Skip to main content

tritonadm command index

tritonadm is the Triton Cloud operator command-line interface. It has 52 top-level commands. Most of them are typed calls against a running control plane. Six of them (install, setup, update, versions, self-update, and channel) also act on the local host or on the signed release channel.

Only setup ignores the global --endpoint and --api-key options. install, update, versions, self-update, and channel read the cluster through tritond: install, self-update, and channel revisions read the channel the cluster follows when no channel flag is given, and update, versions, channel refresh, and channel import call tritond directly.

Global options​

Every option below is declared global = true, so it is accepted on every subcommand.

OptionDefaultPurpose
--endpoint <URL>noneOverride the cluster endpoint. Falls back to TRITONADM_ENDPOINT, then to the endpoint field in the on-disk config.
--api-key <KEY>noneAuthenticate with this API key instead of the stored login session. Falls back to TRITONADM_API_KEY.
--timeout <SECS>60Give up on a request after this many seconds. 0 waits forever.
-v, --verboseoffOn error, print the full cause chain.
-j, --jsonoffEmit JSON instead of a table. Same as --format json.
--format <FORMAT>tableOutput format: table, json, or yaml.
-o, --output <COLS>noneTable columns to show, comma separated. A dotted path reads a field of the raw record. Refused with --json, --format json, or --format yaml.
-l, --longoffShow the resource's wider column set. Ignored with -o.
-s, --sort <COLS>noneSort by these columns, comma separated. A leading - reverses a column. Applies to tables and JSON.
-H, --no-headersoffOmit the header row. Refused with --json, --format json, or --format yaml.
--limit <N>noneStop after this many rows.
--versionPrint the binary version.
--helpPrint usage. Available on the root command and every subcommand.

-j together with a --format other than json is refused with -j means --format json; pass one or the other.

Endpoint and credential resolution​

