This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
howto:licensing [2022/04/07 15:16] ccrosby [Off-site licensing] |
howto:licensing [2025/01/29 09:00] (current) ccrosby [SSH tunneling] |
||
|---|---|---|---|
| Line 45: | Line 45: | ||
| It is somewhat atypical for the CHPC to provide in-network software licensing, the availability of such a service depending largely on the marketing strategy of the software vendor. | It is somewhat atypical for the CHPC to provide in-network software licensing, the availability of such a service depending largely on the marketing strategy of the software vendor. | ||
| * The lengau compute nodes do not have direct access to the internet | * The lengau compute nodes do not have direct access to the internet | ||
| - | * The off-site license server is typically situated within a corporate network behind a firewall | ||
| * Some of the license daemons may be using random port numbers, which make it difficult to set up appropriate firewall rules | * Some of the license daemons may be using random port numbers, which make it difficult to set up appropriate firewall rules | ||
| + | * The off-site license server is typically situated within a corporate network behind a firewall | ||
| - | === SSH tunneling === | + | |
| + | ==== SSH tunneling | ||
| It is possible for compute nodes to communicate with the outside world using ssh-tunnels. | It is possible for compute nodes to communicate with the outside world using ssh-tunnels. | ||
| < | < | ||
| Line 54: | Line 55: | ||
| export CDLMD_LICENSE_FILE=1999@localhost | export CDLMD_LICENSE_FILE=1999@localhost | ||
| </ | </ | ||
| - | In practice, the CHPC has many users making use of this system, and it has become easier for the CHPC to simply set up a permanent tunnel with the license server port forwarded to port 1999 on chplic1. | + | In practice, the CHPC has many users making use of this system, and it has become easier for the CHPC to simply set up a permanent tunnel with the license server port forwarded to port 1999 on chplic1. |
| + | |||
| + | === Random port numbers === | ||
| + | The difficulty with default random port numbers is that it makes it impossible to set very tight firewall rules. | ||
| + | |||
| + | < | ||
| + | SERVER login1 246e96345ca0 1055 | ||
| + | VENDOR ansyslmd | ||
| + | </ | ||
| + | |||
| + | This Flexnet license file nominates port 1055 for the Flexnet lmgrd daemon, but leaves the ansyslmd vendor daemon free to use a random port number. | ||
| + | |||
| + | < | ||
| + | SERVER login1 246e96345ca0 1055 | ||
| + | VENDOR ansyslmd port=1056 | ||
| + | </ | ||
| + | |||
| + | === Remote license server === | ||
| + | Internet communication between the CHPC cluster and the remote license server must be possible. | ||
| + | < | ||
| + | 196.24.44.124 | ||
| + | 196.24.44.6 | ||
| + | 196.24.44.129 | ||
| + | 196.24.44.83 | ||
| + | 154.114.44.7 | ||
| + | </ | ||
| + | |||
| + | The CHPC's firewall will also need to be configured to allow license server traffic to and from the off-site license server. | ||
| + | |||
| + | ==== Procedure ==== | ||
| + | - Contact your CHPC support scientist or engineer and explain your requirements. | ||
| + | - Ensure that all your license server daemons are providing their services on fixed and known port numbers. | ||
| + | - Instruct corporate IT at your end to configure the network to make the license server ports accessible. | ||
| + | - Instruct corporate IT at your end to configure the firewall to permit traffic to and from the CHPC's public IP addresses. | ||
| + | - Provide the CHPC with the license server port numbers as well as your license server' | ||
| + | - Once all these configurations have been set, test the connectivity from the nodes login1 and chpclic1 in the cluster. | ||
| + | - Now you can attempt to check out the license from a compute node. Preferably first test this in an interactive PBS session, but the instructions are essentially the same as you would use in the following PBS job script snippet: | ||
| + | <file bash JobScriptSnippet.pbs> | ||
| + | # | ||
| + | #PBS -l select=.... etc | ||
| + | |||
| + | # Set up the required number of ssh-tunnels to the license server ports | ||
| + | ssh -f jblogs@chpclic1 -L *: | ||
| + | ssh -f jblogs@chpclic1 -L *: | ||
| + | # Set the appropriate license server environment variable. | ||
| + | # Please RTFM of the software that you are using | ||
| + | export LM_LICENSE_FILE=1234@localhost | ||
| + | # Now run your code with the normal command line | ||
| + | mpirun -np $nproc ...... | ||
| + | # Finally take down each of your ssh tunnels again | ||
| + | kill -9 `ps ux | grep "ssh -f" | grep -o -E ' | ||
| + | kill -9 `ps ux | grep "ssh -f" | grep -o -E ' | ||
| + | </ | ||
| + | |||
| + | ==== Alternative procedure for off-site license servers ==== | ||
| + | **If** the user has control over the off-site license server that they want to use, it is possible to access the license from inside the cluster by means of ssh-tunneling, | ||
| + | |||
| + | === Alternative instructions === | ||
| + | * The user must have the ability to run commands on the license server. | ||
| + | * Command line access to the license server is necessary. | ||
| + | * Let us assume that the license server is running the license service on port 2345. | ||
| + | * On the license server command line, create the ssh tunnel: | ||
| + | < | ||
| + | ssh -R *: | ||
| + | </ | ||
| + | * In plain English, this translates as: " | ||
| + | * Do the same for the second (or third) license port. Do not try to do this through login1 or chpclic1 with default Ansys license ports, because the Ansys ports are already being used on these servers. | ||
| + | * You can now access the license by setting the relevant environment variables as such in your job script: | ||
| + | < | ||
| + | export LM_LICENSE_FILE=2345@login1 | ||
| + | </ | ||
| + | * When you take down the license tunnel, kill the tunnel process on the license server. | ||