mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-10 17:48:25 +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
|
||||
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.
|
||||
|
||||
|
|
|
@ -351,7 +351,7 @@ done
|
|||
|
||||
setup_mesh() {( set -e
|
||||
|
||||
wait_seconds 5
|
||||
wait_seconds 15
|
||||
|
||||
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
|
||||
do
|
||||
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)
|
||||
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 " Exiting..."
|
||||
exit 1
|
||||
elif [ -z "$SERVER_ID" ]; then
|
||||
echo " server node not yet configured, retrying..."
|
||||
else
|
||||
elif [[ ! -z "$SERVER_ID" ]]; then
|
||||
echo " server node is now availble, continuing"
|
||||
break
|
||||
fi
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue