feat: init cloudmon dashboard mit d3.js mindmap
All checks were successful
cloudmon GitOps Deploy / build-and-deploy (push) Successful in 42s
All checks were successful
cloudmon GitOps Deploy / build-and-deploy (push) Successful in 42s
This commit is contained in:
parent
5bb1e0f0d2
commit
cf5e520f2b
1 changed files with 58 additions and 0 deletions
58
.github/workflows/deploy.yml
vendored
Normal file
58
.github/workflows/deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
name: cloudmon GitOps Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Trust Local Nginx Certificate Inside Container
|
||||||
|
run: |
|
||||||
|
mkdir -p /usr/local/share/ca-certificates/
|
||||||
|
cp nginx_ssl/nginx.crt /usr/local/share/ca-certificates/nginx-sandbox.crt 2>/dev/null || echo "Nutze Workspace-Zertifikat"
|
||||||
|
update-ca-certificates
|
||||||
|
|
||||||
|
# Nutzt dein PAT für den schnellen, unkomplizierten Push via localhost:3005
|
||||||
|
- name: Log in to Local Registry
|
||||||
|
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login localhost:3005 -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
|
# Baut das schlanke Python-Image für das Dashboard
|
||||||
|
- name: Build Dashboard Image
|
||||||
|
run: |
|
||||||
|
docker build -t localhost:3005/${{ github.repository }}:${{ github.sha }} .
|
||||||
|
docker build -t localhost:3005/${{ github.repository }}:latest .
|
||||||
|
|
||||||
|
# Schiebt das Image über das unverschlüsselte Socket-Tor hoch
|
||||||
|
- name: Push Dashboard Image
|
||||||
|
run: |
|
||||||
|
docker push localhost:3005/${{ github.repository }}:${{ github.sha }}
|
||||||
|
docker push localhost:3005/${{ github.repository }}:latest
|
||||||
|
|
||||||
|
# Bereitet die echten K3s-Schlüssel aus dem automatischen Secret vor
|
||||||
|
- name: Prepare Kubernetes Access
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.KUBECONFIG_DATA }}" > ./kind_kubeconfig
|
||||||
|
chmod 600 ./kind_kubeconfig
|
||||||
|
|
||||||
|
# Bereinigt alte Reste und zündet das dezentrale Terraform-Zentral-Binary
|
||||||
|
- name: Terraform Deploy
|
||||||
|
run: |
|
||||||
|
docker exec local-k3s-platform kubectl delete deployment cloudmon service cloudmon-service ingress-v1 cloudmon-ingress -n default --ignore-not-found=true 2>/dev/null || true
|
||||||
|
|
||||||
|
terraform init
|
||||||
|
terraform apply -auto-approve -var="app_version=${{ github.sha }}"
|
||||||
|
|
||||||
|
- name: Verify Dashboard Health
|
||||||
|
run: |
|
||||||
|
echo "Warte auf die cloudmon-Pods und das Ingress-Routing..."
|
||||||
|
sleep 10
|
||||||
|
# Testet den Zugriff mit dem passenden Host-Header über das interne Netz
|
||||||
|
curl --fail --connect-timeout 5 -H "Host: cloudmon.local" http://local-k3s-platform:80/ || exit 1
|
||||||
|
echo "Erfolg: Das Boday-IT cloudmon Dashboard läuft fehlerfrei im Cluster!"
|
||||||
Loading…
Reference in a new issue