Main Content

Manage Azure Resources for MATLAB Production Server (PAYG)

After you deploy the MATLAB® Production Server™ pay as you go (PAYG) environment on Azure®, use the Azure portal to manage resources that you provision for in the deployment.

Change the Number of Virtual Machines

Each MATLAB Production Server instance runs on a virtual machine (VM) and each instance runs multiple MATLAB Production Server workers. You can change the number of VMs after the initial deployment.

  1. Log in to the Azure portal and select the resource group associated with the deployment.

  2. Select the VM scale set resource vmss<uniqueID>.

  3. Select Scaling from the left pane to change the number of VMs in the VM scale set.

In the Azure Resource Manager (ARM) template, the overprovision property is set to true by default. This means that Azure provisions more virtual machines than necessary initially to buffer against any machines that fail. If all VMs are healthy, Azure scales down to the specified the number of VMs.

Change Self-Signed Certificate to Application Gateway

When you deploy MATLAB Production Server (PAYG), you get an HTTPS endpoint to the Azure application gateway that uses a self-signed SSL certificate. This endpoint provides lets you connect to the server instances and the dashboard. To change the certificate to the application gateway, use the Azure portal to create a listener and add a rule.

Create a Listener

  1. Log in to the Azure portal and select the resource group associated with the deployment.

  2. Select the application gateway resource with the name vmss<uniqueID>-agw.

  3. Select Listeners from the left pane and click +Basic on the top pane.

  4. Enter values for these parameters.

    NameValue
    Listener nameEnter a name for the listener.
    Frontend IPChoose Public if your solution uses public IPs; otherwise, choose Private.
    PortEnter any free port between 8001 and 10000.
    ProtocolSelect HTTPS.

  5. Select Create New in Choose a Certificate dropdown, then select Upload a certificate.

  6. Upload a PFX certificate, give it a name, and create a password. Click Add.

Add a Rule

  1. Log in to the Azure portal and select the resource group associated with this deployment.

  2. Select the application gateway resource with the name vmss<uniqueID>-agw.

  3. Select Rules from the left pane and click +Basic on the top pane.

  4. Enter values for these parameters.

    NameValue
    NameEnter a name for the rule.
    ListenerSelect the listener you created.
    Configure redirectionSelect the box if appropriate.
    Backend poolSelect the available value.
    HTTP settingSelect the available value.

View Logs

View MATLAB Production Server logs using Azure Application Insights.

  1. Log in to the Azure portal and select the resource group associated with the deployment.

  2. Select the resource logs-apmservice.

  3. Select Logs from the left pane of the resource.

  4. Create a new query and click Run.

To view logs generated by all the server instances, you can use the following query.

traces
| where customDimensions.source == "prodServerInstance"

To view the last 200 logs generated by all server instances, you can use the following query.

traces
| where customDimensions.source == "prodServerInstance"
| limit 200

To view only the error logs generated by all server instances, you can use the following query. For more information on log severity, see log-severity.

traces
| where customDimensions.source == "prodServerInstance"
| where parse_json(message).severity == "error"  

To view logs generated by all the server instances within a certain time duration, you can use the following query.

traces
| where customDimensions.source == "prodServerInstance"
| where timestamp >= todatetime('2020-02-11T17:21:45.188659Z') 
| and timestamp <= todatetime('2020-02-11T19:22:46.881331Z')   

Upload MATLAB Applications

The Azure file share lets you upload and deploy multiple applications to the server.

  1. Log in to the Azure portal and select the resource group associated with the deployment.

  2. Select the storage account resource within the resource group. This resource usually has the name serverlog<uniqueID>.

  3. In the pane that opens, select File Share > deployable-archives > auto_deploy.

  4. Select Upload to select the applications to upload, then click Upload.

Delete Resource Group

A resource group contains all related resources for an Azure solution. You can remove the resource group and all associated cluster resources when you are no longer need them. You cannot undo this.

  1. Log in to the Azure portal and select the resource group associated with the deployment.

  2. Click Delete resource group to delete all resources deployed in the group.

  3. Enter the name of the resource group to confirm the deletion.

Related Topics