Red Hat OpenShift is an implementation of Kubernetes that includes a number of additional enterprise functions and capabilities to help automate the operation of Kubernetes applications. The Operator Lifecycle Manager (OLM) is one such feature.
You can install and run VoltDB databases on OpenShift the same way you do on other Kubernetes platforms — using Helm to install and run both the Volt operator and the database servers. However, you can also install Volt natively using the OpenShift web console and enabling OLM to install and manage the Volt operator the same way you would other OpenShift applications.
The Operator Lifecycle Manager (OLM) is a management framework available in Red Hat OpenShift. Operators, such as the Volt Operator, are native Kubernetes applications that manage the individual services running on a Kubernetes cluster. OLM manages the operators for multiple services — automating the startup, configuration, and running of the operators — including updating the operators as needed. By using OLM to manage the operators, system administrators can manage all of the applications and services on a Kubernetes instance from within the OpenShift web console, also known as the Operator Hub.
Normally, when running VoltDB on a standard Kubernetes instance, the Volt Helm chart manages the startup and shutdown of both the operator and its associated database servers. To add Volt as an application available in the OpenShift web console, you need to let OLM manage the Volt Operator. First, you must add the Volt Operator to the OpenShift CatalogSource. Then you can install it with OLM through the OpenShift Operator Hub. Once the Volt Operator is under the control of OLM, you can start and stop VoltDB clusters using Helm, explicitly telling Helm not to start or stop the operator. The following sections explain how to:
Add the Volt Operator to the OpenShift OperatorHub
Install and configure the Volt Operator and its associated pods from the Operator Hub within the OpenShift web console
Start and stop VoltDB clusters separately using Helm
OLM does not have a user interface of its own. It takes effect when you install applications through the Operator Hub on the OpenShift web console. So to have OLM manage a Kubernetes operator you must first add the operator to the OpenShift CatalogSource so it becomes available in the web console. To do this you add a catalog that describes the operator, including the location of the image and various aspects of its operation. Volt provides both the operator image and a catalog describing it in a private repository located on docker.io.
So the first step for adding Volt to the OpenShift web console is to provide the credentials for accessing the Volt repository to the global pull secret. You do this using the oc get, set, and registry login commands, which require cluster-admin privileges. Once you do this, wait until the oc wait mcp --for=condition=Updated=True command returns before continuing to the next step.
$ oc get secret/pull-secret -n openshift-config \
--template='{{index .data ".dockerconfigjson" | base64decode}}' > pull-secret.json
$ oc registry login --registry=docker.io \
--auth-basic='{username}:{token}' --to=pull-secret.json
$ oc set data secret/pull-secret -n openshift-config \
--from-file=.dockerconfigjson=pull-secret.json
$ oc wait mcp --all --for=condition=Updated=True --timeout=15mOnce you provide access, you can add the Volt Operator catalog to the OpenShift CatalogSource by constructing and applying a manifest with the oc apply command. After applying the manifest, be sure to wait a few minutes to allow the Operator Hub to pick up the new entry. You can use the oc wait command to do this:
$ cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: volt-catalog
namespace: openshift-marketplace
spec:
sourceType: grpc
image: docker.io/voltdb/voltdb-operator-catalog:4.0.0
displayName: VoltDB Operator
publisher: Volt Active Data
updateStrategy:
registryPoll:
interval: 30m
EOF
$ oc wait catalogsource/volt-catalog -n openshift-marketplace \
--for=jsonpath='{.status.connectionState.lastObservedState}'=READY \
--timeout=5mYou can verify that Volt has been added using the oc get packagemanifest command:
$ oc get packagemanifest voltdb-operator \
-n openshift-marketplace
Documentation