Update UCP cli reference docs

This commit is contained in:
Joao Fernandes 2017-01-08 17:40:39 -08:00
parent 46e4e522c3
commit 2d9630a865
13 changed files with 106 additions and 244 deletions

View File

@ -1,41 +1,28 @@
---
description: Create a backup of a UCP manager node
keywords: docker, dtr, cli, backup
title: docker/ucp backup
description: Create a backup of a UCP manager node
keywords: docker, ucp, cli, backup
---
Create a backup of a UCP manager node
## Usage
```bash
docker run -i --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
backup [command options] > backup.tar
```
## Description
This command creates a tar file with the contents of the volumes used by
this UCP manager node, and prints it. You can then use the 'restore' command to
restore the data from an existing backup.
To create backups of a multi-node swarm, you should create backups for all manager
nodes, one at a time in a quick succession, and keep track of the exact time and
sequence when you performed each backup. You will need this sequence information
if you restore more than one manager node at a time.
To create backups of a multi-node swarm, you only need to backup a single manager
node. The restore operation will reconstitute a new UCP installation from the
backup of any previous manager.
Note:
* During the backup, UCP is temporarily stopped. This does not affect your
applications.
* During the backup, UCP is temporarily stopped. This does not affect your
applications.
* The backup contains private keys and other sensitive information. Use the
'--passphrase' flag to encrypt the backup with PGP-compatible encryption.
* The backup contains private keys and other sensitive information. Use the
'--passphrase' flag to encrypt the backup with PGP-compatible encryption.
## Options

View File

@ -1,23 +1,11 @@
---
description: Print the public certificates used by this UCP web server
keywords: docker, dtr, cli, dump-certs
title: docker/ucp dump-certs
description: Print the public certificates used by this UCP web server
keywords: docker, ucp, cli, dump-certs
---
Print the public certificates used by this UCP web server
## Usage
```bash
docker run --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
dump-certs [command options]
```
## Description
This command outputs the public certificates for the UCP web server running on

View File

@ -1,24 +1,13 @@
---
description: Print the TLS fingerprint for this UCP web server
keywords: docker, dtr, cli, fingerprint
title: docker/ucp fingerprint
description: Print the TLS fingerprint for this UCP web server
keywords: docker, ucp, cli, fingerprint
---
Print the TLS fingerprint for this UCP web server
## Usage
```bash
docker run --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
fingerprint [command options]
```
## Description
This command displays the fingerprint of the certificate used in the UCP web
server running on this node.

View File

@ -1,23 +1,11 @@
---
description: Print the ID of UCP running on this node
keywords: docker, dtr, cli, id
title: docker/ucp id
description: Print the ID of UCP running on this node
keywords: docker, ucp, cli, id
---
Print the ID of UCP running on this node
## Usage
```bash
docker run -it --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
id [command options]
```
## Description
This command prints the ID of the UCP components running on this node. This ID
@ -25,3 +13,4 @@ matches what you see when running the 'docker info' command while using
a client bundle.
This ID is used by other commands as confirmation.

View File

@ -1,28 +1,16 @@
---
description: Verify the UCP images on this node
keywords: docker, dtr, cli, images
title: docker/ucp images
description: Verify the UCP images on this node
keywords: docker, ucp, cli, images
---
Verify the UCP images on this node
## Usage
```bash
docker run -it --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
images [command options]
```
## Description
This command checks the UCP images that are available in this node, and pulls
the ones that are missing.
## Options

View File

@ -1,44 +1,29 @@
---
description: Learn about the commands available in the docker/ucp image.
keywords: docker, ucp, cli, ucp
title: docker/ucp overview
description: Learn about the commands available in the docker/ucp image.
keywords:
- docker, ucp, cli, docker run --rm -it \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
---
This image has commands to install and manage
Docker Universal Control Plane (UCP) on a Docker Engine.
You can configure the commands using flags or environment variables. When using
environment variables use the 'docker run -e VARIABLE_NAME' syntax to pass the
value from your shell, or 'docker run -e VARIABLE_NAME=value' to specify the
value explicitly on the command line.
The container running this image needs to be named 'ucp' and bind-mount the
Docker daemon socket. Below you can find an example of how to run this image.
Additional help is available for each command with the '--help' flag.
## Usage
```bash
docker run -it --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
command [command arguments]
```
A new cli application
## Commands
| Option | Description |
|:-----------------------------|:---------------------------|
|`install`| Install UCP on this node|
|`restart`| Start or restart UCP components running on this node|
|`stop`| Stop UCP components running on this node|
|`upgrade`| Upgrade the UCP components on this node|
|`images`| Verify the UCP images on this node|
|`uninstall-ucp`| Uninstall UCP from this swarm|
|`dump-certs`| Print the public certificates used by this UCP web server|
|`fingerprint`| Print the TLS fingerprint for this UCP web server|
|`support`| Create a support dump for this UCP node|
|`id`| Print the ID of UCP running on this node|
|`backup`| Create a backup of a UCP manager node|
|`restore`| Restore a UCP manager node from a backup|
| Option | Description |
|:----------------|:----------------------------------------------------------|
| `install` | Install UCP on this node |
| `restart` | Start or restart UCP components running on this node |
| `stop` | Stop UCP components running on this node |
| `upgrade` | Upgrade the UCP components on this node |
| `images` | Verify the UCP images on this node |
| `uninstall-ucp` | Uninstall UCP from this swarm |
| `dump-certs` | Print the public certificates used by this UCP web server |
| `fingerprint` | Print the TLS fingerprint for this UCP web server |
| `support` | Create a support dump for this UCP node |
| `id` | Print the ID of UCP running on this node |
| `backup` | Create a backup of a UCP manager node |
| `restore` | Restore a UCP cluster from a backup |

