License management

Hydra uses two types of license keys:

  • product license key: once activated it is locked to the hardware ID on the machine that activated it
  • floating key: Hydra leases a key for the duration of its execution. Requires an active Internet connection

License key activation

Before a license key can be used it needs to be activated via the Triplequote activation server. This can be done via sbt, Maven, Gradle, or within IntelliJ IDEA using the Triplequote Hydra plugin, by passing the license key that you received:

Note that license activation can only be performed using Oracle JDK or OpenJDK9+. Once the activation is completed, the activated license can be used with other versions of OpenJDK (such as version 8) as well.

The process for managing license activation within IntelliJ IDEA using the Triplequote Hydra plugin is described here

To activate the license within sbt, use the hydraActivateLicense task as instructed below:

$ sbt hydraActivateLicense XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
[info] Activating using https://activation.triplequote.com/algas/. This may take some time..
[info] License successfully activated

For Maven, make sure you are using scala-maven-plugin patch -hydra05 or later:

$ mvn -Dhydra.license.key="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" scala:hydraActivateLicense

Hydra stores the activated license in ~/.triplequote/hydra.license. From now on Hydra won't need to connect to the activation server (but it will check the license on every run, locally). An activated license can't be used on a different machine. Virtual machines or Docker containers may also appear as having a different hardware ID and refuse to run using the activated license.

Hydra needs write access to it's license store. You can override the location of the license store file by defining the hydra.license.store=<path> system property. This usually means passing -Dhydra.license.store=<path> to the JVM process taking care of compilation.

License key deactivation

If the machine on which the license key was activated is no longer used or you wish to recover the license key for another developer you can deactivate the license key. Deactivation is limited to a small number and depends on the quantity you purchased.

sbt:

$ sbt hydraDeactivateLicense
[info] Deactivating using https://activation.triplequote.com/algas/. This may take some time..
[info] License successfully deactivated

Similarly for maven:

$ mvn scala:hydraDeactivateLicense

License key reactivation

After renewing a license you need to deactivate and activate the license again for correctly extending the license period.

sbt:

$ sbt hydraDeactivateLicense
...
$ sbt hydraActivateLicense
...

Similarly for maven:

$ mvn scala:hydraDeactivateLicense
...
$ mvn scala:hydraActivateLicense
...

Floating key configuration

In case of CI server builds you are better off using a floating key. A floating key "leases" a key from the activation server for the exact duration of its run. The server keeps track of the number of concurrent builds and will validate the key if the maximum number of concurrent builds hasn't been reached yet. The maximum number of concurrent builds is determined by the license key you obtained.

To configure a floating key you will need to create the hydra.license file yourself and place it in ~/.triplequote/hydra.license:

floating-key=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

You can override the location of the license store file by defining the hydra.license.store=<path> system property. This usually means passing -Dhydra.license.store=<path> to the JVM process taking care of compilation.