Skip to content

Commit

Permalink
feat(install): upgrade scripts, yamls for 0.8.0
Browse files Browse the repository at this point in the history
- Created upgrade scripts for 0.7.x to 0.8.0
  - Create patch files for jiva, cstor volumes
  - Create patch files for cStor pools
  - Update instructions
- Update the openebs-operator.yaml with new ENV
  for analytics
- Remove the unused maya-apiserver install configmap
- Update the charts with 0.8.0 changes
- Also includes some minor updates to the demo YAML files

Signed-off-by: kmova <kiran.mova@openebs.io>
  • Loading branch information
kmova committed Dec 7, 2018
1 parent 0dddaf7 commit 95ac0c6
Show file tree
Hide file tree
Showing 23 changed files with 875 additions and 95 deletions.
4 changes: 2 additions & 2 deletions k8s/charts/openebs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
version: 0.7.0
version: 0.8.0
name: openebs
appVersion: 0.7.0
appVersion: 0.8.0
description: Containerized Storage for Containers
icon: https://raw.githubusercontent.com/openebs/chitrakala/master/OpenEBS%20logo/openebs%20logos-03.png
home: http://www.openebs.io/
Expand Down
74 changes: 38 additions & 36 deletions k8s/charts/openebs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,42 +68,44 @@ helm del --purge <openebs-chart-name>

The following table lists the configurable parameters of OpenEBS chart and their default values.

