Main Content

Azure Deployment for MATLAB Production Server (BYOL)

To deploy your MATLAB® Production Server™ bring your own license (BYOL) environment on Azure®, launch the MATLAB Production Server solution template from the Azure marketplace. After the deployment to Azure is complete, upload your license file using the Network License Manager for MATLAB dashboard, and configure and manage MATLAB Production Server using the MATLAB Production Server dashboard.

Note

You must have an Azure account to deploy resources on Azure and configure your server environment.

To use your solution, you need a MATLAB Production Server license. You can upload the MATLAB Production Server license file only after provisioning the cloud resources. For more information on licensing on the cloud, see Configure MATLAB Production Server License for Use on the Cloud.

You are responsible for the cost of the Azure services and resources that the deployment uses.

Follow these steps to deploy your server environment on Azure.

  1. In the Azure marketplace, click Create. Doing so launches the solution template where you provide values to configure your server environment.

  2. Provision Cloud Resources. Creating resources on Azure can take up to 30 minutes.

  3. Upload License File.

  4. Connect and Log In to Dashboard.

To run an application on MATLAB Production Server, you need to create the application using MATLAB Compiler SDK™. For more information, see Create Deployable Archive for MATLAB Production Server.

Provision Cloud Resources

You must have an Azure subscription before you can start deploying cloud resources for MATLAB Production Server on Azure. Launch the MATLAB Production Server solution template to configure and deploy cloud resources. The deployment process goes through the following steps. Click OK at the end of each step to proceed to the next step.

Basics

First, you must choose an Azure subscription, specify a resource group to hold the resources you provision, and specify a location to start your resources in.

Parameter NameValue
SubscriptionChoose an Azure subscription to use for purchasing resources.
Resource group

Choose a name for the resource group to hold the resources.

Creating a new resource group for each deployment is recommended. Doing so enables you to delete all the resources for each deployment easily.

Region

Choose the region to start resources in.

Select a region that supports your requested virtual machine (VM) instance types. For a list of resources that are supported by region, see Products available by region.

Server

Next, you configure the server VM and data persistence. Each MATLAB Production Server instance runs on a VM and each instance runs multiple MATLAB Production Server workers. To deploy a server instance, you must specify parameters for the VM, such as the size, number of VMs, and operating system.

Parameter NameValue
Server VM Size

Specify the size of the VM to use for the server.

It is recommended that you select a VM size where the number of vCPUs on your VM matches the number of MATLAB Production Server workers per VM that you plan on using. For example, if you select a D8s V3 VM which has 8 vCPUs, use 8 MATLAB Production Server workers. You can change the number of workers by updating the Number of Workers in the Settings tab in the MATLAB Production Server dashboard. For more information about the property, see num-workers.

The template defaults to Standard_D4s_v3. This configuration has 4 vCPUs and 16 GB of memory. For more information on Azure VMs, see Azure VM sizes.

Number of Server VMs

Specify the number of VMs to run MATLAB Production Server instances.

The deployment template sets the default to 2 VMs for load balancing.

If you have a standard 24 worker MATLAB Production Server license and select Standard_D4s_v3 VM (4 vCPUs) as the Server VM Size, you need 6 VMs to fully utilize the MATLAB Production Server workers in your license. You can always underprovision the number of VMs. If you do so, you can end up using fewer workers than you are licensed for.

You can change the number of VMs after the initial deployment. For more information, see Change the Number of Virtual Machines.

Server VM Operating System

Choose the server VM operating system.

Windows® (Windows Server®) and Linux® (Ubuntu®) are the only available options.

In most cases, choosing an operating system depends on your personal preference. Unless you add operating system-specific dependencies or content such as MEX files to your applications, the applications you deploy to the server do not depend on a specific operating system.

Create Redis™ Cache

Choose whether you want to create an Azure cache for Redis.

Creating this service allows you to use the persistence functionality of the server. Persistence provides a mechanism to cache data between calls to MATLAB code running on a server instance. For more information, see Data Caching Basics.

You can provision an Azure cache for Redis after the initial deployment. For setup instructions, see Azure documentation.

License Server

The network license manager manages the license files for MATLAB Production Server (BYOL). You can choose to deploy a license server for the Network License Manager for MATLAB or use an existing license server. For information about the Network License Manager for MATLAB, see Network License Manager for MATLAB on Microsoft Azure.

If you use an existing license server, use the MATLAB Production Server dashboard to enter the port number and IP address of the license server. For more information, see Upload License File.

Parameter NameValue
Create License Server

Specify whether you want to deploy the Network License Manager for MATLAB to upload and mange your license files. The license manager runs on a separate Windows VM.

If you want to use an existing network license manager, choose No. If you do not have an existing license manager, choose Yes.

Dashboard Login

After you deploy the server VMs, you can manage the server using the MATLAB Production Server dashboard, which provides a web-based interface to configure and manage MATLAB Production Server in the cloud. Specify the login credentials for the dashboard.

If you deploy the license manager with this deployment, use these same credentials to log in to the Network License Manager for MATLAB dashboard.

Parameter NameValue
Admin Username

Specify the administrator user name to log in to the MATLAB Production Server dashboard.

Admin Password

Specify the administrator password to log in to the MATLAB Production Server dashboard.

