From df374d50791d8e82f94c70fdfba99551fffeaa15 Mon Sep 17 00:00:00 2001 From: Steve Kriss Date: Tue, 5 Nov 2019 11:33:07 -0700 Subject: [PATCH] add upgrading to v1.2 doc (#2035) * add upgrading to v1.2 doc Signed-off-by: Steve Kriss * add CRD upgrade command Signed-off-by: Steve Kriss * fix daemonset container name Signed-off-by: Steve Kriss * add comma Signed-off-by: Steve Kriss --- site/_data/master-toc.yml | 4 +- site/docs/master/upgrade-to-1.1.md | 25 -------- site/docs/master/upgrade-to-1.2.md | 99 ++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 27 deletions(-) delete mode 100644 site/docs/master/upgrade-to-1.1.md create mode 100644 site/docs/master/upgrade-to-1.2.md diff --git a/site/_data/master-toc.yml b/site/_data/master-toc.yml index a05250313..8e7204e63 100644 --- a/site/_data/master-toc.yml +++ b/site/_data/master-toc.yml @@ -11,8 +11,8 @@ toc: subfolderitems: - page: Overview url: /install-overview - - page: Upgrade to 1.1 - url: /upgrade-to-1.1 + - page: Upgrade to 1.2 + url: /upgrade-to-1.2 - page: Supported providers url: /supported-providers - page: Evaluation install diff --git a/site/docs/master/upgrade-to-1.1.md b/site/docs/master/upgrade-to-1.1.md deleted file mode 100644 index 939c43ae5..000000000 --- a/site/docs/master/upgrade-to-1.1.md +++ /dev/null @@ -1,25 +0,0 @@ -# Upgrading to Velero 1.1 - -## Prerequisites -- [Velero v1.0][1] installed. - -Velero v1.1 only requires user intervention if Velero is running in a namespace other than `velero`. - -## Instructions - -### Adding VELERO_NAMESPACE environment variable to the deployment - -Previous versions of Velero's server detected the namespace in which it was running by inspecting the container's filesystem. -With v1.1, this is no longer the case, and the server must be made aware of the namespace it is running in with the `VELERO_NAMESPACE` environment variable. - -`velero install` automatically writes this for new deployments, but existing installations will need to add the environment variable before upgrading. - -You can use the following command to patch the deployment: - -```bash -kubectl patch deployment/velero -n \ ---type='json' \ --p='[{"op":"add","path":"/spec/template/spec/containers/0/env/0","value":{"name":"VELERO_NAMESPACE", "valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}}]' -``` - -[1]: https://github.com/vmware-tanzu/velero/releases/tag/v1.0.0 diff --git a/site/docs/master/upgrade-to-1.2.md b/site/docs/master/upgrade-to-1.2.md new file mode 100644 index 000000000..810844eff --- /dev/null +++ b/site/docs/master/upgrade-to-1.2.md @@ -0,0 +1,99 @@ +# Upgrading to Velero 1.2 + +## Prerequisites +- Velero [v1.1][0] or [v1.0][1] installed. + +_Note: if you're upgrading from v1.0, follow the [upgrading to v1.1][2] instructions first._ + +## Instructions + +1. Install the Velero v1.2 command-line interface (CLI) by following the [instructions here][3]. + + Verify that you've properly installed it by running: + + ```bash + velero version --client-only + ``` + + You should see the following output: + + ```bash + Client: + Version: v1.2.0 + Git commit: + ``` + +1. Scale down the existing Velero deployment: + + ```bash + kubectl scale deployment/velero \ + --namespace velero \ + --replicas 0 + ``` + +1. Update the container image used by the Velero deployment and, optionally, the restic daemon set: + + ```bash + kubectl set image deployment/velero \ + velero=velero/velero:v1.2.0 \ + --namespace velero + + # optional, if using the restic daemon set + kubectl set image daemonset/restic \ + restic=velero/velero:v1.2.0 \ + --namespace velero + ``` + +1. If using AWS, Azure, or GCP, add the respective plugin to your Velero deployment: + + For AWS: + ```bash + velero plugin add velero/velero-plugin-for-aws:v1.0.0 + ``` + + For Azure: + ```bash + velero plugin add velero/velero-plugin-for-microsoft-azure:v1.0.0 + ``` + + For GCP: + ```bash + velero plugin add velero/velero-plugin-for-gcp:v1.0.0 + ``` + +1. Update the Velero custom resource definitions (CRDs) to include the structural schemas: + + ```bash + velero install --crds-only --dry-run -o yaml | kubectl apply -f - + ``` + +1. Scale back up the existing Velero deployment: + + ```bash + kubectl scale deployment/velero \ + --namespace velero \ + --replicas 1 + ``` + +1. Confirm that the deployment is up and running with the correct version by running: + + ```bash + velero version + ``` + + You should see the following output: + + ```bash + Client: + Version: v1.2.0 + Git commit: + + Server: + Version: v1.2.0 + ``` + + +[0]: https://github.com/vmware-tanzu/velero/releases/tag/v1.1.0 +[1]: https://github.com/vmware-tanzu/velero/releases/tag/v1.0.0 +[2]: https://velero.io/docs/v1.1.0/upgrade-to-1.1/ +[3]: install-overview.md#install-the-cli