demo-cluster-install #54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: demo-cluster-install | |
| permissions: | |
| contents: read | |
| on: workflow_dispatch | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| runner: [ubuntu-24.04, ubuntu-24.04-arm] | |
| runs-on: ${{ matrix.runner }} | |
| name: test-${{ matrix.runner }} | |
| steps: | |
| - name: Install deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --yes libssl-dev | |
| - name: Run | |
| run: | | |
| curl -o install-cluster.sh https://octelium.com/install-cluster.sh | |
| sudo chmod +x install-cluster.sh | |
| sudo ./install-cluster.sh --domain localhost | |
| sudo chmod 644 /etc/rancher/k3s/k3s.yaml | |
| export KUBECONFIG="/etc/rancher/k3s/k3s.yaml" | |
| kubectl wait --for=condition=available deployment/svc-default-octelium-api --namespace octelium --timeout=600s | |
| kubectl wait --for=condition=available deployment/svc-auth-octelium-api --namespace octelium --timeout=600s | |
| kubectl wait --for=condition=available deployment/octelium-ingress-dataplane --namespace octelium --timeout=600s | |
| kubectl wait --for=condition=available deployment/octelium-ingress --namespace octelium --timeout=600s | |
| curl -k --fail --retry 10 --retry-delay 1 --max-time 2 https://localhost | |
| ./install-cluster.sh --uninstall | |
| - name: Run NAT | |
| run: | | |
| curl -o install-cluster.sh https://octelium.com/install-cluster.sh | |
| sudo chmod +x install-cluster.sh | |
| export OCTELIUM_AUTH_TOKEN_SAVE_PATH="/tmp/octelium-auth-token" | |
| # export OCTELIUM_SKIP_MESSAGES="true" | |
| sudo -E ./install-cluster.sh --domain localhost --nat --force-machine-ip | |
| sudo chmod 644 /etc/rancher/k3s/k3s.yaml | |
| sudo chmod 644 $OCTELIUM_AUTH_TOKEN_SAVE_PATH | |
| export KUBECONFIG="/etc/rancher/k3s/k3s.yaml" | |
| kubectl wait --for=condition=available deployment/svc-default-octelium-api --namespace octelium --timeout=600s | |
| kubectl wait --for=condition=available deployment/svc-auth-octelium-api --namespace octelium --timeout=600s | |
| kubectl wait --for=condition=available deployment/octelium-ingress-dataplane --namespace octelium --timeout=600s | |
| kubectl wait --for=condition=available deployment/octelium-ingress --namespace octelium --timeout=600s | |
| curl -k --fail --retry 10 --retry-delay 1 --max-time 2 https://localhost | |
| export OCTELIUM_INSECURE_TLS=true | |
| export OCTELIUM_DOMAIN=localhost | |
| AUTH_TOKEN=$(cat $OCTELIUM_AUTH_TOKEN_SAVE_PATH) | |
| USER_NAME="$(id -un)" | |
| sudo chown -R "$USER_NAME":"$USER_NAME" /home/$USER_NAME | |
| octelium login --domain localhost --auth-token $AUTH_TOKEN | |
| octelium status | |
| octelium connect -p demo-nginx:9090 & | |
| sleep 3 | |
| curl --fail --retry 10 --retry-delay 1 --max-time 2 http://localhost:9090 |