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 Oct 3, 2016 · 10 revisions

Admiral CLI commands

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

[events] (#admiral-events)
[login] (#admiral-login)
[logout] (#admiral-logout)
[requests] (#admiral-requests)
[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 deployment-policy] (#admiral-deployment-policy-1)

[add] (#admiral-deployment-policy-add)
[ls] (#admiral-deployment-policy-ls)
[rm] (#admiral-deployment-policy-rm)
[update] (#admiral-deployment-policy-update)

[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 template] (#admiral-template-1)

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

admiral (basic)

admiral events

Prints events log.

Usage:
  admiral events [OPTIONS]

Options:
      --clear   Clear all logged requests.

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.
      --url string    Set URL config property.
  -u, --user string   Username

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 requests

Prints request log.

Usage:
  admiral requests [OPTIONS]

Options:
      --clear      Clear all logged requests.
      --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 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. (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.
      --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          An integer value containing the container CPU shares
      --deployment-policy string   Deployment policy name.
  -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
      --memory-swap int            Total memory limit(Memory + Swap), set -1 to disable swap
      --network-mode string        Sets the networking mode for the container. (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) Resource count.

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:
  -c, --containers     Lists containers inside the template.
  -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   (Required) 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 some custom properties
      --name string       (Required) Credentials name.
      --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   New password.
      --private string    Location to new private key.
      --public string     Location to new public key.
      --username string   New 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          IP 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          IP of the host that you want to manage custom properties.
  -k, --key stringSlice      (Required) Keys of custom property.

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          IP of the host that you want to manage custom properties.
  -k, --key stringSlice      (Required) Keys of custom property.
  -v, --value stringSlice    (Required) Values of custom property.

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

admiral deployment-policy

admiral deployment-policy add

Adds deployment policy.

Usage:
  admiral deployment-policy add [NAME] [OPTIONS]

Options:
      --description string   (Required) Deployment policy description.

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

admiral deployment-policy ls

Lists existing deployment policies.

Usage:
  admiral deployment-policy ls

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

admiral deployment-policy rm

Removes existing depoyment policy.

Usage:
  admiral deployment-policy rm [DEPLOYMENT-POLICY-ID] [OPTIONS]

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

admiral deployment-policy update

Update deployment policy.

Usage:
  admiral deployment-policy update [DEPLOYMENT-POLICY-ID] [OPTIONS]

Options:
      --description string   (Required) New deployment policy description.
      --name string          (Required) New deployment policy name

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.
      --cp stringSlice             Add some custom properties
      --credentials string         (Required if using existing one.) Credentials ID.
      --deployment-policy string   Deployment policy ID.
      --ip string                  (Required) Address of host.
      --password string            (Required if adding new credentials)Password.
      --placement-zone string      (Required) 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-ADDRESS] [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-ADDRESS] [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-ADDRESS] [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 [ADDRESS] [OPTIONS]

Options:
      --accept                     Auto accept if certificate is not trusted.
      --credentials string         New credentials ID.
      --deployment-policy string   New deployment policy 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:
      --gateway stringSlice   Gateway for the master subnet.
  -o, --opt stringSlice       Set driver options. Format: "key:value"
      --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-NAME] [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

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

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 string                 CPU shares.
      --deployment-policy string   Deployment policy ID
      --instances string           Instances
      --memory 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

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 int32                  New CPU shares. (default -1)
      --deployment-policy string   New deployment policy ID
      --group string               New group
      --instances int32            New instances (default -1)
      --memory 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
      --prio int32                 New priority (default -1)

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]

Options:
      --description string   Project description.

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:
      --description string   New description.
      --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 some custom properties
      --credentials string   (Required if using existing one.) 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 template

admiral template export

Download exported application.

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

Options:
      --file string     (Required) path/to/file
      --format string   (Required) File format - yaml/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 ls

Lists existing templates.

Usage:
  admiral template ls

Options:
  -c, --containers     Show all containers.
  -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.