Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refact(README): updated README for upgrades with some comments #2750

Merged
merged 3 commits into from Oct 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
75 changes: 51 additions & 24 deletions k8s/upgrades/README.md
Expand Up @@ -4,9 +4,9 @@

This document describes the steps for the following OpenEBS Upgrade paths:

- Upgrade from 1.0.0 to 1.1.0
- Upgrade from 1.0.0 to 1.2.0
- Upgrade from 1.1.0 to 1.2.0
- Upgrade from 1.0.0 to any of 1.1.0, 1.2.0, 1.3.0
- Upgrade from 1.1.0 to any of 1.2.0, 1.3.0
- Upgrade from 1.2.0 to 1.3.0

For other upgrade paths, please refer to the respective directories.
Example, the steps to upgrade from 0.9.0 to 1.0.0 will be under [0.9.0-1.0.0](./0.9.0-1.0.0/).
Expand All @@ -25,9 +25,10 @@ The upgrade of OpenEBS is a three step process:
## Step 1: Prerequisites

**Note: It is mandatory to make sure to that all OpenEBS control plane
and data plane components are running with expected version before the upgrade.
- For upgrading to 1.1.0, the previous version should be 1.0.0
- For upgrading to 1.2.0, the previous version should be 1.0.0 or 1.1.0**
and data plane components are running with expected version before the upgrade.**
- **For upgrading to 1.1.0, the previous version should be 1.0.0**
- **For upgrading to 1.2.0, the previous version should be 1.0.0 or 1.1.0**
- **For upgrading to 1.3.0, the previous version should be 1.0.0 or 1.1.0 or 1.2.0**

**Note: All steps described in this document need to be performed from a
machine that has access to Kubernetes master**
Expand Down Expand Up @@ -80,8 +81,8 @@ the openebs-operator.yaml for your cluster, you will have to download the
desired openebs-operator.yaml and customize it again**

```
#Upgrade to OpenEBS control plane components to desired version. Say 1.2.0
$ kubectl apply -f https://openebs.github.io/charts/openebs-operator-1.2.0.yaml
#Upgrade to OpenEBS control plane components to desired version. Say 1.3.0
$ kubectl apply -f https://openebs.github.io/charts/openebs-operator-1.3.0.yaml
```

