Containers service command-line client

Containers service command-line client

The magnum client is the command-line interface (CLI) for the Containers service API and its extensions.

This chapter documents magnum version 2.0.0.

For help on a specific magnum command, enter:

$ magnum help COMMAND

magnum usage

usage: magnum [--version] [--debug] [--os-cache]
              [--os-region-name <region-name>]
              [--os-tenant-id <auth-tenant-id>]
              [--os-user-domain-id <auth-user-domain-id>]
              [--os-user-domain-name <auth-user-domain-name>]
              [--os-project-domain-id <auth-project-domain-id>]
              [--os-project-domain-name <auth-project-domain-name>]
              [--service-type <service-type>]
              [--endpoint-type <endpoint-type>]
              [--magnum-api-version <magnum-api-ver>]
              [--os-cacert <ca-certificate>] [--bypass-url <bypass-url>]
              [--insecure] [--os-auth-system <auth-system>]
              [--os-username <username>] [--os-password <password>]
              [--os-tenant-name <tenant-name>] [--os-token <token>]
              [--os-auth-url <auth-url>]
              <subcommand> ...

Subcommands:

baymodel-create
Create a baymodel.
baymodel-delete
Delete specified baymodel.
baymodel-list
Print a list of bay models.
baymodel-show
Show details about the given baymodel.
baymodel-update
Updates one or more baymodel attributes.
bay-create
Create a bay.
bay-delete
Delete specified bay.
bay-list
Print a list of available bays.
bay-show
Show details about the given bay.
bay-update
Update information about the given bay.
ca-show
Show details about the CA certificate for a bay.
ca-sign
Generate the CA certificate for a bay.
container-create
Create a container.
container-delete
Delete specified containers.
container-exec
Execute command in a container.
container-list
Print a list of available containers.
container-logs
Get logs of a container.
container-pause
Pause specified containers.
container-reboot
Reboot specified containers.
container-show
Show details of a container.
container-start
Start specified containers.
container-stop
Stop specified containers.
container-unpause
Unpause specified containers.
service-list
Print a list of magnum services.
pod-create
Create a pod.
pod-delete
Delete specified pod.
pod-list
Print a list of registered pods.
pod-show
Show details about the given pod.
pod-update
Update information about the given pod.
rc-create
Create a replication controller.
rc-delete
Delete specified replication controller.
rc-list
Print a list of registered replication controllers.
rc-show
Show details about the given replication controller.
rc-update
Update information about the given replication controller.
coe-service-create
Create a coe service.
coe-service-delete
Delete specified coe service.
coe-service-list
Print a list of coe services.
coe-service-show
Show details about the given coe service.
coe-service-update
Update information about the given coe service.
bash-completion
Prints arguments for bash-completion. Prints all of the commands and options to stdout so that the magnum.bash_completion script doesn’t have to hard code them.
help
Display help about this program or one of its subcommands.

magnum optional arguments

--version
show program’s version number and exit
--debug
Print debugging output.
--os-cache
Use the auth token cache. Defaults to False if env[OS_CACHE] is not set.
--os-region-name <region-name>
Region name. Default= env[OS_REGION_NAME].
--os-tenant-id <auth-tenant-id>
Defaults to env[OS_TENANT_ID].
--os-user-domain-id <auth-user-domain-id>
Defaults to env[OS_USER_DOMAIN_ID].
--os-user-domain-name <auth-user-domain-name>
Defaults to env[OS_USER_DOMAIN_NAME].
--os-project-domain-id <auth-project-domain-id>
Defaults to env[OS_PROJECT_DOMAIN_ID].
--os-project-domain-name <auth-project-domain-name>
Defaults to env[OS_PROJECT_DOMAIN_NAME].
--service-type <service-type>
Defaults to container for all actions.
--endpoint-type <endpoint-type>
Defaults to env[OS_ENDPOINT_TYPE] or publicURL.
--magnum-api-version <magnum-api-ver>
Accepts “api”, defaults to env[MAGNUM_API_VERSION].
--os-cacert <ca-certificate>
Specify a CA bundle file to use in verifying a TLS (https) server certificate. Defaults to env[OS_CACERT].
--bypass-url <bypass-url>
Use this API endpoint instead of the Service Catalog.
--insecure
Do not verify https connections

