From f7a9efb93ae264ec2624fbdba923a0dd422d94bf Mon Sep 17 00:00:00 2001 From: SrishT Date: Tue, 22 Sep 2020 05:07:29 +0530 Subject: [PATCH 01/14] Updating documentation and charts Signed-off-by: SrishT --- README.md | 39 ++++++--------- charts/pravega-operator/README.md | 16 +++--- .../pravega-operator/templates/webhook.yaml | 2 +- charts/pravega/README.md | 13 ++++- charts/pravega/templates/pravega.yaml | 18 +++++-- doc/operator-upgrade.md | 22 +++++---- doc/rollback-cluster.md | 27 +++++----- doc/upgrade-cluster.md | 49 +++++++++---------- 8 files changed, 103 insertions(+), 83 deletions(-) diff --git a/README.md b/README.md index 85be597b8..531cc9e65 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,17 @@ The Pravega Operator manages Pravega clusters deployed to Kubernetes and automat ## Quickstart +We recommend using our [helm charts](charts) for all installation and upgrades. The helm charts for pravega operator (version 0.4.5 onwards) and pravega cluster (version 0.5.0 onwards) are published in [https://charts.pravega.io](https://charts.pravega.io/). To add this repository to your Helm repos, use the following command +``` +helm repo add pravega https://charts.pravega.io +``` +However there are manual deployment and upgrade options available as well. + ### Install the Operator > Note: If you are running on Google Kubernetes Engine (GKE), please [check this first](doc/development.md#installation-on-google-kubernetes-engine). -We recommend using helm to deploy a Pravega Operator. Check out the [helm installation](charts/pravega-operator/README.md) document for instructions. +To understand how to deploy a Pravega Operator using helm, refer to [this](charts/pravega-operator#installing-the-chart). #### Deploying in Test Mode The Operator can be run in a "test" mode if we want to create pravega on minikube or on a cluster with very limited resources by enabling `testmode: true` in `values.yaml` file. Operator running in test mode skips minimum replica requirement checks on Pravega components. "Test" mode ensures a bare minimum setup of pravega and is not recommended to be used in production environments. @@ -79,22 +85,9 @@ $ kubectl create -f ./example/pvc-tier2.yaml #### Install a Pravega cluster -Use Helm to install a sample Pravega cluster with release name `bar`. - -``` -$ helm install bar charts/pravega --set zookeeperUri=[ZOOKEEPER_HOST] --set bookkeeperUri=[BOOKKEEPER_SVC] --set storage.longtermStorage.filesystem.pvc=[TIER2_NAME] -``` - -where: - -- **[ZOOKEEPER_HOST]** is the host or IP address of your Zookeeper deployment (e.g. `zookeeper-client:2181`). Multiple Zookeeper URIs can be specified, use a comma-separated list and DO NOT leave any spaces in between (e.g. `zookeeper-0:2181,zookeeper-1:2181,zookeeper-2:2181`). -- **[BOOKKEEPER_SVC]** is the is the name of the headless service of your Bookkeeper deployment (e.g. `bookkeeper-bookie-0.bookkeeper-bookie-headless.default.svc.cluster.local:3181,bookkeeper-bookie-1.bookkeeper-bookie-headless.default.svc.cluster.local:3181,bookkeeper-bookie-2.bookkeeper-bookie-headless.default.svc.cluster.local:3181`). -- **[TIER2_NAME]** is the longtermStorage `PersistentVolumeClaim` name. `pravega-tier2` if you created the PVC above. - - -Check out the [Pravega Helm Chart](charts/pravega) for the complete list of configurable parameters. +To understand how to deploy a pravega cluster using helm, refer to [this](charts/zookeeper#installing-the-chart). -Verify that the cluster instances and its components are being created. +Once the pravega cluster with release name `bar` has been created, use the following command to verify that the cluster instances and its components are being created. ``` $ kubectl get PravegaCluster @@ -132,27 +125,27 @@ statefulset.apps/bar-pravega-segmentstore 3 3 2m By default, a `PravegaCluster` instance is only accessible within the cluster through the Controller `ClusterIP` service. From within the Kubernetes cluster, a client can connect to Pravega at: ``` -tcp://-pravega-controller.:9090 +tcp://-pravega-controller.:9090 ``` And the `REST` management interface is available at: ``` -http://-pravega-controller.:10080/ +http://-pravega-controller.:10080/ ``` Check out the [external access documentation](doc/external-access.md) if your clients need to connect to Pravega from outside Kubernetes. -Check out the [exposing Segmentstore service on single IP address ](https://github.com/pravega/pravega-operator/blob/4aa88641c3d5a1d5afbb2b9e628846639fd13290/doc/external-access.md#exposing-segmentstore-service-on-single-ip-address-and-different-ports) if your clients need to connect to Pravega Segment store on the same IP address from outside Kubernetes. +Check out the [exposing Segmentstore service on single IP address](https://github.com/pravega/pravega-operator/blob/4aa88641c3d5a1d5afbb2b9e628846639fd13290/doc/external-access.md#exposing-segmentstore-service-on-single-ip-address-and-different-ports) if your clients need to connect to Pravega Segment store on the same IP address from outside Kubernetes. ### Scale a Pravega cluster -You can scale Pravega components independently by modifying their corresponding field in the Pravega resource spec. You can either `kubectl edit` the cluster or `kubectl patch` it. If you edit it, update the number of replicas for BookKeeper, Controller, and/or Segment Store and save the updated spec. +You can scale Pravega components independently by modifying their corresponding field in the Pravega resource spec. You can either `kubectl edit` the cluster or `kubectl patch` it. If you edit it, update the number of replicas for Controller, and/or Segment Store and save the updated spec. Example of patching the Pravega resource to scale the Segment Store instances to 4. ``` -kubectl patch PravegaCluster --type='json' -p='[{"op": "replace", "path": "/spec/pravega/segmentStoreReplicas", "value": 4}]' +kubectl patch PravegaCluster --type='json' -p='[{"op": "replace", "path": "/spec/pravega/segmentStoreReplicas", "value": 4}]' ``` ### Upgrade a Pravega cluster @@ -162,7 +155,7 @@ Check out the [upgrade guide](doc/upgrade-cluster.md). ### Uninstall the Pravega cluster ``` -$ helm uninstall bar +$ helm uninstall $ kubectl delete -f ./example/pvc-tier2.yaml ``` @@ -171,7 +164,7 @@ $ kubectl delete -f ./example/pvc-tier2.yaml > Note that the Pravega clusters managed by the Pravega operator will NOT be deleted even if the operator is uninstalled. ``` -$ helm uninstall foo +$ helm uninstall ``` If you want to delete the Pravega clusters, make sure to do it before uninstalling the operator. diff --git a/charts/pravega-operator/README.md b/charts/pravega-operator/README.md index 9e3d9eecd..e0c1020a6 100644 --- a/charts/pravega-operator/README.md +++ b/charts/pravega-operator/README.md @@ -13,22 +13,26 @@ This chart bootstraps a [pravega-operator](https://github.com/pravega/pravega-op - An existing Apache Bookkeeper 4.9.2 cluster. This can be easily deployed using our [BookKeeper Operator](https://github.com/pravega/bookkeeper-operator) - Cert-Manager v0.15.0+ or some other certificate management solution in order to manage the webhook service certificates. This can be easily deployed by referring to [this](https://cert-manager.io/docs/installation/kubernetes/) - An Issuer and a Certificate (either self-signed or CA signed) in the same namespace that the Pravega Operator will be installed (refer to [this](https://github.com/pravega/pravega-operator/blob/master/deploy/certificate.yaml) manifest to create a self-signed certificate in the default namespace) - > The name of the certificate (*webhookCert.certName*), the name of the secret created by this certificate (*webhookCert.secretName*), the tls.crt (*webhookCert.crt*) and tls.key (*webhookCert.key*) need to be specified against the corresponding fields in the values.yaml file, or can be provided with the install command as shown [here](#installing-the-chart). - The values *tls.crt* and *tls.key* are contained in the secret which is created by the certificate and can be obtained using the following command - ``` - kubectl get secret -o yaml | grep tls. - ``` ## Installing the Chart To install the chart with the release name `my-release`: ``` -$ helm install my-release pravega-operator --set webhookCert.crt= --set webhookCert.generate=false --set webhookCert.certName= --set webhookCert.secretName= +$ helm repo add pravega https://charts.pravega.io +$ helm repo update +$ helm install my-release pravega/pravega-operator --version=[VERSION] --set webhookCert.crt=[TLS_CRT] --set webhookCert.generate=false --set webhookCert.certName=[CERT_NAME] --set webhookCert.secretName=[SECRET_NAME] ``` +where: +- **[VERSION]** can be any stable release version for pravega operator from 0.5.0 onwards. +- **[CERT_NAME]** is the name of the certificate created in the previous step +- **[SECRET_NAME]** is the name of the secret created by the above certificate +- **[TLS_CRT]** is contained in the above secret and can be obtained using the command `kubectl get secret [SECRET_NAME] -o yaml | grep tls.crt` The command deploys pravega-operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. +>Note: If the pravega operator version is 0.4.5, webhookCert.generate, webhookCert.crt, webhookCert.certName and webhookCert.secretName should not be set. Also in this case, bookkeeper operator, cert-manager and the certificate/issuer do not need to be deployed as a prerequisite. + ## Uninstalling the Chart To uninstall/delete the `my-release` deployment: diff --git a/charts/pravega-operator/templates/webhook.yaml b/charts/pravega-operator/templates/webhook.yaml index f481057bf..406531dfa 100644 --- a/charts/pravega-operator/templates/webhook.yaml +++ b/charts/pravega-operator/templates/webhook.yaml @@ -23,7 +23,7 @@ metadata: labels: {{ include "pravega-operator.commonLabels" . | indent 4 }} annotations: - cert-manager.io/inject-ca-from: default/selfsigned-cert + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ .Values.certName }} webhooks: - clientConfig: service: diff --git a/charts/pravega/README.md b/charts/pravega/README.md index 12074a2d3..4cbb890b2 100644 --- a/charts/pravega/README.md +++ b/charts/pravega/README.md @@ -19,14 +19,23 @@ This chart creates a [Pravega](https://github.com/pravega/pravega) cluster in [K To install the chart with the release name `my-release`: ``` -$ helm install my-release pravega +$ helm repo add pravega https://charts.pravega.io +$ helm repo update +$ helm install my-release pravega/pravega --version=[VERSION] --set zookeeperUri=[ZOOKEEPER_HOST] --set bookkeeperUri=[BOOKKEEPER_SVC] --set storage.longtermStorage.filesystem.pvc=[TIER2_NAME] ``` +where: +- **[VERSION]** can be any stable release version for pravega from 0.5.0 onwards. +- **[ZOOKEEPER_HOST]** is the host or IP address of your Zookeeper deployment (e.g. `zookeeper-client:2181`). Multiple Zookeeper URIs can be specified, use a comma-separated list and DO NOT leave any spaces in between (e.g. `zookeeper-0:2181,zookeeper-1:2181,zookeeper-2:2181`). +- **[BOOKKEEPER_SVC]** is the is the name of the headless service of your Bookkeeper deployment (e.g. `bookkeeper-bookie-0.bookkeeper-bookie-headless.default.svc.cluster.local:3181,bookkeeper-bookie-1.bookkeeper-bookie-headless.default.svc.cluster.local:3181,bookkeeper-bookie-2.bookkeeper-bookie-headless.default.svc.cluster.local:3181`). +- **[TIER2_NAME]** is the longtermStorage `PersistentVolumeClaim` name (`pravega-tier2` if you created the PVC using the manifest provided). The command deploys pravega on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. +>Note: If the underlying pravega operator version is 0.4.5, bookkeeperUri should not be set, and the pravega-bk charts should be used instead of the pravega charts + ## Uninstalling the Chart -To uninstall/delete the `my-release` deployment: +To uninstall/delete the pravega cluster `my-release`: ``` $ helm uninstall my-release diff --git a/charts/pravega/templates/pravega.yaml b/charts/pravega/templates/pravega.yaml index ddc80f1a9..625674cb7 100644 --- a/charts/pravega/templates/pravega.yaml +++ b/charts/pravega/templates/pravega.yaml @@ -9,9 +9,15 @@ spec: {{- if .Values.tls }} tls: static: + {{- if .Values.tls.secret.controller }} controllerSecret: {{ .Values.tls.secret.controller }} + {{- end }} + {{- if .Values.tls.secret.segmentStore }} segmentStoreSecret: {{ .Values.tls.secret.segmentStore }} + {{- end }} + {{- if .Values.tls.caBundle }} caBundle: {{ .Values.tls.caBundle }} + {{- end }} {{- end }} authentication: enabled: {{ .Values.authentication.enabled }} @@ -86,20 +92,26 @@ spec: {{ toYaml .Values.segmentStore.jvmOptions | indent 6 }} {{- end }} debugLogging: {{ .Values.debugLogging }} + {{- if .Values.storage.cache }} cacheVolumeClaimTemplate: accessModes: [ "ReadWriteOnce" ] + {{- if .Values.storage.cache.className }} storageClassName: {{ .Values.storage.cache.className }} + {{- end }} + {{- if .Values.storage.cache.size }} resources: requests: storage: {{ .Values.storage.cache.size }} + {{- end }} + {{- end }} longtermStorage: - {{- if eq .Values.storage.longtermStorage.type "ecs"}} + {{- if eq (default .Values.storage.longtermStorage.type "filesystem") "ecs" }} ecs: configUri: {{ .Values.storage.longtermStorage.ecs.configUri }} bucket: {{ .Values.storage.longtermStorage.ecs.bucket }} prefix: {{ .Values.storage.longtermStorage.ecs.prefix }} credentials: {{ .Values.storage.longtermStorage.ecs.credentials }} - {{- else if eq .Values.storage.longtermStorage.type "hdfs"}} + {{- else if eq (default .Values.storage.longtermStorage.type "filesystem") "hdfs"}} hdfs: uri: {{ .Values.storage.longtermStorage.hdfs.uri }} root: {{ .Values.storage.longtermStorage.hdfs.root }} @@ -107,7 +119,7 @@ spec: {{- else }} filesystem: persistentVolumeClaim: - claimName: {{ .Values.storage.longtermStorage.filesystem.pvc }} + claimName: {{ default "pravega-tier2" .Values.storage.longtermStorage.filesystem.pvc }} {{- end }} {{- if .Values.options }} options: diff --git a/doc/operator-upgrade.md b/doc/operator-upgrade.md index 7513cd49f..fa20c6ae1 100644 --- a/doc/operator-upgrade.md +++ b/doc/operator-upgrade.md @@ -7,16 +7,18 @@ Starting Operator version `0.4.3` we also support major version upgrades for Pra `0.4.4 --> 0.5.0` + `0.4.5 --> 0.5.0` + # Upgrade Guide -## Upgrading till 0.4.4 +## Upgrading till 0.4.5 or from 0.5.0 to above ### Trigger the upgrade via helm -Pravega operator can be upgraded using the following command +Pravega operator can be upgraded to a version `` using the following command ``` -$ helm upgrade +$ helm upgrade pravega/pravega-operator --version= ``` ### Trigger the upgrade manually @@ -37,7 +39,7 @@ Here is a list of changes and their impact: 1. The Pravega Cluster CRD -Till Operator `0.4.4`, the Pravega CR (version `v1alpha1`) includes Bookkeeper. +Till Operator `0.4.5`, the Pravega CR (version `v1alpha1`) includes Bookkeeper. Starting version `0.5.0`, Pravega CR does **not** include Bookkeeper. Bookkeeper is moved out and is now a prerequisite for Pravega deployment. It can be installed separately either using [Bookkeeper-Operator](https://github.com/pravega/bookkeeper-operator) or some other means. @@ -97,11 +99,6 @@ To install cert-manager check [this](https://cert-manager.io/docs/installation/k 3. [Bookkeeper Operator](https://github.com/pravega/bookkeeper-operator/tree/master/charts/bookkeeper-operator) must be deployed in the same namespace as Pravega Operator, prior to triggering the upgrade. Also, Bookkeeper operator version map should contain the bookkeeper versions of the installed bookkeeper. 4. Install an Issuer and a Certificate (either self-signed or CA signed) in the same namespace as the Pravega Operator (refer to [this](https://github.com/pravega/pravega-operator/blob/master/deploy/certificate.yaml) manifest to create a self-signed certificate in the default namespace). -> The name of the certificate (*webhookCert.certName*), the name of the secret created by this certificate (*webhookCert.secretName*), the tls.crt (*webhookCert.crt*) and tls.key (*webhookCert.key*) need to be specified against the corresponding fields in the values.yaml file, or can be provided with the upgrade command as shown [here](#triggering-the-upgrade). -The values *tls.crt* and *tls.key* are contained in the secret which is created by the certificate and can be obtained using the following command -``` -kubectl get secret -o yaml | grep tls. -``` 5. Execute the script `pre-upgrade.sh` inside the [scripts](https://github.com/pravega/pravega-operator/blob/master/scripts) folder. This script patches the `pravega-webhook-svc` with the required annotations and labels. @@ -112,8 +109,13 @@ kubectl get secret -o yaml | grep tls. The upgrade to Operator 0.5.0 can be triggered using the following command ``` -helm upgrade --set webhookCert.crt= --set webhookCert.generate=false --set webhookCert.certName= --set webhookCert.secretName= +helm upgrade pravega/pravega-operator --version=0.5.0 --set webhookCert.crt=[tls.crt] --set webhookCert.generate=false --set webhookCert.certName=[cert-name] --set webhookCert.secretName=[secret-name] ``` +where: +- `[cert-name]` is the name of the certificate that has been created +- `[secret-name]` is the name of the secret created by the above certificate +- `[tls.crt]` is contained in the above secret and can be obtained using the command `kubectl get secret -o yaml | grep tls.crt` + Once the upgrade completes and the following command starts returning a response instead of throwing an error message (this might take around 7 to 10 minutes after the operator upgrade has been done) ``` diff --git a/doc/rollback-cluster.md b/doc/rollback-cluster.md index bbe0c37e8..accbd5e8b 100644 --- a/doc/rollback-cluster.md +++ b/doc/rollback-cluster.md @@ -24,10 +24,10 @@ Status: True Reason: UpgradeFailed Message:
``` -After an Upgrade Failure the output of `kubectl describe pravegacluster pravega` would look like this: +After an Upgrade Failure the output of `kubectl describe pravegacluster ` would look like this (assuming name of pravega cluster is `bar-pravega`): ``` -$> kubectl describe pravegacluster pravega +$> kubectl describe pravegacluster bar-pravega . . . Spec: . . . @@ -46,7 +46,7 @@ Conditions: Type: PodsReady Last Transition Time: 2019-09-06T09:00:13Z Last Update Time: 2019-09-06T09:00:13Z - Message: failed to sync segmentstore version. pod pravega-pravega-segmentstore-0 update failed because of ImagePullBackOff + Message: failed to sync segmentstore version. pod bar-pravega-pravega-segmentstore-0 update failed because of ImagePullBackOff Reason: UpgradeFailed Status: True Type: Error @@ -60,7 +60,7 @@ where `0.6.0-2252.b6f6512` is the version we tried upgrading to and `0.6.0-2239. ## Manual Rollback Trigger -A Rollback is triggered when a Pravega Cluster is in `UpgradeFailed` Error State and a user manually updates version feild in the PravegaCluster spec to point to the last stable cluster version. +A Rollback is triggered when a Pravega Cluster is in `UpgradeFailed` Error State and a user manually updates version field in the PravegaCluster spec to point to the last stable cluster version. A Rollback involves moving all components in the cluster back to the last stable cluster version. As with upgrades, the operator rolls back one component at a time and one pod at a time to preserve high-availability. @@ -68,27 +68,28 @@ Note: 1. A Rollback to only the last stable cluster version is supported at this point. 2. Changing the cluster spec version to the previous cluster version, when cluster is not in `UpgradeFailed` state, will not trigger a rollback. -## Rollback via Helm +## Rollback via Helm (Experimental) The following command prints the historical revisions of a particular helm release ``` -$ helm history +$ helm history ``` Rollback can be triggered via helm using the following command ``` -$ helm rollback +$ helm rollback ``` Rollback will be successfully triggered only if the previous revision number is provided. +Note: Helm rollbacks are still an experimental feature and are not encouraged. We recommend using the manual way for cluster rollbacks. ## Rollback Implementation When Rollback is triggered the cluster moves into ClusterCondition `RollbackInProgress`. Once the Rollback completes, this condition is set to false. -During a Rollback, the Cluster Status should look something like: +During a Rollback, the Cluster Status should look something like this (assuming name of pravega cluster is `bar-pravega`): ``` -$> kubectl describe pravegacluster pravega +$> kubectl describe pravegacluster bar-pravega . . . Status: Conditions: @@ -102,7 +103,7 @@ Status: Type: PodsReady Last Transition Time: 2019-09-20T10:41:10Z Last Update Time: 2019-09-20T10:41:10Z - Message: failed to sync segmentstore version. pod pravega-pravega-segmentstore-0 update failed because of ImagePullBackOff + Message: failed to sync segmentstore version. pod bar-pravega-pravega-segmentstore-0 update failed because of ImagePullBackOff Reason: UpgradeFailed Status: True Type: Error @@ -114,9 +115,9 @@ Status: . . . ``` Here the `RollbackInProgress` condition being `true` indicates that a Rollback is in Progress. -Also `Reason` and `Message` feilds of this condition indicate the component being rolled back and number of updated replicas respectively. +Also `Reason` and `Message` fields of this condition indicate the component being rolled back and number of updated replicas respectively. -The operator rolls back components following the reverse upgrade order : +The operator rolls back components following the reverse upgrade order (only if number of segmentstore replicas is greater than 1): 1. Pravega Controller 2. Pravega Segment Store @@ -180,7 +181,7 @@ Status: Type: PodsReady Last Transition Time: 2019-09-20T09:46:24Z Last Update Time: 2019-09-20T09:50:57Z - Message: failed to sync segmentstore version. pod pravega-pravega-segmentstore-0 update failed because of ImagePullBackOff + Message: failed to sync segmentstore version. pod bar-pravega-pravega-segmentstore-0 update failed because of ImagePullBackOff Reason: RollbackFailed Status: True Type: Error diff --git a/doc/upgrade-cluster.md b/doc/upgrade-cluster.md index 274f0b8d5..87f12aa63 100644 --- a/doc/upgrade-cluster.md +++ b/doc/upgrade-cluster.md @@ -22,8 +22,8 @@ Your Pravega cluster should be in a healthy state. You can check your cluster he ``` $ kubectl get PravegaCluster -NAME VERSION DESIRED MEMBERS READY MEMBERS AGE -pravega 0.4.0 7 7 11m +NAME VERSION DESIRED MEMBERS READY MEMBERS AGE +bar-pravega 0.4.0 7 7 11m ``` ## Valid Upgrade Paths @@ -34,11 +34,11 @@ To understand the valid upgrade paths for a pravega cluster, refer to the [versi ### Upgrading via Helm -The upgrade can be triggered via helm using the following command +The upgrade of the pravega cluster with release name `bar` from a version `x` to `y` can be triggered via helm using the following command ``` -$ helm upgrade --reuse-values --timeout 600s +$ helm upgrade bar pravega/pravega --version=y --set version=y --reuse-values --timeout 600s ``` -By specifying the `--reuse-values` option, the values of all parameters are retained across upgrades. However if some values need to be modified during the upgrade, the `--set` flag can be used to specify the new values of these parameters. +Note: By specifying the `--reuse-values` option, the values of all parameters are retained across upgrades. However if some values need to be modified during the upgrade, the `--set` flag can be used to specify the new values of these parameters. Also, by skipping the `reuse-values` flag, the values of all parameters are reset to their default values specified in the charts published for version `y`. ### Upgrading manually @@ -146,16 +146,16 @@ You can monitor your upgrade process by listing the Pravega clusters. If a desir ``` $ kubectl get PravegaCluster -NAME VERSION DESIRED VERSION DESIRED MEMBERS READY MEMBERS AGE -pravega 0.4.0 0.5.0 5 4 1h +NAME VERSION DESIRED VERSION DESIRED MEMBERS READY MEMBERS AGE +bar-pravega 0.4.0 0.5.0 5 4 1h ``` When the upgrade process has finished, the version will be updated. ``` $ kubectl get PravegaCluster -NAME VERSION DESIRED MEMBERS READY MEMBERS AGE -pravega 0.5.0 5 5 1h +NAME VERSION DESIRED MEMBERS READY MEMBERS AGE +bar-pravega 0.5.0 5 5 1h ``` The command `kubectl describe` can be used to track progress of the upgrade. @@ -196,7 +196,7 @@ Status: Type: PodsReady Last Transition Time: 2019-04-01T19:43:08+02:00 Last Update Time: 2019-04-01T19:43:08+02:00 - Message: failed to sync segmentstore version. pod pravega-pravega-segmentstore-0 is restarting + Message: failed to sync segmentstore version. pod bar-pravega-pravega-segmentstore-0 is restarting Reason: UpgradeFailed Status: True Type: Error @@ -204,12 +204,12 @@ Status: Current Version: 0.4.0 Members: Ready: - pravega-pravega-controller-64ff87fc49-kqp9k - pravega-pravega-segmentstore-1 - pravega-pravega-segmentstore-2 - pravega-pravega-segmentstore-3 + bar-pravega-pravega-controller-64ff87fc49-kqp9k + bar-pravega-pravega-segmentstore-1 + bar-pravega-pravega-segmentstore-2 + bar-pravega-pravega-segmentstore-3 Unready: - pravega-pravega-segmentstore-0 + bar-pravega-pravega-segmentstore-0 Ready Replicas: 4 Replicas: 5 ``` @@ -219,16 +219,15 @@ You can also find useful information at the operator logs. ``` ... INFO[5884] syncing cluster version from 0.4.0 to 0.5.0-1 -INFO[5885] Reconciling PravegaCluster default/pravega -INFO[5886] updating statefulset (pravega-pravega-segmentstore) template image to 'adrianmo/pravega:0.5.0-1' -INFO[5896] Reconciling PravegaCluster default/pravega -INFO[5897] statefulset (pravega-bookie) status: 0 updated, 4 ready, 4 target -INFO[5897] upgrading pod: pravega-pravega-segmentstore-0 -INFO[5899] Reconciling PravegaCluster default/pravega -INFO[5900] statefulset (pravega-pravega-segmentstore) status: 1 updated, 3 ready, 4 target -INFO[5929] Reconciling PravegaCluster default/pravega -INFO[5930] statefulset (pravega-pravega-segmentstore) status: 1 updated, 3 ready, 4 target -INFO[5930] error syncing cluster version, upgrade failed. failed to sync segmentstore version. pod pravega-pravega-segmentstore-0 is restarting +INFO[5885] Reconciling PravegaCluster default/bar-pravega +INFO[5886] updating statefulset (bar-pravega-pravega-segmentstore) template image to 'pravega/pravega:0.5.0-1' +INFO[5896] Reconciling PravegaCluster default/bar-pravega +INFO[5897] upgrading pod: bar-pravega-pravega-segmentstore-0 +INFO[5899] Reconciling PravegaCluster default/bar-pravega +INFO[5900] statefulset (bar-pravega-pravega-segmentstore) status: 1 updated, 3 ready, 4 target +INFO[5929] Reconciling PravegaCluster default/bar-pravega +INFO[5930] statefulset (bar-pravega-pravega-segmentstore) status: 1 updated, 3 ready, 4 target +INFO[5930] error syncing cluster version, upgrade failed. failed to sync segmentstore version. pod bar-pravega-pravega-segmentstore-0 is restarting ... ``` From bd2a7d69920b0f7f7313aa4d3bc3e0225812bbb0 Mon Sep 17 00:00:00 2001 From: SrishT Date: Tue, 22 Sep 2020 16:28:36 +0530 Subject: [PATCH 02/14] Updating documentation and charts Signed-off-by: SrishT --- charts/pravega/README.md | 4 ++-- charts/pravega/templates/pravega.yaml | 10 +++++----- doc/operator-upgrade.md | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/charts/pravega/README.md b/charts/pravega/README.md index 4cbb890b2..5f491f877 100644 --- a/charts/pravega/README.md +++ b/charts/pravega/README.md @@ -79,8 +79,8 @@ The following table lists the configurable parameters of the Pravega chart and t | `segmentStore.resources.limits.memory` | Memory limits for segmentStore | `4Gi` | | `segmentStore.service.type` | Override the segmentStore service type, if external access is enabled (LoadBalancer/NodePort) | | | `segmentStore.service.annotations` | Annotations to add to the segmentStore service, if external access is enabled | `{}` | -| `segmentStore.service.segmentStoreLoadBalancerIP` |It is used to provide a LoadBalancerIP | | -| `segmentStore.service.segmentStoreExternalTrafficPolicy` | It is used to provide segmentStoreExternalTrafficPolicy | | +| `segmentStore.service.loadBalancerIP` |It is used to provide a LoadBalancerIP for the segmentStore service | | +| `segmentStore.service.externalTrafficPolicy` | It is used to provide ExternalTrafficPolicy for the segmentStore service | | | `segmentStore.jvmOptions` | JVM Options for segmentStore | `[]` | | `storage.longtermStorage.type` | Type of long term storage backend to be used (filesystem/ecs/hdfs) | `filesystem` | | `storage.longtermStorage.filesystem.pvc` | Name of the pre-created PVC, if long term storage type is filesystem | `pravega-tier2` | diff --git a/charts/pravega/templates/pravega.yaml b/charts/pravega/templates/pravega.yaml index 625674cb7..e51d5ccfb 100644 --- a/charts/pravega/templates/pravega.yaml +++ b/charts/pravega/templates/pravega.yaml @@ -39,10 +39,12 @@ spec: {{- if .Values.externalAccess.enabled }} controllerServiceAccountName: {{ .Values.serviceAccount.name }} segmentStoreServiceAccountName: {{ .Values.serviceAccount.name }} - {{- if .Values.segmentStore.service.segmentStoreLoadBalancerIP }} - segmentStoreLoadBalancerIP: {{ .Values.segmentStore.service.segmentStoreLoadBalancerIP }} + {{- if .Values.segmentStore.service.loadBalancerIP }} + segmentStoreLoadBalancerIP: {{ .Values.segmentStore.service.loadBalancerIP }} + {{- end }} + {{- if .Values.segmentStore.service.externalTrafficPolicy }} + segmentStoreExternalTrafficPolicy: {{ .Values.segmentStore.service.externalTrafficPolicy }} {{- end }} - segmentStoreExternalTrafficPolicy: {{ .Values.segmentStore.service.segmentStoreExternalTrafficPolicy }} {{- if .Values.controller.service.type }} controllerExtServiceType: {{ .Values.controller.service.type }} {{- end }} @@ -76,9 +78,7 @@ spec: {{- end }} {{- if .Values.segmentStore.secret }} segmentStoreSecret: - {{- if .Values.segmentStore.secret.name }} secret: {{ .Values.segmentStore.name }} - {{- end }} {{- if .Values.segmentStore.secret.path }} mountPath: {{ .Values.segmentStore.path }} {{- end }} diff --git a/doc/operator-upgrade.md b/doc/operator-upgrade.md index fa20c6ae1..9a67be7fb 100644 --- a/doc/operator-upgrade.md +++ b/doc/operator-upgrade.md @@ -114,16 +114,16 @@ helm upgrade pravega/pravega-operator --version= where: - `[cert-name]` is the name of the certificate that has been created - `[secret-name]` is the name of the secret created by the above certificate -- `[tls.crt]` is contained in the above secret and can be obtained using the command `kubectl get secret -o yaml | grep tls.crt` +- `[tls.crt]` is contained in the above secret and can be obtained using the command `kubectl get secret [secret-name] -o yaml | grep tls.crt` Once the upgrade completes and the following command starts returning a response instead of throwing an error message (this might take around 7 to 10 minutes after the operator upgrade has been done) ``` -kubectl describe PravegaCluster +kubectl describe PravegaCluster ``` Execute the script `post-upgrade.sh` inside the [scripts](https://github.com/pravega/pravega-operator/blob/master/scripts) folder. The format of the command is ``` -./post-upgrade.sh +./post-upgrade.sh ``` This script patches the `PravegaCluster` and `BookkeeperCluster` resources with the required annotations and labels, and updates their corresponding helm releases. This script needs the following arguments 1. Name of the PravegaCluster or BookkeeperCluster resource (check the output of `kubectl get PravegaCluster` to obtain this name). From 53225b62b648d9e54e4d067352cc04cce39e7837 Mon Sep 17 00:00:00 2001 From: SrishT Date: Tue, 22 Sep 2020 16:39:26 +0530 Subject: [PATCH 03/14] Updating documentation and charts Signed-off-by: SrishT --- charts/pravega/templates/pravega.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/pravega/templates/pravega.yaml b/charts/pravega/templates/pravega.yaml index e51d5ccfb..4c224d195 100644 --- a/charts/pravega/templates/pravega.yaml +++ b/charts/pravega/templates/pravega.yaml @@ -78,9 +78,9 @@ spec: {{- end }} {{- if .Values.segmentStore.secret }} segmentStoreSecret: - secret: {{ .Values.segmentStore.name }} + secret: {{ .Values.segmentStore.secret.name }} {{- if .Values.segmentStore.secret.path }} - mountPath: {{ .Values.segmentStore.path }} + mountPath: {{ .Values.segmentStore.secret.path }} {{- end }} {{- end }} {{- if .Values.controller.jvmOptions }} From e1fa07cbf5aed6ee349bd6d7e2318b45d9dd66db Mon Sep 17 00:00:00 2001 From: SrishT Date: Tue, 22 Sep 2020 17:05:17 +0530 Subject: [PATCH 04/14] Updating documentation and charts Signed-off-by: SrishT --- README.md | 2 +- doc/operator-upgrade.md | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 531cc9e65..741371242 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ $ kubectl create -f ./example/pvc-tier2.yaml #### Install a Pravega cluster -To understand how to deploy a pravega cluster using helm, refer to [this](charts/zookeeper#installing-the-chart). +To understand how to deploy a pravega cluster using helm, refer to [this](charts/pravega#installing-the-chart). Once the pravega cluster with release name `bar` has been created, use the following command to verify that the cluster instances and its components are being created. diff --git a/doc/operator-upgrade.md b/doc/operator-upgrade.md index 9a67be7fb..cbd965ce7 100644 --- a/doc/operator-upgrade.md +++ b/doc/operator-upgrade.md @@ -100,7 +100,10 @@ To install cert-manager check [this](https://cert-manager.io/docs/installation/k 4. Install an Issuer and a Certificate (either self-signed or CA signed) in the same namespace as the Pravega Operator (refer to [this](https://github.com/pravega/pravega-operator/blob/master/deploy/certificate.yaml) manifest to create a self-signed certificate in the default namespace). -5. Execute the script `pre-upgrade.sh` inside the [scripts](https://github.com/pravega/pravega-operator/blob/master/scripts) folder. This script patches the `pravega-webhook-svc` with the required annotations and labels. +5. Execute the script `pre-upgrade.sh` inside the [scripts](https://github.com/pravega/pravega-operator/blob/master/scripts) folder. This script patches the `pravega-webhook-svc` with the required annotations and labels. The format of the command is +``` +./pre-upgrade.sh +``` ### Triggering the upgrade @@ -117,11 +120,11 @@ where: - `[tls.crt]` is contained in the above secret and can be obtained using the command `kubectl get secret [secret-name] -o yaml | grep tls.crt` -Once the upgrade completes and the following command starts returning a response instead of throwing an error message (this might take around 7 to 10 minutes after the operator upgrade has been done) +Wait for the upgrade to complete (which can be determined once the following command starts returning a response instead of throwing an error message). This might take around 7 to 10 minutes after the operator upgrade has been done. ``` kubectl describe PravegaCluster ``` -Execute the script `post-upgrade.sh` inside the [scripts](https://github.com/pravega/pravega-operator/blob/master/scripts) folder. The format of the command is +Next, execute the script `post-upgrade.sh` inside the [scripts](https://github.com/pravega/pravega-operator/blob/master/scripts) folder. The format of the command is ``` ./post-upgrade.sh ``` @@ -132,7 +135,7 @@ This script patches the `PravegaCluster` and `BookkeeperCluster` resources with 4. Version of the PravegaCluster or BookkeeperCluster resources (check the output of `kubectl get PravegaCluster` to obtain the version number). 5. Namespace in which PravegaCluster and BookkeeperCluster resources are deployed (this is an optional parameter and its default value is `default`). 6. Name of the zookeeper client service (this is an optional parameter and its default value is `zookeeper-client`). -7. Number of replicas in the BookkeeperCluster (this is an optional parameter and its default value is 3). +7. Number of replicas in the BookkeeperCluster (this is an optional parameter and its default value is `3`). #### Upgrade manually From 3e3c394c21b4f59a30da5c35419a343a535d2775 Mon Sep 17 00:00:00 2001 From: SrishT Date: Wed, 23 Sep 2020 02:07:02 +0530 Subject: [PATCH 05/14] Updating documentation and charts Signed-off-by: SrishT --- charts/pravega-operator/README.md | 15 ++++++++------- charts/pravega/README.md | 13 +++++++------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/charts/pravega-operator/README.md b/charts/pravega-operator/README.md index e0c1020a6..486a84910 100644 --- a/charts/pravega-operator/README.md +++ b/charts/pravega-operator/README.md @@ -16,32 +16,33 @@ This chart bootstraps a [pravega-operator](https://github.com/pravega/pravega-op ## Installing the Chart -To install the chart with the release name `my-release`: +To install the pravega-operator chart, use the following commands: ``` $ helm repo add pravega https://charts.pravega.io $ helm repo update -$ helm install my-release pravega/pravega-operator --version=[VERSION] --set webhookCert.crt=[TLS_CRT] --set webhookCert.generate=false --set webhookCert.certName=[CERT_NAME] --set webhookCert.secretName=[SECRET_NAME] +$ helm install [RELEASE_NAME] pravega/pravega-operator --version=[VERSION] --set webhookCert.crt=[TLS_CRT] --set webhookCert.generate=false --set webhookCert.certName=[CERT_NAME] --set webhookCert.secretName=[SECRET_NAME] ``` where: +- **[RELEASE_NAME]** is the release name for the pravega operator chart. (Note: if the release name contains the string `pravega-operator`, the resource name is the same as the release name, else the resource is named as `[RELEASE_NAME]-pravega-operator`. This way of naming the resource can be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the `helm install` command) - **[VERSION]** can be any stable release version for pravega operator from 0.5.0 onwards. - **[CERT_NAME]** is the name of the certificate created in the previous step - **[SECRET_NAME]** is the name of the secret created by the above certificate - **[TLS_CRT]** is contained in the above secret and can be obtained using the command `kubectl get secret [SECRET_NAME] -o yaml | grep tls.crt` -The command deploys pravega-operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. +This command deploys a pravega-operator on the Kubernetes cluster in its default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. ->Note: If the pravega operator version is 0.4.5, webhookCert.generate, webhookCert.crt, webhookCert.certName and webhookCert.secretName should not be set. Also in this case, bookkeeper operator, cert-manager and the certificate/issuer do not need to be deployed as a prerequisite. +>Note: If the pravega operator version is 0.4.5, webhookCert.generate, webhookCert.crt, webhookCert.certName and webhookCert.secretName should not be set. Also in this case, bookkeeper operator, cert-manager and the certificate/issuer do not need to be deployed as prerequisites. ## Uninstalling the Chart -To uninstall/delete the `my-release` deployment: +To uninstall/delete the pravega-operator chart, use the following command: ``` -$ helm uninstall my-release +$ helm uninstall [RELEASE_NAME] ``` -The command removes all the Kubernetes components associated with the chart and deletes the release. +This command removes all the Kubernetes components associated with the chart and deletes the release. ## Configuration diff --git a/charts/pravega/README.md b/charts/pravega/README.md index 5f491f877..7b8bc27e2 100644 --- a/charts/pravega/README.md +++ b/charts/pravega/README.md @@ -16,32 +16,33 @@ This chart creates a [Pravega](https://github.com/pravega/pravega) cluster in [K ## Installing the Chart -To install the chart with the release name `my-release`: +To install the pravega chart, use the following commands: ``` $ helm repo add pravega https://charts.pravega.io $ helm repo update -$ helm install my-release pravega/pravega --version=[VERSION] --set zookeeperUri=[ZOOKEEPER_HOST] --set bookkeeperUri=[BOOKKEEPER_SVC] --set storage.longtermStorage.filesystem.pvc=[TIER2_NAME] +$ helm install [RELEASE_NAME] pravega/pravega --version=[VERSION] --set zookeeperUri=[ZOOKEEPER_HOST] --set bookkeeperUri=[BOOKKEEPER_SVC] --set storage.longtermStorage.filesystem.pvc=[TIER2_NAME] ``` where: +- **[RELEASE_NAME]** is the release name for the pravega chart. (Note: if the release name contains the string `pravega`, the pravega cluster name is the same as the release name, else the pravega cluster is named as `[RELEASE_NAME]-pravega`. This way of naming the cluster can be overridden by providing `--set fullnameOverride=[CLUSTER_NAME]` along with the helm install command. You need to ensure that the [CLUSTER_NAME] is the same value as that provided in the [bookkeeper chart configuration](https://github.com/pravega/bookkeeper-operator/tree/master/charts/bookkeeper#configuration), the default value for which is `pravega` and can be achieved by either providing the [RELEASE_NAME] as pravega or by providing `--set fullnameOverride=pravega` at the time of installing the pravega chart. Otherwise, the default value of [CLUSTER_NAME] in the bookkeeper charts can be overridden by providing `--set pravegaClusterName=[CLUSTER_NAME]` at the time of installing the bookkeeper chart) - **[VERSION]** can be any stable release version for pravega from 0.5.0 onwards. - **[ZOOKEEPER_HOST]** is the host or IP address of your Zookeeper deployment (e.g. `zookeeper-client:2181`). Multiple Zookeeper URIs can be specified, use a comma-separated list and DO NOT leave any spaces in between (e.g. `zookeeper-0:2181,zookeeper-1:2181,zookeeper-2:2181`). - **[BOOKKEEPER_SVC]** is the is the name of the headless service of your Bookkeeper deployment (e.g. `bookkeeper-bookie-0.bookkeeper-bookie-headless.default.svc.cluster.local:3181,bookkeeper-bookie-1.bookkeeper-bookie-headless.default.svc.cluster.local:3181,bookkeeper-bookie-2.bookkeeper-bookie-headless.default.svc.cluster.local:3181`). - **[TIER2_NAME]** is the longtermStorage `PersistentVolumeClaim` name (`pravega-tier2` if you created the PVC using the manifest provided). -The command deploys pravega on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. +This command deploys pravega on the Kubernetes cluster in its default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. >Note: If the underlying pravega operator version is 0.4.5, bookkeeperUri should not be set, and the pravega-bk charts should be used instead of the pravega charts ## Uninstalling the Chart -To uninstall/delete the pravega cluster `my-release`: +To uninstall/delete the pravega chart, use the following command: ``` -$ helm uninstall my-release +$ helm uninstall [RELEASE_NAME] ``` -The command removes all the Kubernetes components associated with the chart and deletes the release. +This command removes all the Kubernetes components associated with the chart and deletes the release. ## Configuration From 6c82783ca75d36d54a838677e489adf20ea9365c Mon Sep 17 00:00:00 2001 From: SrishT Date: Wed, 23 Sep 2020 02:46:12 +0530 Subject: [PATCH 06/14] Updating documentation and charts Signed-off-by: SrishT --- charts/pravega-operator/README.md | 8 ++++---- charts/pravega/README.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/pravega-operator/README.md b/charts/pravega-operator/README.md index 486a84910..6b0be0137 100644 --- a/charts/pravega-operator/README.md +++ b/charts/pravega-operator/README.md @@ -24,15 +24,15 @@ $ helm repo update $ helm install [RELEASE_NAME] pravega/pravega-operator --version=[VERSION] --set webhookCert.crt=[TLS_CRT] --set webhookCert.generate=false --set webhookCert.certName=[CERT_NAME] --set webhookCert.secretName=[SECRET_NAME] ``` where: -- **[RELEASE_NAME]** is the release name for the pravega operator chart. (Note: if the release name contains the string `pravega-operator`, the resource name is the same as the release name, else the resource is named as `[RELEASE_NAME]-pravega-operator`. This way of naming the resource can be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the `helm install` command) -- **[VERSION]** can be any stable release version for pravega operator from 0.5.0 onwards. +- **[RELEASE_NAME]** is the release name for the pravega operator chart. (**[RESOURCE_NAME]** is the name of the pravega operator resource so created. If [RELEASE_NAME] contains the string `pravega-operator`, `[RESOURCE_NAME] = [RELEASE_NAME]`, else `[RESOURCE_NAME] = [RELEASE_NAME]-pravega-operator`. The [RESOURCE_NAME] can however be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the helm install command) +- **[VERSION]** can be any stable release version for pravega-operator from 0.5.0 onwards. - **[CERT_NAME]** is the name of the certificate created in the previous step - **[SECRET_NAME]** is the name of the secret created by the above certificate - **[TLS_CRT]** is contained in the above secret and can be obtained using the command `kubectl get secret [SECRET_NAME] -o yaml | grep tls.crt` This command deploys a pravega-operator on the Kubernetes cluster in its default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. ->Note: If the pravega operator version is 0.4.5, webhookCert.generate, webhookCert.crt, webhookCert.certName and webhookCert.secretName should not be set. Also in this case, bookkeeper operator, cert-manager and the certificate/issuer do not need to be deployed as prerequisites. +>Note: If the pravega-operator version is 0.4.5, webhookCert.generate, webhookCert.crt, webhookCert.certName and webhookCert.secretName should not be set. Also in this case, bookkeeper operator, cert-manager and the certificate/issuer do not need to be deployed as prerequisites. ## Uninstalling the Chart @@ -46,7 +46,7 @@ This command removes all the Kubernetes components associated with the chart and ## Configuration -The following table lists the configurable parameters of the Pravega operator chart and their default values. +The following table lists the configurable parameters of the pravega-operator chart and their default values. | Parameter | Description | Default | | ----- | ----------- | ------ | diff --git a/charts/pravega/README.md b/charts/pravega/README.md index 7b8bc27e2..b8e9c6d59 100644 --- a/charts/pravega/README.md +++ b/charts/pravega/README.md @@ -24,7 +24,7 @@ $ helm repo update $ helm install [RELEASE_NAME] pravega/pravega --version=[VERSION] --set zookeeperUri=[ZOOKEEPER_HOST] --set bookkeeperUri=[BOOKKEEPER_SVC] --set storage.longtermStorage.filesystem.pvc=[TIER2_NAME] ``` where: -- **[RELEASE_NAME]** is the release name for the pravega chart. (Note: if the release name contains the string `pravega`, the pravega cluster name is the same as the release name, else the pravega cluster is named as `[RELEASE_NAME]-pravega`. This way of naming the cluster can be overridden by providing `--set fullnameOverride=[CLUSTER_NAME]` along with the helm install command. You need to ensure that the [CLUSTER_NAME] is the same value as that provided in the [bookkeeper chart configuration](https://github.com/pravega/bookkeeper-operator/tree/master/charts/bookkeeper#configuration), the default value for which is `pravega` and can be achieved by either providing the [RELEASE_NAME] as pravega or by providing `--set fullnameOverride=pravega` at the time of installing the pravega chart. Otherwise, the default value of [CLUSTER_NAME] in the bookkeeper charts can be overridden by providing `--set pravegaClusterName=[CLUSTER_NAME]` at the time of installing the bookkeeper chart) +- **[RELEASE_NAME]** is the release name for the pravega chart. (**[CLUSTER_NAME]** is the name of the pravega cluster so created. If [RELEASE_NAME] contains the string `pravega`, `[CLUSTER_NAME] = [RELEASE_NAME]`, else `[CLUSTER_NAME] = [RELEASE_NAME]-pravega`. The [CLUSTER_NAME] can however be overridden by providing `--set fullnameOverride=[CLUSTER_NAME]` along with the helm install command. **Note:** You need to ensure that the [CLUSTER_NAME] is the same value as that provided in the [bookkeeper chart configuration](https://github.com/pravega/bookkeeper-operator/tree/master/charts/bookkeeper#configuration), the default value for which is `pravega` and can be achieved by either providing the `[RELEASE_NAME] = pravega` or by providing `--set fullnameOverride=pravega` at the time of installing the pravega chart. On the contrary, the default value of [CLUSTER_NAME] in the bookkeeper charts can also be overridden by providing `--set pravegaClusterName=[CLUSTER_NAME]` at the time of installing the bookkeeper chart) - **[VERSION]** can be any stable release version for pravega from 0.5.0 onwards. - **[ZOOKEEPER_HOST]** is the host or IP address of your Zookeeper deployment (e.g. `zookeeper-client:2181`). Multiple Zookeeper URIs can be specified, use a comma-separated list and DO NOT leave any spaces in between (e.g. `zookeeper-0:2181,zookeeper-1:2181,zookeeper-2:2181`). - **[BOOKKEEPER_SVC]** is the is the name of the headless service of your Bookkeeper deployment (e.g. `bookkeeper-bookie-0.bookkeeper-bookie-headless.default.svc.cluster.local:3181,bookkeeper-bookie-1.bookkeeper-bookie-headless.default.svc.cluster.local:3181,bookkeeper-bookie-2.bookkeeper-bookie-headless.default.svc.cluster.local:3181`). @@ -32,7 +32,7 @@ where: This command deploys pravega on the Kubernetes cluster in its default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. ->Note: If the underlying pravega operator version is 0.4.5, bookkeeperUri should not be set, and the pravega-bk charts should be used instead of the pravega charts +>Note: If the underlying pravega operator version is 0.4.5, bookkeeperUri should not be set, and the pravega-bk chart should be used instead of the pravega chart ## Uninstalling the Chart @@ -46,7 +46,7 @@ This command removes all the Kubernetes components associated with the chart and ## Configuration -The following table lists the configurable parameters of the Pravega chart and their default values. +The following table lists the configurable parameters of the pravega chart and their default values. | Parameter | Description | Default | | ----- | ----------- | ------ | From f17241dd0b0d8d0cb4bf96264b86580843505ca4 Mon Sep 17 00:00:00 2001 From: SrishT Date: Wed, 23 Sep 2020 03:06:18 +0530 Subject: [PATCH 07/14] Updating documentation and charts Signed-off-by: SrishT --- charts/pravega-operator/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pravega-operator/README.md b/charts/pravega-operator/README.md index 6b0be0137..ebd03bb35 100644 --- a/charts/pravega-operator/README.md +++ b/charts/pravega-operator/README.md @@ -24,7 +24,7 @@ $ helm repo update $ helm install [RELEASE_NAME] pravega/pravega-operator --version=[VERSION] --set webhookCert.crt=[TLS_CRT] --set webhookCert.generate=false --set webhookCert.certName=[CERT_NAME] --set webhookCert.secretName=[SECRET_NAME] ``` where: -- **[RELEASE_NAME]** is the release name for the pravega operator chart. (**[RESOURCE_NAME]** is the name of the pravega operator resource so created. If [RELEASE_NAME] contains the string `pravega-operator`, `[RESOURCE_NAME] = [RELEASE_NAME]`, else `[RESOURCE_NAME] = [RELEASE_NAME]-pravega-operator`. The [RESOURCE_NAME] can however be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the helm install command) +- **[RELEASE_NAME]** is the release name for the pravega-operator chart. (**[RESOURCE_NAME]** is the name of the pravega-operator resource so created. If [RELEASE_NAME] contains the string `pravega-operator`, `[RESOURCE_NAME] = [RELEASE_NAME]`, else `[RESOURCE_NAME] = [RELEASE_NAME]-pravega-operator`. The [RESOURCE_NAME] can however be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the helm install command) - **[VERSION]** can be any stable release version for pravega-operator from 0.5.0 onwards. - **[CERT_NAME]** is the name of the certificate created in the previous step - **[SECRET_NAME]** is the name of the secret created by the above certificate From 284a6e27e3db07389aa5f0daf3c1e7cf918d83a2 Mon Sep 17 00:00:00 2001 From: SrishT Date: Wed, 23 Sep 2020 06:03:31 +0530 Subject: [PATCH 08/14] Updating documentation and charts Signed-off-by: SrishT --- README.md | 10 ++++---- charts/pravega-operator/README.md | 3 ++- charts/pravega/README.md | 4 +++- doc/operator-upgrade.md | 38 +++++++++++++++---------------- doc/rollback-cluster.md | 12 +++++----- doc/upgrade-cluster.md | 14 ++++++------ 6 files changed, 42 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 741371242..3d4f18394 100644 --- a/README.md +++ b/README.md @@ -125,13 +125,13 @@ statefulset.apps/bar-pravega-segmentstore 3 3 2m By default, a `PravegaCluster` instance is only accessible within the cluster through the Controller `ClusterIP` service. From within the Kubernetes cluster, a client can connect to Pravega at: ``` -tcp://-pravega-controller.:9090 +tcp://[CLUSTER_NAME]-pravega-controller.[NAMESPACE]:9090 ``` And the `REST` management interface is available at: ``` -http://-pravega-controller.:10080/ +http://[CLUSTER_NAME]-pravega-controller.[NAMESPACE]:10080/ ``` Check out the [external access documentation](doc/external-access.md) if your clients need to connect to Pravega from outside Kubernetes. @@ -145,7 +145,7 @@ You can scale Pravega components independently by modifying their corresponding Example of patching the Pravega resource to scale the Segment Store instances to 4. ``` -kubectl patch PravegaCluster --type='json' -p='[{"op": "replace", "path": "/spec/pravega/segmentStoreReplicas", "value": 4}]' +kubectl patch PravegaCluster [CLUSTER_NAME] --type='json' -p='[{"op": "replace", "path": "/spec/pravega/segmentStoreReplicas", "value": 4}]' ``` ### Upgrade a Pravega cluster @@ -155,7 +155,7 @@ Check out the [upgrade guide](doc/upgrade-cluster.md). ### Uninstall the Pravega cluster ``` -$ helm uninstall +$ helm uninstall [PRAVEGA_RELEASE_NAME] $ kubectl delete -f ./example/pvc-tier2.yaml ``` @@ -164,7 +164,7 @@ $ kubectl delete -f ./example/pvc-tier2.yaml > Note that the Pravega clusters managed by the Pravega operator will NOT be deleted even if the operator is uninstalled. ``` -$ helm uninstall +$ helm uninstall [PRAVEGA_OPERATOR_RELEASE_NAME] ``` If you want to delete the Pravega clusters, make sure to do it before uninstalling the operator. diff --git a/charts/pravega-operator/README.md b/charts/pravega-operator/README.md index ebd03bb35..fab0ee579 100644 --- a/charts/pravega-operator/README.md +++ b/charts/pravega-operator/README.md @@ -24,7 +24,8 @@ $ helm repo update $ helm install [RELEASE_NAME] pravega/pravega-operator --version=[VERSION] --set webhookCert.crt=[TLS_CRT] --set webhookCert.generate=false --set webhookCert.certName=[CERT_NAME] --set webhookCert.secretName=[SECRET_NAME] ``` where: -- **[RELEASE_NAME]** is the release name for the pravega-operator chart. (**[RESOURCE_NAME]** is the name of the pravega-operator resource so created. If [RELEASE_NAME] contains the string `pravega-operator`, `[RESOURCE_NAME] = [RELEASE_NAME]`, else `[RESOURCE_NAME] = [RELEASE_NAME]-pravega-operator`. The [RESOURCE_NAME] can however be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the helm install command) +- **[RELEASE_NAME]** is the release name for the pravega-operator chart. + **[RESOURCE_NAME]** is the name of the pravega-operator resource so created. (If [RELEASE_NAME] contains the string `pravega-operator`, `[RESOURCE_NAME] = [RELEASE_NAME]`, else `[RESOURCE_NAME] = [RELEASE_NAME]-pravega-operator`. The [RESOURCE_NAME] can however be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the helm install command) - **[VERSION]** can be any stable release version for pravega-operator from 0.5.0 onwards. - **[CERT_NAME]** is the name of the certificate created in the previous step - **[SECRET_NAME]** is the name of the secret created by the above certificate diff --git a/charts/pravega/README.md b/charts/pravega/README.md index b8e9c6d59..93d7fee15 100644 --- a/charts/pravega/README.md +++ b/charts/pravega/README.md @@ -24,7 +24,9 @@ $ helm repo update $ helm install [RELEASE_NAME] pravega/pravega --version=[VERSION] --set zookeeperUri=[ZOOKEEPER_HOST] --set bookkeeperUri=[BOOKKEEPER_SVC] --set storage.longtermStorage.filesystem.pvc=[TIER2_NAME] ``` where: -- **[RELEASE_NAME]** is the release name for the pravega chart. (**[CLUSTER_NAME]** is the name of the pravega cluster so created. If [RELEASE_NAME] contains the string `pravega`, `[CLUSTER_NAME] = [RELEASE_NAME]`, else `[CLUSTER_NAME] = [RELEASE_NAME]-pravega`. The [CLUSTER_NAME] can however be overridden by providing `--set fullnameOverride=[CLUSTER_NAME]` along with the helm install command. **Note:** You need to ensure that the [CLUSTER_NAME] is the same value as that provided in the [bookkeeper chart configuration](https://github.com/pravega/bookkeeper-operator/tree/master/charts/bookkeeper#configuration), the default value for which is `pravega` and can be achieved by either providing the `[RELEASE_NAME] = pravega` or by providing `--set fullnameOverride=pravega` at the time of installing the pravega chart. On the contrary, the default value of [CLUSTER_NAME] in the bookkeeper charts can also be overridden by providing `--set pravegaClusterName=[CLUSTER_NAME]` at the time of installing the bookkeeper chart) +- **[RELEASE_NAME]** is the release name for the pravega chart. + **[CLUSTER_NAME]** is the name of the pravega cluster so created. (If [RELEASE_NAME] contains the string `pravega`, `[CLUSTER_NAME] = [RELEASE_NAME]`, else `[CLUSTER_NAME] = [RELEASE_NAME]-pravega`. The [CLUSTER_NAME] can however be overridden by providing `--set fullnameOverride=[CLUSTER_NAME]` along with the helm install command) + **Note:** You need to ensure that the [CLUSTER_NAME] is the same value as that provided in the [bookkeeper chart configuration](https://github.com/pravega/bookkeeper-operator/tree/master/charts/bookkeeper#configuration), the default value for which is `pravega` and can be achieved by either providing the `[RELEASE_NAME] = pravega` or by providing `--set fullnameOverride=pravega` at the time of installing the pravega chart. On the contrary, the default value of [CLUSTER_NAME] in the bookkeeper charts can also be overridden by providing `--set pravegaClusterName=[CLUSTER_NAME]` at the time of installing the bookkeeper chart) - **[VERSION]** can be any stable release version for pravega from 0.5.0 onwards. - **[ZOOKEEPER_HOST]** is the host or IP address of your Zookeeper deployment (e.g. `zookeeper-client:2181`). Multiple Zookeeper URIs can be specified, use a comma-separated list and DO NOT leave any spaces in between (e.g. `zookeeper-0:2181,zookeeper-1:2181,zookeeper-2:2181`). - **[BOOKKEEPER_SVC]** is the is the name of the headless service of your Bookkeeper deployment (e.g. `bookkeeper-bookie-0.bookkeeper-bookie-headless.default.svc.cluster.local:3181,bookkeeper-bookie-1.bookkeeper-bookie-headless.default.svc.cluster.local:3181,bookkeeper-bookie-2.bookkeeper-bookie-headless.default.svc.cluster.local:3181`). diff --git a/doc/operator-upgrade.md b/doc/operator-upgrade.md index cbd965ce7..6d8dd01f0 100644 --- a/doc/operator-upgrade.md +++ b/doc/operator-upgrade.md @@ -15,18 +15,18 @@ Starting Operator version `0.4.3` we also support major version upgrades for Pra ### Trigger the upgrade via helm -Pravega operator can be upgraded to a version `` using the following command +Pravega operator can be upgraded to a version **[VERSION]** using the following command ``` -$ helm upgrade pravega/pravega-operator --version= +$ helm upgrade [PRAVEGA_OPERATOR_RELEASE_NAME] pravega/pravega-operator --version=[VERSION] ``` ### Trigger the upgrade manually -Pravega operator can be upgraded manually by modifying the image tag using kubectl edit, patch or apply +The pravega operator with deployment name **[DEPLOYMENT_NAME]** can be upgraded manually by modifying the image tag using kubectl edit, patch or apply ``` -$ kubectl edit +$ kubectl edit [DEPLOYMENT_NAME] ``` The upgrade is handled as a [rolling update](https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/) by Kubernetes and results in a new operator pod being created and the old one being terminated. @@ -102,7 +102,7 @@ To install cert-manager check [this](https://cert-manager.io/docs/installation/k 5. Execute the script `pre-upgrade.sh` inside the [scripts](https://github.com/pravega/pravega-operator/blob/master/scripts) folder. This script patches the `pravega-webhook-svc` with the required annotations and labels. The format of the command is ``` -./pre-upgrade.sh +./pre-upgrade.sh [PRAVEGA_OPERATOR_RELEASE_NAME][PRAVEGA_OPERATOR_NAMESPACE] ``` @@ -112,30 +112,30 @@ To install cert-manager check [this](https://cert-manager.io/docs/installation/k The upgrade to Operator 0.5.0 can be triggered using the following command ``` -helm upgrade pravega/pravega-operator --version=0.5.0 --set webhookCert.crt=[tls.crt] --set webhookCert.generate=false --set webhookCert.certName=[cert-name] --set webhookCert.secretName=[secret-name] +helm upgrade [PRAVEGA_OPERATOR_RELEASE_NAME] pravega/pravega-operator --version=0.5.0 --set webhookCert.crt=[TLS_CRT] --set webhookCert.generate=false --set webhookCert.certName=[CERT_NAME] --set webhookCert.secretName=[SECRET_NAME] ``` where: -- `[cert-name]` is the name of the certificate that has been created -- `[secret-name]` is the name of the secret created by the above certificate -- `[tls.crt]` is contained in the above secret and can be obtained using the command `kubectl get secret [secret-name] -o yaml | grep tls.crt` +- `[CERT_NAME]` is the name of the certificate that has been created +- `[SECRET_NAME]` is the name of the secret created by the above certificate +- `[TLS_CRT]` is contained in the above secret and can be obtained using the command `kubectl get secret [SECRET_NAME] -o yaml | grep tls.crt` Wait for the upgrade to complete (which can be determined once the following command starts returning a response instead of throwing an error message). This might take around 7 to 10 minutes after the operator upgrade has been done. ``` -kubectl describe PravegaCluster +kubectl describe PravegaCluster [CLUSTER_NAME] ``` Next, execute the script `post-upgrade.sh` inside the [scripts](https://github.com/pravega/pravega-operator/blob/master/scripts) folder. The format of the command is ``` -./post-upgrade.sh +./post-upgrade.sh [CLUSTER_NAME] [PRAVEGA_RELEASE_NAME] [BOOKKEEPER_RELEASE_NAME] [VERSION] [NAMESPACE] [ZOOKEEPER_SVC_NAME] [BOOKKEEPER_REPLICA_COUNT] ``` -This script patches the `PravegaCluster` and `BookkeeperCluster` resources with the required annotations and labels, and updates their corresponding helm releases. This script needs the following arguments -1. Name of the PravegaCluster or BookkeeperCluster resource (check the output of `kubectl get PravegaCluster` to obtain this name). -2. Name of the release that has been created for the v1alpha1 PravegaCluster resource (check the output of `helm ls` to obtain this name). -3. Name of the release that needs to be created for the BookkeeperCluster resource. -4. Version of the PravegaCluster or BookkeeperCluster resources (check the output of `kubectl get PravegaCluster` to obtain the version number). -5. Namespace in which PravegaCluster and BookkeeperCluster resources are deployed (this is an optional parameter and its default value is `default`). -6. Name of the zookeeper client service (this is an optional parameter and its default value is `zookeeper-client`). -7. Number of replicas in the BookkeeperCluster (this is an optional parameter and its default value is `3`). +This script patches the `PravegaCluster` and the newly created `BookkeeperCluster` resources with the required annotations and labels, and updates their corresponding helm releases. This script needs the following arguments +1. **[CLUSTER_NAME]** is the name of the PravegaCluster or BookkeeperCluster (check the output of `kubectl get PravegaCluster` to obtain this name). +2. **[PRAVEGA_RELEASE_NAME]** is the release name corresponding to the v1alpha1 PravegaCluster chart (check the output of `helm ls` to obtain this name). +3. **[BOOKKEEPER_RELEASE_NAME]** is the name of the release that needs to be created for the BookkeeperCluster chart. +4. **[VERSION]** is the version of the PravegaCluster or BookkeeperCluster resources (check the output of `kubectl get PravegaCluster` to obtain the version number). +5. **[NAMESPACE]** is the namespace in which PravegaCluster and BookkeeperCluster resources are deployed (this is an optional parameter and its default value is `default`). +6. **[ZOOKEEPER_SVC_NAME]** is the name of the zookeeper client service (this is an optional parameter and its default value is `zookeeper-client`). +7. **[BOOKKEEPER_REPLICA_COUNT]** is the number of replicas in the BookkeeperCluster (this is an optional parameter and its default value is `3`). #### Upgrade manually diff --git a/doc/rollback-cluster.md b/doc/rollback-cluster.md index accbd5e8b..2702bd906 100644 --- a/doc/rollback-cluster.md +++ b/doc/rollback-cluster.md @@ -24,7 +24,7 @@ Status: True Reason: UpgradeFailed Message:
``` -After an Upgrade Failure the output of `kubectl describe pravegacluster ` would look like this (assuming name of pravega cluster is `bar-pravega`): +After an Upgrade Failure the output of `kubectl describe pravegacluster [CLUSTER_NAME]` would look like this: ``` $> kubectl describe pravegacluster bar-pravega @@ -72,22 +72,22 @@ Note: The following command prints the historical revisions of a particular helm release ``` -$ helm history +$ helm history [PRAVEGA_RELEASE_NAME] ``` Rollback can be triggered via helm using the following command ``` -$ helm rollback +$ helm rollback [PRAVEGA_RELEASE_NAME] [REVISION_NUMBER] ``` -Rollback will be successfully triggered only if the previous revision number is provided. -Note: Helm rollbacks are still an experimental feature and are not encouraged. We recommend using the manual way for cluster rollbacks. +Rollback will be successfully triggered only if a [REVISION_NUMBER] corresponding to the previously deployed version is provided. +**Note:** Helm rollbacks are still an experimental feature and are not encouraged. We strongly recommend using manual rollbacks. ## Rollback Implementation When Rollback is triggered the cluster moves into ClusterCondition `RollbackInProgress`. Once the Rollback completes, this condition is set to false. -During a Rollback, the Cluster Status should look something like this (assuming name of pravega cluster is `bar-pravega`): +During a Rollback, the Cluster Status should look something like this: ``` $> kubectl describe pravegacluster bar-pravega . . . diff --git a/doc/upgrade-cluster.md b/doc/upgrade-cluster.md index 87f12aa63..185cfe55d 100644 --- a/doc/upgrade-cluster.md +++ b/doc/upgrade-cluster.md @@ -34,18 +34,18 @@ To understand the valid upgrade paths for a pravega cluster, refer to the [versi ### Upgrading via Helm -The upgrade of the pravega cluster with release name `bar` from a version `x` to `y` can be triggered via helm using the following command +The upgrade of the pravega cluster from a version **[OLD_VERSION]** to **[NEW_VERSION]** can be triggered via helm using the following command ``` -$ helm upgrade bar pravega/pravega --version=y --set version=y --reuse-values --timeout 600s +$ helm upgrade [PRAVEGA_RELEASE_NAME] pravega/pravega --version=[NEW_VERSION] --set version=[NEW_VERSION] --reuse-values --timeout 600s ``` -Note: By specifying the `--reuse-values` option, the values of all parameters are retained across upgrades. However if some values need to be modified during the upgrade, the `--set` flag can be used to specify the new values of these parameters. Also, by skipping the `reuse-values` flag, the values of all parameters are reset to their default values specified in the charts published for version `y`. +**Note:** By specifying the `--reuse-values` option, the configuration of all parameters are retained across upgrades. However if some values need to be modified during the upgrade, the `--set` flag can be used to specify the new configuration for these parameters. Also, by skipping the `reuse-values` flag, the values of all parameters are reset to the default configuration that has been specified in the published charts for version [NEW_VERSION]. ### Upgrading manually To initiate the upgrade process manually, a user has to update the `spec.version` field on the `PravegaCluster` custom resource. This can be done in three different ways using the `kubectl` command. -1. `kubectl edit PravegaCluster `, modify the `version` value in the YAML resource, save, and exit. +1. `kubectl edit PravegaCluster [CLUSTER_NAME]`, modify the `version` value in the YAML resource, save, and exit. 2. If you have the custom resource defined in a local YAML file, e.g. `pravega.yaml`, you can modify the `version` value, and reapply the resource with `kubectl apply -f pravega.yaml`. -3. `kubectl patch PravegaCluster --type='json' -p='[{"op": "replace", "path": "/spec/version", "value": "X.Y.Z"}]'`. +3. `kubectl patch PravegaCluster [CLUSTER_NAME] --type='json' -p='[{"op": "replace", "path": "/spec/version", "value": "X.Y.Z"}]'`. After the `version` field is updated, the operator will detect the version change and it will trigger the upgrade process. @@ -160,7 +160,7 @@ bar-pravega 0.5.0 5 5 1h The command `kubectl describe` can be used to track progress of the upgrade. ``` -$ kubectl describe PravegaCluster pravega +$ kubectl describe PravegaCluster bar-pravega ... Status: Conditions: @@ -184,7 +184,7 @@ The `Reason` field in Upgrading Condition shows the component currently being up If upgrade has failed, please check the `Status` section to understand the reason for failure. ``` -$ kubectl describe PravegaCluster pravega +$ kubectl describe PravegaCluster bar-pravega ... Status: Conditions: From 1eda7651a98c08032193944f41cd7257e9e9bb61 Mon Sep 17 00:00:00 2001 From: SrishT Date: Wed, 23 Sep 2020 06:07:45 +0530 Subject: [PATCH 09/14] Updating documentation and charts Signed-off-by: SrishT --- charts/pravega-operator/README.md | 2 +- charts/pravega/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/pravega-operator/README.md b/charts/pravega-operator/README.md index fab0ee579..e341d903b 100644 --- a/charts/pravega-operator/README.md +++ b/charts/pravega-operator/README.md @@ -25,7 +25,7 @@ $ helm install [RELEASE_NAME] pravega/pravega-operator --version=[VERSION] --set ``` where: - **[RELEASE_NAME]** is the release name for the pravega-operator chart. - **[RESOURCE_NAME]** is the name of the pravega-operator resource so created. (If [RELEASE_NAME] contains the string `pravega-operator`, `[RESOURCE_NAME] = [RELEASE_NAME]`, else `[RESOURCE_NAME] = [RELEASE_NAME]-pravega-operator`. The [RESOURCE_NAME] can however be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the helm install command) +- **[RESOURCE_NAME]** is the name of the pravega-operator resource so created. (If [RELEASE_NAME] contains the string `pravega-operator`, `[RESOURCE_NAME] = [RELEASE_NAME]`, else `[RESOURCE_NAME] = [RELEASE_NAME]-pravega-operator`. The [RESOURCE_NAME] can however be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the helm install command) - **[VERSION]** can be any stable release version for pravega-operator from 0.5.0 onwards. - **[CERT_NAME]** is the name of the certificate created in the previous step - **[SECRET_NAME]** is the name of the secret created by the above certificate diff --git a/charts/pravega/README.md b/charts/pravega/README.md index 93d7fee15..b3dbc5455 100644 --- a/charts/pravega/README.md +++ b/charts/pravega/README.md @@ -25,7 +25,7 @@ $ helm install [RELEASE_NAME] pravega/pravega --version=[VERSION] --set zookeepe ``` where: - **[RELEASE_NAME]** is the release name for the pravega chart. - **[CLUSTER_NAME]** is the name of the pravega cluster so created. (If [RELEASE_NAME] contains the string `pravega`, `[CLUSTER_NAME] = [RELEASE_NAME]`, else `[CLUSTER_NAME] = [RELEASE_NAME]-pravega`. The [CLUSTER_NAME] can however be overridden by providing `--set fullnameOverride=[CLUSTER_NAME]` along with the helm install command) +- **[CLUSTER_NAME]** is the name of the pravega cluster so created. (If [RELEASE_NAME] contains the string `pravega`, `[CLUSTER_NAME] = [RELEASE_NAME]`, else `[CLUSTER_NAME] = [RELEASE_NAME]-pravega`. The [CLUSTER_NAME] can however be overridden by providing `--set fullnameOverride=[CLUSTER_NAME]` along with the helm install command) **Note:** You need to ensure that the [CLUSTER_NAME] is the same value as that provided in the [bookkeeper chart configuration](https://github.com/pravega/bookkeeper-operator/tree/master/charts/bookkeeper#configuration), the default value for which is `pravega` and can be achieved by either providing the `[RELEASE_NAME] = pravega` or by providing `--set fullnameOverride=pravega` at the time of installing the pravega chart. On the contrary, the default value of [CLUSTER_NAME] in the bookkeeper charts can also be overridden by providing `--set pravegaClusterName=[CLUSTER_NAME]` at the time of installing the bookkeeper chart) - **[VERSION]** can be any stable release version for pravega from 0.5.0 onwards. - **[ZOOKEEPER_HOST]** is the host or IP address of your Zookeeper deployment (e.g. `zookeeper-client:2181`). Multiple Zookeeper URIs can be specified, use a comma-separated list and DO NOT leave any spaces in between (e.g. `zookeeper-0:2181,zookeeper-1:2181,zookeeper-2:2181`). From 4d18a8d9d1a033a56f53d16d5b9ce924b05923cb Mon Sep 17 00:00:00 2001 From: SrishT Date: Wed, 23 Sep 2020 06:13:31 +0530 Subject: [PATCH 10/14] Updating documentation and charts Signed-off-by: SrishT --- charts/pravega-operator/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pravega-operator/README.md b/charts/pravega-operator/README.md index e341d903b..ed78a9a70 100644 --- a/charts/pravega-operator/README.md +++ b/charts/pravega-operator/README.md @@ -25,7 +25,7 @@ $ helm install [RELEASE_NAME] pravega/pravega-operator --version=[VERSION] --set ``` where: - **[RELEASE_NAME]** is the release name for the pravega-operator chart. -- **[RESOURCE_NAME]** is the name of the pravega-operator resource so created. (If [RELEASE_NAME] contains the string `pravega-operator`, `[RESOURCE_NAME] = [RELEASE_NAME]`, else `[RESOURCE_NAME] = [RELEASE_NAME]-pravega-operator`. The [RESOURCE_NAME] can however be overridden by providing `--set fullnameOverride=[RESOURCE_NAME]` along with the helm install command) +- **[DEPLOYMENT_NAME]** is the name of the pravega-operator deployment so created. (If [RELEASE_NAME] contains the string `pravega-operator`, `[DEPLOYMENT_NAME] = [RELEASE_NAME]`, else `[DEPLOYMENT_NAME] = [RELEASE_NAME]-pravega-operator`. The [DEPLOYMENT_NAME] can however be overridden by providing `--set fullnameOverride=[DEPLOYMENT_NAME]` along with the helm install command) - **[VERSION]** can be any stable release version for pravega-operator from 0.5.0 onwards. - **[CERT_NAME]** is the name of the certificate created in the previous step - **[SECRET_NAME]** is the name of the secret created by the above certificate From 885840b7a824a0b85673eeaddce70a29a517ec62 Mon Sep 17 00:00:00 2001 From: SrishT Date: Wed, 23 Sep 2020 09:33:27 +0530 Subject: [PATCH 11/14] Documentation update Signed-off-by: SrishT --- README.md | 4 ++-- doc/rollback-cluster.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3d4f18394..43ef025eb 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,11 @@ The Pravega Operator manages Pravega clusters deployed to Kubernetes and automat ## Quickstart -We recommend using our [helm charts](charts) for all installation and upgrades. The helm charts for pravega operator (version 0.4.5 onwards) and pravega cluster (version 0.5.0 onwards) are published in [https://charts.pravega.io](https://charts.pravega.io/). To add this repository to your Helm repos, use the following command +We recommend using our [helm charts](charts) for all installation and upgrades (but not for rollbacks at the moment since helm rollbacks are still experimental). The helm charts for pravega operator (version 0.4.5 onwards) and pravega cluster (version 0.5.0 onwards) are published in [https://charts.pravega.io](https://charts.pravega.io/). To add this repository to your Helm repos, use the following command ``` helm repo add pravega https://charts.pravega.io ``` -However there are manual deployment and upgrade options available as well. +There are manual deployment, upgrade and rollback options available as well. ### Install the Operator diff --git a/doc/rollback-cluster.md b/doc/rollback-cluster.md index 2702bd906..7df7fd3c4 100644 --- a/doc/rollback-cluster.md +++ b/doc/rollback-cluster.md @@ -77,7 +77,7 @@ $ helm history [PRAVEGA_RELEASE_NAME] Rollback can be triggered via helm using the following command ``` -$ helm rollback [PRAVEGA_RELEASE_NAME] [REVISION_NUMBER] +$ helm rollback [PRAVEGA_RELEASE_NAME] [REVISION_NUMBER] --wait --timeout 600s ``` Rollback will be successfully triggered only if a [REVISION_NUMBER] corresponding to the previously deployed version is provided. **Note:** Helm rollbacks are still an experimental feature and are not encouraged. We strongly recommend using manual rollbacks. From 49a3e1b6e6a34fa268001936e03cce6271c142d2 Mon Sep 17 00:00:00 2001 From: SrishT Date: Wed, 23 Sep 2020 09:37:50 +0530 Subject: [PATCH 12/14] Documentation update Signed-off-by: SrishT --- doc/rollback-cluster.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/rollback-cluster.md b/doc/rollback-cluster.md index 7df7fd3c4..064db8199 100644 --- a/doc/rollback-cluster.md +++ b/doc/rollback-cluster.md @@ -80,6 +80,7 @@ Rollback can be triggered via helm using the following command $ helm rollback [PRAVEGA_RELEASE_NAME] [REVISION_NUMBER] --wait --timeout 600s ``` Rollback will be successfully triggered only if a [REVISION_NUMBER] corresponding to the previously deployed version is provided. + **Note:** Helm rollbacks are still an experimental feature and are not encouraged. We strongly recommend using manual rollbacks. ## Rollback Implementation From f545899c9414a85f1a6a8cc79a7339e4020be745 Mon Sep 17 00:00:00 2001 From: SrishT Date: Wed, 23 Sep 2020 09:41:56 +0530 Subject: [PATCH 13/14] Documentation update Signed-off-by: SrishT --- doc/rollback-cluster.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/rollback-cluster.md b/doc/rollback-cluster.md index 064db8199..3433e3033 100644 --- a/doc/rollback-cluster.md +++ b/doc/rollback-cluster.md @@ -80,8 +80,7 @@ Rollback can be triggered via helm using the following command $ helm rollback [PRAVEGA_RELEASE_NAME] [REVISION_NUMBER] --wait --timeout 600s ``` Rollback will be successfully triggered only if a [REVISION_NUMBER] corresponding to the previously deployed version is provided. - -**Note:** Helm rollbacks are still an experimental feature and are not encouraged. We strongly recommend using manual rollbacks. +>**Note:** Helm rollbacks are still an experimental feature and are not encouraged. We strongly recommend using manual rollbacks. ## Rollback Implementation From 3d68f53560efbc2baac73892c8d5eb023956cc91 Mon Sep 17 00:00:00 2001 From: SrishT Date: Wed, 23 Sep 2020 09:45:16 +0530 Subject: [PATCH 14/14] Documentation update Signed-off-by: SrishT --- doc/rollback-cluster.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/rollback-cluster.md b/doc/rollback-cluster.md index 3433e3033..c6a775402 100644 --- a/doc/rollback-cluster.md +++ b/doc/rollback-cluster.md @@ -79,8 +79,8 @@ Rollback can be triggered via helm using the following command ``` $ helm rollback [PRAVEGA_RELEASE_NAME] [REVISION_NUMBER] --wait --timeout 600s ``` -Rollback will be successfully triggered only if a [REVISION_NUMBER] corresponding to the previously deployed version is provided. ->**Note:** Helm rollbacks are still an experimental feature and are not encouraged. We strongly recommend using manual rollbacks. +Rollback will be successfully triggered only if a [REVISION_NUMBER] corresponding to the last stable cluster version is provided. +>Note: Helm rollbacks are still an experimental feature and are not encouraged. We strongly recommend using manual rollbacks. ## Rollback Implementation