ibm-rook-rbd-cluster

by Helm

Helm chartv0.8.3App 1.0Apache-2.0

This chart deploys Rook Ceph storage cluster.

About this chart

Rook Ceph Cluster (ibm-rook-rbd-cluster V 0.8.3) - Beta

Introduction

Rook, an open source orchestrator for distributed storage systems, runs in Cloud Native environments.

Ceph is a distributed storage system with multiple storage presentations that include object storage, block storage, and POSIX-compliant shared file system.

Rook is now in beta state and supports only Ceph distributed storage system.

Chart details

This Helm chart bootstraps a Rook Ceph cluster on a Kubernetes cluster by using the Helm package manager. Along with a storage cluster, this chart also creates a storage pool and a storage class.

Limitations

  • Rook is supported on Linux® 64-bit clusters. Currently, it is not supported on Linux® on Power® 64-bit LE and IBM® Z clusters.
  • Rook supports multiple Ceph clusters. However, only one cluster per namespace can be set up.
  • After Rook cluster is installed and Rook rbd volume is claimed in an application pod, if you see the following errors, you must disable some Ceph features by starting the rook toolbox and running ceph osd crush tunables bobtail in the rook toolbox container:
    • if you see volume mount failure in the application pod with an error Failed to complete rbd: signal: interrupt.
    • if dmesg on the node where application pod is scheduled shows the message libceph: mon2 10.205.92.13:6790 feature set mismatch, my 4a042a42 < server's 2004a042a42, missing 20000000000.

Prerequisites

  • You must have the cluster administrator role to install the chart.
  • Role-based access control (RBAC) is enabled by default in IBM Cloud Private. Therefore, you must add certain RBAC objects before you deploy the Rook Ceph Operator and ibm-rook-rbd-cluster Helm charts. For more information, see Rook Prerequisites.
  • You must first deploy the Rook Ceph Operator Helm chart, rook-ceph version v0.8.3, in your IBM Cloud Private cluster. You must set rbacEnable chart configuration parameter to true while installing the Rook Ceph Operator Helm chart. The Rook Ceph Operator Helm chart must create one Rook Operator pod, rook-ceph-agent DaemonSet and rook-discover DaemonSet in your IBM Cloud Private cluster. You must verify that these objects are successfully created before installing ibm-rook-rbd-cluster.
  • In the storage.nodes ibm-rook-rbd-cluster chart configuration parameter, you must specify either disks or directories for a storage node. Your storage node must be part of IBM Cloud Private cluster. If you specify disk devices, they must not have any file system present.
  • The path, which is specified as dataDirHostPath cluster settings, must not have any pre-existing entries from a previous cluster installation. Stale keys and other configurations that exist from a previous installation cause the installation to fail.

PodSecurityPolicy Requirements

This chart requires the following PodSecurityPolicy before you deploy both Rook operator and Rook Ceph cluster charts:

PodSecurityPolicy

apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
  name: rook-privileged
spec:
  fsGroup:
    rule: RunAsAny
  privileged: true
  runAsUser:
    rule: RunAsAny
  seLinux:
    rule: RunAsAny
  supplementalGroups:
    rule: RunAsAny
  volumes:
  - '*'
  allowedCapabilities:
  - '*'
  hostPID: true
  hostIPC: true
  hostNetwork: true
  hostPorts:
   # CEPH ports
   - min: 6789
     max: 7300
   # rook-api port
   - min: 8124
     max: 8124

Resources required

The Ceph cluster containers have the following resource requests and limits:

ContainerMemory RequestMemory LimitCPU RequestCPU Limit
Monitoring256Mi512Mi250m500m
ODS256Mi512Mi250m500m
Manager256Mi512Mi250m500m

Installing Rook Ceph cluster

Installation of a Rook Ceph cluster is three-step process:

  1. Configure role-based access control (RBAC)
  2. Install the Rook Ceph Operator Helm chart
  3. Install the Rook Ceph cluster (ibm-rook-rbd-cluster) chart

You must be a cluster administrator to install a Rook Ceph cluster.

Configure RBAC

Create the following RBAC objects before you deploy both Rook operator and ibm-rook-rbd-cluster charts:

Create a ClusterRole object.

# privilegedPSP grants access to use the privileged PSP.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: privileged-psp-user
rules:
- apiGroups:
  - extensions
  resources:
  - podsecuritypolicies
  resourceNames:
  - rook-privileged
  verbs:
  - use  

Create a ClusterRoleBinding object

Note: In the following ClusterRoleBinding definition, you must change the namespace parameter value to the namespace where you are deploying the Rook Operator chart.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: rook-agent-psp
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: privileged-psp-user
subjects:
- kind: ServiceAccount
  name: rook-agent
  namespace: <Rook Ceph Operator chart namespace>

Create the following RBAC objects before you deploy each ibm-rook-rbd-cluster chart. The RBAC objects are needed to perform pre-installation validations. This is optional step. If you do not create these RBAC objects, disable pre-validation check by setting preValidation.enabled parameter to false or disable Pre-validation Checks on your IBM Cloud Private cluster management console.

Create a ClusterRole object.

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: pod-reader
rules:
- apiGroups: [""] # "" indicates the core API group
  resources: ["pods"]
  verbs: ["get", "list"]

Create a ClusterRoleBinding object

Note: In the following ClusterRoleBinding definition, you must change the namespace parameter value to the namespace where you are deploying the ibm-rook-rbd-cluster chart.

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: pod-reader-binding
subjects:
- kind: ServiceAccount
  name: default
  namespace: <ibm-rook-rbd-cluster namespace>
roleRef:
  kind: ClusterRole
  name: pod-reader
  apiGroup: rbac.authorization.k8s.io

Install the Rook Ceph Operator Helm chart

