License server

In order to share floating licenses between multiple workstations, a license server needs to be up and running, and reachable for all machines in the network.

Setup

Download latest release from releases. The download contains directories for Windows, Linux and macOS.

Extract the contents of the folder of the relevant OS to a permanent location of your machine that will run the server, e.g.: nglicensemanager-v1.0.18.zip/windows > C:\Users\yourself\apps\ngskintools-license-server. The contents of the new folder should similar to:

  • nglicensemanager - the executable to run
  • config.ini - base configuration for the server
  • licenses - empty folder for future license files

Launch the server; you should see output similar to:

2021/02/07 18:33:20 *****************************************
2021/02/07 18:33:20 *     ngLicenseManager      v1.0.18     *
2021/02/07 18:33:20 *****************************************
2021/02/07 18:33:20 Looking for config file: C:\Users\yourself\apps\ngskintools-license-server\config.ini
2021/02/07 18:33:20 Loading configuration from : C:\Users\yourself\apps\ngskintools-license-server\config.ini
2021/02/07 18:33:20 No licenses loaded.
2021/02/07 18:33:20 Starting server on port 8050
2021/02/07 18:33:20 Open browser at http://localhost:8050

If you see no errors, you can open a browser at http://localhost:8050 and you should see something like this:

This confirms that the server is working and ready for next step, setting up licenses to serve.

Setting up licenses

When you purchased floating licenses, you received a license key. License server has a utility to exchange the key for a license file. Click on “Add new license” and in the next screen, enter your license key.

By clicking “continue” you’ll receive a link similar to this:

https://licensing.ngskintools.com/#/self-service/eyJ0eXBlIjoiZ.....

Following the link you’ll be taken to online wizard where you will download your license file. Place it into the empty “licenses” folder that was pre-created alongside the server binary.

After restarting the server, you should now be able to see that server picked up the license file and is preparing to serve it. There is an intentional short delay between server restart and licenses being ready for checkout.

Additional server configuration

Open “config.ini” and you’ll find a few options that you can edit, e.g. server port, license files location configuration. Configuration file contains self-explanatory examples of possible configuration options:

[server]
# server port where console is available and where clients will be connecting to
port = 8050

[licenses]
# Provide search paths for licenses. Partial paths will be resolved
# from this configuration file folder. Wildcard patterns are allowed.
#
# Sample entries:
# all json files in this folder:
# *.json

# subfolder
# licenses/*.json

# all ngskintools*.json files in a specific folder:
# /path/to/ngskintools*.json
# c:\path\to\ngskintools*.json


# one specific license file:
# ngskintools-c14dc3d2.json.json
# ...or
# /path/to/ngskintools-c14dc3d2.json.json

licenses/*.json
*-license.json

Linux: running as systemd daemon

To easier manage server uptime, you can configure it to run as systemd service. This will make sure the license server is started after OS restarts or if process crashes for any reason.

Create file /etc/systemd/system/nglicensemanager.service with contents:

[Unit]
Description=ngLicenseManager

[Service]
ExecStart=/path/to/nglicensemanager-v1.0.20/linux/nglicensemanager
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

Reload systemd to pickup the configuration:

$ sudo systemctl daemon-reload

Start the service, check it’s status:

$ sudo systemctl start nglicensemanager.service
$ systemctl status nglicensemanager.service

Configure to run at startup:

$ sudo systemctl enable nglicensemanager.service

Configuring client workstations

Once the server is serving licenses, you can configure plugin itself. This can be done either via plugin UI, or setting an environment variable in Maya.

UI method

Open Help | Register from ngSkinTools2 menu, select “License server” method and enter server address in the network and it’s port.

Environment variable

In order to automate configuration for many workstations, it might be more convenient to set server location via environment variables. If ngSkinTools detects an environment variable NGSKINTOOLS2_LICENSE_CONFIG, it will attempt to load configuration from there. Example setup:

$ NGSKINTOOLS2_LICENSE_CONFIG="license-server-url=192.168.1.111:8050"
$ maya