Main Content

mosadm deploy

Deploy MATLAB Online Server services to Kubernetes cluster

Since R2020a

    Description

    mosadm deploy deploys all MATLAB® Online Server™ services that have override charts into the Kubernetes® cluster for the server.

    example

    mosadm deploy serviceName deploys only the specified service.

    example

    mosadm deploy [serviceName] option1 ... optionN deploys services using the specified configuration options and either of the previous syntaxes.

    Examples

    collapse all

    ./mosadm deploy
    Cluster name matlab-online-server
    Cluster namespace mathworks
    Charts dir /.../matlab_online_server/charts
    Overrides dir /.../matlab_online_server/overrides
    Successfully installed release:  mathworks-authnz
    Successfully installed release:  mathworks-core-ui
    Successfully installed release:  mathworks-gateway
    Successfully installed release:  mathworks-license
    Successfully installed release:  mathworks-matlab-pool
    Successfully installed release:  mathworks-namespace
    Successfully installed release:  mathworks-resource

    Deploy the MATLAB pool service.

    ./mosadm deploy matlab-pool
    Cluster name matlab-online-server
    Cluster namespace mathworks
    Charts dir /.../matlab_online_server/charts
    Overrides dir /.../matlab_online_server/overrides
    Successfully installed release:  mathworks-matlab-pool

    Input Arguments

    collapse all

    Name of service, specified as one of the options in this table.

    NameDescription
    authnzAuthenticates and authorizes actions of MATLAB Online Server users and some MATLAB Online Server components
    core-ui

    Configures the login screen and other UI elements

    gatewayMaps MATLAB Online Server clients to their assigned MATLAB instances
    licenseCommunicates with MathWorks® License Manager to check for MATLAB Online Server licenses
    matlab-poolConfigures settings for MATLAB instances running in MATLAB Online Server
    namespaceConfigures the namespace used for a MATLAB Online Server deployment
    nginx-ingressConfigure the NGINX Ingress controller, which acts as a load balancer for MATLAB Online Server
    resource

    Maintains information on all MATLAB instances

    One or more configuration options, specified as strings corresponding to valid configuration options from these tables.

    Specific to mosadm deploy

    OptionDescription

    --install serviceName

    If a service with the name serviceName is not already deployed, deploy that service during upgrade.

    --set-string key1=value1,...,keyN=valueN

    YAML configuration values to deploy to the server, specified as a comma-separated list of key=value strings, where:

    • key is the name of the YAML field that stores the configuration value. To specify a nested field, use dot notation (for example, field.subfield).

    • value is the value of that YAML field.

    If you have many YAML configuration values to deploy, consider specifying them in a YAML file and deploying them using the --values option.

    mosadm deploy applies these configuration values directly to the Helm® chart of the server. These values override any corresponding ones set in the overrides file or values.yaml file of each service.

    Use --set-string to deploy sensitive information such as passwords to the server without having to specify it in server configuration files. Each deployed value is available only to the services that support its corresponding key field.

    Example: This command deploys a port@host license configuration to the server and makes it available to the license service from the flexlm.servers field.

    ./mosadm deploy license --set-string flexlm.servers=27000@lm.acme.com

    --set-file key1=filePath1,...,keyN=filePathN

    Files to deploy to the server, specified as a comma-separated list of key=filePath strings, where:

    • key is the name of YAML field that stores the file path. To specify a nested field, use dot notation (for example, field.subfield).

    • filePath is the path to the file. Specify an absolute path or a path relative to the MATLAB Online Server root folder.

    Use --set-file to deploy scripts, images, or other files to the server. Each deployed file is available only to the services that support its corresponding key field.

    Example: This command deploys a PNG file to the server and makes it available to the core-ui service from the loginPage.logo.file field.

    ./mosadm deploy core-ui --set-file loginPage.logo.file=/local/myorg.png

    --values yamlFilePath

    YAML file containing configuration values that you want to deploy to the server.

    Specify yamlFilePath as an absolute path or a path relative to the MATLAB Online Server root folder.

    To deploy multiple YAML files, specify multiple --values fields. For example:

    ./mosadm deploy --values yamlFilePath1 --values yamlFilePath2

    mosadm deploy applies the configuration values in this file directly to the Helm chart of the server. These values override any corresponding ones set in the overrides file or values.yaml file of each service.

    Example: myvalues.yaml

    --skip-create-namespace namespaceName

    Skip checking whether the specified namespace exists.

    Common to All mosadm Commands

    OptionDescription

    --charts-dir chartsDir

    Name of the MATLAB Online Server charts folder to use. This folder contains the Helm charts of the server.

    Specify chartsDir as an absolute path or a path relative to the MATLAB Online Server root folder mosRoot.

    Example: matlab_online_server/charts.

    Default: mosRoot/charts

    --data-dir dataDir

    Name of the MATLAB Online Server data folder to use.

    Specify dataDir as an absolute path or a path relative to the MATLAB Online Server root folder mosRoot.

    Example: matlab_online_server/data.

    Default: mosRoot/data

    --dry-run

    Print out the commands that would have run without this option specified but do not run the operation. Specify this option to test that the operation produces the expected results before actually executing it.

    --help, -h, help

    Output help for mosadm deploy to the command line.

    --kube-config configFilePath

    Path to the Kubernetes cluster configuration file. Specify configFilePath as an absolute path or a path relative to the MATLAB Online Server root folder mosRoot.

    Example: /etc/kubernetes/admin.conf

    By default, configFilePath is empty and Kubernetes obtains the cluster configuration from the KUBECONFIG environment variable (if specified) or the ~/.kube/config file. If you run mosadm deploy with sudo, then ~/.kube/config is equivalent to /root/.kube/config.

    --mos-root rootDir

    MATLAB Online Server root folder, specified as an absolute path or a path relative to the current folder, that is, the folder in which you can run mosadm commands.

    Default: . (current folder)

    --overrides-dir overridesDir

    Name of the MATLAB Online Server overrides folder to use.

    Specify overridesDir as an absolute path or a path relative to the MATLAB Online Server root folder, mosRoot.

    Example: matlab_online_server/overrides

    Default: mosRoot/overrides

    --quiet, -q

    Print only the most useful or relevant output from the mosadm deploy command.

    --skip-log-file

    Skip creating the install.log file and logging data about the mosadm deploy operation to this file.

    --skip-prompt, -y

    Force acceptance of the terms of use for the mosadm deploy and skip any command-line prompts normally provided when calling this command.

    --tmp-dir tempDirName

    Name of MATLAB Online Server temporary folder to use.

    Specify tempDirName as an absolute path or a path relative to the temporary folder.

    By default, mosadm deploy generates a new temporary folder every time you run the command.

    --verbose

    Output extra details about the mosadm deploy operation to the command line.

    Version History

    Introduced in R2020a