| Parameter | Description | Default |
| ----------------------------------------| --------------------------------------------- | ----------------------------------------- |
| `rbac.create` | Enable RBAC Resources | `true` |
| `image.pullPolicy` | Container pull policy | `IfNotPresent` |
| `apiserver.image` | Docker Image for API Server | `openebs/m-apiserver` |
| `apiserver.imageTag` | Docker Image Tag for API Server | `0.7.0` |
| `apiserver.replicas` | Number of API Server Replicas | `1` |
| `provisioner.image` | Docker Image for Provisioner | `openebs/openebs-k8s-provisioner` |
| `provisioner.imageTag` | Docker Image Tag for Provisioner | `0.7.0` |
| `provisioner.replicas` | Number of Provisioner Replicas | `1` |
| `snapshotOperator.provisioner.image` | Docker Image for Snapshot Provisioner | `openebs/snapshot-provisioner` |
| `snapshotOperator.provisioner.imageTag` | Docker Image Tag for Snapshot Provisioner | `0.7.0` |
| `snapshotOperator.controller.image` | Docker Image for Snapshot Controller | `openebs/snapshot-controller` |
| `snapshotOperator.controller.imageTag` | Docker Image Tag for Snapshot Controller | `0.7.0` |
| `snapshotOperator.replicas` | Number of Snapshot Operator Replicas | `1` |
| `ndm.image` | Docker Image for Node Disk Manager | `openebs/openebs/node-disk-manager-amd64` |
| `ndm.imageTag` | Docker Image Tag for Node Disk Manager | `v0.1.0` |
| `ndm.sparse.enabled` | Create Sparse files and cStor Sparse Pool | `true` |
| `ndm.sparse.path` | Directory where Sparse files are created | `/var/openebs/sparse` |
| `ndm.sparse.size` | Size of the sparse file in bytes | `10737418240` |
| `ndm.sparse.count` | Number of sparse files to be created | `1` |
| `ndm.sparse.filters.excludeVendors` | Exclude devices with specified vendor | `CLOUDBYT,OpenEBS` |
| `ndm.sparse.filters.excludePaths` | Exclude devices with specified path patterns | `loop,fd0,sr0,/dev/ram,/dev/dm-` |
| `jiva.image` | Docker Image for Jiva | `openebs/jiva` |
| `jiva.imageTag` | Docker Image Tag for Jiva | `0.7.0` |
| `jiva.replicas` | Number of Jiva Replicas | `3` |
| `cstor.pool.image` | Docker Image for cStor Pool | `openebs/cstor-pool` |
| `cstor.pool.imageTag` | Docker Image Tag for cStor Pool | `0.7.0` |
| `cstor.poolMgmt.image` | Docker Image for cStor Pool Management | `openebs/cstor-pool-mgmt` |
| `cstor.poolMgmt.imageTag` | Docker Image Tag for cStor Pool Management | `0.7.0` |
| `cstor.target.image` | Docker Image for cStor Target | `openebs/cstor-istgt` |
| `cstor.target.imageTag` | Docker Image Tag for cStor Target | `0.7.0` |
| `cstor.volumeMgmt.image` | Docker Image for cStor Volume Management | `openebs/cstor-volume-mgmt` |
| `cstor.volumeMgmt.imageTag` | Docker Image Tag for cStor Volume Management | `0.7.0` |
| `policies.monitoring.image` | Docker Image for Prometheus Exporter | `openebs/m-exporter` |
| `policies.monitoring.imageTag` | Docker Image Tag for Prometheus Exporter | `0.7.0` |
| Parameter | Description | Default |
| ----------------------------------------| --------------------------------------------| ------------------------------------------------- |
| `rbac.create` | Enable RBAC Resources | `true` |
| `image.pullPolicy` | Container pull policy | `IfNotPresent` |
| `apiserver.image` | Docker Image for API Server | `quay.io/openebs/m-apiserver` |
| `apiserver.imageTag` | Docker Image Tag for API Server | `0.8.0` |
| `apiserver.replicas` | Number of API Server Replicas | `1` |
| `provisioner.image` | Docker Image for Provisioner | `quay.io/openebs/openebs-k8s-provisioner` |
| `provisioner.imageTag` | Docker Image Tag for Provisioner | `0.8.0` |
| `provisioner.replicas` | Number of Provisioner Replicas | `1` |
| `snapshotOperator.provisioner.image` | Docker Image for Snapshot Provisioner | `quay.io/openebs/snapshot-provisioner` |
| `snapshotOperator.provisioner.imageTag` | Docker Image Tag for Snapshot Provisioner | `0.8.0` |
| `snapshotOperator.controller.image` | Docker Image for Snapshot Controller | `quay.io/openebs/snapshot-controller` |
| `snapshotOperator.controller.imageTag` | Docker Image Tag for Snapshot Controller | `0.8.0` |
| `snapshotOperator.replicas` | Number of Snapshot Operator Replicas | `1` |
| `ndm.image` | Docker Image for Node Disk Manager | `quay.io/openebs/openebs/node-disk-manager-amd64` |
| `ndm.imageTag` | Docker Image Tag for Node Disk Manager | `v0.2.0` |
| `ndm.sparse.enabled` | Create Sparse files and cStor Sparse Pool | `true` |
| `ndm.sparse.path` | Directory where Sparse files are created | `/var/openebs/sparse` |
| `ndm.sparse.size` | Size of the sparse file in bytes | `10737418240` |
| `ndm.sparse.count` | Number of sparse files to be created | `1` |
| `ndm.sparse.filters.excludeVendors` | Exclude devices with specified vendor | `CLOUDBYT,OpenEBS` |
| `ndm.sparse.filters.excludePaths` | Exclude devices with specified path patterns| `loop,fd0,sr0,/dev/ram,/dev/dm-` |
| `jiva.image` | Docker Image for Jiva | `quay.io/openebs/jiva` |
| `jiva.imageTag` | Docker Image Tag for Jiva | `0.8.0` |
| `jiva.replicas` | Number of Jiva Replicas | `3` |
| `cstor.pool.image` | Docker Image for cStor Pool | `quay.io/openebs/cstor-pool` |
| `cstor.pool.imageTag` | Docker Image Tag for cStor Pool | `0.8.0` |
| `cstor.poolMgmt.image` | Docker Image for cStor Pool Management | `quay.io/openebs/cstor-pool-mgmt` |
| `cstor.poolMgmt.imageTag` | Docker Image Tag for cStor Pool Management | `0.8.0` |
| `cstor.target.image` | Docker Image for cStor Target | `quay.io/openebs/cstor-istgt` |
| `cstor.target.imageTag` | Docker Image Tag for cStor Target | `0.8.0` |
| `cstor.volumeMgmt.image` | Docker Image for cStor Volume Management | `quay.io/openebs/cstor-volume-mgmt` |
| `cstor.volumeMgmt.imageTag` | Docker Image Tag for cStor Volume Management| `0.8.0` |
| `policies.monitoring.image` | Docker Image for Prometheus Exporter | `quay.io/openebs/m-exporter` |
| `policies.monitoring.imageTag` | Docker Image Tag for Prometheus Exporter | `0.8.0` |
| `analytics.enabled` | Enable sending stats to Google Analytics | `true` |
| `analytics.pingInterval` | Duration(hours) between sending ping stat | `24h` |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Expand Down
18 changes: 0 additions & 18 deletions k8s/charts/openebs/templates/cm-maya-apiserver-config.yaml

This file was deleted.