View File

@ -1,23 +1,11 @@
---
description: Install UCP on this node
keywords: docker, dtr, cli, install
title: docker/ucp install
description: Install UCP on this node
keywords: docker, ucp, cli, install
---
Install UCP on this node
## Usage
```bash
docker run -it --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
install [command options]
```
## Description
This command initializes a new swarm, turns this node into a manager, and installs
@ -25,28 +13,22 @@ Docker Universal Control Plane (UCP).
When installing UCP you can customize:
* The certificates used by the UCP web server. Create a volume
named 'ucp-controller-server-certs' and copy the ca.pem, cert.pem, and key.pem
files to the root directory. Then run the install command with the
'--external-server-cert' flag.
* The certificates used by the UCP web server. Create a volume
named 'ucp-controller-server-certs' and copy the ca.pem, cert.pem, and key.pem
files to the root directory. Then run the install command with the
'--external-server-cert' flag.
* The license used by UCP, by bind-mounting the file at
'/config/docker_subscription.lic' in the tool.
E.g. -v /path/to/my/config/docker_subscription.lic:/config/docker_subscription.lic
* The initial users, permissions and settings of the system, using a backup of
an existing UCP cluster. Bind-mount the backup file under
'/config/backup.tar' in the tool and use the '--from-backup' flag. When
using the '--from-backup' flag, all other configuration flags are
respected, except for the '--admin-username' and '--admin-password' flags.
* The license used by UCP, by bind-mounting the file at
'/config/docker_subscription.lic' in the tool. E.g. -v /path/to/my/config/docker_subscription.lic:/config/docker_subscription.lic
or by specifying with '--license "$(cat license.lic)"
If you're joining more nodes to this swarm, open the following ports in your
firewall:
* 443 or the '--controller-port'
* 2376 or the '--swarm-port'
* 12376, 4789, 12379, 12380, 12381, 12382, 12383, 12384, 12385, 12386
* 4789(udp) and 7946(tcp/udp) for overlay networking
* 443 or the '--controller-port'
* 2376 or the '--swarm-port'
* 12376, 4789, 12379, 12380, 12381, 12382, 12383, 12384, 12385, 12386, 12387
* 4789(udp) and 7946(tcp/udp) for overlay networking
## Options
@ -66,13 +48,12 @@ firewall:
|`--dns`|Set custom DNS servers for the UCP containers|
|`--dns-opt`|Set DNS options for the UCP containers|
|`--dns-search`|Set custom DNS search domains for the UCP containers|
|`--unlock-key`|The unlock key for this swarm-mode cluster, if one exists.|
|`--pull`|Pull UCP images: 'always', when 'missing', or 'never'|
|`--registry-username`|Username to use when pulling images|
|`--registry-password`|Password to use when pulling images|
|`--kv-timeout`|Timeout in milliseconds for the key-value store|
|`--kv-snapshot-count`|Number of changes between key-value store snapshots|
|`--from-backup`|Initialize a system from a backup of a UCP cluster|
|`--passphrase`|The passphrase needed to decrypt the backup file. To be used together with --from-backup if the backup is encrypted.|
|`--swarm-experimental`|Enable Docker Swarm experimental features. Used for backwards compatibility|
|`--disable-tracking`|Disable anonymous tracking and analytics|
|`--disable-usage`|Disable anonymous usage reporting|
@ -82,3 +63,4 @@ firewall:
|`--random`|Set the Docker Swarm scheduler to random mode. Used for backwards compatibility|
|`--external-service-lb`|Set the external service load balancer reported in the UI|
|`--enable-profiling`|Enable performance profiling|
|`--license`|Add a license: e.g. --license "$(cat license.lic)"|

View File

@ -1,23 +1,11 @@
---
description: Start or restart UCP components running on this node
keywords: docker, dtr, cli, restart
title: docker/ucp restart
description: Start or restart UCP components running on this node
keywords: docker, ucp, cli, restart
---
Start or restart UCP components running on this node
## Usage
```bash
docker run -it --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
restart [command options]
```
## Options
| Option | Description |

View File

