Online license activation/unactivation via CLI/gwcmd?

Is there a good way to finish the activation of a license from the CLI? I see that gwcmd -a will generate the activation_message.txt, but nothing about actually submitting it to the licensing endpoint of api.inductiveautomation.com. We were thinking to do a POST with the activation_message.txt as a payload and hope to get back the license.ipl that we can apply with gwcmd -w.

Thoughts? Or suggested format for the POST request?

Welcome!

What's the intended purpose of fully scripted?

For a headless server, I simply fire up Chrome etc on a remote session and use a browser to apply the license, assuming the server (gateway) has internet access.

If it does not, then I also use a remote session to do the offline activation process.

Once a license is applied there is no need to go through the process, unless moving servers, bolting on a new module, or if the server infrastructure has a catastrophic failure.

Thanks for the quick reply!

What you described is our current process. However we have 60-100+ ignition servers per site so we are heavily automating the deployment, upgrade, and config processes. The licensing is really the only piece we have been unable to automate so far.

Additionally, we're considering dockerization of our ignition deployments, and this would require a license unactivation and then reactivation every time the container version changes (such as when we update to a newer version of ignition). This gets unwieldy the more we scale.

I also admit I've forgotten to go through the manual unactivation process upon destroying some of our servers via terraform, and therefore had to request a license refresh too many times :slight_smile: , so the automation would for my forgetfulness as well.

Well, do you have EAM with that many gateways?

There is this feature:

https://docs.inductiveautomation.com/display/DOC81/License+Management

There are also Leased Licenses, designed for Docker, if you do go that route.

https://docs.inductiveautomation.com/display/DOC81/Licensing+and+Activation

Sorry, I'm not directly answering your original question, just throwing out some food for thought.

We do not have EAM but will look into it. And thanks for leased licenses link. I appreciate any discussion! so thank you!

Still open for ideas on the POST request to the licensing endpoint for anyone else reading.