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.
In the Azure marketplace, click Create. Doing so launches the solution template where you provide values to configure your server environment.
Provision Cloud Resources. Creating resources on Azure can take up to 30 minutes.
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 Name | Value |
---|---|
Subscription | Choose 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 Name | Value |
---|---|
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
The template defaults to
|
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 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 Name | Value |
---|---|
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 |
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 Name | Value |
---|---|
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 Name | Value |
---|---|
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 If you set this parameter to |
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.
|
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 Name | Value |
---|---|
PFX Certificate | Upload a PFX-formatted SSL certificate. |
PFX Certificate Password | If 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.
In the Azure Portal, click Resource groups and select the resource group containing your cluster resources.
Select Deployments from the left pane and click the deployment name that has the text
mathworks-inc.matlabprodserver
.Select Outputs from the left pane.
Copy the parameter value for networkLicenseManagerURL and paste it in a browser to launch the dashboard.
Log in using the administrator user name and password that you specified during the deployment process.
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.
In the Azure Portal, click Resource groups and select the resource group containing your cluster resources
Select Deployments from the left pane. In the pane that opens, click the deployment name that has the text
mathworks-inc.matlabprodserver
.Select Outputs from the left pane.
Copy the parameter value for dashboardAdminURL and paste it in a browser to launch the dashboard.
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.