fabric-samples/full-stack-asset-transfer-guide/infrastructure/ec2-cloud-config.yaml
jkneubuh a299e18e26
Moves the Full Stack Asset Transfer Development Guide to fabric-samples (#852)
* Import Full Stack Asset Transfer Guide at commit fb554befdbbeff9e69159b54fce0b811603f29c7

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* Update the workshop with a new WORKSHOP_PATH under fabric-samples

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* Update the workshop with a new WORKSHOP_PATH under fabric-samples

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* missed a .git ignored directory on add

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* Updates to run the workshop on the Apple M1

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* Workaround for https://github.com/eslint/eslint/issues/15299 in the contract tslinter

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* Build an arch-specific CC images on M1

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* empty commit - force a build

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* revert an accidental commit that was building the top-level asset-transfer as arm64

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
2022-11-10 10:40:27 -05:00

59 lines
2.1 KiB
YAML

#cloud-config
write_files:
- path: /config/provision-root.sh
permissions: '0744'
content: |
#!/usr/bin/env bash
set -ex
# set -o errexit
# set -o pipefail
# APT setup for kubectl
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
# Install kubectl
apt-get -y --no-upgrade install kubectl
# Install yq
YQ_VERSION=4.23.1
if [ ! -x "/usr/local/bin/yq" ]; then
curl --fail --silent --show-error -L "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_amd64" -o /usr/local/bin/yq
chmod 755 /usr/local/bin/yq
fi
# Install kind
KIND_VERSION=0.14.0
if [ ! -x "/usr/local/bin/kind" ]; then
curl --fail --silent --show-error -L "https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64" -o /usr/local/bin/kind
chmod 755 /usr/local/bin/kind
fi
# Install k9s
K9S_VERSION=0.25.3
if [ ! -x "/usr/local/bin/k9s" ]; then
curl --fail --silent --show-error -L "https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_x86_64.tar.gz" -o "/tmp/k9s_Linux_x86_64.tar.gz"
tar -zxf "/tmp/k9s_Linux_x86_64.tar.gz" -C /usr/local/bin k9s
chown root:root /usr/local/bin/k9s
chmod 755 /usr/local/bin/k9s
fi
# Install just
JUST_VERSION=1.2.0
if [ ! -x "/usr/local/bin/just" ]; then
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --tag ${JUST_VERSION} --to /usr/local/bin
chown root:root /usr/local/bin/just
chmod 755 /usr/local/bin/just
fi
runcmd:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
- add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- apt-get update -y
- apt-get install -y docker.io
- usermod -a -G docker ubuntu
- apt-get install -y jq
- /config/provision-root.sh
final_message: "The system is finally up, after $UPTIME seconds"