Skip to main content

tritonadm command index

tritonadm is the Triton Cloud operator command-line interface. It has 40 top-level commands. Most of them are typed calls against a running control plane. Five of them (install, setup, update, self-update, and channel) act on the local host or on the signed release channel, and they ignore the global endpoint and credential flags.

Global options

--endpoint and --api-key are declared global = true, so they are accepted on every subcommand.

OptionPurpose
--endpoint <URL>Override the cluster endpoint. Falls back to TRITONADM_ENDPOINT, then to the endpoint field in the on-disk config.
--api-key <KEY>Authenticate with this API key instead of the stored login session. Falls back to TRITONADM_API_KEY.
--versionPrint the binary version. Declared by #[command(version)] on the root command.
--helpPrint usage. Available on the root command and every subcommand.

The install, setup, update, self-update, and channel dispatch arms never read either value, so passing them there has no effect.

Endpoint and credential resolution

The endpoint is resolved in this order, highest priority first:

  1. --endpoint
  2. TRITONADM_ENDPOINT
  3. The endpoint field in the config file

When none of the three yields a value, the command fails with this message:

no endpoint configured: pass --endpoint, set TRITONADM_ENDPOINT, or run `tritonadm configure`

The bearer credential is resolved in this order, highest priority first:

  1. --api-key
  2. TRITONADM_API_KEY
  3. TRITONADM_ACCESS_TOKEN (used verbatim; no automatic refresh)
  4. The token pair stored in the config file

A stored access token with 60 seconds or less of life left is refreshed through /v1/auth/refresh before the command runs, and the new pair is written back to the config file. When the stored refresh token has itself expired, the command fails with this message:

refresh token has expired; run `tritonadm login` to re-authenticate

Environment variables

VariableEffect
TRITONADM_ENDPOINTCluster endpoint, below --endpoint in precedence.
TRITONADM_API_KEYAPI key, below --api-key in precedence.
TRITONADM_ACCESS_TOKENBearer token used as-is, with no refresh.
TRITONADM_CONFIG_DIRDirectory holding config.json, replacing the system default.
RUST_LOGLog filter. With no value set, the filter is warn,host_resources=info.

Logs are written to stderr with timestamps suppressed.

Configuration file

The config file is config.json inside TRITONADM_CONFIG_DIR when that variable is set, and inside <user config dir>/triton/tritonadm/ otherwise, which is $XDG_CONFIG_HOME/triton/tritonadm/config.json on Linux and ~/Library/Application Support/triton/tritonadm/config.json on macOS. It holds three fields: endpoint, tokens, and imgapi_sources. Writes go to a config.json.tmp sibling, are chmod'ed 0600 on Unix, and are then renamed over the target. imgapi_sources defaults to a single entry, https://images.smartos.org.

Command index

Commands are listed in declaration order. The subcommands column lists the first level below each command only.

CommandSubcommandsPurpose
configureInteractive login: prompts for endpoint, username, and password, then writes the config file.
loginRe-authenticate against the stored endpoint, for example after the refresh token has expired.
logoutDelete the config file, forgetting the endpoint and both tokens.
envPrint shell export lines for the current session.
api-keycreate, list, deleteManage long-lived API keys.
cnlist, show, approve, disable, label, reservoir, auto-approveManage compute-node registration and approvals.
instancelist, show, create, delete, start, stop, restart, migrateManage instances: read, create, delete, power state, and migration.
disklist, show, resizeRead an instance's disks and grow a disk's backing volume.
niclist, showRead NICs by IP, subnet, or instance.
vpclist, show, create, deleteManage VPCs inside a project.
subnetlist, show, create, deleteManage subnets inside a VPC.
floating-iplist, show, create, delete, attach, detachAllocate floating IPs and bind them to NICs.
firewall-rulelist, show, create, deleteManage VPC firewall rules.
nat-gatewaylist, show, create, deleteManage VPC NAT gateways.
route-tablelist, show, create, deleteManage VPC route tables.
routelist, show, create, deleteManage routes inside a route table.
ssh-key-v1list, showRead SSH keys through the /v1/ surface.
systeminstances, nics, images-using, cn-instances, cns, utilization, dhcp-lease-show, user-grant, user-revokeFleet-admin commands under /v1/system/. Capability-gated; a caller without the capability sees the same 404 as a missing resource.
findClient-side composition over the typed /v1/system/* list endpoints.
legacycns, vms, showInspect legacy (not control-plane-managed) zones the classifier discovered on registered compute nodes.
auditlist, get, verifyInspect and verify the audit log.
operationslist, get, abandonInspect long-running operations (durable workflow runs).
migrationlist, show, watch, abortInspect and control instance migrations.
silolist, create, show, ssh-key, imageManage silo-scoped resources.
tenantlist, show, create, delete, init-storage, drop-storage, create-user, project, idp, image, ssh-keyManage tenant-scoped resources, including projects, quotas, and the tenant IdP.
imagelist, show, add, delete, avail, import, fetch-nocloud, nocloud-versions, nocloud-vendorsManage images through the /v1/ surface, plus upstream IMGAPI browse and import.
ssh-keylist, add, show, deleteManage public SSH keys, plus the global show and delete-by-id endpoints.
authimage, ssh-keyManage the calling user's own user-scoped images and SSH keys.
metalist, get, set, unset, realizedManage layered instance metadata at silo, tenant, project, and instance scope, plus the realized view for one instance.
storageclusterManage registered manta-storage clusters.
fdbstatus, policy, grow, approvals, decommission, configure, coordinatorsRead and change the FoundationDB control-plane cluster.
infrazoneManage the control-plane infrastructure zone registry.
workspacequotaManage individual storage workspaces on mantad.
userpolicy, scoped-keyManage mantad IAM users: inline policies and bucket-scoped access keys.
configlist, get, set, resetView and change cluster-wide tritond settings. Values live in FoundationDB and take effect on the next tritond restart.
installInstall one image or global-zone agent from the signed release channel onto this host.
setupapply, destroyBring up or tear down the control plane on this head node.
updateUpdate running components from the signed release channel.
self-updateReplace this tritonadm binary from the signed release channel.
channelrevisionsInspect the release channel's sealed revisions.

Host-side commands

install, setup, update, self-update, and channel revisions run on tokio::task::spawn_blocking because they use a blocking HTTP client, and the first three also drive local host resources. Those three change the host through the host-resources crate, which runs imgadm and the SMF commands svccfg and svcadm, so they run in the global zone. Zone lifecycle work goes through the native tritond-vmadm library, which drives zonecfg, zoneadm, and zfs rather than the vmadm command. setup and update act on the head node.

fdb status --break-glass, fdb configure, and fdb coordinators also run in the global zone: they reach the FoundationDB zone over zlogin rather than through tritond.

Transport

tritonadm installs aws-lc-rs as the process-default rustls crypto provider at startup and builds its HTTPS client against the bundled webpki-roots trust store, because the SmartOS global zone has no system CA bundle.

See also