Main Content

Host MATLAB Online on Your Infrastructure

MATLAB® Online Server™ lets you centrally host and manage MATLAB Online™ for the MATLAB users in your organization, enabling them to access MATLAB from their web browsers. You can integrate MATLAB Online Server with your network file system and authentication protocol, configure hardware resources, and define access for your users.

After you configure MATLAB Online Server, your users can access MATLAB Online from a browser by providing their organizational sign-on credentials. MATLAB Online provides an interactive MATLAB desktop environment for iterative analysis and prototyping. This access includes the Live Editor for creating scripts that combine code, output, and formatted text in an executable notebook. MATLAB Online Server can be hosted on your on-premises infrastructure, or it can be hosted on public cloud infrastructures but under your private accounts.

MATLAB Online UI on MATLAB Online Server with browser URL matlab.acme.com

Kubernetes Architecture

MATLAB Online Server runs on Kubernetes, a container orchestration engine for automating the deployment, management, and scaling of applications. In this architecture, a Kubernetes® cluster hosts one or more virtual or physical machines called nodes. Using the Kubernetes API, you can centrally manage, monitor, and scale compute resources assigned to these nodes. MATLAB Online Server is deployed as a node within a Kubernetes cluster.

If your organization does not already use Kubernetes, then you can create a new Kubernetes cluster and deploy MATLAB Online Server as a single node within that cluster.

MATLAB Online Server inside a single node within a Kubernetes cluster.

If your organization already has a Kubernetes cluster running on a cloud service (for example, AWS® or Azure®), then you can deploy MATLAB Online Server as a new node in that cluster along with other applications.

MATLAB Online Server as part of a multi-node Kubernetes cluster with other applications.

MATLAB Online Server Components

MATLAB Online Server is composed of a set of containerized microservices and applications. These components run in pods, which are related containers running in Kubernetes that together form larger applications.

MATLAB Online Server components come in two main types: the core services and the MATLAB pool.

Core Services

The core services performs core server operations such as authenticating users, assigning MATLAB compute resources to users, and checking out licenses. Each service runs in a separate pod.

Core-UI, Resource, Gateway, Licensing, and AuthNZ pods

ServiceDescription
Core-UI

Provides the login screen and other user interface (UI) capabilities.

Resource

Enables clients to acquire and then release MATLAB instances from the MATLAB Pool. This component maintains information on all MATLAB instances, such as the used or available instances and the users associated with certain instances.

Gateway

Maps MATLAB Online Server clients to their assigned MATLAB instances. After a mapping is created, the Gateway ensures that any request from a given client is forwarded to its assigned MATLAB instance.

AuthNZ

Authenticates and authorizes actions of MATLAB Online Server users and some MATLAB Online Server components.

Licensing

Communicates with the MathWorks® License Manager, which uses FlexNet Publisher (formerly FLEXlm®) to check for MATLAB Online Server licenses.

MATLAB Pool

The MATLAB pool group is a collection of pods in which each pod is dedicated to one MATLAB end user. When a user logs in, the server assigns a MATLAB pod from this resource pool to that user. That pod runs multiple services that together serve that user a MATLAB instance.

MATLAB pool containing multiple MATLAB pods. Each pod contains a Resource-Proxy and MATLAB service.

ComponentDescription
Resource-ProxyActs as a proxy server to the MATLAB service.
MATLABContains the MATLAB Runtime engine.

Login Workflow

The high-level workflow for when a user logs into the system is as follows:

  1. The user accesses MATLAB Online from a web browser at an organization-specific URL. The Core-UI component serves the landing page containing the request for the end user’s username and password. The incoming request goes through an Ingress controller, which acts as a load balancer and routes requests to the appropriate components. All incoming requests to the Kubernetes cluster go through this controller.

  2. The controller passes the user's credentials to the AuthNZ component, which passes them to the server of an identity provider, such as Active Directory®, for authentication.

  3. If the authentication is successful, the Resource component assigns the user an available MATLAB instance (that is, a pod) from the MATLAB resource pool, and the Licensing component checks out a license from the network license server.

  4. The server mounts user file storage and shared file systems and serves the MATLAB user interface to the user. Any subsequent requests by the user go through the Gateway component, which forwards them to their assigned MATLAB instance.

MATLAB Online Server login workflow

Server Configuration

Configuration settings for components reside in Helm® YAML files. Helm is the package manager for Kubernetes that is used to deploy services onto Kubernetes clusters. YAML files are a plain-text, key: value file format used to encode data. In MATLAB Online Server, YAML file names must be all lowercase and their contents must be strictly formatted.

To apply MATLAB Online Server service-specific configuration, edit the settings in the following YAML file.

<server-root>/overrides/<cluster-name>/<namespace-name>/<service-name>.yaml
  • <server-root> is the MATLAB Online Server installation folder.

  • <cluster-name> is the name of the Kubernetes cluster.

  • <namespace-name> is the namespace of the MATLAB Online Server deployment.

  • <service-name> is the name of the microservice.

For example, this sample path is for the YAML file used to configure the MATLAB resource pool.

~/matlab_online_server/overrides/matlab-online-server/mathworks/matlab-pool.yaml

You can configure the root folder, cluster name, and server namespace during the installation process.

Server Management

You can manage services and images for MATLAB Online Server using the mosadm command. The syntax for mosadm is as follows:

mosadm command option1 ... optionN

Use mosadm to perform commands such as:

  • Load, list, and push the Docker® images used to build containerized applications.

  • Deploy, upgrade, and undeploy services.

  • Get system information.

To see the available options, use the mosadm help command.

Server Installation

To get started with MATLAB Online Server, install the server on a single-node Kubernetes cluster for development and testing purposes. See Perform Minimal MATLAB Online Server Installation on Single Machine.

If your organization has an existing cloud-managed Kubernetes cluster, you can then migrate your installation to the cloud service used by your organization or perform a fresh installation. See Install MATLAB Online Server on Cloud-Managed Kubernetes.

If you encounter issues during the installation process:

Related Topics