The Rook Ceph Operator Helm chart installs the basic components that are required to create, configure, and manage Rook Ceph clusters on Kubernetes.

For more information about installing the Rook Ceph Operator Helm chart, see Operator Helm Chart document. You must install Beta release version v0.8.3 of Rook Operator Helm chart.

Note: Make a note of the namespace in which you deployed the Rook Ceph Operator Helm chart. You need to specify this namespace when you deploy the ibm-rook-rbd-cluster chart.

Next, install the ibm-rook-rbd-cluster chart.

Install the Rook Ceph cluster (ibm-rook-rbd-cluster) chart

Install the ibm-rook-rbd-cluster chart to create a Ceph storage cluster. The chart deploys a Ceph block storage cluster, and creates its storage pool and associated StorageClass.

Installing the chart

Installing the chart by using the command line

The following sample YAML shows the storage settings that specify three nodes with disks as storage devices:

rookOperatorNamespace: "<Rook Ceph Operator Namespace>"
cluster:
  storage:
    nodes:
      - name: "1.2.3.4"
        devices:
          - name: "vdb"
          - name: "vdc"
      - name: "1.2.3.5"
        devices:
          - name: "vdb"
      - name: "1.2.3.6"
        devices:
          - name: "vdb"

Note: The node name must be the name of a kubernetes node as reported by the kubectl get nodes command.

The following sample YAML shows storage settings that specify three nodes with directories as storage devices:

rookOperatorNamespace: "<Rook Ceph Operator Namespace>"
cluster:
  storage:
    nodes:
      - name: "1.2.3.4"
        directories:
          - path: "/rook/storage-dir"
      - name: "1.2.3.5"
        directories:
          - path: "/rook/storage-dir"
      - name: "1.2.3.6"
        directories:
          - path: "/rook/storage-dir"

Note:

  • Replace <Rook Ceph Operator Namespace> with the namespace in which you deployed the Rook Ceph Operator chart.
  • Disk devices that are specified here must not have any file system present; use wipefs -a <disk path> to clean the disks.
  • Storage settings can be applied at a cluster or at a node level. See the Configuration section for details.

Run the following command to install ibm-rook-rbd-cluster chart from command line with the release name my-release:

helm install --name my-release -f values.yaml stable/ibm-rook-rbd-cluster --tls

Installing the chart by using the management console

Consider the following storage settings examples if you are installing the ibm-rook-rbd-cluster chart from the IBM Cloud Private Catalog.

Storage setting that specifies three nodes with disks as storage devices:

-
    name: "1.2.3.4"
    devices: [{name: "vdb"}, {name: "vdc"}]
-
    name: "1.2.3.5"
    devices: [{name: "vdb"}]
-
    name: "1.2.3.6"
    devices: [{name: "vdb"}]

Note: The node name must be the name of a kubernetes node as reported by the kubectl get nodes command.

Storage setting that specifies three nodes with directories as storage devices:

-
    name: "1.2.3.4"
    directories: [{path: "/rook/storage-dir"}]
-
    name: "1.2.3.5"
    directories: [{path: "/rook/storage-dir"}]
-
    name: "1.2.3.6"
    directories: [{path: "/rook/storage-dir"}]

Configuration

The following table lists the configurable parameters of the ibm-rook-rbd-cluster chart and their default values.

ParameterDescriptionDefault
rookOperatorNamespaceNamespace in which the Rook Ceph Operator Helm chart is installed. This parameter is required to grant adequate permission to Ceph operator to create and manage Ceph cluster pods. Note: The Rook Ceph Operator Helm chart must be installed before you install the ibm-rook-rbd-cluster chart.nil
cluster.dataDirHostPathPath on the host where configuration files are stored. If not specified, a Kubernetes emptyDir is created. Note: The directory must not have pre-exsiting entries./var/lib/rook
cluster.mon.countSets the number of Ceph monitoring processes to start. The value must be odd number in the range 1 - 9.3
cluster.mon.allowMultiplePerNodeSet it true to allow multiple monitoring processes on one node.false
cluster.network.hostNetworkSet it true to use network of the hosts instead of using the software-defined network (SDN) underneath the containers.false
cluster.dashboard.enabledSet it true to view the Ceph dashboard in your browser.true
cluster.placement.all.enabledSet it true to enable generic placement configuration for all services (mon, osd, mgr). The placement configuration is used to schedule pods on nodes. Each service has its placement configuration that is generated by merging the generic configuration with the most specific one, which overrides any attribute. For more information, see Placement Configuration Settings.false
cluster.placement.all.nodeSelectorTermsNode affinity match expressions that are associated with nodeSelectorTerms for all the services (mon, osd, mgr).[]
cluster.placement.all.tolerationsTolerations that are applied to pods for all the services (mon, osd, mgr).nil
cluster.placement.mon.enabledSet it true to enable generic placement configuration for Ceph monitoring service pods. The placement configuration is used to schedule pods on nodes. Each service has its placement configuration that is generated by merging the generic configuration with the most specific one, which overrides any attribute. For more information, see Placement Configuration Settings.false
cluster.placement.mon.nodeSelectorTermsNode affinity match expressions that are associated with nodeSelectorTerms for the Ceph monitoring service.[]
cluster.placement.mon.tolerationsTolerations that are applied to pods of the Ceph monitoring service.nil
cluster.placement.osd.enabledSet it true to enable generic placement configuration for Ceph OSD service pods. The placement configuration is used to schedule pods on nodes. Each service has its placement configuration that is generated by merging the generic configuration with the most specific one, which overrides any attribute. For more info

Deploy ibm-rook-rbd-cluster with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-rook-rbd-cluster on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartibm-rook-rbd-cluster is pinned at v0.8.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply