Programmatic license activation and unactivation

Is there any way to programmatically activate and deactivate ignition licenses on given machines? I'm working on some automated VM orchestration tooling and would want to pass a license around between active ephemeral VMs before deleting inactive ones (With only one VM running at a time).

(I assume this is something easier in 8.3)

There's a little bit of support for this in the gwcmd utility: Gateway Command-line Utility - gwcmd | Ignition User Manual

See --unactivate and --uselicense.

It requires some interaction with the licensing servers as well; it's not assuming that you're working with an online gateway that will then make the calls to the server itself.

Probably

So the path would be --unactivate followed by a CURL to the license server or similar, and to reactivate --activate, then CURL, then --use-license with the output ipl?

Yeah something like that.

The 8-digit leased license keys might be better suited to your use case...

The problem is: "However, due to the frequent checks, they require extra attention and depend on the Gateway having internet access at all times." This isn't something I can assume for my deployments

I'm not really sure if this method with the gwcmd is meant for automation, it looks to me like it's meant to be done by hand.

The page where activation/unactivation requests happen is here: Support - Inductive Automation

I don't know anything about the service that backs this page or how you would access it programatically.

@kcollins1 might know more

Your use case sounds ideal for the 8-digit leased activation system (although it seems like connectivity may be a limiting factor for you). You could configure each VM with the same leased licensing configuration (which lives at data/leased-activation/config.json under the Ignition 8.1.x installation folder) and then enable Leased Activation Session Termination. This will cause the license session to be released on a clean shutdown of Ignition. The default behavior is to persist the session on disk (under a data/leased-activation/.cached-response-XXXX-YYYY file) so that it can be immediately resumed on a restart. The consequence of this is that your session is orphaned [to that one gateway] until its validity duration has expired.

You can place a properly structured config.json into place on the filesystem and Ignition will pick that up on startup. It doesn't currently react to changes of this file once running.