oc-deploy can now deploy Demo

This commit is contained in:
mr
2026-02-06 10:27:42 +01:00
parent 90691a5ec7
commit cbf32fff48
11 changed files with 1364 additions and 600 deletions

View File

@@ -1,22 +1,30 @@
#!/bin/bash
mode=${2:-demo}
mode=${2:-all}
branch=${3:-main}
path=${4:-.}
port=${5:-80}
portTLS=${6:-443}
start=1
end=${1:-1}
cp $HOME/.kube/config $HOME/.kube/config_past
curl -L -o oc-k8s https://cloud.o-forge.io/core/oc-k8s/raw/branch/main/cmd/oc-k8s
sudo cp ./oc-k8s /usr/local/bin
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl fs.inotify.max_user_instances=512
echo "Install oc-k8s"
oc-k8s install
cp ~/.kube/config ~/.kube/config_past
for ((i=start; i<=end; i++)); do
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
echo "Run cluster-$i"
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
./start.sh $mode $branch "cluster-$i" $path $port $portTLS
./start.sh $mode $branch "cluster-$i" $path
sudo cp $HOME/.kube/config $HOME/.kube/configCluster$i
sudo chown $(id -u):$(id -g) $HOME/.kube/configCluster$i
export KUBECONFIG="$HOME/.kube/configCluster$i"
sudo cp ~/.kube/config ~/.kube/configCluster$i
sudo chown $(id -u):$(id -g) ~/.kube/configCluster$i
done