Skip to content

Latest commit

 

History

History
87 lines (68 loc) · 17.5 KB

File metadata and controls

87 lines (68 loc) · 17.5 KB

MATLAB Production Server on Microsoft Azure - R2023a

Follow these steps to deploy the R2023a MATLAB Production Server reference architecture on Microsoft Azure. To deploy reference architectures for other releases, see Deploy Reference Architecture for Your Release.

Step 1. Launch Template

To deploy resources on Azure, click Deploy to Azure. The Azure Portal open in your web browser.

Deploy to Azure

MATLAB Release: R2023a

Creating resources on Azure can take at least 30 minutes.

Step 2. Configure Cloud Resources

Provide values for parameters in the custom deployment template on the Azure Portal :

Parameter Name Value
Subscription Choose an Azure subscription to use for purchasing resources.

Example: VERTHAM Dev

Resource group Choose a name for the resource group that will hold the resources. It is recommended you create a new resource group for each deployment. This allows all resources in a group to be deleted simultaneously.

Example: Saveros

Region Choose the region to start resources in. Select a region which supports your requested instance types. To check which services are supported in each location, see Azure Region Services. MathWorks recommends using East US or East US 2.

Example: East US

Location Specify the location where the MATLAB Production Server instance will be deployed or use the default value.
Server VM Instance Size Specify the size of the VM you plan on using for deployment. Each MATLAB Production Server instance runs on a VM and each instance runs multiple workers. We recommend you choose a VM size where the number of cores on your VM matches the number of MATLAB workers per VM you plan on using. The template defaults to Standard_D4s_v3. This configuration has 4 vCPUs and 16 GiB of memory. For more information, see the Azure documentation.

Example: Standard_D4s_v3

Dashboard VM Size Specify the size of the VM you plan on using for the MATLAB Production Server dashboard. The dashboard lets you configure server settings and manage deployed applications. In most cases, choosing the smallest VM size is adequate. The template defaults to Standard_D1_v2. For more information, see the Azure documentation.

Example: Standard_D1_v2

Instance Count Number of VMs to run MATLAB Production Server instances. Each MATLAB Production Server instance runs on a VM and each instance runs multiple workers.

Example: 6

If you have a standard 24 worker MATLAB Production Server license and select Standard_D4s_v3 VM (4 cores) as the Server VM Instance Size, you need 6 VMs to fully use the workers in your license. Therefore, your instance count will be 6.

You can always underprovision the number of VMs, in which case you may end up using fewer workers than you are licensed for.

Admin Username Specify the administrator username for all VMs. Use this username to log in to the MATLAB Production Server dashboard and network license manager.
Admin Password Specify the administrator password for all VMs. Use this password to log in to the MATLAB Production Server dashboard and network license manager.
Allow connections from Specify the IP address range that is allowed to connect to the dashboard that manages the server and to the network license manager. The format for this field is IP Address/Mask.

Example: 10.0.0.1/32

  • This is the public IP address which can be found by searching for "what is my ip address" on the web. The mask determines the number of IP addresses to include.
  • A mask of 32 is a single IP address.
  • If you need a range of IP addresses, use a CIDR calculator.
  • To determine which address is appropriate, contact your IT administrator.

Create Azure Redis Cache Choose whether you want to create an Azure Redis Cache service. Creating this service will allow 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.
Use Public IP Addresses Choose 'Yes' if you want to make your solution available over the Internet.
If you choose '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.
Platform Choose the operating system for the server. Microsoft Windows and Linux are the only available options.
New or Existing Virtual Network Select 'new' to create a new virtual network for your deployment using the default values shown in the parameters after this one. Any changes to these parameter values are ignored.

Select 'existing' to specify an existing virtual network by updating the parameters after this one.

If you are deploying to an existing virtual network, open these ports in your network:
  • 443 — Required for communicating with the dashboard
  • 8000, 8004, 8080, 9090, 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 open to the Internet.
  • 27000 — Required for communication between the network license manager and the 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 — (Optional) Enables Remote Desktop functionality, which can be used for troubleshooting and debugging.

If you are deploying to a new virtual network, these ports are opened by default.

You can close ports 22 and 3389 after deployment.

