Access your organization's VMware Tanzu Mission Control resources using the command-line interface.

Note: Tanzu Mission Control Self-Managed uses only the tmc CLI. As noted in the Tanzu Mission Control console, the tmc CLI is now in deprecation, however it is supported for Tanzu Mission Control Self-Managed.

Prerequisites

Downloading the the Tanzu Mission Control CLI (tmc) requires an internet connection, either directly from your Tanzu Mission Control Self-Managed deployment or through a separate workstation.

Procedure

  1. If your workstation has a browser, you can use the Tanzu Mission Control console to download the the CLI binary. Otherwise skip this step.
    1. In the left navigation pane of the Tanzu Mission Control console, click Automation center.
    2. On the Automation Center page, click Download CLI, and then choose the environment where you want to use the CLI.
  2. If your workstation does not have a browser, download the binary using a wget command.
    1. Locate the supported binary for your system using curl.
      In the following command, replace my-dns-zone with the DNS zone defined for your Tanzu Mission Control Self-Managed deployment.
      curl https://my-dns-zone/v1alpha1/system/binaries
      This command returns output similar to the following:
      {"latestVersion":"0.5.3-defeac11","versions":{"0.5.3-defeac11":{
      "darwinX64":"https://tmc-cli.s3-us-west-2.amazonaws.com/tmc/0.5.3-defeac11/darwin/x64/tmc",
      "linuxX64":"https://tmc-cli.s3-us-west-2.amazonaws.com/tmc/0.5.3-defeac11/linux/x64/tmc",
      "windowsX64":"https://tmc-cli.s3-us-west-2.amazonaws.com/tmc/0.5.3-defeac11/windows/x64/tmc"}}}
    2. Download the binary using wget.
      In the following command, replace my-os-binary with the quoted URL for your operating system.
      wget -O /usr/local/bin/tmc my-os-binary
      For example:
      wget -O /usr/local/bin/tmc "https://tmc-cli.s3-us-west-2.amazonaws.com/tmc/0.5.3-defeac11/linux/x64/tmc"
  3. Make the downloaded binary executable.
    1. After the download completes, move the tmc executable to an accessible bin directory (for example, ~/bin or %UserProfile%\bin).
    2. Make sure the bin directory is accessible on your PATH.
    3. Make the file executable.
      • For Linux or Mac OS:
        chmod +x ~/bin/tmc
      • For Windows:
        move %UserProfile%\bin\tmc %UserProfile%\bin\tmc.exe
        attrib +x %UserProfile%\bin\tmc.exe
        
    4. Now change to a different directory and verify that the CLI is ready to use by checking the help.
      tmc --help
      If you are running on Mac OS, you might encounter the following error:
      "tmc" cannot be opened because the developer cannot be verified.
      If this happens, you need to create a security exception for the tmc executable. Locate the tmc app in the Finder, control-click the app, and then choose Open.
  4. Open a command window and use the following command to log in.
    tmc login --self-managed --basic-auth
  5. Follow the interactive prompts to complete login.
    Note:

    Tanzu Mission Control does not store or have access to your username and password. These inputs are used only to initiate the authorization request during login. You can alternatively store these inputs in environment variables (TMC_SELF_MANAGED_USERNAME and TMC_SELF_MANAGED_PASSWORD) for a non-interactive login.

    By using these environment variables and some command line flags, you can log in without the interactive prompts. For example:
    tmc login --self-managed --basic-auth --endpoint tmc.tanzu.io:443 --name my-test --no-configure
    For more information, enter the following command.
    tmc login --help

What to do next

After you log in, you can manage your clusters at the command line.