drpcli¶
drpcli¶
A CLI application for interacting with the DigitalRebar Provision API
Synopsis¶
drpcli is the official command-line tool for managing a DigitalRebar Provision (DRP) server. It communicates with the DRP REST API and provides subcommands for every resource type and operational function DRP exposes.
Authentication can be provided via username/password, a pre-issued token, or
mutual TLS client certificates. drpcli will cache authentication tokens in
~/.cache/drpcli/tokens/ to avoid repeated password prompts.
Connection parameters can be set with flags, environment variables, or a
~/.drpclirc configuration file. Environment variables take precedence over
the rc file; flags take precedence over both. Additionally, the drpcli config
commands can be used to generate multiple profiles for managing different access sets.
drpcli is a general-purpose command for interacting with a dr-provision endpoint. It has several subcommands which have their own help.
It also has several environment variables that control aspects of its operation:
-
RS_OBJECT_ERRORS_ARE_FATAL: Have drpcli exit with a non-zero exit status if a returned object has an Errors field that is not empty. Normally it will only exit with a non-zero exit status when the API returns with an error or fatal status code.
-
RS_ENDPOINTS: A space-separated list of URLS that drpcli should try to communicate with. The first one that authenticates will be used.
-
RS_ENDPOINT: The URL that drpcli should try to communicate. Ignored if RS_ENDPOINTS exists in the environment. Default to https://127.0.0.1:8092
-
RS_URL_PROXY: The HTTP proxy drpcli should use when communicating with the dr-provision endpoint. It functions like the standard http_proxy environment variable.
-
RS_TOKEN: The token to use for authentication with the dr-provision endpoint. Overrides RS_KEY.
-
RS_CATALOG: The URL to use to fetch the artifact catalog. All commands in the 'drpcli catalog' group of commands use this. Defaults to https://repo.rackn.io
-
RS_HTTP_REQUEST_RETRY_COUNT: Specifies the number of times to retry http requests upon failure. Defaults to 0.
-
RS_HTTP_REQUEST_RETRY_DELAY_MAX: Specifies the maximum delay (in seconds) between retries for HTTP requests upon failure. This variable only takes effect when RS_HTTP_REQUEST_RETRY_COUNT is set. Defaults to 60 seconds.
-
RS_FORMAT: The output format drpcli will use. Defaults to json
-
RS_PRINT_FIELDS: The fields of an object to display in text or table format. Defaults to all of them.
-
RS_DOWNLOAD_PROXY: The http proxy to use when downloading bootenv ISO files. If this is not set we will look for the https_proxy and http_proxy env vars.
-
RS_NO_HEADER: Controls whether to print column headers in text or table output mode.
-
RS_NO_COLOR: Controls whether output to a terminal should be stripped.
-
RS_COLORS: Controls the 8 ANSI colors that should be used in colorized output.
-
RS_TRUNCATE_LENGTH: The max length of an individual column in text or table mode.
-
RS_FORCE_NEW_SESSION: Should the client always create a new session
-
RS_IGNORE_UNIX_PROXY: Should the client ignore the unix domain socket to the server.
-
RS_CLIENT_KEY: The path to a client private key. Used with RS_CLIENT_CERT.
-
RS_CLIENT_CERT: The path to a client certificate. Used with RS_CLIENT_KEY.
-
RS_SERVER_VERIFY: Should the client verify the server's certificate.
-
RS_CA_CERT: The path to an additional CA certificate.
-
RS_KEY: The default username:password to use when missing a token.
-
RS_SHOW_GLOBAL_HELP_FLAGS: Show global flags in help message (defaults to true)
Options¶
--ca-cert string CA certificate used to verify the server certs (with the system set)
-c, --catalog string The catalog file to use to get product information (default "https://repo.rackn.io")
--catalog-path string The path to where the catalog file exists on the drp server. By default and historically this has been /files/rebar-catalog. For example, if no catalog urls are provided, the complete path will be https://drp-ip:8090/files/rebar-catalog (default "/files/rebar-catalog")
-S, --catalog-source string A location from which catalog items can be downloaded. For example, in airgapped mode it would be the local catalog
--client-cert string Client certificate to use for communicating to the server - replaces RS_KEY, RS_TOKEN, RS_USERNAME, RS_PASSWORD
--client-key string Client key to use for communicating to the server - replaces RS_KEY, RS_TOKEN, RS_USERNAME, RS_PASSWORD
-C, --colors string The colors for JSON and Table/Text colorization. 8 values in the for 0=val,val;1=val,val2... (default "0=32;1=33;2=36;3=90;4=34,1;5=35;6=95;7=32;8=92")
-d, --debug Whether the CLI should run in debug mode
-D, --download-proxy string HTTP Proxy to use for downloading catalog and content
-E, --endpoint string The Digital Rebar Provision API endpoint to talk to (default "https://127.0.0.1:8092")
-X, --exit-early Cause drpcli to exit if a command results in an object that has errors
--fetch-catalogs all Determines which catalog urls to use to fetch the catalog. If set to all, all the catalog urls defined with catalog_url and catalog_urls as well as the default catalog will be used. If set to server, only the catalog urls defined on the server will be used. If set to cli, then the specific url specified with the -c flag will be used. It defaults to `all`. Allowed values `all, `server`, `cli`. (default "all")
-f, --force When needed, attempt to force the operation - used on some update/patch calls
--force-new-session Should the client always create a new session
-F, --format string The serialization we expect for output. Can be "json" or "yaml" or "text" or "table" (default "json")
-h, --help help for drpcli
--http-request-retry-count int Specifies the number of retries for downloads in case of failure
--http-request-retry-delay-max int Specifies the maximum delay (in seconds) between HTTP/HTTPS retry attempts (default 60)
--ignore-unix-proxy Should the client ignore unix proxies
-N, --no-color Whether the CLI should output colorized strings
-H, --no-header Should header be shown in "text" or "table" mode
-x, --no-token Do not use token auth or token cache
-P, --password string password of the Digital Rebar Provision user (default "r0cketsk8ts")
-p, --platform string Platform to filter details by. Defaults to current system. Format: arch/os
-J, --print-fields string The fields of the object to display in "text" or "table" mode. Comma separated
-r, --ref string A reference object for update commands that can be a file name, yaml, or json blob
--server-verify Should the client verify the server cert
-G, --show-global-help-flags Show global flags in help message
-T, --token string token of the Digital Rebar Provision access
-t, --trace string The log level API requests should be logged at on the server side
-Z, --trace-token string A token that individual traced requests should report in the server logs
-j, --truncate-length int Truncate columns at this length (default 40)
-u, --url-proxy string URL Proxy for passing actions through another DRP
-U, --username string Name of the Digital Rebar Provision user to talk to (default "rocketskates")
SEE ALSO¶
- drpcli activities - Manage and interact with
activitiesresources - drpcli agent - Manage the
drpcliagent service that processes machine jobs locally - drpcli airgap - Manage air-gapped DRP content bundles for offline installation
- drpcli alerts - Manage and interact with
alertsresources - drpcli archive - Create and extract ROFS static archives usable by dr-provision without extraction
- drpcli autocomplete - Generate a bash shell autocompletion script for drpcli
- drpcli batches - Manage and interact with
batchesresources - drpcli blueprints - Manage
blueprints(reusable work order task sequence templates) - drpcli bootenvs - Manage and interact with
bootenvsresources - drpcli catalog - Manage the RackN content catalog (list, search, install, and build catalog items)
- drpcli catalog_items - Manage individual
catalog_itemsentries in the DRP content catalog - drpcli certs - Manage TLS certificate signing requests and private keys
- drpcli clusters - Manage
clusters(machine groups for coordinated operations) - drpcli completion - Generate completion script
- drpcli config - Manage drpcli connection profiles (endpoint, credentials, TLS settings)
- drpcli connections - Inspect active API and WebSocket connections to
dr-provision - drpcli content-archive - Build and upload atomic content archives (content bundles, plugins, ISOs, files)
- drpcli contents - Manage DRP content packs (bundles of bootenvs, templates, tasks, and more)
- drpcli contexts - Manage DRP execution
contextsfor task dispatch - drpcli debug - Gather runtime debug data of
[type]from DRP and save it to[target] - drpcli document - Generate markdown reference documentation for all drpcli commands
- drpcli endpoints - Manage remote DRP
endpointsfor multi-site federation - drpcli events - Post and watch real-time DRP events
- drpcli extended - Manage extended DRP objects by
--ldatatype - drpcli files - Manage DRP
filesfor upload, download, and static serving - drpcli filters - Manage DRP event
filtersfor notification routing - drpcli fingerprint - Display the machine fingerprint used to identify this system in DRP
- drpcli generate - Generate DRP content pack scaffolding and object YAML files
- drpcli gohai - Get basic system information as a JSON blob
- drpcli identity_providers - Manage SSO, OAuth, and LDAP identity providers configured in DRP
- drpcli info - Access DRP server information and service health status
- drpcli instances - Manage and interact with
instancesresources - drpcli interfaces - List and inspect network interfaces tracked by DRP for DHCP and provisioning
- drpcli isos - Manage ISO images stored in DRP (list, upload, download, delete)
- drpcli jobs - Manage and interact with
jobsresources - drpcli labs - Manage and render DRP lab environment definitions
- drpcli leases - Manage DHCP leases assigned by the DRP DHCP server
- drpcli license - Manage and inspect the DRP license
- drpcli logs - Access and stream DRP server log entries
- drpcli machines - Manage and interact with
machinesresources - drpcli net - Manage local network configuration using DRP machine network params (Linux only)
- drpcli objects - List the available object types in DRP
- drpcli params - Manage DRP
params(parameter definitions and metadata) - drpcli plugin_providers - Manage and interact with
plugin_providersresources - drpcli plugins - Manage DRP
plugins(loaded extension instances) - drpcli pools - Manage DRP machine
poolsfor workload allocation - drpcli preflight - Run pre-installation validation checks before deploying
dr-provision - drpcli prefs - List and set DigitalRebar Provision global server preferences
- drpcli profiles - Manage and interact with
profilesresources - drpcli proxy - Run a local UNIX socket proxy so other drpcli invocations can share a DRP session
- drpcli reservations - Manage DHCP
reservationsto bind IP addresses to MAC addresses - drpcli resource_brokers - Manage DRP
resource_brokersthat provide machine resources from external providers - drpcli roles - Manage DRP access control
rolesand their associated claims - drpcli stages - Manage DRP workflow
stagesthat define task execution points - drpcli static - Transfer files using the DRP static HTTP, HTTPS, and TFTP file servers
- drpcli store_objects - Access raw DRP data
store_objectsfrom the backing data store - drpcli subnets - Manage and interact with
subnetsresources - drpcli support - Collect support bundles and diagnostic information for RackN support
- drpcli system - Access system-level CLI commands for DRP administration
- drpcli tasks - Manage DRP
tasks(atomic units of work run on machines) - drpcli templates - Manage and interact with
templatesresources - drpcli tenants - Manage DRP
tenantsfor namespace isolation in multi-tenant deployments - drpcli trigger_providers - Manage DRP
trigger_providers(plugins that watch for external events) - drpcli triggers - Manage DRP
triggers(event-driven rules that run workflows automatically) - drpcli users - Manage and interact with
usersresources - drpcli ux_options - Manage DRP web UI
ux_optionsconfiguration settings - drpcli ux_settings - Manage DRP web UI
ux_settingsfor global UI configuration - drpcli ux_views - Manage DRP web UI
ux_views(custom dashboard and page definitions) - drpcli version - Print the drpcli version string
- drpcli version_sets - Manage DRP
version_sets(pinned collections of content pack versions) - drpcli work_orders - Manage and interact with
work_ordersresources - drpcli workflows - Manage DRP
workflows(ordered sequences of stages for machine provisioning) - drpcli zones - Manage DRP
zonesfor DNS and DHCP network segmentation