Skip to content

Latest commit

 

History

History
218 lines (148 loc) · 5.94 KB

File metadata and controls

218 lines (148 loc) · 5.94 KB

mwcsim

Command line tool for simulation platform.

Syntax

mwcsim [command] [flags]

Global Flags

Flag Short Description Default
--aws Create/delete cluster on AWS, or filter clusters by AWS
--config <path> Path to config file ~/.mwcsim/config.yaml
--etchosts <path> Location of hosts file for local clusters to manage local DNS /etc/hosts
--local Create/delete cluster on local machine with k3s, or filter clusters by local
--lockoverride Override existing configuration locks (use with caution)
--mwregistry <url> Container registry to pull MathWorks containers from containers.mathworks.com/simulation-platform
--projectid <id> GCP project ID for operations; uses current gcloud config if unset
--region <region> -r AWS region for operations; uses AWS default config if unset us-east-1
--tfexe <path> Terraform/OpenTofu executable path; checks for both on PATH if empty
--workdir <path> -w Working directory for terraform and kubernetes manifest files mwcsim installation directory

Commands

mwcsim version

Get the mwcsim version.

mwcsim version

mwcsim create backend

Create the mwcsim configuration storage backend. This is done automatically as part of any other mwcsim operation, but can be run standalone.

mwcsim create backend [flags]

mwcsim create cluster

Create a simulation cluster.

mwcsim create cluster [flags]

Flags

Flag Short Description Default
--domain <domain> Specify cluster domain if setting it up on your own none
--operation <op> -x Specify granular operation to perform (see below) all
--template -t Create cluster from base template in <workdir>/template and <workdir>/terraform-template
--version <ver> -v Cluster simulation worker minimum version (see below) R2025bUpdate2

Operations (-x)

Operations run in the following order and can be individually specified:

Operation Description
init Initialize cluster in mwcsim backend
tfplan Run terraform plan
tfapply Run terraform apply
kustomize0 Build wave 0 kustomization files
kubeapply0 Apply wave 0 kubernetes resources (loadbalancer endpoint becomes available for DNS)
domain Provision domain automatically if not manually provisioned
kustomize1 Build wave 1 kustomization files
kubeapply1 Apply wave 1 kubernetes resources
configure Configure kubernetes resources (cluster ready to use after this)
all Run all operations above (except tfplan); only works with auto-provisioned domain
stableblock Run init, tfapply, kustomize0, kubeapply0 (no valid domain required)
dynamicblock Run domain, kustomize1, kubeapply1, configure (valid domain required)

All operations can be rerun if there are issues during setup.

Version (-v)

Version Supported Client Versions
R2024bUpdate6 R2024b Update 6 and later updates (R2025a currently unsupported)
R2025bUpdate2 R2025b Update 2 and later updates

mwcsim create user

Create a user for a cluster. Once a user is created, the auto-generated password is returned.

mwcsim create user [flags]

Flags

Flag Short Description
--cluster <name> -c Specify the cluster to create the user in

mwcsim delete backend

Delete the mwcsim configuration storage backend. All clusters must be deleted, all operations stopped, and all locks released before the backend can be deleted.

mwcsim delete backend [flags]

mwcsim delete cluster

Delete a simulation cluster.

mwcsim delete cluster [flags]

Flags

Flag Short Description Default
--delete-data Delete all data in the cluster storage
--ignore-errors-releasedomain Ignore errors during the releasedomain operation and continue
--operation <op> -x Specify granular operation to perform (see below) all

Operations (-x)

Operations run in the following order:

Operation Description
tfplan Run terraform plan
kubedelete1 Delete wave 1 kubernetes resources
releasedomain Release domain if auto-provisioned
kubedelete0 Delete wave 0 kubernetes resources
deletedata Delete storage contents (--delete-data flag also required)
tfdestroy Run terraform destroy
deinit De-initialize cluster from mwcsim backend
all Run all operations (except tfplan)

All operations can be rerun if there are issues during deletion.


mwcsim get backend

Get the mwcsim configuration storage backend(s), one per provider.

Aliases: backend, backends

mwcsim get backend [flags]

Flags

Flag Short Description
--output <format> -o Output format: json or yaml

mwcsim get cluster

Get details on a simulation cluster or list all clusters.

Aliases: cluster, clusters

mwcsim get cluster [name] [flags]

Flags

Flag Short Description
--output <format> -o Output format: json or yaml

mwcsim get user

Get details of a cluster user or admin.

mwcsim get user [name] [flags]

Flags

Flag Short Description
--cluster <name> -c Specify the cluster to get the user data from
--credential Get user credential data
--output <format> -o Output format: json or yaml

mwcsim completion

Generate shell auto-completion scripts.

mwcsim completion [shell]