Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jasonmadigan/662e80142e5547d9d61d3646645351a7 to your computer and use it in GitHub Desktop.
Save jasonmadigan/662e80142e5547d9d61d3646645351a7 to your computer and use it in GitHub Desktop.
Base setup for MGC install guide
#!/bin/bash
make local-setup-mgc
make local-setup-kind OCM_SINGLE=true
./bin/clusteradm init --bundle-version='0.11.0' --wait --context kind-mgc-control-plane
hub_token=$(./bin/clusteradm get token --context kind-mgc-control-plane -o=json | jq -r '."hub-token"')
hub_apiserver=$(./bin/clusteradm get token --context kind-mgc-control-plane -o=json | jq -r '."hub-apiserver"')
./bin/clusteradm join kind-mgc-control-plane --hub-token ${hub_token} --hub-apiserver ${hub_apiserver} --cluster-name kind-mgc-control-plane --bundle-version='0.11.0' --force-internal-endpoint-lookup --context kind-mgc-control-plane --feature-gates=RawFeedbackJsonString=true
max_retry=18
counter=0
until ./bin/clusteradm accept --clusters kind-mgc-control-plane --context kind-mgc-control-plane; do
[[ counter -eq $max_retry ]] && echo "Failed!" && exit 1
echo "Try #$counter failed. Retrying in 5 seconds..."
((++counter))
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment