Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/bootstraps/core/graphistry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ echo
./prepopulate-notebooks.sh graph-app-kit/public views ubuntu
./prepopulate-notebooks.sh graph-app-kit/private views ubuntu
./graphistry-wait-healthy.sh
./swap-caddy.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think almost all of this file can go away as Graphistry has gak pub/priv built in, in unclear what's left here?

source ./graphistry-service-account.sh
echo "Got SERVICE_USER ${SERVICE_USER}, SERVICE_PASS"

Expand Down Expand Up @@ -65,4 +64,4 @@ echo '----- Launching graph-app-kit as streamlit-pub/priv:8501'
&& sudo docker-compose -p priv run -d --name streamlit-priv streamlit \
)

./hello-end.sh "$SCRIPT"
./hello-end.sh "$SCRIPT"
13 changes: 10 additions & 3 deletions src/bootstraps/scripts/cloudformation-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ SCRIPT="Installing CloudFormation Bootstrap"
./hello-start.sh "$SCRIPT"

sudo apt-get update -y
sudo apt-get install -y python-pip python-setuptools
sudo apt-get install -y python3-pip python-setuptools
sudo mkdir -p /opt/aws/bin
sudo python /usr/lib/python2.7/dist-packages/easy_install.py --script-dir /opt/aws/bin https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz
#sudo python /usr/lib/python2.7/dist-packages/easy_install.py --script-dir /opt/aws/bin https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz
sudo wget -O /opt/aws-cfn-bootstrap-py3-latest.tar.gz https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz

./hello-end.sh "$SCRIPT"
sudo tar zxvf aws-cfn-bootstrap-py3-latest.tar.gz

sudo ln -s /opt/aws-cfn-bootstrap-2.0/init/ubuntu/cfn-hup /etc/init.d/cfn-hup

pip3 install aws-cfn-bootstrap-py3-latest.tar.gz

./hello-end.sh "$SCRIPT"
4 changes: 2 additions & 2 deletions src/bootstraps/scripts/docker-aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ sudo chkconfig docker on

sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose version
docker compose version

./hello-end.sh "$SCRIPT"
./hello-end.sh "$SCRIPT"
4 changes: 2 additions & 2 deletions src/bootstraps/scripts/docker-container-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
set -ex

SCRIPT="Build graph-app-kit docker"
DC_ALIAS=${DC_ALIAS:-docker-compose}
DC_ALIAS=${DC_ALIAS:-docker compose}
./hello-start.sh "$SCRIPT"

( cd ../../docker && $DC_ALIAS build )

./hello-end.sh "$SCRIPT"
./hello-end.sh "$SCRIPT"
6 changes: 3 additions & 3 deletions src/bootstraps/scripts/graphistry-service-account.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SCRIPT="Get AWS Instance ID"
cd "${GRAPHISTRY_HOME}" \
&& ( \
until ( curl -fsS http://localhost/streamgl-gpu/secondary/gpu/health > /dev/null ); \
do ( docker-compose ps && sleep 1 ); \
do ( docker compose ps && sleep 1 ); \
done \
)
)
Expand All @@ -24,9 +24,9 @@ POST_SCRIPT="CELERY_BROKER_URL=zz python manage.py shell && echo done || { echo

( \
cd "${GRAPHISTRY_HOME}" \
&& docker-compose exec -T nexus \
&& docker compose exec -T nexus \
bash -c \
"source activate rapids && echo \"${ADD_USER_SCRIPT}; ${VERIFY_USER_SCRIPT}\" | ${POST_SCRIPT}" \
)

./hello-end.sh "$SCRIPT"
./hello-end.sh "$SCRIPT"
10 changes: 5 additions & 5 deletions src/bootstraps/scripts/graphistry-wait-healthy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ SCRIPT="Wait Graphistry docker containers healthy"

( \
cd "${GRAPHISTRY_HOME}" \
&& for i in `sudo docker-compose ps --services`; do ( \
&& for i in `sudo docker compose ps --services`; do ( \
( \
until ( \
[[ '"healthy"' == $(sudo docker inspect "graphistry_${i}_1" --format "{{json .State.Health.Status}}") ]] \
[[ '"healthy"' == $(sudo docker inspect "graphistry-${i}-1" --format "{{json .State.Health.Status}}") ]] \
); do ( \
echo "waiting on $i (5s)" \
&& sudo docker-compose ps \
&& sudo docker compose ps \
&& sleep 5 \
); done \
) && echo "healthy $i" \
); done \
)

echo "--- Graphistry status after healthy waiting ---"
( cd "${GRAPHISTRY_HOME}" && sudo docker-compose ps )
( cd "${GRAPHISTRY_HOME}" && sudo docker compose ps )

./hello-end.sh "$SCRIPT"
./hello-end.sh "$SCRIPT"
14 changes: 7 additions & 7 deletions src/bootstraps/scripts/swap-caddy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
set -ex

## Graphistry now uses Caddy2, and until Caddy 2 supports simple auth, g-a-k still sticks with Caddy1
## ... So we stop Graphistry's Caddy 2 and put in a docker-compose of its old
## ... So we stop Graphistry's Caddy 2 and put in a docker compose of its old

CADDY_FILENAME=${CADDY_FILENAME:-full.Caddyfile}
CADDY_COMPOSE_FILENAME=${CADDY_COMPOSE_FILENAME:-docker-compose.gak.graphistry.yml}
CADDY_COMPOSE_FILENAME=${CADDY_COMPOSE_FILENAME:-docker compose.gak.graphistry.yml}

SCRIPT="Swap Caddyfile"
./hello-start.sh "$SCRIPT"
Expand All @@ -16,10 +16,10 @@ sudo cp "../../caddy/${CADDY_COMPOSE_FILENAME}" "${GRAPHISTRY_HOME}/${CADDY_COMP
sudo cp "../../caddy/${CADDY_FILENAME}" "${GRAPHISTRY_HOME}/data/config/Caddyfile"
( \
cd "${GRAPHISTRY_HOME}" \
&& sudo docker-compose stop caddy \
&& sudo docker-compose -f "${CADDY_COMPOSE_FILENAME}" up -d caddy \
&& sudo docker-compose ps \
&& sudo docker-compose -f "${CADDY_COMPOSE_FILENAME}" ps \
&& sudo docker compose stop caddy \
&& sudo docker compose -f "${CADDY_COMPOSE_FILENAME}" up -d caddy \
&& sudo docker compose ps \
&& sudo docker compose -f "${CADDY_COMPOSE_FILENAME}" ps \
)

./hello-end.sh "$SCRIPT"
./hello-end.sh "$SCRIPT"