magnum.. _magnum_common_auth:

magnum common authentication arguments

--os-auth-system <auth-system>
Defaults to env[OS_AUTH_SYSTEM].
--os-username <username>
Defaults to env[OS_USERNAME].
--os-password <password>
Defaults to env[OS_PASSWORD].
--os-tenant-name <tenant-name>
Defaults to env[OS_TENANT_NAME].
--os-token <token>
Defaults to env[OS_TOKEN].
--os-auth-url <auth-url>
Defaults to env[OS_AUTH_URL].

magnum bay-create

usage: magnum bay-create [--name <name>] --baymodel <baymodel>
                         [--node-count <node-count>]
                         [--master-count <master-count>]
                         [--discovery-url <discovery-url>]
                         [--timeout <timeout>]

Create a bay.

Optional arguments:

--name <name>
Name of the bay to create.
--baymodel <baymodel>
ID or name of the baymodel.
--node-count <node-count>
The bay node count.
--master-count <master-count>
The number of master nodes for the bay.
--discovery-url <discovery-url>
Specifies custom discovery url for node discovery.
--timeout <timeout>
The timeout for bay creation in minutes. Set to 0 for no timeout. The default is no timeout.

magnum bay-delete

usage: magnum bay-delete <bay> [<bay> ...]

Delete specified bay.

Positional arguments:

<bay>
ID or name of the (bay)s to delete.

magnum bay-list

usage: magnum bay-list

Print a list of available bays.

magnum bay-show

usage: magnum bay-show <bay>

Show details about the given bay.

Positional arguments:

<bay>
ID or name of the bay to show.

magnum bay-update

usage: magnum bay-update <bay> <op> <path=value> [<path=value> ...]

Update information about the given bay.

Positional arguments:

<bay>
UUID or name of bay
<op>
Operations: ‘add’, ‘replace’ or ‘remove’
<path=value>
Attributes to add/replace or remove (only PATH is necessary on remove)

magnum baymodel-create

usage: magnum baymodel-create [--name <name>] --image-id <image-id>
                              --keypair-id <keypair-id> --external-network-id
                              <external-network-id> --coe <coe>
                              [--fixed-network <fixed-network>]
                              [--network-driver <network-driver>]
                              [--volume-driver <volume-driver>]
                              [--dns-nameserver <dns-nameserver>]
                              [--flavor-id <flavor-id>]
                              [--master-flavor-id <master-flavor-id>]
                              [--docker-volume-size <docker-volume-size>]
                              [--http-proxy <http-proxy>]
                              [--https-proxy <https-proxy>]
                              [--no-proxy <no-proxy>]
                              [--labels <KEY1=VALUE1,KEY2=VALUE2...>]
                              [--tls-disabled] [--public] [--registry-enabled]

Create a baymodel.

Optional arguments:

--name <name>
Name of the baymodel to create.
--image-id <image-id>
The name or UUID of the base image to customize for the bay.
--keypair-id <keypair-id>
The name or UUID of the SSH keypair to load into the Bay nodes.
--external-network-id <external-network-id>
The external Neutron network ID to connect to this bay model.
--coe <coe>
Specify the Container Orchestration Engine to use.
--fixed-network <fixed-network>
The private Neutron network name to connect to this bay model.
--network-driver <network-driver>
The network driver name for instantiating container networks.
--volume-driver <volume-driver>
The volume driver name for instantiating container volume.
--dns-nameserver <dns-nameserver>
The DNS nameserver to use for this Bay.
--flavor-id <flavor-id>
The nova flavor id to use when launching the bay.
--master-flavor-id <master-flavor-id>
The nova flavor id to use when launching the master node of the bay.
--docker-volume-size <docker-volume-size>
Specify the number of size in GB for the docker volume to use.
--http-proxy <http-proxy>
The http_proxy address to use for nodes in bay.
--https-proxy <https-proxy>
The https_proxy address to use for nodes in bay.
--no-proxy <no-proxy>
The no_proxy address to use for nodes in bay.
--labels <KEY1=VALUE1,KEY2=VALUE2...>
Arbitrary labels in the form of key=value pairs to associate with a baymodel. May be used multiple times.
--tls-disabled
Disable TLS in the Bay.
--public
Make baymodel public.
--registry-enabled
Enable docker registry in the Bay

