From 835478813ffd3cf8f3c6cd68f56d95a6ed5da210 Mon Sep 17 00:00:00 2001 From: cicharka Date: Tue, 5 Apr 2022 07:54:18 +0200 Subject: [PATCH] rook/ceph * add default values in epiphany configuration * bump up verison of rook --- .../requirements/x86_64/files.yml | 8 +- .../requirements/x86_64/images.yml | 4 +- .../playbooks/roles/rook/defaults/main.yml | 4 +- ansible/playbooks/roles/rook/tasks/main.yml | 23 +- docs/home/COMPONENTS.md | 2 +- .../howto/kubernetes/PERSISTENT_STORAGE.md | 10 +- schema/common/defaults/configuration/rook.yml | 213 +++++++++++++++++- 7 files changed, 229 insertions(+), 35 deletions(-) diff --git a/ansible/playbooks/roles/repository/files/download-requirements/requirements/x86_64/files.yml b/ansible/playbooks/roles/repository/files/download-requirements/requirements/x86_64/files.yml index 8ab8b35ac9..cdd00db475 100644 --- a/ansible/playbooks/roles/repository/files/download-requirements/requirements/x86_64/files.yml +++ b/ansible/playbooks/roles/repository/files/download-requirements/requirements/x86_64/files.yml @@ -39,8 +39,8 @@ files: 'https://helm.elastic.co/helm/filebeat/filebeat-7.9.2.tgz': sha256: 5140b4c4473ca33a0af4c3f70545dcc89735c0a179d974ebc150f1f28ac229ab - 'https://charts.rook.io/release/rook-ceph-v1.8.5.tgz': - sha256: 11a425c16a8513e9cf7a2d6de396ea6e5166a03a63a8bf883d4f2098ab35b268 + 'https://charts.rook.io/release/rook-ceph-v1.8.8.tgz': + sha256: f67e474dedffd4004f3a0b7b40112694a7f1c2b1a0048b03b3083d0a01e86b14 - 'https://charts.rook.io/release/rook-ceph-cluster-v1.8.5.tgz': - sha256: 58695a740845091c10426266e7b345fe6185ee5a3b86f1f2d6e52a55af8503c1 + 'https://charts.rook.io/release/rook-ceph-cluster-v1.8.8.tgz': + sha256: df4e1f2125af41fb84c72e4d12aa0cb859dddd4f37b3d5979981bd092040bd16 diff --git a/ansible/playbooks/roles/repository/files/download-requirements/requirements/x86_64/images.yml b/ansible/playbooks/roles/repository/files/download-requirements/requirements/x86_64/images.yml index d186bde0be..cef0d5a32f 100644 --- a/ansible/playbooks/roles/repository/files/download-requirements/requirements/x86_64/images.yml +++ b/ansible/playbooks/roles/repository/files/download-requirements/requirements/x86_64/images.yml @@ -179,5 +179,5 @@ images: 'quay.io/cephcsi/cephcsi:v3.5.1': sha1: 51dee9ea8ad76fb95ebd16f951e8ffaaaba95eb6 - 'rook/ceph:v1.8.5': - sha1: a70ecb9007032e4374ba01c1a3140e3136ed298b + 'rook/ceph:v1.8.8': + sha1: f34039b17b18f5a855b096d48ff787b4013615e4 diff --git a/ansible/playbooks/roles/rook/defaults/main.yml b/ansible/playbooks/roles/rook/defaults/main.yml index d6f0cac4fb..a20d223e59 100644 --- a/ansible/playbooks/roles/rook/defaults/main.yml +++ b/ansible/playbooks/roles/rook/defaults/main.yml @@ -1,5 +1,5 @@ --- -rook_helm_chart_file_name: rook-ceph-v1.8.5.tgz -rook_helm_cluster_chart_file_name: rook-ceph-cluster-v1.8.5.tgz +rook_helm_chart_file_name: rook-ceph-v1.8.8.tgz +rook_helm_cluster_chart_file_name: rook-ceph-cluster-v1.8.8.tgz rook_helm_chart_name: rook-ceph rook_helm_cluster_chart_name: rook-ceph-cluster diff --git a/ansible/playbooks/roles/rook/tasks/main.yml b/ansible/playbooks/roles/rook/tasks/main.yml index 88501d8280..0a74498fa7 100644 --- a/ansible/playbooks/roles/rook/tasks/main.yml +++ b/ansible/playbooks/roles/rook/tasks/main.yml @@ -21,48 +21,29 @@ - "{{ rook_helm_chart_file_name }}" - "{{ rook_helm_cluster_chart_file_name }}" - - name: Create custom configuration for operator Helm chart file (operator-custom-chart-values.yml) - when: specification.operator_chart_values is defined + - name: Create configuration for operator Helm chart file (operator-custom-chart-values.yml) copy: content: "{{ specification.operator_chart_values }}" dest: "{{ download_directory }}/operator-custom-chart-values.yml" mode: preserve - - name: Create custom configuration for cluster Helm chart file (cluster-custom-chart-values.yml) - when: specification.cluster_chart_values is defined + - name: Create configuration for cluster Helm chart file (cluster-custom-chart-values.yml) copy: content: "{{ specification.cluster_chart_values }}" dest: "{{ download_directory }}/cluster-custom-chart-values.yml" mode: preserve - name: Install Rook operator using Helm chart with values from operator-custom-chart-values.yml - when: specification.operator_chart_values is defined command: | helm -n {{ specification.rook_namespace }} upgrade --install \ -f {{ download_directory }}/operator-custom-chart-values.yml \ {{ rook_helm_chart_name }} \ {{ download_directory }}/{{ rook_helm_chart_file_name }} --create-namespace - - name: Install Rook operator using Helm chart with default values - when: not specification.operator_chart_values is defined - command: | - helm -n {{ specification.rook_namespace }} upgrade --install \ - {{ rook_helm_chart_name }} \ - {{ download_directory }}/{{ rook_helm_chart_file_name }} --create-namespace - - name: Create Rook cluster with values from cluster-custom-chart-values.yml - when: specification.cluster_chart_values is defined command: | helm -n {{ specification.rook_namespace }} upgrade --install \ --set operatorNamespace={{ specification.rook_namespace }} \ -f {{ download_directory }}/cluster-custom-chart-values.yml \ {{ rook_helm_cluster_chart_name }} \ {{ download_directory }}/{{ rook_helm_cluster_chart_file_name }} --create-namespace - - - name: Create Rook cluster with default values - when: not specification.cluster_chart_values is defined - command: | - helm -n {{ specification.rook_namespace }} upgrade --install \ - --set operatorNamespace={{ specification.rook_namespace }} \ - {{ rook_helm_cluster_chart_name }} \ - {{ download_directory }}/{{ rook_helm_cluster_chart_file_name }} --create-namespace diff --git a/docs/home/COMPONENTS.md b/docs/home/COMPONENTS.md index cad07603a8..e0b1064a6c 100644 --- a/docs/home/COMPONENTS.md +++ b/docs/home/COMPONENTS.md @@ -39,7 +39,7 @@ Note that versions are default versions and can be changed in certain cases thro | Pgpool | 4.2.4 | https://www.pgpool.net/ | [License](https://www.pgpool.net/mediawiki/index.php/pgpool-II_License) | | Alertmanager | 0.23.0 | https://github.com/prometheus/alertmanager | [Apache License 2.0](https://github.com/prometheus/alertmanager/blob/master/LICENSE) | | Apache2 | 2.4.29 | https://httpd.apache.org/ | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Rook | 1.8.5 | https://rook.io/ | [Apache License 2.0](https://github.com/rook/rook/blob/master/LICENSE) | +| Rook | 1.8.8 | https://rook.io/ | [Apache License 2.0](https://github.com/rook/rook/blob/master/LICENSE) | ## Epicli binary dependencies diff --git a/docs/home/howto/kubernetes/PERSISTENT_STORAGE.md b/docs/home/howto/kubernetes/PERSISTENT_STORAGE.md index 46a697304a..f6aed34e51 100644 --- a/docs/home/howto/kubernetes/PERSISTENT_STORAGE.md +++ b/docs/home/howto/kubernetes/PERSISTENT_STORAGE.md @@ -104,7 +104,9 @@ specification: rook_namespace: your-rook-namespace ``` -The key `specification.enabled` must be set to true to install Rook/Ceph component. This will install Rook/Ceph with default values. To override default values provided by Rook you need to add to `configuration/rook` keys: +The key `specification.enabled` must be set to true to install Rook/Ceph component. Epiphany configuration file provides set of +parameters that are used for Rook/Ceph installation with default values. To override default values provided by Rook you need +to adjust `configuration/rook` keys: - `specification.operator_chart_values` - to override Rook Operator Helm Chart default values - `specification.cluster_chart_values` - to override Rook Cluster Helm Chart default values @@ -121,16 +123,18 @@ specification: ... ``` Values nested below the `operator_chart_values` and `cluster_chart_values` keys are respectively Helm Chart values for Rook Operator and Rook Ceph Cluster. +It is important to ensure that configuration of operator and chart values matches configuration of your cluster. More information about Helm Chart values may be found: - [Helm Operator](https://github.com/rook/rook/blob/master/Documentation/helm-operator.md) - [Helm Ceph Cluster](https://github.com/rook/rook/blob/master/Documentation/helm-ceph-cluster.md) Sample configuration files that can be used in Epiphany `configuration/rook`: -- [Helm Operator](https://raw.githubusercontent.com/rook/rook/v1.8.5/deploy/charts/rook-ceph/values.yaml) -- [Helm Ceph Cluster](https://raw.githubusercontent.com/rook/rook/v1.8.5/deploy/charts/rook-ceph-cluster/values.yaml) +- [Helm Operator](https://raw.githubusercontent.com/rook/rook/v1.8.8/deploy/charts/rook-ceph/values.yaml) +- [Helm Ceph Cluster](https://raw.githubusercontent.com/rook/rook/v1.8.8/deploy/charts/rook-ceph-cluster/values.yaml) More informations about Rook with Ceph storage may be found in the official Rook [documentation](https://rook.io/docs/rook/v1.8/). + ### Azure #### Infrastructure diff --git a/schema/common/defaults/configuration/rook.yml b/schema/common/defaults/configuration/rook.yml index f61ce6d3f9..77f08ea0a3 100644 --- a/schema/common/defaults/configuration/rook.yml +++ b/schema/common/defaults/configuration/rook.yml @@ -3,5 +3,214 @@ kind: configuration/rook title: "Kubernetes Rook Config" name: default specification: - rook_namespace: rook-ceph - enabled: false + rook_namespace: rook-ceph + enabled: false + operator_chart_values: + crds: + enabled: true + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 128Mi + nodeSelector: {} + tolerations: [] + unreachableNodeTolerationSeconds: 5 + currentNamespaceOnly: false + annotations: {} + logLevel: INFO + rbacEnable: true + pspEnable: true + csi: + enableRbdDriver: true + enableCephfsDriver: true + enableGrpcMetrics: false + enableCephfsSnapshotter: true + enableRBDSnapshotter: true + enablePluginSelinuxHostMount : false + rbdFSGroupPolicy: "ReadWriteOnceWithFSType" + cephFSFSGroupPolicy: "ReadWriteOnceWithFSType" + enableOMAPGenerator: false + provisionerReplicas: 2 + allowUnsupportedVersion: false + forceCephFSKernelClient: true + volumeReplication: + enabled: false + csiAddons: + enabled: false + enableDiscoveryDaemon: false + cephCommandsTimeoutSeconds: "15" + enableSelinuxRelabeling: true + hostpathRequiresPrivileged: false + disableDeviceHotplug: false + discoverDaemonUdev: + enableOBCWatchOperatorNamespace: true + admissionController: + monitoring: + enabled: false + cluster_chart_values: + operatorNamespace: rook-ceph + toolbox: + enabled: false + image: rook/ceph:v1.8.8 + tolerations: [] + affinity: {} + resources: {} + monitoring: + enabled: false + rulesNamespaceOverride: + pspEnable: true + cephClusterSpec: + cephVersion: + image: quay.io/ceph/ceph:v16.2.7 + allowUnsupported: false + dataDirHostPath: /var/lib/rook + skipUpgradeChecks: false + continueUpgradeAfterChecksEvenIfNotHealthy: false + waitTimeoutForHealthyOSDInMinutes: 10 + mon: + count: 3 + allowMultiplePerNode: false + mgr: + count: 1 + modules: + - name: pg_autoscaler + enabled: true + dashboard: + enabled: true + ssl: true + crashCollector: + disable: false + cleanupPolicy: + confirmation: "" + sanitizeDisks: + method: quick + dataSource: zero + iteration: 1 + allowUninstallWithVolumes: false + removeOSDsIfOutAndSafeToRemove: false + storage: + useAllNodes: true + useAllDevices: true + disruptionManagement: + managePodBudgets: true + osdMaintenanceTimeout: 30 + pgHealthCheckTimeout: 0 + manageMachineDisruptionBudgets: false + machineDisruptionBudgetNamespace: openshift-machine-api + healthCheck: + daemonHealth: + mon: + disabled: false + interval: 45s + osd: + disabled: false + interval: 60s + status: + disabled: false + interval: 60s + livenessProbe: + mon: + disabled: false + mgr: + disabled: false + osd: + disabled: false + ingress: + dashboard: {} + cephBlockPools: + - name: ceph-blockpool + spec: + failureDomain: host + replicated: + size: 3 + storageClass: + enabled: true + name: ceph-block + isDefault: true + reclaimPolicy: Delete + allowVolumeExpansion: true + mountOptions: [] + parameters: + imageFormat: "2" + imageFeatures: layering + csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner + csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph + csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner + csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph + csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node + csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph + csi.storage.k8s.io/fstype: ext4 + cephFileSystems: + - name: ceph-filesystem + spec: + metadataPool: + replicated: + size: 3 + dataPools: + - failureDomain: host + replicated: + size: 3 + name: data0 + metadataServer: + activeCount: 1 + activeStandby: true + storageClass: + enabled: true + isDefault: false + name: ceph-filesystem + pool: data0 + reclaimPolicy: Delete + allowVolumeExpansion: true + mountOptions: [] + parameters: + csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner + csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph + csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner + csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph + csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node + csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph + csi.storage.k8s.io/fstype: ext4 + cephFileSystemVolumeSnapshotClass: + enabled: false + name: ceph-filesystem + isDefault: true + deletionPolicy: Delete + annotations: {} + labels: {} + parameters: {} + cephBlockPoolsVolumeSnapshotClass: + enabled: false + name: ceph-block + isDefault: false + deletionPolicy: Delete + annotations: {} + labels: {} + parameters: {} + cephObjectStores: + - name: ceph-objectstore + spec: + metadataPool: + failureDomain: host + replicated: + size: 3 + dataPool: + failureDomain: host + erasureCoded: + dataChunks: 2 + codingChunks: 1 + preservePoolsOnDelete: true + gateway: + port: 80 + instances: 1 + healthCheck: + bucket: + interval: 60s + storageClass: + enabled: true + name: ceph-bucket + reclaimPolicy: Delete + parameters: + region: us-east-1 \ No newline at end of file