Main Content

mosadm upgrade

Upgrade MATLAB Online Server services in Kubernetes cluster

Since R2020a

    Description

    example

    mosadm upgrade upgrades all services currently deployed in the Kubernetes® cluster for MATLAB® Online Server™ that have YAML override files. This command upgrades services only if they have configuration changes since their last deployment.

    example

    mosadm upgrade serviceName upgrades only the specified service.

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

    Examples

    collapse all

    If you are updating a property that is applicable to all services:

    1. In the all-services override file (all.yaml), update the desired property.

    2. Run: mosadm upgrade

    ./mosadm upgrade

    Update the number of available MATLAB instances in the prewarmed MATLAB pool.

    First, in the MATLAB Pool override file (matlab-pool.yaml), change the replicaCount attribute value to the desired number, for example: replicaCount: 4

    Then, upgrade the MATLAB pool service.

    ./mosadm upgrade 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 upgrade

    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 upgrade 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 upgrade 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 upgrade core-ui --set-string 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 upgrade --values yamlFilePath1 --values yamlFilePath2

    mosadm upgrade 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 upgrade 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 upgrade 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 upgrade command.

    --skip-log-file

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

    --skip-prompt, -y

    Force acceptance of the terms of use for the mosadm upgrade 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 upgrade generates a new temporary folder every time you run the command.

    --verbose

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

    Version History

    Introduced in R2020a