From 1aadca306c9fc1e1947a4b0c35581ee664f0acd1 Mon Sep 17 00:00:00 2001 From: Scott Prutton Date: Wed, 26 Jun 2024 11:23:30 -0400 Subject: [PATCH] chore: update userdata example to include dockerhub login --- bin/veritech/scripts/userdata.sh | 3 +++ component/deploy/userdata | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bin/veritech/scripts/userdata.sh b/bin/veritech/scripts/userdata.sh index 02b8429211..9689fb675d 100644 --- a/bin/veritech/scripts/userdata.sh +++ b/bin/veritech/scripts/userdata.sh @@ -73,6 +73,9 @@ wget https://artifacts.systeminit.com/${SI_SERVICE}/${SI_VERSION}/omnibus/linux/ # prep system mkdir -p /run/app + +DOCKER_CREDS=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id ${SI_HOSTENV}-dockerhub-creds | jq -r '.SecretString') +docker login --username $(echo $DOCKER_CREDS | jq -r '.username') --password-stdin <<< $(echo $DOCKER_CREDS | jq -r '.password') wget https://raw.githubusercontent.com/systeminit/si/${BRANCH:-main}/component/deploy/docker-compose.yaml -O /run/app/docker-compose.yaml docker-compose -f /run/app/docker-compose.yaml --profile $SI_SERVICE up --wait diff --git a/component/deploy/userdata b/component/deploy/userdata index ad92cd684e..2c522fa832 100644 --- a/component/deploy/userdata +++ b/component/deploy/userdata @@ -22,6 +22,9 @@ wget https://artifacts.systeminit.com/${SI_SERVICE}/${SI_VERSION}/omnibus/linux/ # prep system mkdir -p /run/app + +DOCKER_CREDS=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id ${SI_HOSTENV}-dockerhub-creds | jq -r '.SecretString') +docker login --username $(echo $DOCKER_CREDS | jq -r '.username') --password-stdin <<< $(echo $DOCKER_CREDS | jq -r '.password') wget https://raw.githubusercontent.com/systeminit/si/${BRANCH:-main}/component/deploy/docker-compose.yaml -O /run/app/docker-compose.yaml docker-compose -f /run/app/docker-compose.yaml --profile $SI_SERVICE up --wait