dpsctl#
Overview#
dpsctl is a CLI used to query or send control commands to the Dynamic Power Software.
Usage#
dpsctl [global options] [command [command options]]
Flags#
The following global options configure the endpoint, authentication, and output:
Global dpsctl Options
--host string, -H string DPS gRPC host address (default: "localhost") [$DPSCTL_HOST]
--port uint, -p uint DPS gRPC port number (default: 50051) [$DPSCTL_PORT]
--grpc-timeout duration, -D duration gRPC timeout (duration) (default: 1m0s) [$DPSCTL_GRPC_TIMEOUT]
--resolve string Provide a custom address for a hostname in format 'host:port:addr' (similar to curl --resolve)
--credentials-path string, -c string The path to the credentials configuration file (default: "${HOME}/.dpsctl/credentials.yaml") [$DPSCTL_CREDENTIALS_PATH]
--oidc-issuer string OIDC issuer URL for browser login endpoint discovery [$DPSCTL_OIDC_ISSUER]
--oidc-token-url string OIDC token endpoint URL override [$DPSCTL_OIDC_TOKEN_URL]
--oidc-device-auth-url string OIDC browser login authorization endpoint URL override [$DPSCTL_OIDC_DEVICE_AUTH_URL]
--oidc-client-id string, --client-id string OIDC OAuth client ID [$DPSCTL_OIDC_CLIENT_ID, $DPSCTL_CLIENT_ID]
--oidc-ca-cert-file string Path to PEM CA bundle for OIDC endpoint verification [$DPSCTL_OIDC_CA_CERT_FILE]
--oidc-allow-http Allow HTTP OIDC endpoint URLs for local development only (default: false) [$DPSCTL_OIDC_ALLOW_HTTP]
--oidc-oauth-scope string, --oauth-scope string OIDC OAuth scopes to request for browser login or client credentials [$DPSCTL_OIDC_OAUTH_SCOPE, $DPSCTL_OAUTH_SCOPE]
--insecure Disable TLS encryption for gRPC connections (default: false) [$DPSCTL_INSECURE]
--insecure-tls-skip-verify Disable TLS certificate validation for gRPC connections (default: false) [$DPSCTL_INSECURE_TLS_SKIP_VERIFY]
--ca-cert-path string Path to CA certificate file for TLS verification [$DPSCTL_CA_CERT_PATH]
--client-cert-path string Path to client certificate file for mTLS authentication [$DPSCTL_CLIENT_CERT_PATH]
--client-key-path string Path to client private key file for mTLS authentication [$DPSCTL_CLIENT_KEY_PATH]
--auth-mode string Authentication mode. Valid values are: auto, jwt, mtls (default: "auto") [$DPSCTL_AUTH_MODE]
--output string, -o string Output format. Valid values are: json, yaml (default: "json") [$DPSCTL_OUTPUT]
--no-retry Whether to avoid retrying a retryable command (default: false) [$DPSCTL_NO_RETRY]
--no-version-check Skip the preflight dpsctl/dps-server version mismatch check (default: false) [$DPSCTL_NO_VERSION_CHECK]
--max-retries int The number of retries to attempt on a retryable command (default: 3) [$DPSCTL_MAX_RETRIES]
--retry-delay int The time to wait between retries, in seconds, for a retryable command (default: 3) [$DPSCTL_RETRY_DELAY]
--log-file string Path to log file (default: "${HOME}/.dpsctl/dpsctl.log") [$DPSCTL_LOG_FILE]
--debug Enable debug logging (default: false) [$DEBUG]
--help, -h show help
--version, -v print the version
For the server settings that these options must match, refer to Configure Server Authentication.
OIDC Browser Login#
Use --oidc-issuer with login to discover the identity provider’s device
authorization and token endpoints. Provide --oidc-client-id and
--oidc-oauth-scope when your deployment requires specific values. The browser
login defaults are client ID dpsctl and scope dps:api when no client ID or
scopes are supplied through flags or saved client settings.
The interactive CLI uses a public OAuth client without a client secret. It sends no secret during device authorization, token exchange, or token refresh. The UI uses a separate public client. Register these clients through Configure OIDC Mode.
You can override the discovered endpoints with --oidc-device-auth-url and
--oidc-token-url. Without issuer discovery, provide both endpoint URLs.
Use --oidc-ca-cert-file when the provider’s certificate requires a private
certificate authority (CA).
Refer to dpsctl login for the sign-in procedure and token selection. Automation uses the separate client credentials flow described in the following section.
OIDC Client Credentials#
In OIDC mode, dpsctl can obtain a service account access token for unattended
applications using the OAuth 2.0 client credentials grant. Register a separate
confidential client with a client ID and secret for this flow. The following
global flags configure that flow; each has an environment-variable equivalent.
Flag |
Environment variable |
Description |
|---|---|---|
|
|
OIDC token endpoint URL for the client-credentials grant. |
|
|
OAuth client ID. |
|
|
Path to a file containing the client secret. Prefer this option to an inline secret. |
|
|
Inline client secret. Use the secret-file option to keep the value out of process listings and shell history. |
|
|
OAuth scope to request. Repeatable. Defaults to |
|
|
PEM CA bundle used to verify the token endpoint’s TLS certificate (for a private or enterprise CA). |
|
|
Allow an |
The following details apply to client credentials:
The token endpoint must use HTTPS unless
--oidc-allow-httpis set.--oidc-client-secretand--oidc-client-secret-fileare hidden fromdpsctl --help. Prefer--oidc-client-secret-fileor theDPSCTL_OIDC_CLIENT_SECRET_FILEenvironment variable.The aliases
--client-id,--client-secret,--client-secret-file, and--oauth-scoperemain available, with their correspondingDPSCTL_CLIENT_ID,DPSCTL_CLIENT_SECRET,DPSCTL_CLIENT_SECRET_FILE, andDPSCTL_OAUTH_SCOPEenvironment variables.Acquired tokens are cached in the credentials file and reused while valid when the token URL, client ID, and scopes match.
If DPS is configured with an OIDC
allowedClientIdsallowlist, the client ID must be listed there; otherwise the request is rejected asinvalid_authorized_party.Client credentials apply to normal commands.
dpsctl loginuses LDAP username/password authentication or OIDC browser login and does not use client credentials.
For service account examples, refer to Obtain a Service Account Token.
Commands#
server-version- Get DPS server version informationlogin- Log in to the DPS servertopology- Topology operationsresource-group- Resource Group operationsgpu-policy- Set GPU power policiesdevice- Manage devicescheck- DPS diagnostic toolspolicy- Policy operationssettings- Settings operationsimport- Import operationsverify- Verify DPS deployment statusvalidate- Validation operations (dry-run analysis without persisting state)auth- Authentication operationsnvgrid- NvGrid power management operationstask- Task operationsagent- Agent operationshelp,h- Shows a list of commands or help for one command
Aliases#
Command |
Aliases |
|---|---|
|
|
|
|
|
|
|
|