Configure Floating License resources

In this page, we will see how IDEA manages job and capacity provisioning based on license availabilities.

Example configuration

Test settings used for all examples:

  • License Server Hostname:lic1.idea-licenses.internal

  • License Server port: 1999

  • License Daemon port: 1998

  • Feature to check: ccmppower

Firewall Configuration

Depending your configuration, you may need to edit the security groups to allow traffic to/from your license server.

Allow traffic from your license server IP to IDEA

Navigate to EC2 console then click "Security Groups" and safe-list the license server IP(s) for the two ports on the following security groups:

  • <CLUSTER_NAME>-scheduler-security-group

  • <CLUSTER_NAME>-scheduler-compute-node-security-group

  • <CLUSTER_NAME>-vdc-dcv-host-security-group

  • <CLUSTER_NAME>-cluster-manager-security-group

Example of IP/Ports safelist assuming license server IP is 10.0.15.8

Allow traffic from IDEA to your license server

Since FlexLM use client/server protocol, you will need to authorize traffic coming from IDEA to your license servers for both SERVER and DAEMON ports. Depending on your IDEA setup, you will need to safe-list:

  • Standard Deployment:

    • NAT Gateway IP(s) associated to your IDEA environment ("VPC console" > "NAT Gateways")

  • No Outgoing Internet Deployment:

    • Scheduler/Cluster Manager/VDC IP ranges

Upload your lmutil

lmutil binary is not included with IDEA. You are required to upload it manually and update /apps/<CLUSTER_NAME>/scheduler/scripts/license_check.py with the location of your file. To avoid permission issue, it's recommended to create a copy of the file and move it to another location (as /apps/<IDEA_CLUSTER> is protected). General recommendation is to create /apps/utils and copy the license_check.py on this location.

arg = parser.parse_args()
lmstat_path = "PATH_TO_LMUTIL"
if lmstat_path == "PATH_TO_LMUTIL":
    print('Please specify a link to your lmutil binary (edit line 30 of this file')
    sys.exit(1)

You do not need to install FlexLM server manager. Only lmutil binary is required.

How to retrieve number of licenses available

IDEA includes a script (/apps/<IDEA-CLUSTER>/scheduler/scripts/license_check.py) which output the number of FlexLM available for a given feature. This script takes the following arguments:

  • -s: The license server hostname

  • -p: The port used by your flexlm daemon

  • -f: The feature name (case sensitive)

To avoid permission issue, it's recommended to create a copy of the file and move it to another location (as /apps/<IDEA_CLUSTER> is protected). General recommendation is to create /apps/utils and copy the license_check.py on this location.

Let say you have 30 ccmp licenses and 4 are currently in use. The command below will list how many licenses are currently available to use for your jobs:

python /apps/utils/license_check.py -s lic1.idea-licenses.internal -p 1999 -f ccmppower
26

license_check.py is simply a lmutil wrapper. You can get the same output by running the command below and adding some regex validations. You can edit the script to match your own requirements if needed

lmutil lmstat -a -c [email protected] | grep "Users of ccmppower:"

Integration with IDEA

Navigate to "Licenses" under "Scale-Out Computing" section on your IDEA web interface then click "Create License Resource" to fill out the form below.

In our example, the availability check script command is:

python /apps/utils/license_check.py --server lic1.idea-licenses.internal \
  --port 1999 \
  --feature ccmppower
Add your license resource information

Once ready, click "Next" and IDEA will validate your configuration.

Step2 will requires you to configure the scheduler manually. Follow the instructions mentioned on the page:

  • Connect to the Scheduler EC2 instance

  • Update your resourcedef

  • Update your sched_config

  • Restart OpenPBS

Follow the instructions to finalize your configuration

Once done, validate your configuration by clicking "Create License Resource". If your configuration is correct, you will now see the name of your License Resource as well as a real-time count of the number of licenses available.

Your License resource (starccm_lic_ccmppower) is now ready to use

IDEA checks the configuration on your behalf and will return an error if you haven't configured your resourcedef / sched_config correctly.

Example of invalid configuration

Submit a job with License Restrictions

Use -l <resource_name>=<number_of_licenses>to submit a job with license restriction

Example:

qsub -l starccm_lic_ccmppower=5 -- /bin/sleep 600

IDEA will ensures capacity will be provisioned only if there is at least 5 StarCCM+ ccmppower licenses available.

You can combine multiple license restrictions if needed

qsub -l starccm_lic_ccmppower=5 -l starccm_lic_ccmpsuite=1 -- -/bin/sleep 600

Example if you are using a job script:

#PBS -N <jobname>
#PBS -q <queue>
#PBS -l starccm_lic_ccmppower=5
/bin/sleep 600

Last updated