Install the Serverless Logic Operator

This guide describes how to install the Serverless Logic Operator in a Kubernetes or OpenShift cluster. The operator is in an early development stage (community only) and has been tested on OpenShift 4.12+ , Kubernetes 1.26+ , and Minikube.

Prerequisites

OpenShift Serverless Logic Operator OpenShift installation

Install

To install the operator on OpenShift refer to the "Adding Operators to a cluster" from the OpenShift’s documentation.

When searching for the operator in the Filter by keyword field, use the word Serverless Logic. If you’re installing from the CLI, the operator’s catalog name is logic-rhel8-operator.

Uninstall

To remove the operator on OpenShift refer to the "Deleting Operators from a cluster" from the OpenShift’s documentation.

OpenShift Serverless Logic Operator Kubernetes installation

Install

To install the operator on Kubernetes refer to the "How to install an Operator from OperatorHub.io" from the OperatorHub’s documentation.

Uninstall

To remove the operator on Kubernetes follow the document "Uninstall your operator" from the OLM’s documentation.

When searching for the subscription to remove, use the word my-sonataflow-operator.

OpenShift Serverless Logic Operator Manual Installation

If you’re running on Kubernetes or OpenShift, it is highly recommended to install the operator from the OperatorHub or OpenShift Console instead since the installation is managed by OLM. Use this method only if you need a snapshot version or you’re running locally on Minikube or KIND.

Prerequisites

Install

To install the OpenShift Serverless Logic Operator, you can use the following command:

Install OpenShift Serverless Logic Operator on Kubernetes
kubectl create -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator//1.35.0/operator.yaml

Replace <version> with specific version if needed:

kubectl create -f {kogito_operator_repository_rawcontent_url}/<version>/operator.yaml

<version> could be 1.35.0 for instance.

You can follow the deployment of the OpenShift Serverless Logic Operator:

Watch the OpenShift Serverless Logic Operator pod
kubectl get pod -n openshift-serverless-logic --watch

A successful installation should have an output like this:

Successful Installation Output
NAME                                                     READY   STATUS              RESTARTS   AGE
{operator_controller_manager_deployment_name}-948547ffd-sr2j2   0/2     ContainerCreating   0          6s
{operator_controller_manager_deployment_name}-948547ffd-sr2j2   1/2     Running             0          7s
{operator_controller_manager_deployment_name}-948547ffd-sr2j2   2/2     Running             0          20s

You can also follow the operator’s log:

Watch the OpenShift Serverless Logic Operator pod logs
kubectl logs deployment/logic-operator-rhel8-controller-manager -n openshift-serverless-logic -f

Once the operator is running, it will watch for instances of the OpenShift Serverless Logic Custom Resources (CR). Using CRs, you can configure your OpenShift Serverless Logic environment and define Workflows and builds to be handled by the operator.

Uninstall

To uninstall the Serverless Logic Operator, first, you must delete all the OpenShift Serverless Logic Custom Resources (CR) instances managed by it. Once the CRs are deleted, you can then delete all resources created during the operator installation.

To delete every CR managed by the operator in your cluster, you can run these series of commands:

Delete all OpenShift Serverless Logic CR instances
kubectl delete --all workflow --all-namespaces
kubectl delete --all sonataflowbuild --all-namespaces
kubectl delete --all sonataflowplatform --all-namespaces

Alternatively, if you created everything under the same Namespace, deleting the given namespace has the same outcome.

To uninstall the correct version of the operator, first you must get the current version by running:

Getting the operator version
kubectl get deployment logic-operator-rhel8-controller-manager -n openshift-serverless-logic -o jsonpath="{.spec.template.spec.containers[?(@.name=='manager')].image}"

registry.redhat.io/openshift-serverless-1/logic-rhel8-operator:1.35.0
Uninstalling the operator
kubectl delete -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator//<version>/operator.yaml

The URL should be the same as the one you used when installing the operator.

Found an issue?

If you find an issue or any misleading information, please feel free to report it here. We really appreciate it!