Installing License Service without Operator Lifecycle Manager (OLM)
Learn how to install License Service without the Operator Lifecycle Manager (OLM).
Complete the following procedure to install License Service on a system that does not have the Operator Lifecycle Manager (OLM) deployed.
Prerequisites
Complete the installation on a host that meets the following criteria:
- Linux or macOS operating system (or Windows with Linux Bash Shell, for example from WSL).
- Docker and Kubernetes CLI installed.
- Internet access.
- Access to your cluster with Kubernetes config.
See Supported platforms and hardware requirements before you install License Service to check the installation requirements.
Installation
Complete the following steps to create the required resources.
-
Run the following command to create the
ibm-licensing
namespace for installing the operator.export licensing_namespace=ibm-licensing kubectl create namespace ${licensing_namespace}
See the following notes:
-
The
ibm-licensing
namespace is the default namespace of License Service. If you need to install License Service in a custom namespace for your cluster, replaceibm-licensing
with your custom namespace. -
For OpenShift cluster, check whether License Service is installed in
cs-control
oribm-common-services
namespace of the cluster to prevent the multiple License Service instance. If License Service is installed, you can upgrade License Service to the latest version. If you install multiple License Service in the same namespace, an incorrect license usage report is generated.
-
-
Set the context to create the resources.
-
For Kubernetes:
current_context=$(kubectl config current-context) kubectl config set-context ${current_context} --namespace=${licensing_namespace}
-
For OpenShift Container Platform:
oc project ${licensing_namespace}
-
-
Use
git clone
.export operator_release_version=latest-4.x git clone -b ${operator_release_version} https://github.com/IBM/ibm-licensing-operator.git cd ibm-licensing-operator/
-
Switch namespaces in role-based access control (RBAC) if you need to install License Service in a different namespace than
ibm-licensing
:-
For LINUX users:
if [ "${licensing_namespace}" != "" ] && [ "${licensing_namespace}" != "ibm-licensing" ]; then sed -i 's|namespace: ibm-licensing|namespace: '"${licensing_namespace}"'|g' config/rbac/*.yaml fi
-
For MAC users:
if [ "${licensing_namespace}" != "" ] && [ "${licensing_namespace}" != "ibm-licensing" ]; then sed -i '' 's|namespace: ibm-licensing|namespace: '"${licensing_namespace}"'|g' config/rbac/*.yaml fi
-
-
Apply RBAC roles and custom resource definition (CRD):
# To add CRD: kubectl apply -f config/crd/bases/operator.ibm.com_ibmlicensings.yaml kubectl apply -f config/crd/bases/operator.ibm.com_ibmlicensingmetadatas.yaml kubectl apply -f config/crd/bases/operator.ibm.com_ibmlicensingdefinitions.yaml kubectl apply -f config/crd/bases/operator.ibm.com_ibmlicensingquerysources.yaml # To add RBAC: kubectl apply -f config/rbac/role.yaml kubectl apply -f config/rbac/role_operands.yaml kubectl apply -f config/rbac/service_account.yaml kubectl apply -f config/rbac/role_binding.yaml
-
Modify the
operator.yaml
image based on tags.-
For Linux:
sed -i "s/annotations\['olm.targetNamespaces'\]/namespace/g" config/manager/manager.yaml kubectl apply -f config/manager/manager.yaml
-
For MAC:
sed -i "" "s/annotations\['olm.targetNamespaces'\]/namespace/g" config/manager/manager.yaml kubectl apply -f config/manager/manager.yaml
-
The Operator for IBM License Service is created and only responsible for watching over the configuration and managing resources of the IBM License Service.
Configuring ingress
This step is required only if you installed License Service on IBM Cloud Kubernetes Services (IKS) or Amazon Elastic Kubernetes Service (EKS). After you complete the installation, configure ingress before you proceed to verification. For detailed instructions, see Configuring ingress.
If you installed License Service on OpenShift Container Platform, proceed to verification.
Verification
To check whether License Service components are properly installed and running, see Checking License Service components.