magnum baymodel-delete

usage: magnum baymodel-delete <baymodels> [<baymodels> ...]

Delete specified baymodel.

Positional arguments:

<baymodels>
ID or name of the (baymodel)s to delete.

magnum baymodel-list

usage: magnum baymodel-list [--limit <limit>] [--sort-key <sort-key>]
                            [--sort-dir <sort-dir>]

Print a list of bay models.

Optional arguments:

--limit <limit>
Maximum number of baymodels to return
--sort-key <sort-key>
Column to sort results by
--sort-dir <sort-dir>
Direction to sort. “asc” or “desc”.

magnum baymodel-show

usage: magnum baymodel-show <baymodel>

Show details about the given baymodel.

Positional arguments:

<baymodel>
ID of the baymodel to show.

magnum baymodel-update

usage: magnum baymodel-update <baymodel> <op> <path=value> [<path=value> ...]

Updates one or more baymodel attributes.

Positional arguments:

<baymodel>
UUID or name of baymodel
<op>
Operations: ‘add’, ‘replace’ or ‘remove’
<path=value>
Attributes to add/replace or remove (only PATH is necessary on remove)

magnum ca-show

usage: magnum ca-show --bay <bay>

Show details about the CA certificate for a bay.

Optional arguments:

--bay <bay>
ID or name of the bay.

magnum ca-sign

usage: magnum ca-sign [--csr <csr>] --bay <bay>

Generate the CA certificate for a bay.

Optional arguments:

--csr <csr>
File path of the csr file to send to Magnum to get signed.
--bay <bay>
ID or name of the bay.

magnum coe-service-create

usage: magnum coe-service-create [--manifest-url <manifest-url>]
                                 [--manifest <manifest>] --bay <bay>

Create a coe service.

Optional arguments:

--manifest-url <manifest-url>
Name/URL of the service file to use for creating services.
--manifest <manifest>
File path of the service file to use for creating services.
--bay <bay>
Id or name of the bay.

magnum coe-service-delete

usage: magnum coe-service-delete --bay <bay> <services> [<services> ...]

Delete specified coe service.

Positional arguments:

<services>
ID or name of the service to delete.

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum coe-service-list

usage: magnum coe-service-list --bay <bay>

Print a list of coe services.

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum coe-service-show

usage: magnum coe-service-show --bay <bay> <services>

Show details about the given coe service.

Positional arguments:

<services>
ID or name of the service to show.

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum coe-service-update

usage: magnum coe-service-update --bay <bay>
                                 <services> <op> <path=value>
                                 [<path=value> ...]

Update information about the given coe service.

Positional arguments:

<services>
UUID or name of service
<op>
Operations: ‘add’, ‘replace’ or ‘remove’
<path=value>
Attributes to add/replace or remove (only PATH is necessary on remove)

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum container-create

usage: magnum container-create [--name <name>] --image <image> --bay <bay>
                               [--command <command>] [--memory <memory>]

Create a container.

Optional arguments:

--name <name>
name of the container
--image <image>
name or ID of the image
--bay <bay>
ID or name of the bay.
--command <command>
Send command to the container
--memory <memory>
The container memory size (format: <number><optional unit>, where unit = b, k, m or g)

magnum container-delete

usage: magnum container-delete <container> [<container> ...]

Delete specified containers.

Positional arguments:

<container>
ID or name of the (container)s to delete.

magnum container-exec

usage: magnum container-exec --command <command> <container>

