diff --git a/README.md b/README.md index 260c92376..137d66284 100644 --- a/README.md +++ b/README.md @@ -51,18 +51,20 @@ If you're looking for a managed service, you can get started with just few clicks, visit [netmaker.io](https://account.netmaker.io) to create your netmaker server. -# Self-Hosted Quick Start +# Self-Hosted Open Source Quick Start These are the instructions for deploying a Netmaker server on your own cloud VM as quickly as possible. For more detailed instructions, visit the [Install Docs](https://docs.netmaker.io/docs/server-installation/quick-install#quick-install-script). 1. Get a cloud VM with Ubuntu 22.04 and a public IP. 2. Open ports 443, 80, 3479, 8089 and 51821-51830/udp on the VM firewall and in cloud security settings. 3. (recommended) Prepare DNS - Set a wildcard subdomain in your DNS settings for Netmaker, e.g. *.netmaker.example.com, which points to your VM's public IP. -4. Run the script: +4. Run the script to setup open source version of Netmaker: + +`sudo wget -qO /root/nm-quick.sh https://raw.githubusercontent.com/gravitl/netmaker/master/scripts/nm-quick.sh && sudo chmod +x /root/nm-quick.sh && sudo /root/nm-quick.sh` + +**
To Install Self-Hosted PRO Version - https://docs.netmaker.io/docs/server-installation/netmaker-professional-setup
** -`sudo wget -qO /root/nm-quick.sh https://raw.githubusercontent.com/gravitl/netmaker/master/scripts/nm-quick.sh && sudo chmod +x /root/nm-quick.sh && sudo /root/nm-quick.sh` -This script by default installs PRO version with 14-day trial, check out these instructions for post trial period https://docs.netmaker.io/docs/server-installation/quick-install#after-the-trial-period-ends. It also gives you the option to use your own domain (recommended) or an auto-generated domain.

diff --git a/pro/initialize.go b/pro/initialize.go index 8d0c005cd..f6ae65670 100644 --- a/pro/initialize.go +++ b/pro/initialize.go @@ -38,12 +38,12 @@ func InitPro() { controller.ListRoles = proControllers.ListRoles logic.EnterpriseCheckFuncs = append(logic.EnterpriseCheckFuncs, func() { // == License Handling == - enableLicenseHook := false - licenseKeyValue := servercfg.GetLicenseKey() - netmakerTenantID := servercfg.GetNetmakerTenantID() - if licenseKeyValue != "" && netmakerTenantID != "" { - enableLicenseHook = true - } + enableLicenseHook := true + // licenseKeyValue := servercfg.GetLicenseKey() + // netmakerTenantID := servercfg.GetNetmakerTenantID() + // if licenseKeyValue != "" && netmakerTenantID != "" { + // enableLicenseHook = true + // } if !enableLicenseHook { err := initTrial() if err != nil { diff --git a/scripts/nm-quick.sh b/scripts/nm-quick.sh index 473242520..232eb3f02 100755 --- a/scripts/nm-quick.sh +++ b/scripts/nm-quick.sh @@ -167,12 +167,12 @@ configure_netclient() { nmctl host update $HOST_ID --default sleep 5 nmctl node create_remote_access_gateway netmaker $NODE_ID - #setup failOver - sleep 5 - curl --location --request POST "https://api.${NETMAKER_BASE_DOMAIN}/api/v1/node/${NODE_ID}/failover" --header "Authorization: Bearer ${MASTER_KEY}" + sleep 2 # create network for internet access vpn if [ "$INSTALL_TYPE" = "pro" ]; then + #setup failOver + curl --location --request POST "https://api.${NETMAKER_BASE_DOMAIN}/api/v1/node/${NODE_ID}/failover" --header "Authorization: Bearer ${MASTER_KEY}" INET_NODE_ID=$(sudo cat /etc/netclient/nodes.json | jq -r '."internet-access-vpn".id') nmctl node create_remote_access_gateway internet-access-vpn $INET_NODE_ID out=$(nmctl node list -o json | jq -r '.[] | select(.id=='\"$INET_NODE_ID\"') | .ingressdns = "8.8.8.8"') @@ -181,7 +181,6 @@ configure_netclient() { curl --location --request PUT "https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/internet-access-vpn/${INET_NODE_ID}" --data "$out" --header "Authorization: Bearer ${MASTER_KEY}" curl --location --request POST "https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/internet-access-vpn/${INET_NODE_ID}/inet_gw" --data '{}' --header "Authorization: Bearer ${MASTER_KEY}" fi - set -e } @@ -593,52 +592,11 @@ set_install_vars() { done fi wait_seconds 1 - unset GET_MQ_USERNAME - unset GET_MQ_PASSWORD - unset CONFIRM_MQ_PASSWORD - echo "Enter Credentials For MQ..." - - read -p "MQ Username (click 'enter' to use 'netmaker'): " GET_MQ_USERNAME - if [ -z "$GET_MQ_USERNAME" ]; then - echo "using default username for mq" - MQ_USERNAME="netmaker" - else - MQ_USERNAME="$GET_MQ_USERNAME" - fi - - if test -z "$MQ_PASSWORD"; then - MQ_PASSWORD=$( + MQ_USERNAME="netmaker" + MQ_PASSWORD=$( tr -dc A-Za-z0-9