Network

You can specify which IP addresses can access the dashboard, whether your solution should use a public IP address, and configure a virtual network (VNet).

Parameter NameValue
Allow Connections from IP address

Specify the range of IP addresses that are permitted to connect to the dashboard that manages the server.

Use CIDR notation, which provides the IP address before the slash and mask after the slash, when specifying the IP address range. The mask determines the number of IP addresses to include. For example, 10.0.0.1/24.

You can use a CIDR calculator to determine the CIDR notation for a range of IP addresses.

Make Solution Available over Internet

Make your solution available over the Internet by setting this parameter to Yes. This will use public IP addresses.

If you set this parameter to No, the ARM template does not assign a public IP address for the VM that hosts the dashboard. To access the dashboard, you can use a different VM located in the same virtual network as the VM that hosts the dashboard.

Virtual Network

Create a new VNet or choose an existing one.

The template defaults to a creating a new VNet with predefined values. These are the values that Azure defaults to while creating a new VNet. You can use the default values or enter new values based on your network setup.

The deployment opens the following ports. If you are using an existing VNet, you need to open the following ports.

  • 443 – Required for communicating with the dashboard.

  • 8000, 8004, 8080, 9090, and 9910 – Required for communication between the dashboard, MATLAB Production Server workers, and various microservices within the virtual network. These ports do not need to be accessible over the Internet.

  • 27000 – Required for communication between the network license manager and the MATLAB Production Server workers.

  • 6520065535 – Required for the Azure application gateway health check to work. These ports need to be accessible over the Internet. For more information, see MSDN Community.

  • 22, 3389 – Required for Remote Desktop functionality. You can use remote login functionality for troubleshooting and debugging. You can close these ports after deployment is complete.

First Subnet

Second Subnet

Specify the subnet name and subnet address prefix for a new or existing subnet.

The first subnet hosts the dashboard. The second subnet hosts the application gateway.

The template defaults to creating new subnets with predefined values. You can use the default values or enter new values based on your network setup.

SSL Certificate

In this section, you specify an SSL certificate for the Azure application gateway to use. The application gateway provides an HTTPS endpoint that you use to connect to server instances and the MATLAB Production Server dashboard.

Parameter NameValue
PFX CertificateUpload a PFX-formatted SSL certificate.
PFX Certificate PasswordIf the certificate requires a password, enter it here. Otherwise, leave the field blank.

Upload License File

The network license manager manages the MATLAB Production Server license file. The MATLAB Production Server deployment template provides an option to use an existing license manager or deploy the Network License Manager for MATLAB. For information about the Network License Manager for MATLAB, see the documentation on GitHub® for Network License Manager for MATLAB on Microsoft Azure.

If you want to use an existing license manager, the VM that hosts the license server must be in the same VNet as the VM that hosts MATLAB Production Server. Use the MATLAB Production Server dashboard to enter the port number and IP address of the license server. Enter the license server details in the Advanced > License Server field on the Settings tab of the dashboard.

If you choose to deploy a new license server, you do not need to enter the license server details in the dashboard. The deployment template prepopulates default values for port number and IP address in the License Server field.

You need a static MAC address to get a license file from the MathWorks® License Center. The license server MAC address is available only after the deployment is complete. For more information on configuring your license for use on Azure, see Configure MATLAB Production Server License for Use on the Cloud.

Follow these steps to upload the license file using the Network License Manager for MATLAB dashboard, if you have deployed the license manager during the MATLAB Production Server deployment process.

  1. In the Azure Portal, click Resource groups and select the resource group containing your cluster resources.

  2. Select Deployments from the left pane and click the deployment name that has the text mathworks-inc.matlabprodserver.

  3. Select Outputs from the left pane.

  4. Copy the parameter value for networkLicenseManagerURL and paste it in a browser to launch the dashboard.

  5. Log in using the administrator user name and password that you specified during the deployment process.

  6. Follow the instructions in the Network License Manager for MATLAB dashboard to upload your MATLAB Production Server license.

Connect and Log In to Dashboard

The MATLAB Production Server dashboard is a web-based interface to configure and manage server instances in the cloud.

Note

The Internet Explorer® web browser is not supported for interacting with the dashboard.

Complete these steps only after you successfully create your resource group. This workflow assumes that your solution uses public IP addresses. If your solution uses private IP addresses, you can connect to the dashboard from a VM located in the same virtual network as the VM that hosts the dashboard.

  1. In the Azure Portal, click Resource groups and select the resource group containing your cluster resources

  2. Select Deployments from the left pane. In the pane that opens, click the deployment name that has the text mathworks-inc.matlabprodserver.

  3. Select Outputs from the left pane.

  4. Copy the parameter value for dashboardAdminURL and paste it in a browser to launch the dashboard.

  5. Log in using the administrator user name and password that you specified during the deployment process.

Configuring role-based access control for the dashboard is recommended. MATLAB Production Server integrates with OAuth 2.0 providers such as Microsoft® Azure Active Directory, Google® Identity, and PingFederate® for providing role-based access control. Role-based access control lets you grant users the privileges to perform tasks on the dashboard and server, based on their role. For more information on how to configure role-based access control, see Dashboard Access Control.

Related Topics