Execute command in a container.

Positional arguments:

<container>
ID or name of the container to execute command in.

Optional arguments:

--command <command>
The command to execute

magnum container-list

usage: magnum container-list [--bay <bay>]

Print a list of available containers.

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum container-logs

usage: magnum container-logs <container>

Get logs of a container.

Positional arguments:

<container>
ID or name of the container to get logs for.

magnum container-pause

usage: magnum container-pause <container> [<container> ...]

Pause specified containers.

Positional arguments:

<container>
ID or name of the (container)s to pause.

magnum container-reboot

usage: magnum container-reboot <container> [<container> ...]

Reboot specified containers.

Positional arguments:

<container>
ID or name of the (container)s to reboot.

magnum container-show

usage: magnum container-show [--json] <container>

Show details of a container.

Positional arguments:

<container>
ID or name of the container to show.

Optional arguments:

--json
Print JSON representation of the container.

magnum container-start

usage: magnum container-start <container> [<container> ...]

Start specified containers.

Positional arguments:

<container>
ID of the (container)s to start.

magnum container-stop

usage: magnum container-stop <container> [<container> ...]

Stop specified containers.

Positional arguments:

<container>
ID or name of the (container)s to stop.

magnum container-unpause

usage: magnum container-unpause <container> [<container> ...]

Unpause specified containers.

Positional arguments:

<container>
ID or name of the (container)s to unpause.

magnum pod-create

usage: magnum pod-create [--manifest-url <manifest-url>]
                         [--manifest <manifest>] --bay <bay>

Create a pod.

Optional arguments:

--manifest-url <manifest-url>
Name/URL of the pod file to use for creating PODs.
--manifest <manifest>
File path of the pod file to use for creating PODs.
--bay <bay>
ID or name of the bay.

magnum pod-delete

usage: magnum pod-delete --bay <bay> <pods> [<pods> ...]

Delete specified pod.

Positional arguments:

<pods>
ID or name of the (pod)s to delete.

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum pod-list

usage: magnum pod-list --bay <bay>

Print a list of registered pods.

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum pod-show

usage: magnum pod-show --bay <bay> <pod>

Show details about the given pod.

Positional arguments:

<pod>
ID or name of the pod to show.

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum pod-update

usage: magnum pod-update --bay <bay>
                         <pod-id> <op> <path=value> [<path=value> ...]

Update information about the given pod.

Positional arguments:

<pod-id>
UUID or name of pod
<op>
Operations: ‘add’, ‘replace’ or ‘remove’
<path=value>
Attributes to add/replace or remove (only PATH is necessary on remove)

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum rc-create

usage: magnum rc-create [--manifest-url <manifest-url>]
                        [--manifest <manifest>] --bay <bay>

Create a replication controller.

Optional arguments:

--manifest-url <manifest-url>
Name/URL of the replication controller file to use for creating replication controllers.
--manifest <manifest>
File path of the replication controller file to use for creating replication controllers.
--bay <bay>
ID or name of the bay.

magnum rc-delete

usage: magnum rc-delete --bay <bay> <rcs> [<rcs> ...]

Delete specified replication controller.

Positional arguments:

<rcs>
ID or name of the replication (controller)s to delete.

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum rc-list

usage: magnum rc-list --bay <bay>

Print a list of registered replication controllers.

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum rc-show

usage: magnum rc-show --bay <bay> <rc>

Show details about the given replication controller.

Positional arguments:

<rc>
ID or name of the replication controller to show.

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum rc-update

usage: magnum rc-update --bay <bay> <rc> <op> <path=value> [<path=value> ...]

Update information about the given replication controller.

Positional arguments:

<rc>
UUID or name of replication controller
<op>
Operations: ‘add’, ‘replace’ or ‘remove’
<path=value>
Attributes to add/replace or remove (only PATH is necessary on remove)

Optional arguments:

--bay <bay>
UUID or Name of Bay

magnum service-list

usage: magnum service-list

Print a list of magnum services.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.