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-premise infrastructure, or it can be hosted on public cloud infrastructures but under your private accounts.
kubernetes architecture
matlab online server runs on , 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.
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 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.
service | description |
---|---|
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 (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.
component | description |
---|---|
resource-proxy | acts as a proxy server to the matlab service. |
matlab | contains the matlab runtime engine. |
login workflow
the high-level workflow for when a user logs into the system is as follows:
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.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.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 thelicensing
component checks out a license from the network license server.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.
server configuration
configuration settings for components reside in helm® yaml files. 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.
matlab-online-server-root
/overrides/cluster
/namespace
/service-name
.yaml
here:
is the matlab online server installation folder.matlab-online-server-root
is the name of the kubernetes cluster.cluster
is the namespace of the matlab online server deployment.namespace
for example, this sample path is for the yaml file used to configure the matlab resource pool.
/opt/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 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 .
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 .
if you encounter issues during the installation process:
see the troubleshooting documentation.
contact technical support. see .