mirror of
https://codeberg.org/27/inception-of-things.git
synced 2025-12-31 21:56:41 +01:00
@ -12,9 +12,10 @@ spec:
|
|||||||
destination:
|
destination:
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
namespace: dev
|
namespace: dev
|
||||||
|
name: ''
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
automated:
|
automated:
|
||||||
prune: true
|
prune: true
|
||||||
selfHeal: true
|
selfHeal: true
|
||||||
syncOptions:
|
syncOptions:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
|
|||||||
@ -1,33 +1,42 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
k3d cluster create inception-of-things
|
k3d cluster create inception-of-things
|
||||||
|
|
||||||
|
# Setup a metrics-server to prevent dumb errors
|
||||||
|
# kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
|
||||||
|
# kubectl patch deployment metrics-server -n kube-system --type='json' \
|
||||||
|
# -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-insecure-tls"}]'
|
||||||
|
|
||||||
kubectl create namespace argocd
|
kubectl create namespace argocd
|
||||||
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
||||||
|
|
||||||
echo ArgoCD is starting...
|
echo ">"
|
||||||
|
echo "> ArgoCD is starting (this takes around ~4 minutes)..."
|
||||||
|
echo ">"
|
||||||
|
|
||||||
kubectl wait --namespace argocd \
|
kubectl wait --namespace argocd \
|
||||||
--for=condition=ready pod \
|
--for=condition=ready pod \
|
||||||
--selector=app.kubernetes.io/name=argocd-server \
|
--selector=app.kubernetes.io/name=argocd-server \
|
||||||
--timeout=300s \
|
--timeout=600s
|
||||||
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'
|
echo 'ArgoCD is running'
|
||||||
|
sleep 10
|
||||||
|
|
||||||
SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
|
SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
|
||||||
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
|
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
|
||||||
|
|
||||||
kubectl create namespace dev
|
kubectl create namespace dev
|
||||||
kubectl apply -n argocd -f "$SCRIPT_DIR/../confs/argocd-app.yml"
|
kubectl apply -n argocd -f "$SCRIPT_DIR/../confs/argocd-app.yml"
|
||||||
echo 'App is starting...'
|
echo '>'
|
||||||
|
echo '> App is starting (this takes around ~30 seconds)...'
|
||||||
|
echo '>'
|
||||||
|
|
||||||
kubectl wait --namespace dev \
|
kubectl wait --namespace dev \
|
||||||
--for=condition=ready pod \
|
--for=condition=ready pod \
|
||||||
--selector=app.kubernetes.io/name=app-deployment \
|
--selector=app.kubernetes.io/name=app-deployment \
|
||||||
--timeout=300s
|
--timeout=300s
|
||||||
echo 'App imported in ArgoCD'
|
echo 'App imported in ArgoCD'
|
||||||
|
sleep 10
|
||||||
|
|
||||||
TRAEFIK_IP=$(kubectl get service -n kube-system traefik -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
TRAEFIK_IP=$(kubectl get service -n kube-system traefik -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||||
echo Traefik ip is : $TRAEFIK_IP
|
echo Traefik ip is : $TRAEFIK_IP
|
||||||
@ -40,6 +49,6 @@ echo
|
|||||||
|
|
||||||
echo "=== Login into ArgoCD with: ==="
|
echo "=== Login into ArgoCD with: ==="
|
||||||
echo Username: admin
|
echo Username: admin
|
||||||
ADMIN_PASS=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)
|
echo -n "Password: "
|
||||||
echo Password: \'$ADMIN_PASS\'
|
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
|
||||||
echo "==============================="
|
echo "==============================="
|
||||||
|
|||||||
@ -63,8 +63,8 @@
|
|||||||
set -x
|
set -x
|
||||||
source ${selfPkgs.vm}/bin/run-${hostname}-vm \
|
source ${selfPkgs.vm}/bin/run-${hostname}-vm \
|
||||||
-enable-kvm \
|
-enable-kvm \
|
||||||
-m 4G \
|
-m 6G \
|
||||||
-smp 1 \
|
-smp 2 \
|
||||||
-cpu host \
|
-cpu host \
|
||||||
-virtfs local,path=$(${pkgs.coreutils}/bin/pwd)/..,mount_tag=host0,security_model=mapped-xattr,id=host0
|
-virtfs local,path=$(${pkgs.coreutils}/bin/pwd)/..,mount_tag=host0,security_model=mapped-xattr,id=host0
|
||||||
'';
|
'';
|
||||||
@ -84,6 +84,7 @@
|
|||||||
-m 4G \
|
-m 4G \
|
||||||
-smp 1 \
|
-smp 1 \
|
||||||
-cpu host \
|
-cpu host \
|
||||||
|
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
|
||||||
-virtfs local,path=$(${pkgs.coreutils}/bin/pwd)/..,mount_tag=host0,security_model=mapped-xattr,id=host0
|
-virtfs local,path=$(${pkgs.coreutils}/bin/pwd)/..,mount_tag=host0,security_model=mapped-xattr,id=host0
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
|||||||
Reference in New Issue
Block a user