Adds DTR upgrade docs

Adds instructions on how to upgrade DTR from
2.0.0 to 2.0.1.
This commit is contained in:
Joao Fernandes 2016-05-27 10:51:47 -07:00
parent b1f95658fa
commit 1f57f4a25a
3 changed files with 50 additions and 102 deletions

View File

@ -1,11 +1,10 @@
<!--[metadata]>
+++
draft=true
title = "Upgrade"
description = "Learn how to upgrade your Docker Trusted Registry."
keywords = ["docker, dtr, upgrade, install"]
[menu.main]
parent="workw_dtr"
parent="workw_dtr_install"
identifier="menu_dtr_upgrade"
weight=40
+++
@ -15,4 +14,5 @@ weight=40
This section includes the following topics:
* [Upgrade DTR](upgrade-major.md)
* [Upgrade to DTR 2.0](upgrade-major.md)
* [Upgrade to DTR 2.0.x](upgrade-minor.md)

View File

@ -1,17 +1,17 @@
<!--[metadata]>
+++
aliases = ["/docker-trusted-registry/install/upgrade/"]
title = "Upgrade to DTR 2.0"
title = "Upgrade from 1.4.3"
description = "Learn how to upgrade your Docker Trusted Registry to the latest major release."
keywords = ["docker, dtr, upgrade, install"]
[menu.main]
parent="workw_dtr_install"
parent="menu_dtr_upgrade"
identifier="dtr_upgrade_major"
weight=40
weight=0
+++
<![end-metadata]-->
# 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
@ -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)

View File

@ -1,121 +1,69 @@
<!--[metadata]>
+++
draft=true
title = "# Upgrade to a new minor version"
title = "Upgrade from 2.0.0"
description = "Learn how to upgrade your Docker Trusted Registry to a new minor version or patch release."
keywords = ["docker, dtr, upgrade, install"]
[menu.main]
parent="menu_dtr_upgrade"
identifier="dtr_upgrade_minor"
weight=0
weight=10
+++
<![end-metadata]-->
# 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)