@ -1,43 +1,49 @@
---
description: Restore a UCP manager node from a backup
keywords: docker, dtr, cli, restore
title: docker/ucp restore
description: Restore a UCP cluster from a backup
keywords: docker, ucp, cli, restore
---
Restore a UCP manager node from a backup
## Usage
```bash
docker run -i --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
restore [command options] < restore.tar
```
Restore a UCP cluster from a backup
## Description
This command restores the state of this UCP manager node using a tar file
generated by the 'backup' command.
This command installs a new UCP cluster that is populated with the state of
a previous UCP manager node using a tar file generated by the 'backup' command.
All UCP settings, users, teams and permissions will be restored from the backup
file. The Restore operation does not alter or recover any containers, networks,
volumes or services of an underlying swarm.
The restore command stops the UCP components running on this node and restores
the data from a backup, overwriting all existing data.
The restore command can be performed on any manager node of an existing
swarm. If the current node does not belong in a swarm, one will be
initialized using the value of the '--host-address' flag. When restoring on an
existing swarm-mode cluster, no previous UCP components must be running on any
node of the cluster. This cleanup can be performed with the 'uninstall-ucp'
command.
If restore is performed on a different swarm than the one
where the backup file was taken on, the Cluster Root CA of the old UCP
installation will not be restored. This will invalidate any
previously issued Admin Client Bundles and all administrator will be required
to download new client bundles after the operation is completed.
Any existing Client Bundles for non-admin users will still be fully
operational.
By default the backup tar file is read from stdin. You can also bind-mount the
backup file under /config/backup.tar, and run the restore command with the
'--interactive' flag.
Note:
Notes:
* Before restoring a manager node, you need to stop all other managers.
* Please run 'uninstall-ucp' before attempting the restore operation on an
existing UCP cluster.
* During the restore, UCP is temporarily stopped on this node. This does not
affect your applications.
* If your swarm-mode cluster has lost quorum and the original set of managers
are not recoverable, you can attempt to recover a single-manager cluster
with 'docker swarm init --force-new-cluster'.
* You need to restore using a backup you created for that specific node.
* You can restore from a backup that was taken on a different manager node or
a different swarm altogether.
## Options
@ -47,5 +53,7 @@ Note:
|`--debug, D`|Enable debug mode|
|`--jsonlog`|Produce json formatted output for easier parsing|
|`--interactive, i`|Run in interactive mode and prompt for configuration values|
|`--id`|The ID of the UCP instance to backup|
|`--passphrase`|Decrypt the tar file with the provided passphrase|
|`--passphrase`|Decrypt the backup tar file with the provided passphrase|
|`--san`|Add subject alternative names to certificates (e.g. --san www1.acme.com --san www2.acme.com)|
|`--host-address`|The network address to advertise to other nodes. Format: IP address or network interface name|
|`--unlock-key`|The unlock key for this swarm-mode cluster, if one exists.|

View File

@ -1,22 +1,11 @@
---
description: Stop UCP components running on this node
keywords: docker, dtr, cli, stop
title: docker/ucp stop
description: Stop UCP components running on this node
keywords: docker, ucp, cli, stop
---
Stop UCP components running on this node
## Usage
```bash
docker run -it --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
stop [command options]
```
## Options
| Option | Description |

View File

@ -1,23 +1,12 @@
---
description: Create a support dump for this UCP node
keywords: docker, dtr, cli, support
title: docker/ucp support
description: Create a support dump for this UCP node
keywords: docker, ucp, cli, support
---
Create a support dump for this UCP node
## Usage
```bash
docker run --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
support [command options] > docker-support.tgz
```
## Description
This command creates a support dump file for this node, and prints it to stdout.

View File

@ -1,28 +1,16 @@
---
description: Uninstall UCP from this swarm
keywords: docker, dtr, cli, uninstall-ucp
title: docker/ucp uninstall-ucp
description: Uninstall UCP from this swarm
keywords: docker, ucp, cli, uninstall-ucp
---
Uninstall UCP from this swarm
## Usage
```bash
docker run -it --rm \
--name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp \
uninstall-ucp [command options]
```
## Description
This command uninstalls UCP from the swarm, but preserves the swarm so that
your applications can continue running.
After UCP is uninstalled you can use the 'docker swarm leave' and
After UCP is uninstalled you can use the the 'docker swarm leave' and
'docker node rm' commands to remove nodes from the swarm.
Once UCP is uninstalled, you won't be able to join nodes to the swarm unless

View File

@ -1,27 +1,19 @@
---
description: Upgrade the UCP components on this node
keywords: docker, dtr, cli, upgrade
title: docker/ucp upgrade
description: Upgrade the UCP components on this node
keywords: docker, ucp, cli, upgrade
---
Upgrade the UCP components on this node
## Usage
```bash
docker run -it --rm docker/ucp \
upgrade [command options]
```
## Description
This commands upgrades the UCP running on this node.
To upgrade UCP:
* Upgrade the Docker Engine in all nodes (optional)
* Run the upgrade command in all manager nodes
* Run the upgrade command in all worker nodes
* Upgrade the Docker Engine in all nodes (optional)
* Run the upgrade command in all manager nodes
* Run the upgrade command in all worker nodes
After upgrading UCP in a node, go to the UCP web UI and confirm the node is
healthy, before upgrading other nodes.