Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

CLI reference

Angel Ivanov edited this page Nov 17, 2016 · 10 revisions

Admiral CLI commands

[admiral (basic)] (#admiral-basic-1)

[events] (#admiral-events)
[login] (#admiral-login)
[logout] (#admiral-logout)
[wait] (#admiral-wait)

[admiral (container management)] (#admiral-container-management-1)

[exec] (#admiral-exec)
[inspect] (#admiral-inspect)
[logs] (#admiral-logs)
[ps] (#admiral-ps)
[restart] (#admiral-restart)
[rm] (#admiral-rm)
[run] (#admiral-run)
[scale] (#admiral-scale)
[search] (#admiral-search)
[start] (#admiral-start)
[stop] (#admiral-stop)

[admiral app] (#admiral-app-1)

[inspect] (#admiral-app-inspect)
[ls] (#admiral-app-ls)
[restart] (#admiral-app-restart)
[rm] (#admiral-app-rm)
[run] (#admiral-app-run)
[start] (#admiral-app-start)
[stop] (#admiral-app-stop)

[admiral cert] (#admiral-cert-1)

[add] (#admiral-cert-add)
[ls] (#admiral-cert-ls)
[rm] (#admiral-cert-rm)
[update] (#admiral-cert-update)

[admiral config] (#admiral-config-1)

[get] (#admiral-config-get)
[inspect] (#admiral-config-inspect)
[set] (#admiral-config-set)

[admiral credentials] (#admiral-credentials-1)

[add] (#admiral-credentials-add)
[ls] (#admiral-credentials-ls)
[rm] (#admiral-credentials-rm)
[update] (#admiral-credentials-update)

[admiral custom-properties] (#admiral-custom-properties-1)

[ls] (#admiral-custom-properties-ls)
[rm] (#admiral-custom-properties-rm)
[set] (#admiral-custom-properties-set)

[admiral host] (#admiral-host-1)

[add] (#admiral-host-add)
[disable] (#admiral-host-disable)
[enable] (#admiral-host-enable)
[ls] (#admiral-host-ls)
[rm] (#admiral-host-rm)
[update] (#admiral-host-update)

[admiral network] (#admiral-network-1)

[create] (#admiral-network-create)
[inspect] (#admiral-network-inspect)
[ls] (#admiral-network-ls)
[rm] (#admiral-network-rm)

[admiral placement] (#admiral-placement-1)

[add] (#admiral-placement-add)
[ls] (#admiral-placement-ls)
[rm] (#admiral-placement-rm)
[update] (#admiral-placement-update)

[admiral placement-zone] (#admiral-placement-zone-1)

[add] (#admiral-placement-zone-add)
[ls] (#admiral-placement-zone-ls)
[rm] (#admiral-placement-zone-rm)
[update] (#admiral-placement-zone-update)

[admiral project] (#admiral-project-1)

[add] (#admiral-project-add)
[ls] (#admiral-project-ls)
[rm] (#admiral-project-rm)
[update] (#admiral-project-update)

[admiral registry] (#admiral-registry-1)

[add] (#admiral-registry-add)
[disable] (#admiral-registry-disable)
[enable] (#admiral-registry-enable)
[ls] (#admiral-registry-ls)
[rm] (#admiral-registry-rm)
[update] (#admiral-registry-update)

[admiral requests] (#admiral-requests-1)

[clear] (#admiral-requests-clear)
[inspect] (#admiral-requests-inspect)
[ls] (#admiral-requests-ls)
[rm] (#admiral-requests-rm)

[admiral template] (#admiral-template-1)

[export] (#admiral-template-export)
[import] (#admiral-template-import)
[inspect] (#admiral-template-inspect)
[ls] (#admiral-template-ls)
[rm] (#admiral-template-rm)

admiral (basic)

admiral events

Prints events log.

Usage:
  admiral events [OPTIONS]

Options:
      --clear   Clear all logged events.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral login

Login with username and pass

Usage:
  admiral login [OPTIONS]

Options:
  -p, --pass string     Password.
      --status          Print information about current user.
      --tenant string   *vRA* Tenant.
      --url string      Set URL config property.
  -u, --user string     Username.
      --vra             *vRA* Login in Admiral instance embedded in vRA.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral logout

Logout user

Usage:
  admiral logout [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral wait

Wait until task has finished.

Usage:
  admiral wait [TASK-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral (container management)

admiral exec

Run a command in a running container.

Usage:
  admiral exec [CONTAINER-ID] [OPTIONS]

Options:
      --cmd string    Command to execute.
  -i, --interactive   Interactive mode.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral inspect

Return low-level information on a container.

Usage:
  admiral inspect [CONTAINER-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral logs

Fetch the logs of a container

Usage:
  admiral logs [CONTAINER] [OPTIONS]

Options:
  -s, --since int32   Since when to show logs.(minutes) (default 15)

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral ps

Lists existing containers.

Usage:
  admiral ps

Options:
  -a, --all            Show all containers.
  -q, --query string   Add query.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral restart

Restart container.

Usage:
  admiral restart [CONTAINER-ID] [OPTIONS]

Options:
      --async   Wait until the task is finished.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral rm

Remove existing container(s).

Usage:
  admiral rm [CONTAINER-ID]... [OPTIONS]

Options:
      --async          Wait until the task is finished.
  -f, --force          Do not prompt asking for remove.
  -q, --query string   Every container that match the query will be removed.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral run

Provision container

Usage:
  admiral run [IMAGE] [OPTIONS]

Options:
      --async                      Wait until the task is finished.
      --cluster-size int32         The number of nodes to be provisioned. (default 1)
      --cmd stringSlice            Commands to run on container start.
      --cpu-shares string          CPU shares.
      --deployment-policy string   DeploymentPolicy ID.
  -e, --env stringSlice            Set enivornment variables.
  -h, --hostname string            Container host name.
      --log-driver string          Logging driver for container.
      --max-restarts int32         Max restart count on container failures.
  -m, --memory int                 Memory limit. Default unit: kb. Units supported: kb/mb/gb. Example: 1024mb
      --memory-swap int            Memory limit. Default unit: kb. Units supported: kb/mb/gb. Example: 1024mb
      --network-mode string        Driver to manage the Network. (default "bridge")
      --project string             Project ID.
  -p, --publish stringSlice        Publish a container's port(s) to the host.
  -P, --publish-all                Publish all exposed ports to random ports. (default true)
      --restart string             Restart policy to apply. (default "no")
  -v, --volume stringSlice         Bind mount volume
  -w, --workdir string             Working directory inside the container

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral scale

Scale existing container

Usage:
  admiral scale [CONTAINER-ID] [OPTIONS]

Options:
      --async         Wait until the task is finished.
  -c, --count int32   *Required* Nodes count of the resource.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral search

Search for image from which you can provision container.

Usage:
  admiral search [IMAGE-NAME] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral start

Starts existing container

Usage:
  admiral start [CONTAINER-ID]... [OPTIONS]

Options:
      --async   Wait until the task is finished.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral stop

Stops existing container

Usage:
  admiral stop [CONTAINER-ID] [OPTIONS]

Options:
      --async   Wait until the task is finished.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral app

admiral app inspect

Inspect application for additional info.

Usage:
  admiral app inspect [APPLICATION-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral app ls

Lists existing applications.

Usage:
  admiral app ls

Options:
  -q, --query string   Add query.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral app restart

Restarts application.

Usage:
  admiral app restart [APPLICATION-ID] [OPTIONS]

Options:
      --async   Wait until the task is finished.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral app rm

Stops existing application

Usage:
  admiral app rm [APPLICATION-ID] [OPTIONS]

Options:
      --async   Wait until the task is finished.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral app run

Provision application from template.

Usage:
  admiral app run [TEMPLATE-ID] [OPTIONS]

Options:
      --async            Wait until the task is finished.
      --file string      Provision template from file.
      --keep             Do not remove template after provisioning.
      --project string   Project ID.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral app start

Starts existing application

Usage:
  admiral app start [APPLICATION-ID] [OPTIONS]

Options:
      --async   Wait until the task is finished.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral app stop

Stops existing application

Usage:
  admiral app stop [APPLICATION-ID] [OPTIONS]

Options:
      --async   Wait until the task is finished.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral cert

admiral cert add

Add certificate

Usage:
  admiral cert add [OPTIONS]

Options:
  -f, --file string   File to import certificate.
  -u, --url string    Url to import certificate.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral cert ls

Lists existing certificates

Usage:
  admiral cert ls

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral cert rm

Remove certificate.

Usage:
  admiral cert rm [CERTIFICATE-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral cert update

Update certificate.

Usage:
  admiral cert update [CERTIFICATE-ID] [OPTIONS]

Options:
  -f, --file string   File to import certificate.
  -u, --url string    Url to import certificate. (NOT IMPLEMENTED YET).

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral config

admiral config get

Set value from provided key key.

Usage:
  admiral config get [OPTIONS]

Options:
  -k, --key string   *Required* Key

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral config inspect

Shows current config properties

Usage:
  admiral config inspect [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral config set

Set value to provided key.

Usage:
  admiral config set [OPTIONS]

Options:
  -k, --key string     *Required* Key
  -v, --value string   *Required* Value

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral credentials

admiral credentials add

Add credentials

Usage:
  admiral credentials add [OPTIONS]

Options:
      --cp stringSlice    Add custom properties. Format: key=value
      --name string       *Required* Credentials ID.
      --password string   *Required if using username* Password.
      --private string    *Required if using ceritficates* Location to your private key.
      --public string     *Required if using certificates* Location to your public key.
      --username string   *Required if using username* Username.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral credentials ls

Lists credentials.

Usage:
  admiral credentials ls

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral credentials rm

Removes existing credentials.

Usage:
  admiral credentials rm [CREDENTIALS-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral credentials update

Update credentials.

Usage:
  admiral credentials update [CREDENTIALS-ID] [OPTIONS]

Options:
      --password string   Password.
      --private string    Location to your private key.
      --public string     Location to your public key.
      --username string   Username.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral custom-properties

admiral custom-properties ls

Lists current properties of given entity.

Usage:
  admiral custom-properties ls [OPTIONS]

Options:
      --credentials string   ID of the credentials that you want to manage custom properties.
      --host string          ID of the host that you want to manage custom properties.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral custom-properties rm

Remove custom property to given entity.

Usage:
  admiral custom-properties rm [OPTIONS]

Options:
      --credentials string   ID of the credentials that you want to manage custom properties.
      --host string          ID of the host that you want to manage custom properties.
  -k, --key stringSlice      *Required* Keys of custom properties.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral custom-properties set

Set custom property to given entity.

Usage:
  admiral custom-properties set [OPTIONS]

Options:
      --credentials string   ID of the credentials that you want to manage custom properties.
      --host string          ID of the host that you want to manage custom properties.
  -k, --key stringSlice      *Required* Keys of custom properties.
  -v, --value stringSlice    *Required* Values of custom properties

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral host

admiral host add

Add host

Usage:
  admiral host add [OPTIONS]

Options:
      --accept                     Auto accept if certificate is not trusted.
      --address string             *Required* Address of host.
      --cp stringSlice             Add custom properties. Format: key=value
      --credentials string         Credentials ID.
      --deployment-policy string   DeploymentPolicy ID.
      --password string            *Required if adding new credentials* Password.
      --placement-zone string      Placement zone ID.
      --private string             *Required if adding new credentials* Location to your private key.
      --public string              *Required if adding new credentials* Location to your public key.
      --username string            *Required if adding new credentials* Username.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral host disable

Disable host with address provided.

Usage:
  admiral host disable [HOST-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral host enable

Enable host with address provided.

Usage:
  admiral host enable [HOST-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral host ls

Lists existing hosts.

Usage:
  admiral host ls

Options:
  -q, --query string   Add query.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral host rm

Remove existing host.

Usage:
  admiral host rm [HOST-ID] [OPTIONS]

Options:
      --async   Wait until the task is finished.
      --force   Force remove.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral host update

Edit existing hosts.

Usage:
  admiral host update [HOST-ID] [OPTIONS]

Options:
      --accept                     Auto accept if certificate is not trusted.
      --credentials string         New Credentials ID.
      --deployment-policy string   New DeploymentPolicy ID.
      --name string                New host name.
      --placement-zone string      New Placement zone ID.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral network

admiral network create

Create a network

Usage:
  admiral network create [NAME] [OPTIONS]

Options:
      --async                  Wait until the task is finished.
      --cp stringSlice         Add custom properties. Format: key=value
  -d, --driver string          Driver to manage the Network.
      --gateway stringSlice    Gateway for the master subnet.
      --host stringSlice       *Required* Hosts IDs.
      --ip-range stringSlice   IP Range
      --ipam-driver string     IPAM driver.
      --subnet stringSlice     Subnet in CIDR format that represents a network segment.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral network inspect

Display detailed network information

Usage:
  admiral network inspect [NETWORK-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral network ls

Lists existing networks.

Usage:
  admiral network ls

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral network rm

Remove a network(s)

Usage:
  admiral network rm [NETWORK-ID] [OPTIONS]

Options:
      --async   Wait until the task is finished.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral placement

admiral placement add

Add placement

Usage:
  admiral placement add [NAME] [OPTIONS]

Options:
      --cpu-shares string          CPU shares.
      --deployment-policy string   DeploymentPolicy ID.
      --instances string           Instances.
      --memory-limit string        Memory limit. Default unit: kb. Units supported: kb/mb/gb. Example: 1024mb (default "0kb")
      --placement-zone string      *Required* Placement zone ID.
      --priority string            Priority.
      --project string             Project ID.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral placement ls

Lists existing placements.

Usage:
  admiral placement ls

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral placement rm

Remove placement

Usage:
  admiral placement rm [PLACEMENT-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral placement update

Update placement.

Usage:
  admiral placement update [PLACEMENT-ID] [OPTIONS]

Options:
      --cpu-shares int32           New CPU shares. (default -1)
      --deployment-policy string   New DeploymentPolicy ID.
      --instances int32            New Instances. (default -1)
      --memory-limit string        New Memory limit. Default unit: kb. Units supported: kb/mb/gb. Example: 1024mb (default "0kb")
      --name string                New name
      --placement-zone string      New Placement zone ID.
      --priority int32             New Priority. (default -1)
      --project string             New Project ID.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral placement-zone

admiral placement-zone add

Add placement zone by given name.

Usage:
  admiral placement-zone add [NAME] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral placement-zone ls

Lists existing placement zones.

Usage:
  admiral placement-zone ls

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral placement-zone rm

Removes existing placement zone

Usage:
  admiral placement-zone rm [PLACEMENT-ZONE-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral placement-zone update

Edit placement zone

Usage:
  admiral placement-zone update [PLACEMENT-ZONE-ID] [OPTIONS]

Options:
      --name string   New name of placement zone.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral project

admiral project add

Add project.

Usage:
  admiral project add [NAME] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral project ls

List projects.

Usage:
  admiral project ls [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral project rm

Remove project.

Usage:
  admiral project rm [GROUP-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral project update

Update project.

Usage:
  admiral project update [project-ID] [OPTIONS]

Options:
      --name string   New name.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral registry

admiral registry add

Add registry

Usage:
  admiral registry add [NAME] [OPTIONS]

Options:
      --accept               Auto accept if certificate is not trusted.
      --address string       *Required* Address of registry.
      --cp stringSlice       Add custom properties. Format: key=value
      --credentials string   *Required if using existing credentials* Credentials ID.
      --password string      *Required if adding new credentials* Password.
      --private string       *Required if adding new credentials* Location to your private key.
      --public string        *Required if adding new credentials* Location to your public key.
      --username string      *Required if adding new credentials* Username.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral registry disable

Disable registry.

Usage:
  admiral registry disable [REGISTRY-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral registry enable

Enable registry.

Usage:
  admiral registry enable [REGISTRY-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral registry ls

Lists existing registries.

Usage:
  admiral registry ls

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral registry rm

Remove existing registry.

Usage:
  admiral registry rm [REGISTRY-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral registry update

Usage:
  admiral registry update [REGISTRY-ID] [OPTIONS]

Options:
      --accept               Auto accept if certificate is not trusted.
      --address string       New address of registry.
      --credentials string   New credentials name.
      --name string          New registry name.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral requests

admiral requests clear

Clear all requests.

Usage:
  admiral requests clear [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral requests inspect

Inspect specific request.

Usage:
  admiral requests inspect [REQUEST-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral requests ls

Prints request log.

Usage:
  admiral requests ls [OPTIONS]

Options:
      --failed     Show failed only requests.
      --finished   Show finished only requests.
      --started    Show started only requests.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral requests rm

Remove specific request.

Usage:
  admiral requests rm [REQUEST-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral template

admiral template export

Download exported application.

Usage:
  admiral template export [TEMPLATE-ID] [OPTIONS]

Options:
      --file string     *Required* Path to the exported file.
      --format string   File format - vRA/Docker (default "yaml")

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral template import

Import yaml file.

Usage:
  admiral template import [PATH/TO/FILE] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral template inspect

Inspect template.

Usage:
  admiral template inspect [TEMPLATE-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral template ls

Lists existing templates.

Usage:
  admiral template ls

Options:
  -q, --query string   Add query.

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.

admiral template rm

Remove template.

Usage:
  admiral template rm [TEMPLATE-ID] [OPTIONS]

Global Flags:
      --token string   Authorization token.
      --verbose        Showing every request/response json body.