12 changes: 8 additions & 4 deletions k8s/charts/openebs/templates/deployment-maya-apiserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ spec:
# This is supported for maya api server version 0.5.2 onwards
#- name: OPENEBS_IO_K8S_MASTER
# value: "http://172.28.128.3:8080"
# OPENEBS_IO_INSTALL_CONFIG_NAME specifies the config map containing the install configuration.
# Currently, the configuration can be used to specify the default version for the CAS Templates
- name: OPENEBS_IO_INSTALL_CONFIG_NAME
value: {{ template "openebs.fullname" . }}-install-config
{{- if .Values.ndm.sparse }}
{{- if .Values.ndm.sparse.enabled }}
# OPENEBS_IO_INSTALL_DEFAULT_CSTOR_SPARSE_POOL decides whether default cstor sparse pool should be
Expand Down Expand Up @@ -86,6 +82,14 @@ spec:
value: "{{ .Values.cstor.volumeMgmt.image }}:{{ .Values.cstor.volumeMgmt.imageTag }}"
- name: OPENEBS_IO_VOLUME_MONITOR_IMAGE
value: "{{ .Values.policies.monitoring.image }}:{{ .Values.policies.monitoring.imageTag }}"
# OPENEBS_IO_ENABLE_ANALYTICS if set to true sends anonymous usage
# events to Google Analytics
- name: OPENEBS_IO_ENABLE_ANALYTICS
value: "{{ .Values.analytics.enabled }}"
# OPENEBS_IO_ANALYTICS_PING_INTERVAL can be used to specify the duration (in hours)
# for periodic ping events sent to Google Analytics. Default is 24 hours.
- name: OPENEBS_IO_ANALYTICS_PING_INTERVAL
value: "{{ .Values.analytics.pingInterval }}"
{{- if .Values.apiserver.nodeSelector }}
nodeSelector:
{{ toYaml .Values.apiserver.nodeSelector | indent 8 }}
Expand Down
27 changes: 16 additions & 11 deletions k8s/charts/openebs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ image:

apiserver:
image: "quay.io/openebs/m-apiserver"
imageTag: "0.7.2"
imageTag: "0.8.0"
replicas: 1
ports:
externalPort: 5656
Expand All @@ -26,7 +26,7 @@ apiserver:

provisioner:
image: "quay.io/openebs/openebs-k8s-provisioner"
imageTag: "0.7.2"
imageTag: "0.8.0"
replicas: 1
nodeSelector: {}
tolerations: []
Expand All @@ -35,10 +35,10 @@ provisioner:
snapshotOperator:
controller:
image: "quay.io/openebs/snapshot-controller"
imageTag: "0.7.2"
imageTag: "0.8.0"
provisioner:
image: "quay.io/openebs/snapshot-provisioner"
imageTag: "0.7.2"
imageTag: "0.8.0"
replicas: 1
upgradeStrategy: "Recreate"
nodeSelector: {}
Expand All @@ -55,30 +55,35 @@ ndm:
count: "1"
filters:
excludeVendors: "CLOUDBYT,OpenEBS"
excludePaths: "loop,/dev/fd0,/dev/sr0,/dev/ram,/dev/dm-"
excludePaths: "loop,/dev/fd0,/dev/sr0,/dev/ram,/dev/dm-,/dev/md"
nodeSelector: {}

jiva:
image: "quay.io/openebs/jiva"
imageTag: "0.7.2"
imageTag: "0.8.0"
replicas: 3

cstor:
pool:
image: "quay.io/openebs/cstor-pool"
imageTag: "0.7.2"
imageTag: "0.8.0"
poolMgmt:
image: "quay.io/openebs/cstor-pool-mgmt"
imageTag: "0.7.2"
imageTag: "0.8.0"
target:
image: "quay.io/openebs/cstor-istgt"
imageTag: "0.7.2"
imageTag: "0.8.0"
volumeMgmt:
image: "quay.io/openebs/cstor-volume-mgmt"
imageTag: "0.7.2"
imageTag: "0.8.0"

policies:
monitoring:
enabled: true
image: "quay.io/openebs/m-exporter"
imageTag: "0.7.2"
imageTag: "0.8.0"

