Nm quick ee instructions update (#2441)

* updated instructions and fix exp env vars

* Tenant ID for clarity

* and

* changed account id to tenant id

* struct field to tenant & references to field

* fix local variables
This commit is contained in:
Christopher Blaha 2023-07-12 22:53:34 -04:00 committed by GitHub
parent fd58499312
commit dd7e553472
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 21 deletions

View file

@ -71,7 +71,7 @@ type ServerConfig struct {
MetricsExporter string `yaml:"metrics_exporter"`
BasicAuth string `yaml:"basic_auth"`
LicenseValue string `yaml:"license_value"`
NetmakerAccountID string `yaml:"netmaker_account_id"`
NetmakerTenantID string `yaml:"netmaker_tenant_id"`
IsEE string `yaml:"is_ee"`
StunPort int `yaml:"stun_port"`
StunList string `yaml:"stun_list"`

View file

@ -48,9 +48,9 @@ func AddLicenseHooks() {
// if license is not valid, server should terminate
func ValidateLicense() error {
licenseKeyValue := servercfg.GetLicenseKey()
netmakerAccountID := servercfg.GetNetmakerAccountID()
netmakerTenantID := servercfg.GetNetmakerTenantID()
logger.Log(0, "proceeding with Netmaker license validation...")
if len(licenseKeyValue) == 0 || len(netmakerAccountID) == 0 {
if len(licenseKeyValue) == 0 || len(netmakerTenantID) == 0 {
logger.FatalLog0(errValidation.Error())
}
@ -65,7 +65,7 @@ func ValidateLicense() error {
}
licenseSecret := LicenseSecret{
AssociatedID: netmakerAccountID,
AssociatedID: netmakerTenantID,
Limits: getCurrentServerLimit(),
}

View file

@ -15,7 +15,7 @@ MQ_USERNAME=
# The password to set for MQ access
MQ_PASSWORD=
INSTALL_TYPE=
NETMAKER_ACCOUNT_ID=
NETMAKER_TENANT_ID=
LICENSE_KEY=
SERVER_IMAGE_TAG=
UI_IMAGE_TAG=

View file

@ -120,7 +120,7 @@ set_buildinfo() {
elif [ -z "$INSTALL_TYPE" ]; then
echo "-----------------------------------------------------"
echo "Would you like to install Netmaker Community Edition (CE), or Netmaker Enterprise Edition (EE)?"
echo "EE will require you to create an account at https://dashboard.license.netmaker.io"
echo "EE will require you to create an account at https://app.netmaker.io"
echo "-----------------------------------------------------"
select install_option in "Community Edition" "Enterprise Edition"; do
case $REPLY in
@ -291,7 +291,7 @@ save_config() { (
fi
# version-specific entries
if [ "$INSTALL_TYPE" = "ee" ]; then
save_config_item NETMAKER_ACCOUNT_ID "$ACCOUNT_ID"
save_config_item NETMAKER_TENANT_ID "$TENANT_ID"
save_config_item LICENSE_KEY "$LICENSE_KEY"
save_config_item METRICS_EXPORTER "on"
save_config_item PROMETHEUS "on"
@ -307,7 +307,7 @@ save_config() { (
fi
# copy entries from the previous config
local toCopy=("SERVER_HOST" "MASTER_KEY" "TURN_USERNAME" "TURN_PASSWORD" "MQ_USERNAME" "MQ_PASSWORD"
"INSTALL_TYPE" "NODE_ID" "METRICS_EXPORTER" "PROMETHEUS" "DNS_MODE" "NETCLIENT_AUTO_UPDATE" "API_PORT"
"INSTALL_TYPE" "NODE_ID" "DNS_MODE" "NETCLIENT_AUTO_UPDATE" "API_PORT"
"CORS_ALLOWED_ORIGIN" "DISPLAY_KEYS" "DATABASE" "SERVER_BROKER_ENDPOINT" "STUN_PORT" "VERBOSITY"
"DEFAULT_PROXY_MODE" "TURN_PORT" "USE_TURN" "DEBUG_MODE" "TURN_API_PORT" "REST_BACKEND"
"DISABLE_REMOTE_IP_CHECK" "NETCLIENT_ENDPOINT_DETECTION" "TELEMETRY" "AUTH_PROVIDER" "CLIENT_ID" "CLIENT_SECRET"
@ -565,18 +565,18 @@ set_install_vars() {
echo "-----------------------------------------------------"
echo "Provide Details for EE installation:"
echo " 1. Log into https://dashboard.license.netmaker.io"
echo " 2. Copy License Key Value: https://dashboard.license.netmaker.io/license-keys"
echo " 3. Retrieve Account ID: https://dashboard.license.netmaker.io/user"
echo " 1. Log into https://app.netmaker.io"
echo " 2. follow instructions to get a license at: https://docs.netmaker.io/ee/ee-setup.html"
echo " 3. Retrieve License and Tenant ID"
echo " 4. note email address"
echo "-----------------------------------------------------"
unset LICENSE_KEY
while [ -z "$LICENSE_KEY" ]; do
read -p "License Key: " LICENSE_KEY
done
unset ACCOUNT_ID
while [ -z ${ACCOUNT_ID} ]; do
read -p "Account ID: " ACCOUNT_ID
unset TENANT_ID
while [ -z ${TENANT_ID} ]; do
read -p "Tenant ID: " TENANT_ID
done
fi
@ -709,7 +709,7 @@ set_install_vars() {
echo " public ip: $SERVER_HOST"
if [ "$INSTALL_TYPE" = "ee" ]; then
echo " license: $LICENSE_KEY"
echo " account id: $ACCOUNT_ID"
echo " account id: $TENANT_ID"
fi
echo "-----------------------------------------------------------------"
echo "Confirm Settings for Installation"

View file

@ -670,13 +670,13 @@ func GetLicenseKey() string {
return licenseKeyValue
}
// GetNetmakerAccountID - get's the associated, Netmaker, account ID to verify ownership
func GetNetmakerAccountID() string {
netmakerAccountID := os.Getenv("NETMAKER_ACCOUNT_ID")
if netmakerAccountID == "" {
netmakerAccountID = config.Config.Server.NetmakerAccountID
// GetNetmakerTenantID - get's the associated, Netmaker, tenant ID to verify ownership
func GetNetmakerTenantID() string {
netmakerTenantID := os.Getenv("NETMAKER_TENANT_ID")
if netmakerTenantID == "" {
netmakerTenantID = config.Config.Server.NetmakerTenantID
}
return netmakerAccountID
return netmakerTenantID
}
// GetStunPort - Get the port to run the stun server on