Was this page helpful?
Caution
You're viewing documentation for an unstable version of ScyllaDB Operator. Switch to the latest stable version.
Install ScyllaDB Operator in Red Hat OpenShift¶
ScyllaDB Operator is a Red Hat OpenShift Certified Operator available for installation through the embedded software catalog, a user interface for discovering Operators working in conjunction with Operator Lifecycle Manager (OLM), which installs and manages Operators in a cluster. This guide describes how to install ScyllaDB Operator from the software catalog in a Red Hat OpenShift cluster.
Prerequisites¶
This guide requires you to have access to an OpenShift Container Platform cluster using an account with cluster-admin permissions.
Ensure that your OpenShift cluster meets the general prerequisites for ScyllaDB Operator installation.
Additionally, ensure that you have kubectl or OpenShift CLI (oc) installed.
Tip
Commands in this guide can be executed using the OpenShift CLI (oc) in place of kubectl.
Install ScyllaDB Operator¶
ScyllaDB Operator can be installed in a Red Hat OpenShift cluster from the software catalog through one of the below methods: OpenShift Container Platform web console or CLI.
This procedure describes how to install and subscribe to ScyllaDB Operator from software catalog by using the OpenShift Container Platform web console.
Note
This procedure aims to follow the generic Operator installation steps outlined in the upstream documentation: Installing from the software catalog by using the web console. You can refer to it for more detailed instructions, or follow the below steps for a more contained, ScyllaDB Operator specific guidance.
Procedure
Navigate to
Ecosystem->Software Catalog.Search for ScyllaDB Operator and select the
Certifiedversion by setting theSourcefilter toCertifiedor ensuring that the ScyllaDB Operator tile has theCertifiedtag next to it.In the description dialog, read the information about the operator and click
Install.In the
Install Operatordialog, configure your ScyllaDB Operator installation:For clusters on cloud providers with token-based authentication:
AWS Security Token Service (STS Mode in the web console): enter the Amazon Resource Name (ARN) of the AWS IAM role of your service account in the role ARN field.
Select the
stableUpdate Channel and version 1.20.0 from the list.Select the
All namespaces on the clusterinstallation mode.Select the Operator recommended installed namespace:
scylla-operator.Warning
ScyllaDB Operator must run in a reserved
scylla-operatornamespace. It is not currently possible to run it in a different namespace.Select the
Manualupdate approval strategy to manually approve ScyllaDB Operator upgrades when new versions are available.Caution
Always review the Upgrading ScyllaDB Operator guide and check for additional steps for specific versions before starting the upgrade process.
Click
Installto install and subscribe to ScyllaDB Operator.In the
Install Plandialog, review the manual install plan and clickApproveto approve it.Log in to the OpenShift cluster in the terminal. Ensure that
kubectlis configured to communicate with your OpenShift cluster.
This procedure describes how to install and subscribe to ScyllaDB Operator from software catalog by using the CLI.
Note
This procedure aims to follow the generic Operator installation steps outlined in the upstream documentation: Installing from the software catalog by using the CLI. You can refer to it for more detailed instructions, or follow the below steps for a more contained, ScyllaDB Operator specific guidance.
Procedure
Log in to the OpenShift cluster in the terminal. Ensure that
kubectlis configured to communicate with your OpenShift cluster.Ensure that the ScyllaDB Operator package is available:
kubectl get -n=openshift-marketplace packagemanifest scylladb-operator
Expected output:
NAME CATALOG AGE scylladb-operator Certified Operators 2d22h
Create the
scylla-operatornamespace:Warning
ScyllaDB Operator must run in a reserved
scylla-operatornamespace. It is not currently possible to run it in a different namespace.kubectl create namespace scylla-operator
Create an
OperatorGroupobject in thescylla-operatornamespace:kubectl apply --server-side -n=scylla-operator -f=- <<EOF apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: scylladb-operator namespace: scylla-operator EOF
Create a
Subscriptionobject to install and subscribe to ScyllaDB Operator:Clusters on cloud providers with token-based authentication require you to include relevant cloud-provider specific fields in the
Subscriptionobject’s config section. Apply the appropriate manifest based on your environment. In the below table, manifests are provided for AWS STS mode and generic installations.If the cluster is in AWS STS mode, include the role ARN details in the
Subscriptionmanifest.kubectl apply --server-side -n=scylla-operator -f=- <<EOF apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: scylladb-operator namespace: scylla-operator spec: channel: stable installPlanApproval: Manual name: scylladb-operator source: certified-operators sourceNamespace: openshift-marketplace startingCSV: scylladb-operator.v1.20.0 config: env: - name: ROLEARN value: "<role_arn>" EOF
kubectl apply --server-side -n=scylla-operator -f=- <<EOF apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: scylladb-operator namespace: scylla-operator spec: channel: stable installPlanApproval: Manual name: scylladb-operator source: certified-operators sourceNamespace: openshift-marketplace startingCSV: scylladb-operator.v1.20.0 EOF
Review and approve the generated
InstallPlanto start the installation:Locate the generated
InstallPlanobject and note its name:kubectl -n=scylla-operator get installplan -l=operators.coreos.com/scylladb-operator.scylla-operator=""
Example expected output:
NAME CSV APPROVAL APPROVED install-tw6bv scylladb-operator.v1.20.0 Manual true
Describe the
InstallPlanobject and review the changes that will be applied:kubectl -n=scylla-operator describe installplan <install-plan-name>
Approve the reviewed
InstallPlanto start the installation:kubectl -n=scylla-operator patch installplan --type=merge -p='{"spec":{"approved":true}}' <install-plan-name>
Example expected output:
installplan.operators.coreos.com/install-tw6bv patched
Wait for the ScyllaDB Operator to be installed:
Wait for
ClusterServiceVersionto be created:kubectl -n=scylla-operator wait --for=create --timeout=10m csv/scylladb-operator.v1.20.0
Expected output:
clusterserviceversion.operators.coreos.com/scylladb-operator.v1.20.0 condition metWait for
ClusterServiceVersionto reachSucceededphase:kubectl wait -n=scylla-operator --timeout=5m --for=jsonpath='{.status.phase}'=Succeeded clusterserviceversions.operators.coreos.com/scylladb-operator.v1.20.0
Expected output:
clusterserviceversion.operators.coreos.com/scylladb-operator.v1.20.0 condition met
Verify the ScyllaDB Operator installation¶
Wait for CRDs to propagate to all apiservers:
kubectl wait --for='condition=established' crd/scyllaclusters.scylla.scylladb.com crd/nodeconfigs.scylla.scylladb.com crd/scyllaoperatorconfigs.scylla.scylladb.com crd/scylladbmonitorings.scylla.scylladb.com
Expected output:
customresourcedefinition.apiextensions.k8s.io/scyllaclusters.scylla.scylladb.com condition met
customresourcedefinition.apiextensions.k8s.io/nodeconfigs.scylla.scylladb.com condition met
customresourcedefinition.apiextensions.k8s.io/scyllaoperatorconfigs.scylla.scylladb.com condition met
customresourcedefinition.apiextensions.k8s.io/scylladbmonitorings.scylla.scylladb.com condition met
Wait for the components to roll out:
kubectl -n=scylla-operator rollout status --timeout=10m deployment.apps/{scylla-operator,webhook-server}
Expected output:
deployment "scylla-operator" successfully rolled out
deployment "webhook-server" successfully rolled out
Set up local storage on dedicated nodes and enable tuning¶
ScyllaDB Operator enables local storage configuration and performance tuning through the NodeConfig resource.
The below table contains example NodeConfig manifests for a selected set of OpenShift deployment models and platforms:
A production-ready configuration for Red Hat OpenShift Service on AWS (ROSA) clusters with local NVMe storage.
A development-oriented configuration using loop devices intended for environments with no local disks available.
Caution
Local storage configuration depends on the OpenShift deployment model and the underlying platform and infrastructure.
Review the NodeConfig reference and adjust the manifest to your specific environment.
Note
Performance tuning is enabled for all nodes that are selected by NodeConfig by default, unless explicitly opted-out of.
The following manifest creates a RAID0 array from the available NVMe devices, formats it with the XFS filesystem, and enables performance tuning recommended for production-grade ScyllaDB deployments on the selected nodes.
apiVersion: scylla.scylladb.com/v1alpha1
kind: NodeConfig
metadata:
name: scylladb-nodepool-1
spec:
localDiskSetup:
filesystems:
- device: /dev/md/nvmes
type: xfs
mounts:
- device: /dev/md/nvmes
mountPoint: /var/lib/persistent-volumes
unsupportedOptions:
- prjquota
raids:
- name: nvmes
type: RAID0
RAID0:
devices:
modelRegex: Amazon EC2 NVMe Instance Storage
nameRegex: ^/dev/nvme\d+n\d+$
sysctls:
- name: fs.aio-max-nr
value: "30000000"
- name: fs.file-max
value: "9223372036854775807"
- name: fs.nr_open
value: "1073741816"
- name: fs.inotify.max_user_instances
value: "1200"
- name: vm.swappiness
value: "1"
- name: vm.vfs_cache_pressure
value: "2000"
placement:
nodeSelector:
scylla.scylladb.com/node-type: scylla
tolerations:
- effect: NoSchedule
key: scylla-operator.scylladb.com/dedicated
operator: Equal
value: scyllaclusters
You can apply it using the following command:
kubectl -n=scylla-operator apply --server-side -f=https://raw.githubusercontent.com/scylladb/scylla-operator/master/examples/openshift/rosa/nodeconfig.yaml
The following manifest creates a loop device, formats it with the XFS filesystem, and enables performance tuning on the selected nodes.
Caution
This configuration is only intended for development purposes in environments with no local NVMe disks available. Expect performance to be significantly degraded with this setup.
apiVersion: scylla.scylladb.com/v1alpha1
kind: NodeConfig
metadata:
name: scylladb-nodepool-1
spec:
localDiskSetup:
loopDevices:
- name: persistent-volumes
imagePath: /var/lib/persistent-volumes.img
size: 80Gi
filesystems:
- device: /dev/loops/persistent-volumes
type: xfs
mounts:
- device: /dev/loops/persistent-volumes
mountPoint: /var/lib/persistent-volumes
unsupportedOptions:
- prjquota
sysctls:
- name: fs.aio-max-nr
value: "30000000"
- name: fs.file-max
value: "9223372036854775807"
- name: fs.nr_open
value: "1073741816"
- name: fs.inotify.max_user_instances
value: "1200"
- name: vm.swappiness
value: "1"
- name: vm.vfs_cache_pressure
value: "2000"
placement:
nodeSelector:
scylla.scylladb.com/node-type: scylla
tolerations:
- effect: NoSchedule
key: scylla-operator.scylladb.com/dedicated
operator: Equal
value: scyllaclusters
kubectl -n=scylla-operator apply --server-side -f=https://raw.githubusercontent.com/scylladb/scylla-operator/master/examples/generic/nodeconfig-alpha.yaml
Having applied the NodeConfig manifest, wait for it to apply changes to the selected Kubernetes nodes:
kubectl wait --timeout=10m --for='condition=Progressing=False' nodeconfigs.scylla.scylladb.com/scylladb-nodepool-1
kubectl wait --timeout=10m --for='condition=Degraded=False' nodeconfigs.scylla.scylladb.com/scylladb-nodepool-1
kubectl wait --timeout=10m --for='condition=Available=True' nodeconfigs.scylla.scylladb.com/scylladb-nodepool-1
Install Local CSI Driver¶
Local CSI Driver dynamically provisions PersistentVolumes on local storage configured on the nodes using the NodeConfig resource.
To install Local CSI Driver in a Red Hat OpenShift cluster, run the following command:
kubectl -n=local-csi-driver apply --server-side -f=https://raw.githubusercontent.com/scylladb/scylla-operator/master/examples/common/local-volume-provisioner/local-csi-driver/{00_clusterrole_def,00_clusterrole_def_openshift,00_clusterrole,00_namespace,00_scylladb-local-xfs.storageclass,10_csidriver,10_serviceaccount,20_clusterrolebinding,50_daemonset}.yaml
Having applied the manifests, wait for the Local CSI Driver DaemonSet to be deployed:
kubectl -n=local-csi-driver rollout status --timeout=10m daemonset.apps/local-csi-driver
Install ScyllaDB Manager¶
ScyllaDB Manager enables you to schedule second-day operations tasks, such as backups and repairs.
Run the following command to install a production-ready ScyllaDB Manager deployment:
Warning
ScyllaDB Manager must run in a reserved scylla-manager namespace. It is not currently possible to use a different namespace for ScyllaDB Manager deployment.
kubectl -n=scylla-manager apply --server-side -f=https://raw.githubusercontent.com/scylladb/scylla-operator/master/deploy/manager-prod.yaml
Having applied the manifest, wait for ScyllaDB Manager to deploy:
kubectl -n=scylla-manager rollout status --timeout=10m deployment.apps/scylla-manager
Next steps¶
Deploy a ScyllaDB cluster by following the ScyllaCluster deployment guide.
To set up ScyllaDB Monitoring, refer to Setting up ScyllaDB Monitoring on OpenShift. Visit the ScyllaDB Monitoring overview for more information about the monitoring stack.