Files
oc-deploy/k8s/start-demo.sh

30 lines
658 B
Bash
Raw Normal View History

2026-01-12 13:35:25 +01:00
#!/bin/bash
2026-02-06 10:27:42 +01:00
mode=${2:-all}
2026-01-27 16:04:45 +01:00
branch=${3:-main}
path=${4:-.}
2026-01-12 13:35:25 +01:00
start=1
2026-01-27 16:04:45 +01:00
end=${1:-1}
2026-01-12 13:35:25 +01:00
2026-02-06 10:27:42 +01:00
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
2026-01-12 13:35:25 +01:00
for ((i=start; i<=end; i++)); do
2026-02-06 10:27:42 +01:00
echo "Run cluster-$i"
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
2026-01-12 13:35:25 +01:00
2026-02-06 10:27:42 +01:00
./start.sh $mode $branch "cluster-$i" $path
2026-01-12 13:35:25 +01:00
2026-02-06 10:27:42 +01:00
sudo cp ~/.kube/config ~/.kube/configCluster$i
sudo chown $(id -u):$(id -g) ~/.kube/configCluster$i
2026-01-27 16:04:45 +01:00
done