mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
- Node latest LTS - Go latest stable - Fabric 2.5.14, 3.1.3 - Just 1.43.0 - k9s 0.50.15 - Kind 0.30.0 - yq 4.48.1 - nvm 0.40.3 This addresses build breakages due to back-level versions. Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
59 lines
2.1 KiB
YAML
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_amd64.tar.gz" -o "/tmp/k9s_Linux_amd64.tar.gz"
|
|
tar -zxf "/tmp/k9s_Linux_amd64.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"
|