diff --git a/README.md b/README.md index 8945644d..d1f4ea0b 100644 --- a/README.md +++ b/README.md @@ -183,12 +183,12 @@ end | NAME | ROLES | Machine | vCPU | Mem | Storage | | -------- | -------------- | ------- | ---- | ----- | --------------- | -| server-1 | cp,etcd,master | kvm-1 | 8 | 34.0G | N/A | -| server-2 | cp,etcd,master | kvm-2 | 8 | 34.0G | N/A | -| server-3 | cp,etcd,master | kvm-1 | 8 | 34.0G | N/A | -| infra-1 | infra,worker | kvm-1 | 6 | 30.0G | 1x4TB CEPH NVME | -| infra-2 | infra,worker | kvm-2 | 6 | 30.0G | 1x4TB CEPH NVME | -| infra-3 | infra,worker | kvm-3 | 6 | 30.0G | 1x4TB CEPH NVME | +| server-1 | cp,etcd,master | kvm-1 | 8 | 35.0G | N/A | +| server-2 | cp,etcd,master | kvm-2 | 8 | 35.0G | N/A | +| server-3 | cp,etcd,master | kvm-1 | 8 | 35.0G | N/A | +| infra-1 | infra,worker | kvm-1 | 6 | 29.0G | 1x4TB CEPH NVME | +| infra-2 | infra,worker | kvm-2 | 6 | 29.0G | 1x4TB CEPH NVME | +| infra-3 | infra,worker | kvm-3 | 6 | 29.0G | 1x4TB CEPH NVME | | worker-1 | worker | kvm-1 | 12 | 57.0G | N/A | | worker-2 | worker | kvm-2 | 12 | 57.0G | N/A | | worker-3 | worker | kvm-3 | 12 | 57.0G | N/A | diff --git a/main.bash b/main.bash index d0a50366..c7f2b2ab 100644 --- a/main.bash +++ b/main.bash @@ -104,6 +104,7 @@ test_overlays_k3s() { fi } stateful_workload_stop() { + kubectl patch cronjobs -n netbox netbox-housekeeping -p '{"spec" : {"suspend" : true }}' kubectl patch cronjobs -n photoprism photoprism-cron -p '{"spec" : {"suspend" : true }}' kubectl patch cronjobs -n nextcloud nextcloud-preview -p '{"spec" : {"suspend" : true }}' kubectl patch cronjobs -n nextcloud nextcloud-rsync -p '{"spec" : {"suspend" : true }}' @@ -195,6 +196,9 @@ stateful_workload_stop() { kubectl scale --replicas=0 -n awx deployment/awx-task kubectl scale --replicas=0 -n awx deployment/awx-web + kubectl scale --replicas=0 -n awx deployment/netbox + kubectl scale --replicas=0 -n awx deployment/netbox-worker + kubectl delete jobs -A --all kubectl delete pipelineruns -A --all } @@ -223,11 +227,14 @@ stateful_workload_start_pre() { kubectl patch postgresCluster photoprism -n postgres --type=merge -p '{"spec":{"shutdown":false}}' kubectl patch postgresCluster stackrox -n stackrox --type=merge -p '{"spec":{"shutdown":false}}' kubectl patch postgresCluster awx -n awx --type=merge -p '{"spec":{"shutdown":false}}' + kubectl patch postgresCluster netbox -n netbox --type=merge -p '{"spec":{"shutdown":false}}' kubectl scale --replicas=1 -n zitadel statefulset/pihole } stateful_workload_start() { + + kubectl patch cronjobs -n netbox netbox-housekeeping -p '{"spec" : {"suspend" : false }}' kubectl patch cronjobs -n photoprism photoprism-cron -p '{"spec" : {"suspend" : false }}' kubectl patch cronjobs -n nextcloud nextcloud-preview -p '{"spec" : {"suspend" : false }}' kubectl patch cronjobs -n nextcloud nextcloud-rsync -p '{"spec" : {"suspend" : false }}' @@ -280,7 +287,8 @@ stateful_workload_start() { kubectl patch postgresCluster nextcloud -n nextcloud --type=merge -p '{"spec":{"shutdown":false}}' kubectl patch postgresCluster photoprism -n postgres --type=merge -p '{"spec":{"shutdown":false}}' kubectl patch postgresCluster stackrox -n stackrox --type=merge -p '{"spec":{"shutdown":false}}' - kubectl patch postgresCluster awx -n awx --type=merge -p '{"spec":{"shutdown":false}}' + kubectl patch postgresCluster awx -n awx --type=merge -p '{"spec":{"shutdown":true}}' + kubectl patch postgresCluster netbox -n netbox --type=merge -p '{"spec":{"shutdown":true}}' kubectl scale --replicas=1 -n argocd deployment/argocd-operator-controller-manager kubectl scale --replicas=1 -n argocd statefulset/argocd-application-controller @@ -300,6 +308,9 @@ stateful_workload_start() { kubectl scale --replicas=1 -n loki-operator deployment/loki-operator-controller-manager kubectl scale --replicas=1 -n awx deployment/awx-operator-controller-manager + kubectl scale --replicas=1 -n awx deployment/netbox + kubectl scale --replicas=1 -n awx deployment/netbox-worker + # echo -e "\nkubectl exec -it vault-0 -n vault -- vault operator unseal --tls-skip-verify" } diff --git a/okd/vm-config.yaml b/okd/vm-config.yaml index 5fac23b9..dfb72a43 100644 --- a/okd/vm-config.yaml +++ b/okd/vm-config.yaml @@ -8,39 +8,39 @@ vm: server-1: host: kvm-1 cpu: 8 - ram: 34816 + ram: 35840 disk: 160 mac: 10:00:00:00:01:01 server-2: host: kvm-2 cpu: 8 - ram: 34816 + ram: 35840 disk: 160 mac: 10:00:00:00:01:02 server-3: host: kvm-3 cpu: 8 - ram: 34816 + ram: 35840 disk: 160 mac: 10:00:00:00:01:03 infra-1: host: kvm-1 cpu: 6 - ram: 30720 + ram: 29696 disk: 160 storage: 8000 mac: 10:00:00:00:01:21 infra-2: host: kvm-2 cpu: 6 - ram: 30720 + ram: 29696 disk: 160 storage: 8000 mac: 10:00:00:00:01:22 infra-3: host: kvm-3 cpu: 6 - ram: 30720 + ram: 29696 disk: 160 storage: 8000 mac: 10:00:00:00:01:23 diff --git a/okd/vms/scripts/infra-1.sh b/okd/vms/scripts/infra-1.sh index fce8a177..a75f3f78 100644 --- a/okd/vms/scripts/infra-1.sh +++ b/okd/vms/scripts/infra-1.sh @@ -4,7 +4,7 @@ export LIBGUESTFS_BACKEND=direct export HOME=/home/arthur export NODE=infra-1 export VCPUS=6 -export RAM_MB=30720 +export RAM_MB=29696 export IMAGE="/home/okd/${NODE}.raw" export IGNITION_CONFIG="/var/lib/libvirt/images/worker.ign" export SIZE="160G" diff --git a/okd/vms/scripts/infra-2.sh b/okd/vms/scripts/infra-2.sh index a34a578e..ad3520b7 100644 --- a/okd/vms/scripts/infra-2.sh +++ b/okd/vms/scripts/infra-2.sh @@ -4,7 +4,7 @@ export LIBGUESTFS_BACKEND=direct export HOME=/home/arthur export NODE=infra-2 export VCPUS=6 -export RAM_MB=30720 +export RAM_MB=29696 export IMAGE="/home/okd/${NODE}.raw" export IGNITION_CONFIG="/var/lib/libvirt/images/worker.ign" export SIZE="160G" diff --git a/okd/vms/scripts/infra-3.sh b/okd/vms/scripts/infra-3.sh index 4c99eb92..e8deac88 100644 --- a/okd/vms/scripts/infra-3.sh +++ b/okd/vms/scripts/infra-3.sh @@ -4,7 +4,7 @@ export LIBGUESTFS_BACKEND=direct export HOME=/home/arthur export NODE=infra-3 export VCPUS=6 -export RAM_MB=30720 +export RAM_MB=29696 export IMAGE="/home/okd/${NODE}.raw" export IGNITION_CONFIG="/var/lib/libvirt/images/worker.ign" export SIZE="160G" diff --git a/okd/vms/scripts/server-1.sh b/okd/vms/scripts/server-1.sh index bfe8fe16..707ec1c5 100644 --- a/okd/vms/scripts/server-1.sh +++ b/okd/vms/scripts/server-1.sh @@ -4,7 +4,7 @@ export LIBGUESTFS_BACKEND=direct export HOME=/home/arthur export NODE=server-1 export VCPUS=8 -export RAM_MB=34816 +export RAM_MB=35840 export IMAGE="/mnt/${NODE}/${NODE}.raw" export IGNITION_CONFIG="/var/lib/libvirt/images/master.ign" export SIZE="160G" diff --git a/okd/vms/scripts/server-2.sh b/okd/vms/scripts/server-2.sh index f7515aa9..d150a752 100644 --- a/okd/vms/scripts/server-2.sh +++ b/okd/vms/scripts/server-2.sh @@ -4,7 +4,7 @@ export LIBGUESTFS_BACKEND=direct export HOME=/home/arthur export NODE=server-2 export VCPUS=8 -export RAM_MB=34816 +export RAM_MB=35840 export IMAGE="/mnt/${NODE}/${NODE}.raw" export IGNITION_CONFIG="/var/lib/libvirt/images/master.ign" export SIZE="160G" diff --git a/okd/vms/scripts/server-3.sh b/okd/vms/scripts/server-3.sh index 4dc629f2..ccd129fc 100644 --- a/okd/vms/scripts/server-3.sh +++ b/okd/vms/scripts/server-3.sh @@ -4,7 +4,7 @@ export LIBGUESTFS_BACKEND=direct export HOME=/home/arthur export NODE=server-3 export VCPUS=8 -export RAM_MB=34816 +export RAM_MB=35840 export IMAGE="/mnt/${NODE}/${NODE}.raw" export IGNITION_CONFIG="/var/lib/libvirt/images/master.ign" export SIZE="160G"