analytics:
enabled: true
# Specify in hours the duration after which a ping event needs to be sent.
pingInterval: "24h"
2 changes: 1 addition & 1 deletion k8s/demo/fio/demo-fio-jiva-1r.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
volumes:
- name: datavol
persistentVolumeClaim:
claimName: fio-jiva-claim
claimName: fio-jiva-1r-claim
---
kind: PersistentVolumeClaim
apiVersion: v1
Expand Down
60 changes: 60 additions & 0 deletions k8s/demo/percona/percona-cstor-clone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: percona-clone-cstor
labels:
name: percona-clone-cstor
spec:
replicas: 1
selector:
matchLabels:
name: percona-clone-cstor
template:
metadata:
labels:
name: percona-clone-cstor
spec:
securityContext:
fsGroup: 999
tolerations:
- key: "ak"
value: "av"
operator: "Equal"
effect: "NoSchedule"
containers:
- resources:
limits:
cpu: 0.5
name: percona-clone-cstor
image: percona
args:
- "--ignore-db-dir"
- "lost+found"
env:
- name: MYSQL_ROOT_PASSWORD
value: k8sDem0
ports:
- containerPort: 3306
name: percona
volumeMounts:
- mountPath: /var/lib/mysql
name: demo-cstor-vol1
volumes:
- name: demo-cstor-vol1
persistentVolumeClaim:
claimName: demo-cstor-snap-vol-claim
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: demo-cstor-snap-vol-claim
namespace: default
annotations:
snapshot.alpha.kubernetes.io/snapshot: cstor-snapshot-demo
spec:
storageClassName: openebs-snapshot-promoter
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 5Gi
7 changes: 7 additions & 0 deletions k8s/demo/percona/percona-cstor-snap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: volumesnapshot.external-storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
name: cstor-snapshot-demo
namespace: default
spec:
persistentVolumeClaimName: demo-cstor-sparse-vol1-claim
28 changes: 8 additions & 20 deletions k8s/openebs-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,6 @@ roleRef:
name: openebs-maya-operator
apiGroup: rbac.authorization.k8s.io
---
# This is the install related config. It specifies the version of openebs
# components i.e. custom operators that gets installed. This config is
# used by maya-apiserver.
apiVersion: v1
kind: ConfigMap
metadata:
name: maya-install-config
namespace: openebs
data:
install: |
spec:
install:
- version: "0.7.0"
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
Expand Down Expand Up @@ -113,10 +99,6 @@ spec:
# This is supported for maya api server version 0.5.2 onwards
#- name: OPENEBS_IO_K8S_MASTER
# value: "http://172.28.128.3:8080"
# OPENEBS_IO_INSTALL_CONFIG_NAME specifies the config map containing the install configuration.
# Currently, the configuration can be used to specify the default version for the CAS Templates
- name: OPENEBS_IO_INSTALL_CONFIG_NAME
value: "maya-install-config"
# OPENEBS_IO_INSTALL_DEFAULT_CSTOR_SPARSE_POOL decides whether default cstor sparse pool should be
# configured as a part of openebs installation.
# If "true" a default cstor sparse pool will be configured, if "false" it will not be configured.
Expand Down Expand Up @@ -160,6 +142,12 @@ spec:
# events to Google Analytics
- name: OPENEBS_IO_ENABLE_ANALYTICS
value: "true"
# OPENEBS_IO_ANALYTICS_PING_INTERVAL can be used to specify the duration (in hours)
# for periodic ping events sent to Google Analytics.
# Default is 24h.
# Minimum is 1h. You can convert this to weekly by setting 168h
#- name: OPENEBS_IO_ANALYTICS_PING_INTERVAL
# value: "24h"
livenessProbe:
exec:
command:
Expand Down Expand Up @@ -332,7 +320,7 @@ data:
name: path filter
state: true
include: ""
exclude: "loop,/dev/fd0,/dev/sr0,/dev/ram,/dev/dm-"
exclude: "loop,/dev/fd0,/dev/sr0,/dev/ram,/dev/dm-,/dev/md"
---
apiVersion: extensions/v1beta1
kind: DaemonSet
Expand Down Expand Up @@ -361,7 +349,7 @@ spec:
command:
- /usr/sbin/ndm
- start
image: quay.io/openebs/node-disk-manager-amd64:ci
image: quay.io/openebs/node-disk-manager-amd64:v0.2.0
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
Expand Down
6 changes: 3 additions & 3 deletions k8s/upgrades/0.6.0-0.7.0/pre_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ oens=$1

echo
VERSION_INSTALLED=`kubectl get deploy -n openebs -o yaml \
| grep m-apiserver \
| grep m-apiserver | grep image: \
| awk -F ':' '{print $3}'`


echo "Installed Version: $VERSION_INSTALLED"
if [ -z $VERSION_INSTALLED ] || [ $VERSION_INSTALLED = "0*" ]; then
echo "Unable to determine installed openebs version"
print_usage
elif [ $VERSION_INSTALLED = "0.6.0*" ]; then
elif test `echo $VERSION_INSTALLED | grep -c 0.6.` -eq 0; then
echo "Upgrade is supported only from 0.6.0"
exit 1
fi

echo "Installed Version: $VERSION_INSTALLED"

echo
kubectl get sp default 2>/dev/null
Expand Down
Loading

0 comments on commit 95ac0c6

Please sign in to comment.