From 1f57f4a25ad61cb32c8dd76655c8c92d0eca0f9e Mon Sep 17 00:00:00 2001 From: Joao Fernandes Date: Fri, 27 May 2016 10:51:47 -0700 Subject: [PATCH] Adds DTR upgrade docs Adds instructions on how to upgrade DTR from 2.0.0 to 2.0.1. --- install/upgrade/index.md | 6 +- install/upgrade/upgrade-major.md | 12 +-- install/upgrade/upgrade-minor.md | 134 ++++++++++--------------------- 3 files changed, 50 insertions(+), 102 deletions(-) diff --git a/install/upgrade/index.md b/install/upgrade/index.md index e44e0f961f..6f5d970eb2 100644 --- a/install/upgrade/index.md +++ b/install/upgrade/index.md @@ -1,11 +1,10 @@ -# Upgrade to DTR 2.0 +# Upgrade from DTR 1.4.3 The first step in upgrading to Docker Trusted Registry (DTR) 2.0, is ensuring you are running DTR 1.4.3. If that's not the case, start by upgrading your @@ -93,7 +93,7 @@ You need to manually configure the following settings: * Domain name, * Certificates. -You can find the certificates of DTR 1.4.3 under `/usr/local/etc/dtr/ssl`. +You can find the certificates of DTR 1.4.3 under `/usr/local/etc/dtr/ssl`. ## Step 5. Test your installation @@ -167,5 +167,5 @@ containers. ## Where to go next -* [Install DTR offline](../install-dtr-offline.md) +* [Upgrade to DTR 2.x](upgrade-minor.md) * [Monitor DTR](../../monitor-troubleshoot/monitor.md) diff --git a/install/upgrade/upgrade-minor.md b/install/upgrade/upgrade-minor.md index 46cc162287..492addf852 100644 --- a/install/upgrade/upgrade-minor.md +++ b/install/upgrade/upgrade-minor.md @@ -1,121 +1,69 @@ +# Upgrade from 2.0.0 -# Upgrade to a new minor version +The first step in upgrading to a new minor version or patch release of DTR 2.0, +is ensuring you're running DTR 2.0. If that's not the case, start by upgrading +your installation to version 2.0.0, and then upgrade to the latest version +available. +There is no downtime when upgrading an highly-available DTR cluster. If your +DTR deployment has a single replica, schedule the upgrade to take place outside +business peak hours to ensure the impact on your business is close to none. -This document describes the steps to upgrade Docker Trusted Registry and the -commercially supported Engine (CS Engine). When you first install, the general -order is to install the CS Engine, then install the Trusted Registry. However, -when you upgrade, you reverse that order. Ensure when upgrading the Trusted -Registry, that you also upgrade to the latest CS Engine. +## Step 1. Upgrade DTR to 2.0 -## Upgrade Docker Trusted Registry +Make sure you're running DTR 2.0. If that's not the case, [upgrade your +installation to the 2.0 version](upgrade-major.md). -Periodic upgrades to the Trusted Registry trigger a notification to appear in -your Admin dashboard if you have enabled Upgrade checking. This is located in -the General > Settings section of the Trusted Registry Admin dashboard. To -perform this upgrade, you should schedule it during your downtime and allow -about 15 minutes. +## Step 2. Upgrade DTR -To upgrade, perform the following steps: +To upgrade DTR you use the `docker/dtr upgrade` command. -1. Load the Trusted Registry Dashboard in your browser and navigate to -**Settings > Updates**. +1. Download a UCP client bundle. -2. Click **Updates** in the Settings navigation bar. + Having a UCP client bundle allows you to run Docker commands on a UCP + cluster. Download a UCP client bundle and set up your CLI client to use it. - You can see the currently installed version and a message stating that - the version is either current or an update is available. If an update - is available, the message states: +2. Find the DTR replica Id. - "System Update Available and an enabled button displays Update - to version X.X.X."" + When you upgrade your installation, you need to specify the Id of a replica + that is part of the cluster. If you have a highly-available installation, + you can provide the Id of any replica. -3. Click Update to start the update process. + You can find the DTR replica Ids on the **Applications** page of Docker + Universal Control Plane. - The process may take longer than what the message indicates. - To check the status of the install, SSH into the Trusted Registry - host through a command line: +3. Run the upgrade command. - ``` - $ sudo docker logs -f $(sudo docker ps -a --no-trunc | grep 'manager execute-upgrade' | head -n1 | awk '{print $1}') - ``` - -4. Refresh your screen to see the latest changes. - - The Dashboard displays a message that the upgrade successfully - completed and that you need to upgrade to the latest CS Engine. - -## Upgrade Docker Trusted Registry offline - -To upgrade the Trusted Registry offline, perform the following steps: - -1. Since you are retrieving a large file, use the `wget` command in your -command line to get the Trusted Registry files. The following -command is an example getting DTR 1.4.3. Ensure to get your correct version. - - ``` - $ wget https://packages.docker.com/dtr/1.4/dtr-1.4.3.tar - ``` - -2. After downloading, move the `tar` file to the offline machine you -want to install the Trusted Registry. - -3. On that machine, verify that the CS Engine is installed. -If it is not, see the [CS Engine install directions](../cs-engine/install.md). + The upgrade command upgrades all DTR replicas that are part of your cluster: ```bash - $ docker --version + # Get the certificates used by UCP + $ curl -k https://$UCP_URL/ca > ucp-ca.pem + + $ docker run \ + -it \ + --rm \ + docker/dtr upgrade \ + --ucp-url $UCP_URL \ + --existing-replica-id $DTR_REPLICA_ID \ + --ucp-username $USER \ + --ucp-password $PASSWORD \ + --ucp-ca "$(cat ucp-ca.pem)" ``` - > **Note:** To remain compliant with your Docker Trusted Registry support - > agreement, you **must** use the current version of commercially supported - > Docker Engine. Running the open source version of Engine is **not** - > supported. +## Where to go next -5. Open a terminal window on that machine and load the `tar` file using the -following command. Again, ensure you get the correct version. - - ```bash - $ sudo docker load < dtr-1.4.3.tar -``` - -6. Upgrade the Trusted Registry with the following command: - - ```bash - $ sudo bash -c "$(docker run docker/trusted-registry upgrade latest)" - ``` - - > **Note**: sudo is needed for `docker/trusted-registry` commands to - > ensure that the Bash script is run with full access to the Docker host. - -### What is updated in the Trusted Registry? - -The Trusted Registry pulls new container images from Docker Hub. -Then it deploys those containers. Finally, it stops and removes the -old containers. - -If the CS Engine is upgraded first, then the Trusted Registry can still be -upgraded from a command line by running the following command. Ensure to put the -correct version that you want. - -```bash -$ sudo bash -c "$(sudo docker run docker/trusted-registry:1.3.3 upgrade 1.4.3)" -``` - -## See also - -* [Install DTR](install-dtr.md) -* [Install DTR offline](install-dtr-offline.md) +* [Upgrade to DTR 2.0](upgrade-major.md) +* [Monitor DTR](../../monitor-troubleshoot/monitor.md)