OpenStack and Ansible scripts for hosting a private MATLAB license server on CSC Pouta. Hosting other FlexLM licenses should work in similar way.
This setup creates the following infrastructure on Pouta:
- A virtual machine running Ubuntu
- A floating IP address for external access
- SSH key pair for secure access
- Configured MATLAB license server software
Follow the CSC Pouta documentation to set up your terminal environment.
Source your project credentials:
. <project_name_here>-openrc.shThis loads your OpenStack credentials into the current shell session.
Create a Python virtual environment and install required tools.
Regular pip:
python3 -m venv
. .venv/bin/activate
pip install -r requirements.txtUsing uv:
uv venv --python 3.12
. .venv/bin/activate
uv pip install -r requirements.txtThis installs Ansible and the OpenStack SDK.
Generate an SSH key pair for accessing the VM:
./01_create_ssh_key.shThe key is saved as ~/.ssh/id_rsa_license_server.
Deploy the VM using OpenStack Heat with CIRDs for allowed SSH connections as comma separated list:
./02_create_vm.sh "0.0.0.0/32,0.0.0.0/32"Verify the stack was created successfully:
openstack stack show license-server -f jsonTo retrieve the floating IP address assigned to your VM:
openstack stack show license-server -f json | jq -r '.outputs[] | select(.output_key=="floating_ip_address") | .output_value'Run Ansible to install and configure MATLAB license server software:
./03_configure_vm.shThis script connects to the VM and sets up the license server components.
After the configuration completes, you need to activate your MATLAB license:
-
SSH into the VM to get the host ID:
ssh -i ~/.ssh/id_rsa_license_server ubuntu@<floating-ip>
Print the hostid and copy it:
/license/matlab/mlm/R2025b/lm_hostid
-
Go to the MATLAB License Center
-
Activate your license:
- Select "Activate a License Server"
- Choose "Linux" as the operating system
- Enter the VM's host ID
- Provide a label
-
Download the license file.
-
On the server, append the license contents to the license file on the server:
sudo -u lmmatlab vi /license/matlab/files/license.lic
-
Modify the options file to allows desired users to use the license server:
sudo -u lmmatlab vi /license/matlab/files/license.opt
Once the license server is running, configure MATLAB clients to use it:
export MLM_LICENSE_FILE=27000@<floating-ip>Replace <floating-ip> with the actual floating IP address of your license server.