mirror of
https://codeberg.org/27/inception-of-things.git
synced 2025-12-31 21:56:41 +01:00
29 lines
1.1 KiB
Bash
Executable File
29 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
k3d cluster create inception-of-things
|
|
kubectl create namespace argocd
|
|
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
|
echo ArgoCD is starting...
|
|
kubectl wait --namespace argocd \
|
|
--for=condition=ready pod \
|
|
--selector=app.kubernetes.io/name=argocd-server \
|
|
--timeout=300s \
|
|
1>/dev/null 2>/dev/null
|
|
kubectl port-forward svc/argocd-server -n argocd 8080:443 1>/dev/null 2>/dev/null &
|
|
echo 'ArgoCD is running'
|
|
kubectl create namespace dev
|
|
kubectl apply -n argocd -f ../confs/argocd-app.yml
|
|
echo 'App is starting...'
|
|
kubectl wait --namespace dev \
|
|
--for=condition=ready pod \
|
|
--selector=app.kubernetes.io/name=app-deployment \
|
|
--timeout=300s \
|
|
1>/dev/null 2>/dev/null
|
|
echo 'App imported in ArgoCD'
|
|
TRAEFIK_IP=$(kubectl get service -n kube-system traefik -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
|
echo App is reachable at argo-app.com:8888
|
|
echo Traefik ip is : $TRAEFIK_IP
|
|
echo Login into ArgoCD with:
|
|
echo Username: admin
|
|
ADMIN_PASS=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)
|
|
echo Password: \'$ADMIN_PASS\' |