Forum

Author Topic: Floating License Orchestration on VMs  (Read 3328 times)

wolffam

  • Newbie
  • *
  • Posts: 4
    • View Profile
Floating License Orchestration on VMs
« on: February 06, 2020, 08:47:43 PM »
Before purchasing multiple metashape floating licenses, I am speccing out the workings of how to distribute and manage these licenses.
I have read through https://agisoft.freshdesk.com/support/solutions/articles/31000133073-floating-license-activation-procedure as well as the RLM manual (not very helpful), and still have some questions about the implementation.

What I would like to do is have a "server" machine that is running the license server (this seems pretty straightforward) as well as an "orchestrator" machine that will spin up "stitching VMs" for a job once a license is available.  This is in an effort to avoid paying for idle VMs that are waiting for a license to become available.

Can anyone provide information on how I can use the RLM server to reserve a license and then hand it off to a VM that is booted?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14846
    • View Profile
Re: Floating License Orchestration on VMs
« Reply #1 on: February 06, 2020, 09:13:41 PM »
Hello wolffam,

The floating license will be taken from the license server only when Metashape process is started (application is started in GUI mode, as a network processing node, or a headless script is executed).

And to allow the connection of the client computer (a VM in this case) to the license server it is recommended to put the single-line file with .lic extension to Metashape Pro installation directory in the following format:
Code: [Select]
HOST 111.222.333.4444 any 5053Where the IP address of the license server machine should be input and 5053 here stands for the default RLM port. (note that communication with the license server is performed via RLM and ISV ports). Alternative way is setting up agisoft_LICENSE environment variable on the client machine in port@address format.

Providing that the license file or environment variable is properly configured the license will be taken from the server only when Metashape is started in any way. When the process is closed, the license will be returned to the server.

I think that you can reserve the licenses in the pool for the certain hostnames or IP addresses, or set up the password for the license.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14846
    • View Profile
Re: Floating License Orchestration on VMs
« Reply #2 on: February 06, 2020, 09:21:01 PM »
The most common ways seem to be:

1) Reserve N floating licenses from the certain .lic file for the group of users using agisoft.opt settings file (so-called ISV options). It can be done with the following line:

Code: [Select]
RESERVE <count> <product> group <group name> id=<license id>
The users group should be created in the same file using the following line:

Code: [Select]
GROUP <group name> <list of user names separated by spaces>
"license id" should be set by the administrator in .lic file. For that it's necessary to add parameter _id=<license id> to the LICENSE line, for example:

Code: [Select]
LICENSE agisoft photoscan-pro 1.0 permanent 1 _id=1 share=uh issued=... _ck=... sig=...
Also instead of users group it is possible to create the group of computers or IP-addresses:

Code: [Select]
HOST_GROUP <group name> <list of host names separated by spaces>
Code: [Select]
INTERNET_GROUP <group name> <list of ip address separated by spaces>(addresses can contain wildcards "*")

But in this case in RESERVE line it is necessary to use "host_group" or "internet_group" instead of "group".

In principle, it's also possible to specify the certain user in the RESERVE line:

Code: [Select]
RESERVE <count> <product> user <user name> id=<license id>or
Code: [Select]
RESERVE <count> <product> host <host name> id=<license id>
More detailed information about this approach should be found in RLM_License_Administration.pdf in the section "The ISV Options file":
http://www.reprisesoftware.com/RLM_License_Administration.pdf

2) Add for the key the parameter named_user in the RLM base, after that administrator should define for the license the list of allowed users via web-interface (on server status page there's "edit named user list" option). However, there may be certain points that should be kept in mind:
 - if the user list is not defined, it will be formed automatically when the license server is accessed,
 - number of users in the default list should be equal to the number of licenses, but it can be changed via named_user=N, where N  may be bigger or lower than the number of licenses,
- after the user is added, it can be removed from the list, but then he could be added to the list not sooner than M hours (by default M = 24). The default M value can be modified by named user="N M".

3) To use the password in the license file it is necessary to add parameter to the LICENSE line (for example, after share or issued):
Code: [Select]
_password=<password>or to the ISV line add parameter (without understroke symbol, compared to the previous solution):
Code: [Select]
password=<password>
In case the password is set using the both approaches, then the LICENSE option would be in priority.

After that to provide the access to the license via application or web-interface it is necessary to input the password, it may be set via:
1. Environment variable: RLM_LICENSE_PASSWORD=<password>
2. In the corresponding field in the web-interface
3. On the client's side in the .lic file that is linking to the server, by adding the following parameter to the ISV line:
password=<password>
Best regards,
Alexey Pasumansky,
Agisoft LLC

wolffam

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Floating License Orchestration on VMs
« Reply #3 on: February 16, 2020, 04:47:31 AM »
Much thanks, Alexey.  I appreciate the thoughtful responses.