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.
| Option | Purpose |
|---|---|
--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. |
--version | Print the binary version. Declared by #[command(version)] on the root command. |
--help | Print 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:
--endpointTRITONADM_ENDPOINT- The
endpointfield 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:
--api-keyTRITONADM_API_KEYTRITONADM_ACCESS_TOKEN(used verbatim; no automatic refresh)- 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
| Variable | Effect |
|---|---|
TRITONADM_ENDPOINT | Cluster endpoint, below --endpoint in precedence. |
TRITONADM_API_KEY | API key, below --api-key in precedence. |
TRITONADM_ACCESS_TOKEN | Bearer token used as-is, with no refresh. |
TRITONADM_CONFIG_DIR | Directory holding config.json, replacing the system default. |
RUST_LOG | Log 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.
| Command | Subcommands | Purpose |
|---|---|---|
configure | Interactive login: prompts for endpoint, username, and password, then writes the config file. | |
login | Re-authenticate against the stored endpoint, for example after the refresh token has expired. | |
logout | Delete the config file, forgetting the endpoint and both tokens. | |
env | Print shell export lines for the current session. | |
api-key | create, list, delete | Manage long-lived API keys. |
cn | list, show, approve, disable, label, reservoir, auto-approve | Manage compute-node registration and approvals. |
instance | list, show, create, delete, start, stop, restart, migrate | Manage instances: read, create, delete, power state, and migration. |
disk | list, show, resize | Read an instance's disks and grow a disk's backing volume. |
nic | list, show | Read NICs by IP, subnet, or instance. |
vpc | list, show, create, delete | Manage VPCs inside a project. |
subnet | list, show, create, delete | Manage subnets inside a VPC. |
floating-ip | list, show, create, delete, attach, detach | Allocate floating IPs and bind them to NICs. |
firewall-rule | list, show, create, delete | Manage VPC firewall rules. |
nat-gateway | list, show, create, delete | Manage VPC NAT gateways. |
route-table | list, show, create, delete | Manage VPC route tables. |
route | list, show, create, delete | Manage routes inside a route table. |
ssh-key-v1 | list, show | Read SSH keys through the /v1/ surface. |
system | instances, nics, images-using, cn-instances, cns, utilization, dhcp-lease-show, user-grant, user-revoke | Fleet-admin commands under /v1/system/. Capability-gated; a caller without the capability sees the same 404 as a missing resource. |
find | Client-side composition over the typed /v1/system/* list endpoints. | |
legacy | cns, vms, show | Inspect legacy (not control-plane-managed) zones the classifier discovered on registered compute nodes. |
audit | list, get, verify | Inspect and verify the audit log. |
operations | list, get, abandon | Inspect long-running operations (durable workflow runs). |
migration | list, show, watch, abort | Inspect and control instance migrations. |
silo | list, create, show, ssh-key, image | Manage silo-scoped resources. |
tenant | list, show, create, delete, init-storage, drop-storage, create-user, project, idp, image, ssh-key | Manage tenant-scoped resources, including projects, quotas, and the tenant IdP. |
image | list, show, add, delete, avail, import, fetch-nocloud, nocloud-versions, nocloud-vendors | Manage images through the /v1/ surface, plus upstream IMGAPI browse and import. |
ssh-key | list, add, show, delete | Manage public SSH keys, plus the global show and delete-by-id endpoints. |
auth | image, ssh-key | Manage the calling user's own user-scoped images and SSH keys. |
meta | list, get, set, unset, realized | Manage layered instance metadata at silo, tenant, project, and instance scope, plus the realized view for one instance. |
storage | cluster | Manage registered manta-storage clusters. |
fdb | status, policy, grow, approvals, decommission, configure, coordinators | Read and change the FoundationDB control-plane cluster. |
infra | zone | Manage the control-plane infrastructure zone registry. |
workspace | quota | Manage individual storage workspaces on mantad. |
user | policy, scoped-key | Manage mantad IAM users: inline policies and bucket-scoped access keys. |
config | list, get, set, reset | View and change cluster-wide tritond settings. Values live in FoundationDB and take effect on the next tritond restart. |
install | Install one image or global-zone agent from the signed release channel onto this host. | |
setup | apply, destroy | Bring up or tear down the control plane on this head node. |
update | Update running components from the signed release channel. | |
self-update | Replace this tritonadm binary from the signed release channel. | |
channel | revisions | Inspect 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.