Offline installation
This version of documentation is no longer updated. For the latest information, see the following links:
- Continuous Delivery (CD) documentation
- Support Cycle-2 (SC-2) documentation
Learn how to install License Service with no Internet connection.
The support for this version of License Service is being sunset by the end of 2024. Install the newest License Service version. To learn how to install the newest version of License Service, see Installing License Service.
Prerequisites
- A private Docker image registry where you can push the images using
Dockerand from where your cluster can pull images. For more information, see Docker registry in Docker product documentation. - Complete the offline installation on a host that meets the following criteria:
- Has Linux or macOS operating system (or Windows with Linux Bash Shell, for example, from WSL).
- Has Docker and Kubernetes CLI installed.
- Has internet access.
- Has access to your offline cluster via Kubernetes config.
Before installation, see Preparing for installation to check the installation requirements.
Installation
Note: The following procedure guides you through the installation of License Service. It does not cover the installation of License Service Reporter, which is not available without an IBM Cloud Pak® on OpenShift Container Platform.
-
Clone the
ibm-licensing-operatorGitHub repository by usinggit clone. Run the following command:export operator_release_version=latest git clone -b ${operator_release_version} https://github.com/IBM/ibm-licensing-operator.git cd ibm-licensing-operator/Note: If you cannot use
git clone, download the sources, extract, and enter ibm-licensing-operator directory. To download theibm-licensing-operatorsource, see Sources. -
Prepare Docker images.
-
Run the following command to prepare your Docker images:
export my_docker_registry=<YOUR PRIVATE REGISTRY IMAGE PREFIX HERE; for example: "my.registry:5000" or "my.private.registry.example.com"> export operator_version=$(git describe --tags --abbrev=0 | tr -d v) export operand_version=$(git describe --tags --abbrev=0 | tr -d v) -
Pull the required images with the following command:
docker pull icr.io/cpopen/ibm-licensing-operator:${operator_version} docker pull icr.io/cpopen/cpfs/ibm-licensing:${operand_version} -
Before pushing the images to your private registry, make sure that you are logged in. Use the following command:
docker login ${my_docker_registry} -
Tag the images with your registry prefix and push with the following commands:
docker tag icr.io/cpopen/ibm-licensing-operator:${operator_version} ${my_docker_registry}/ibm-licensing-operator:${operator_version} docker push ${my_docker_registry}/ibm-licensing-operator:${operator_version} docker tag icr.io/cpopen/cpfs/ibm-licensing:${operand_version} ${my_docker_registry}/ibm-licensing:${operand_version} docker push ${my_docker_registry}/ibm-licensing:${operand_version}
-
-
Create the required resources.
-
Run the following command on a machine where you have access to your cluster and can use
kubectl.export my_docker_registry=<SAME REGISTRY AS BEFORE> -
Run the following command to set the
licensing_namespacevariable and create the namespace for installing the operator.Note: You can install the operator in the
ibm-common-servicesnamespace or other custom namespace.export licensing_namespace=<installation_namespace> kubectl create namespace ${licensing_namespace}where
<installation_namespace>is the name of the namespace where you want to install the operator.For example:
export licensing_namespace=ibm-common-services kubectl create namespace ${licensing_namespace} -
If your cluster needs the access token to your private Docker registry, create the secret in the dedicated installation namespace:
-
For LINUX users:
kubectl create secret -n ${licensing_namespace} docker-registry my-registry-token --docker-server=${my_docker_registry} --docker-username=<YOUR_REGISTRY_USERNAME> --docker-password=<YOUR_REGISTRY_TOKEN> --docker-email=<YOUR_REGISTRY_EMAIL, probably can be same as username> sed -i -e "5s/^//p; 5s/^.*/imagePullSecrets:\n- name: my-registry-token/" config/rbac/service_account.yaml -
For MAC users:
kubectl create secret -n ${licensing_namespace} docker-registry my-registry-token --docker-server=${my_docker_registry} --docker-username=<YOUR_REGISTRY_USERNAME> --docker-password=<YOUR_REGISTRY_TOKEN> --docker-email=<YOUR_REGISTRY_EMAIL, probably can be same as username> sed -i '' -e "5s/^//p; 5s/^.*/imagePullSecrets:\n- name: my-registry-token/" config/rbac/service_account.yaml
-
-
Set the context so that the resources are created in a dedicated installation namespace:
kubectl config set-context --current --namespace=${licensing_namespace} -
Apply RBAC roles, CRD and
operator.yaml:- For LINUX users:
ESCAPED_REPLACE=$(echo ${my_docker_registry} | sed -e 's/[\/&]/\\&/g') sed -i 's/icr\.io\/cpopen\/cpfs/'"${ESCAPED_REPLACE}"'/g' config/manager/manager.yaml sed -i 's/icr\.io\/cpopen/'"${ESCAPED_REPLACE}"'/g' config/manager/manager.yaml sed -i "s/annotations\['olm.targetNamespaces'\]/namespace/g" config/manager/manager.yaml if [ "${licensing_namespace}" != "" ] && [ "${licensing_namespace}" != "ibm-common-services" ]; then sed -i 's|ibm-common-services|'"${licensing_namespace}"'|g' config/rbac/*.yaml fi # add CRD: kubectl apply -f config/crd/bases/operator.ibm.com_ibmlicensings.yaml kubectl apply -f config/crd/bases/operator.ibm.com_ibmlicenseservicereporters.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 # 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 # add operator: kubectl apply -f config/manager/manager.yaml- For MAC users:
ESCAPED_REPLACE=$(echo ${my_docker_registry} | sed -e 's/[\/&]/\\&/g') sed -i "" 's/icr\.io\/cpopen\/cpfs/'"${ESCAPED_REPLACE}"'/g' config/manager/manager.yaml sed -i "" 's/icr\.io\/cpopen/'"${ESCAPED_REPLACE}"'/g' config/manager/manager.yaml sed -i "" "s/annotations\['olm.targetNamespaces'\]/namespace/g" config/manager/manager.yaml if [ "${licensing_namespace}" != "" ] && [ "${licensing_namespace}" != "ibm-common-services" ]; then sed -i "" 's|ibm-common-services|'"${licensing_namespace}"'|g' config/rbac/*.yaml fi # add CRD: kubectl apply -f config/crd/bases/operator.ibm.com_ibmlicensings.yaml kubectl apply -f config/crd/bases/operator.ibm.com_ibmlicenseservicereporters.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 # 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 # add operator: kubectl apply -f config/manager/manager.yaml
-
Results: You created the Operator for IBM Licensing Service. The Operator is only responsible for watching over the configuration and managing resources used by IBM Licensing Service.
Creating an IBM Licensing instance
-
To create the IBM Licensing instance, run the following command:
cat <<EOF | kubectl apply -f - apiVersion: operator.ibm.com/v1alpha1 kind: IBMLicensing metadata: name: instance spec: datasource: datacollector httpsEnable: true EOF -
If you created the secret that is needed to access the images, add it to the configuration.
apiVersion: operator.ibm.com/v1alpha1 kind: IBMLicensing metadata: name: instance spec: ... imagePullSecrets: # <-- this needs to be added - my-registry-token # ...For example:
cat <<EOF | kubectl apply -f - apiVersion: operator.ibm.com/v1alpha1 kind: IBMLicensing metadata: name: instance spec: apiSecretToken: ibm-licensing-token datasource: datacollector httpsEnable: true imagePullSecrets: # <-- this needs to be added - my-registry-token # <-- this needs to be added with your secret name EOF
Results: Installation is complete and License Service is running in your cluster.
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, check if License Service components are running. For more information, see Checking License Service components.