mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-11 23:54:22 +08:00
Merge pull request #1801 from gravitl/hotfix_v0.17.0_interactive_script
Hotfix v0.17.0 interactive script
This commit is contained in:
commit
527b342919
2 changed files with 12 additions and 6 deletions
|
@ -57,7 +57,7 @@
|
||||||
3. (optional) Prepare DNS - Set a wildcard subdomain in your DNS for Netmaker, e.g. *.netmaker.example.com
|
3. (optional) Prepare DNS - Set a wildcard subdomain in your DNS for Netmaker, e.g. *.netmaker.example.com
|
||||||
4. Run the script:
|
4. Run the script:
|
||||||
|
|
||||||
`sudo wget -qO /root/nm-quick-interactive.sh https://raw.githubusercontent.com/gravitl/netmaker/v0.17.0/scripts/nm-quick-interactive.sh && sudo chmod +x /root/nm-quick-interactive.sh && sudo /root/nm-quick-interactive.sh`
|
`sudo wget -qO /root/nm-quick-interactive.sh https://raw.githubusercontent.com/gravitl/netmaker/master/scripts/nm-quick-interactive.sh && sudo chmod +x /root/nm-quick-interactive.sh && sudo /root/nm-quick-interactive.sh`
|
||||||
|
|
||||||
This script gives you the option to deploy the Community or Enterprise version of Netmaker. If deploying Enterprise, you get a free account with a 50 node limit by default. It also gives you the option to use your own domain (recommended) or an auto-generated domain.
|
This script gives you the option to deploy the Community or Enterprise version of Netmaker. If deploying Enterprise, you get a free account with a 50 node limit by default. It also gives you the option to use your own domain (recommended) or an auto-generated domain.
|
||||||
|
|
||||||
|
|
|
@ -351,7 +351,7 @@ done
|
||||||
|
|
||||||
setup_mesh() {( set -e
|
setup_mesh() {( set -e
|
||||||
|
|
||||||
wait_seconds 5
|
wait_seconds 15
|
||||||
|
|
||||||
echo "Creating netmaker network (10.101.0.0/16)"
|
echo "Creating netmaker network (10.101.0.0/16)"
|
||||||
|
|
||||||
|
@ -371,23 +371,29 @@ echo "Configuring netmaker server as ingress gateway"
|
||||||
for i in 1 2 3 4 5 6
|
for i in 1 2 3 4 5 6
|
||||||
do
|
do
|
||||||
echo " waiting for server node to become available"
|
echo " waiting for server node to become available"
|
||||||
wait_seconds 5
|
wait_seconds 10
|
||||||
curlresponse=$(curl -s -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/netmaker)
|
curlresponse=$(curl -s -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/netmaker)
|
||||||
SERVER_ID=$(jq -r '.[0].id' <<< ${curlresponse})
|
SERVER_ID=$(jq -r '.[0].id' <<< ${curlresponse})
|
||||||
if [[ "$i" == 6 && -z "$SERVER_ID" ]]; then
|
echo " Server ID: $SERVER_ID"
|
||||||
|
if [ $SERVER_ID == "null" ]; then
|
||||||
|
SERVER_ID=""
|
||||||
|
fi
|
||||||
|
if [[ "$i" -ge "6" && -z "$SERVER_ID" ]]; then
|
||||||
echo " Netmaker is having issues configuring itself, please investigate (docker logs netmaker)"
|
echo " Netmaker is having issues configuring itself, please investigate (docker logs netmaker)"
|
||||||
echo " Exiting..."
|
echo " Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
elif [ -z "$SERVER_ID" ]; then
|
elif [ -z "$SERVER_ID" ]; then
|
||||||
echo " server node not yet configured, retrying..."
|
echo " server node not yet configured, retrying..."
|
||||||
else
|
elif [[ ! -z "$SERVER_ID" ]]; then
|
||||||
echo " server node is now availble, continuing"
|
echo " server node is now availble, continuing"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
curl -o /dev/null -s -X POST -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/netmaker/$SERVER_ID/createingress
|
|
||||||
|
|
||||||
|
if [[ ! -z "$SERVER_ID" ]]; then
|
||||||
|
curl -o /dev/null -s -X POST -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/netmaker/$SERVER_ID/createingress
|
||||||
|
fi
|
||||||
)}
|
)}
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
Loading…
Add table
Reference in a new issue