Main Content

Update MATLAB Online Server

An update is a software change to the currently released version. MATLAB® Online Server™ releases updates to add functionality or provide bug fixes.

The workflow to install and deploy a MATLAB Online Server update is as follows:

  1. Configure a new server deployment.

  2. Download the MATLAB Online Server update.

  3. Install the update on the new server deployment.

  4. Switch MATLAB Online™ traffic from the old deployment (referred to as deployment A in this topic), to the new deployment (deployment B).

This process results in little to no downtime for your users.

Configure New Deployment

  1. Choose a deployment environment.

    • If deployments A and B are on the same Kubernetes® cluster, use a different Kubernetes namespace (NAMESPACE) for the new deployment. For example,

      • Existing deployment (A): mathworksa

      • New deployment (B): mathworksb

    • If you are bootstrapping a single-node cluster (mosadm bootstrap-node), use a new server.

    • If you are using a new Kubernetes cluster, configure the Kubernetes context on the terminal (KUBECONFIG configuration).

  2. Choose a different domain name (DOMAIN_BASE) for the new deployment. For example:

    • Existing deployment (A): matlab.domain.com

    • New deployment (B): matlab2.domain.com

Download Server Update

  1. On the MathWorks Downloads page, set I Want To to Get Updates.

  2. Select the release and update you want to download.

  3. Expand the MATLAB Online Server section. This section is visible only if you are signed in as an administrator for a MATLAB Online Server license.

  4. Download the MATLAB Online Server update file.

Install Server Update on New Deployment

  1. Extract the MATLAB Online Server update file to a new folder.

  2. Edit install.config for deployment B, using the same information you used for deployment A, except:

    • For DOMAIN_BASE, use the new domain (for example, matlab2.domain.com).

    • If you are using the same Kubernetes cluster, use the new NAMESPACE (for example, mathworksb).

  3. Deploy the MATLAB Online Server update on the new server or namespace by using the mosadm deploy command. The number of namespaces must not exceed the number of clusters.

    Note

    Make sure you use the correct mosadm for the deployment you are working with. For example, for this new deployment (deployment B), check that you are calling mosadm from the deployment B folder.

    ./mosadm deploy

    This command uses Helm® to install all the charts, customized with any overrides that you generated in the previous section.

  4. Check that the services are all running with kubectl, replacing your-namespace with the namespace you used for MATLAB Online Server:

    kubectl get pods --namespace your-namespace

    The pods running MATLAB can take several minutes to fully start (2/2 containers). It is important to wait until the pods are in the ready state. If any of the containers do not start running, check the license server and the install.config settings. See Resolve MATLAB Pod Issues.

  5. Verify that you have successfully installed the new MATLAB Online Server instance by navigating to the new DOMAIN_BASE (for example, matlab2.domain.com).

Switch to New Deployment

  1. In the B deployment, in the <OVERRIDES_DIR>/<cluster>/<namespace>/all.yaml file, update the domainBase value (matlab2.domain.com) to the original DOMAIN_BASE from deployment A (matlab.domain.com).

  2. Make deployment B ready for DNS cutover by issuing the following command:

    mosadm upgrade --namespace mathworksb

  3. Verify that you have successfully updated all pods; see Check Pod Status.

  4. (Optional) To test with a restricted set of users or on a single machine before switching the DNS to the new deployment, perform a local verification.

    For example, update your operating system’s hosts file to point your original domain base with the new server’s IP address. To do so, update the hosts file:

    • Linux®: /etc/hosts

    • Windows®: <Windows Install>\System32\drivers\etc\hosts

    • macOS: /etc/hosts

    Add the following line:

    <new ip address> <old DOMAIN_BASE>

    For example:

    52.201.253.135 matlab.domain.com

    This update means that when DOMAIN_BASE is accessed from this machine, the requests go to deployment B. You can now verify the MATLAB Online Server installation for deployment B, using the verification process in the Verify Installation section of the installation instructions.

  5. Perform the DNS cutover to redirect the traffic to the new deployment (B) from the old deployment (A) using your vendor’s instructions to update DNS records. Depending on your DNS provider, switching the DNS might require taking the MATLAB Online server offline for some time.

After the DNS switch, all MATLAB users must log in again.

If you encounter any failures, see the Troubleshooting topics for further investigation. You can also start this procedure over.

Related Topics