When neither --endpoint nor TRITONADM_ENDPOINT is set, and no credential is given through --api-key, TRITONADM_API_KEY, or TRITONADM_ACCESS_TOKEN, tritonadm first tries the local tritond UNIX socket. It scans /zones/*/root/data/run/tritond.sock and uses the first path that exists. tritond authenticates that connection by the caller's uid, so no token is sent. The socket is readable by root only, so this applies to root in the head node global zone. workspace quota and the user policy and user scoped-key commands call the mantad admin API and do not work over the socket. They need --endpoint and a credential.

Otherwise 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

With no credential at all, the command fails with a NoSession error and the message not logged in, followed by run `tritonadm login`; for scripts and CI set TRITONADM_API_KEY (create one with `tritonadm api-key create`).

A stored access token with 60 seconds or less of life left is refreshed before the command runs, and the new pair is written back to the config file. A tritond token pair refreshes through /v1/auth/refresh. When its refresh token has expired, the command fails with a NoSession error and the message the refresh token has expired, followed by the same run tritonadm login line. A single sign-on token pair refreshes against the identityd issuer, under a lock on the config directory. When its refresh token has expired, the command fails with this message:

session has expired; run `tritonadm login --sso` 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.
TRITON_DC_ANCHORSPEM file of extra trust anchors for the tritond client. See Transport.
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. Writes go to a config.json.tmp sibling that is created with mode 0600, and are then renamed over the target.

FieldContents
endpointThe cluster endpoint.
tokensThe access and refresh token pair, their expiry times, and the provider that issued them (tritond or identityd).
identityd_issuerThe issuer login --sso used. Written on the first successful SSO login. Omitted when unset.
imgapi_sourcesUpstream IMGAPI servers for image avail and image import. Defaults to a single entry, https://images.smartos.org.
scopeDefault silo, tenant, and project UUIDs for commands whose --silo, --tenant, or --project flag is absent. Set by configure. Omitted when empty.

Command index​

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

CommandSubcommandsPurpose
configureLog in and write the on-disk config.
loginRe-authenticate against the stored endpoint. --sso uses the identityd device flow.
logoutDelete the on-disk config, forgetting the endpoint and tokens.
whoamiShow the principal, endpoint, credential, capabilities, and scope defaults.
completion <SHELL>Print a shell completion script.
llms.txtPrint a guide for coding agents and an index of every command.
llms-full.txtPrint the agent guide and every flag of every command.
envPrint shell export lines for the current session.
api-keycreate, list (ls), delete (rm)Manage long-lived API keys.
cnlist (ls), show, approve, disable, root-password, label, traits, reservoir, sandbox, mantablock, auto-approve, boot, setup, execManage compute-node registration and approvals. See tritonadm cn.
instance (inst)list (ls), show, create, delete (rm), start, stop, restart, migrate, move-to-mantablockManage instances fleet-wide. For move-to-mantablock, see tritonadm MantaBlock commands.
disklist (ls), show, resizeManage instance disks.
niclist (ls), showManage instance NICs.
vpclist (ls), show, create, delete (rm)Manage VPCs.
subnetlist (ls), show, create, delete (rm)Manage subnets.
floating-ip (ip)list (ls), show, create, delete (rm), attach, detachManage floating IPs.
firewall-rule (fwrule)list (ls), show, create, delete (rm)Manage firewall rules.
nat-gatewaylist (ls), show, create, delete (rm)Manage NAT gateways.
route-tablelist (ls), show, create, delete (rm)Manage route tables.
routelist (ls), show, create, delete (rm)Manage routes.
systemnics, utilization, dhcp-lease-show, user-grant, user-revoke, tenantFleet-wide operator reads and user capabilities. Capability-gated; a caller without the capability sees 404 NotFound.
lsShortcut for tritonadm instance list.
cnsShortcut for tritonadm cn list.
findFind what a UUID or IP address names, fleet-wide.
legacycns, vms, showInspect zones on registered compute nodes that tritond does not manage.
auditlist (ls), show, verifyInspect and verify the audit log.
mantablockformatMantaBlock settings of the fleet. See tritonadm MantaBlock commands.
operation (op)list (ls), show, abandonInspect long-running operations (sagas).
jobshow, failInspect the agent work queue and fail a job by hand.
meteringbilling, coverage, gaps, file, trace, usage, review, storageInspect compute-metering evidence and observed usage.
migration (mig)list (ls), show, watch, abort, recoverInspect and control instance migrations.
silolist (ls), create, show, rename, identityd-issuer, image, package, provisioning-policy, signup-policyManage silos and their IdP, SSH keys, images, and packages.
tenantlist (ls), show, create, delete (rm), init-storage, drop-storage, create-user, project, idp, image, ssh-keyManage tenants and their projects, quotas, IdP, images, and keys.
image (img)list (ls), show, add, delete (rm), upload, set-owner, avail, import, fetch-nocloud, nocloud-versions, nocloud-vendorsManage images. See tritonadm image upload.
ssh-key (key)list (ls), show, delete (rm)Manage public SSH keys.
authimage, ssh-keyThe calling user's own user-scoped images and SSH keys.
metalist (ls), get, set, unset, realizedManage layered instance metadata at silo, tenant, project, or instance scope.
storagedeploy, cluster, filesystem, gatewayManage registered storage clusters and deployments.
identityissuer, silo-trustOperator identity directory (identityd, SSO).
fdbstatus, policy, grow, approvals, tls, decommission, configure, coordinatorsFoundationDB cluster health and topology.
infrazone, portal, notifyd, mantafsThe zones the control plane itself runs on.
intentshow, export, revisions, proposals, propose, edit, approveThe committed cluster configuration and its proposed successors.
workspacequotaManage storage workspaces and their quotas.
userpolicy, scoped-keyManage storage IAM users and their inline policies.
configlist (ls), get, set, features, resetView and change cluster-wide tritond settings. See tritonadm config.
installInstall a zone image or global-zone agent from the release channel onto this host. See tritonadm install.
setupapply, bootstrap, converge, destroyBring up the control plane on this head node. See tritonadm setup.
updateUpdate running components from the release channel. See Updates and channels.
versionsShow what runs where against the channel, with drift marked.
self-updateUpdate this tritonadm binary from the release channel. See tritonadm self-update and channel.
channelrevisions, refresh, importWork with the signed release channel and the in-cluster mirror.
pistage, list (ls)Stage platform images onto the booter.

Host-side commands​

install, setup, self-update, and channel revisions run on tokio::task::spawn_blocking, because they use a blocking HTTP client. update is async. Its host-local component walk runs on a blocking task, and its whole-fleet path runs on the async runtime.

install, setup, and the host-local update walk change the host through the host-resources crate, which runs imgadm and the SMF commands svccfg, svcadm, and svcs, so they run in the global zone. Zone create, delete, and reprovision go through the native tritond-vmadm library rather than the vmadm command. setup still runs vmadm list and vmadm get to find addresses already in use on the control network. 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. It builds HTTPS clients with two different trust stores.

ClientUsed byTrust store
triton-tlsEvery tritond call, every self-update download, and the boot-mirror polling of the whole-fleet updateNative system certificates, which honor SSL_CERT_FILE and SSL_CERT_DIR. When none load, /opt/local/etc/openssl/certs/ca-certificates.crt, /etc/ssl/certs/ca-certificates.crt, and the two matching directories. When those are empty too, the bundled Mozilla roots. The PEM file named by TRITON_DC_ANCHORS is added on top.
host-resourcesThe channel manifest fetch of install, setup, update, versions, and channel revisionsThe bundled Mozilla roots only.

When the triton-tls client falls back to the bundled roots, it logs a no native root certificates found; using bundled Mozilla roots warning once per process.

See also​