### Upgrade using helm chart (using stable/openebs, openebs-charts repo, etc.,):
Expand All @@ -96,13 +97,13 @@ latest stable/openebs chart.
- If the default values seem appropriate, you can use the below commands to
update OpenEBS. [More](https://hub.helm.sh/charts/stable/openebs) details about the specific chart version.
```sh
$ helm upgrade --reset-values <release name> stable/openebs --version 1.2.0
$ helm upgrade --reset-values <release name> stable/openebs --version 1.3.0
```
- If not, customize the values into your copy (say custom-values.yaml),
by copying the content from above default yamls and edit the values to
suite your environment. You can upgrade using your custom values using:
```sh
$ helm upgrade <release name> stable/openebs --version 1.2.0 -f custom-values.yaml`
$ helm upgrade <release name> stable/openebs --version 1.3.0 -f custom-values.yaml`
```

### Using customized operator YAML or helm chart.
Expand All @@ -128,9 +129,9 @@ backup of the data before starting the below upgrade procedure.**
**Note: Before proceeding with the upgrade of the OpenEBS Data Plane components
like cStor or Jiva, verify that OpenEBS Control plane is indeed in desired version**

You can use the following command to verify components are in 1.2.0:
You can use the following command to verify components are in 1.3.0:
```sh
$ kubectl get pods -n openebs -l openebs.io/version=1.2.0
$ kubectl get pods -n openebs -l openebs.io/version=1.3.0
```

The above command should show that the control plane components are upgrade.
Expand All @@ -153,7 +154,7 @@ OpenEBS maintainers via [Github Issue](https://github.com/openebs/openebs/issues

As you might have seen by now, control plane components and data plane components
work independently. Even after the OpenEBS Control Plane components have been
upgraded to 1.2.0, the Storage Pools and Volumes (both jiva and cStor)
upgraded to 1.3.0, the Storage Pools and Volumes (both jiva and cStor)
will continue to work with older versions.

You can use the below steps for upgrading cstor and jiva components.
Expand All @@ -164,7 +165,7 @@ using Kubernetes Job spec.

The following instructions provide details on how to create your Upgrade Job specs.
Please ensure the `from` and `to` versions are as per your upgrade path. The below
examples show upgrading from 1.0.0 to 1.2.0.
examples show upgrading from 1.0.0 to 1.3.0.

### Upgrade the OpenEBS Jiva PV

Expand All @@ -176,7 +177,7 @@ pvc-713e3bb6-afd2-11e9-8e79-42010a800065 5G RWO Delete
```

Create a Kubernetes Job spec for upgrading the jiva volume. An example spec is as follows:
```
```yaml
#This is an example YAML for upgrading jiva volume.
#Some of the values below needs to be changed to
#match your openebs installation. The fields are
Expand All @@ -200,16 +201,21 @@ spec:
backoffLimit: 4
template:
spec:
#VERIFY the value of serviceAccountName is pointing to service account
# VERIFY the value of serviceAccountName is pointing to service account
# created within openebs namespace. Use the non-default account.
# by running `kubectl get sa -n <openebs-namespace>`
serviceAccountName: openebs-maya-operator
containers:
- name: upgrade
args:
- "jiva-volume"

# --from-version is the current version of the volume
- "--from-version=1.0.0"
- "--to-version=1.2.0"

# --to-version is the version desired upgrade version
- "--to-version=1.3.0"

#VERIFY that you have provided the correct cStor PV Name
- "--pv-name=pvc-713e3bb6-afd2-11e9-8e79-42010a800065"
#Following are optional parameters
Expand All @@ -222,7 +228,10 @@ spec:
fieldRef:
fieldPath: metadata.namespace
tty: true
image: quay.io/openebs/m-upgrade:1.2.0

# the image version should be same as the --to-version mentioned above
# in the args of the job
image: quay.io/openebs/m-upgrade:1.3.0
restartPolicy: OnFailure
---
```
Expand Down Expand Up @@ -250,7 +259,7 @@ cstor-sparse-pool 24m

The Job spec for upgrade cstor pools is:

```sh
```yaml
#This is an example YAML for upgrading cstor SPC.
#Some of the values below needs to be changed to
#match your openebs installation. The fields are
Expand Down Expand Up @@ -281,10 +290,16 @@ spec:
- name: upgrade
args:
- "cstor-spc"

# --from-version is the current version of the pool
- "--from-version=1.0.0"
- "--to-version=1.2.0"

# --to-version is the version desired upgrade version
- "--to-version=1.3.0"

#VERIFY that you have provided the correct SPC Name
- "--spc-name=cstor-sparse-pool"

#Following are optional parameters
#Log Level
- "--v=4"
Expand All @@ -295,7 +310,10 @@ spec:
fieldRef:
fieldPath: metadata.namespace
tty: true
image: quay.io/openebs/m-upgrade:1.2.0

# the image version should be same as the --to-version mentioned above
# in the args of the job
image: quay.io/openebs/m-upgrade:1.3.0
restartPolicy: OnFailure
---
```
Expand All @@ -311,7 +329,7 @@ pvc-1085415d-f84c-11e8-aadf-42010a8000bb 5G RWO Delete
```

Create a Kubernetes Job spec for upgrading the cstor volume. An example spec is as follows:
```
```yaml
#This is an example YAML for upgrading cstor volume.
#Some of the values below needs to be changed to
#match your openebs installation. The fields are
Expand Down Expand Up @@ -343,10 +361,16 @@ spec:
- name: upgrade
args:
- "cstor-volume"

# --from-version is the current version of the volume
- "--from-version=1.0.0"
- "--to-version=1.2.0"

# --to-version is the version desired upgrade version
- "--to-version=1.3.0"

#VERIFY that you have provided the correct cStor PV Name
- "--pv-name=pvc-c630f6d5-afd2-11e9-8e79-42010a800065"

#Following are optional parameters
#Log Level
- "--v=4"
Expand All @@ -357,7 +381,10 @@ spec:
fieldRef:
fieldPath: metadata.namespace
tty: true
image: quay.io/openebs/m-upgrade:1.2.0

# the image version should be same as the --to-version mentioned above
# in the args of the job
image: quay.io/openebs/m-upgrade:1.3.0
restartPolicy: OnFailure
---
```