Virtual Network Name Specify the name of your existing virtual network or use the default value.
Virtual Network CIDR Range Specify the IP address range of the virtual network in CIDR notation or use the default value.
Subnet 1 CIDR Range Specify the IP address range of the first subnet in CIDR notation or use the default value. The first subnet hosts the dashboard and other resources.
Subnet 2 CIDR Range Specify the IP address range of the second subnet in CIDR notation or use the default value. The second subnet hosts the application gateway.
Available Subnet 2 IP Address Specify an unused IP address from Subnet 2 or use the default value. This IP address serves as the private IP of the application gateway.
Resource Group Name Of Virtual Network Specify the resource group name of the virtual network or use the default value.
Deploy Network License Manager for MATLAB Select whether you want to deploy the Network License Manager for MATLAB to manage your license files. Selecting 'Yes' deploys the Network License Manager for the MATLAB reference architecture. Select 'No' if you want to use an existing license server.
Certificate Input Type Select how you want to specify the SSL certificate for the Azure application gateway to use. The Azure application gateway provides an HTTPS endpoint that you use to connect to server instances and the MATLAB Production Server dashboard. You must select one of these options:

  • KeyVault: Specify an SSL certificate that exists in the Azure Key Vault.
  • Base64-encoded PFX Certificate: Specify a string that is a base64-encoded value of an SSL certificate that is in PFX format.

Specify the certificate data for your selected option in the parameters that follow.

If you set Certificate Input Type to 'KeyVault', specify these parameters:

Parameter Name Value
Key Vault Certificate Secret ID Enter the secret ID of the SSL certificate present in the Key Vault. To create a Key Vault and add a certificate, see Add a certificate to Key Vault (Azure).
Managed Identity Resource ID for Key Vault Enter the resource ID of the user-assigned managed identity that has permission to access the Key Vault. If your managed identity does not have access to the Key Vault, the deployment fails.

If you set Certificate Input Type to 'Base64-encoded PFX Certificate', specify these parameters:

Parameter Name Value
Base64Encoded PFX Certificate Data Enter a string that is a base64-encoded value of an SSL certificate in PFX format.
Password For Base64Encoded PFX Certificate If the certificate requires a password, enter it here. Otherwise, leave the field blank.

Click Create to begin the deployment. This can take up to 40 minutes.

Step 3. Upload License File

The Network License Manager for MATLAB manages the MATLAB Production Server license file. The MATLAB Production Server deployment template provides an option to deploy the license manager or use an existing license manager. For more information about the Network License Manager for MATLAB, see Network License Manager for MATLAB. The following steps show how to upload the license file using the Network License Manager for MATLAB dashboard:

Note: You must provide a fixed license server MAC address to get a license file from the MathWorks License Center. For more information, see Configure MATLAB Production Server License for Use on the Cloud.

  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 Microsoft.Template.
  3. Click Outputs. Copy the parameter value for networkLicenseManagerURL and paste it in a browser.
  4. Log in using the administrator username and password that you specified in the Configure Cloud Resources step of the deployment process.
  5. Follow the instructions in the Network License Manager for MATLAB dashboard to upload your MATLAB Production Server license.

Step 4. Connect and Log In to the Dashboard

The MALAB Production Server dashboard provides a web-based interface to configure and manage server instances on the cloud. If your solution uses private IP addresses, you can connect to the dashboard from a VM that belongs to the same virtual network as the VM that hosts the dashboard.

Note: Complete these steps only after your resource group has been successfully created.

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

  1. In the Azure Portal, click Resource groups and select the resource group you created for this deployment from the list.
  2. Select Deployments from the left pane and click Microsoft.Template.
  3. Click Outputs from the left pane. Copy the parameter value for dashboardURL and paste it in a browser.
  4. Log in using the administrator username and password that you specified in the Configure Cloud Resources step of the deployment process.

MATLAB Production Server Dashboard

You are now ready to use MATLAB Production Server on Azure.

For more information on how to use the dashboard, see Manage MATLAB Production Server Using the Dashboard.

Configuring role-based access control for the dashboard is recommended. Role-based access control uses Azure AD to let 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.

To run applications on MATLAB Production Server, you will need to create applications using MATLAB Compiler SDK. For more information, see Create Deployable Archive for MATLAB Production Server.