feat(scripts): add script to wait for important services to reach heathy state

This commit is contained in:
Khue Doan 2021-11-30 00:08:27 +07:00
parent 03ac8ebc7d
commit 3f8515c0dc
4 changed files with 25 additions and 0 deletions

7
scripts/argocd-admin-login Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
argocd login \
argocd.khuedoan.com \
--username admin \
--password "$(./scripts/argocd-admin-password)" \
--insecure # TODO Remove insecure login

17
scripts/wait-for-apps Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
set -eu
echo "Waiting for important services to reach heathy state"
until argocd app wait \
argocd \
gitea \
hajimari \
ingress-nginx \
longhorn-system \
metallb-system \
> /dev/null
do
sleep 3
done

View File

@ -12,6 +12,7 @@ RUN pacman --sync --refresh --noconfirm \
RUN yes | pacman --sync --refresh \
ansible \
ansible-lint \
argocd \
diffutils \
docker \
docker-compose \