Installing IBM Cloud Pak foundational services by using the CLI
You can use the command-line interface (CLI) to install IBM Cloud Pak foundational services in your cluster.
The IBM Cloud Pak foundational services operator installs IBM Cloud Pak foundational services and manages the lifecycle of all foundational services operators. For more information about the service operator names and versions, see Foundational services operators and versions
Note: If the IBM Cloud Pak foundational services that you are using are included
as part of an IBM Cloud Pak
deployment, you do not have to manually deploy the <span
data-key-file="/home/jenkins/workspace/workspace/dita-converter/git_repo/conrefs.yml"
data-conkeyref="conrefs/keyword.cs" data-variable="keyword.cs"
class="md-conref">keyword.cs</span> operator. The
<span
data-key-file="/home/jenkins/workspace/workspace/dita-converter/git_repo/conrefs.yml"
data-conkeyref="conrefs/keyword.cs" data-variable="keyword.cs"
class="md-conref">keyword.cs</span> is deployed
into the same namespace as your IBM Cloud Pak deployment by
default.
Installing the IBM Common Service Operator
Ensure that your IBM Cloud Pak namespace exists in your cluster.
The namespace is needed for the <span
data-key-file="/home/jenkins/workspace/workspace/dita-converter/git_repo/conrefs.yml"
data-conkeyref="conrefs/keyword.cs" data-variable="keyword.cs"
class="md-conref">keyword.cs</span> operator.
Usually, the <span
data-key-file="/home/jenkins/workspace/workspace/dita-converter/git_repo/conrefs.yml"
data-conkeyref="conrefs/keyword.cs" data-variable="keyword.cs"
class="md-conref">keyword.cs</span> operator is automatically installed in your
IBM Cloud Pak namespace when you install your IBM Cloud Pak. If you see the operator in your IBM Cloud Pak namespace, you do not need to manually install it. The
Operand Deployment Lifecycle Manager and the foundational services are then, by default, installed in the <span
data-key-file="/home/jenkins/workspace/workspace/dita-converter/git_repo/conrefs.yml"
data-conkeyref="conrefs/keyword.cs_ns" data-variable="keyword.cs_ns"
class="md-conref">keyword.cs_ns</span> namespace.
- If your IBM Cloud Pak namespace exists in your cluster, and
you installed your IBM Cloud Pak but you don't see the
<span data-key-file="/home/jenkins/workspace/workspace/dita-converter/git_repo/conrefs.yml" data-conkeyref="conrefs/keyword.cs" data-variable="keyword.cs" class="md-conref">keyword.cs</span>operator in your IBM Cloud Pak namespace, then you need to create only the subscription for the<span data-key-file="/home/jenkins/workspace/workspace/dita-converter/git_repo/conrefs.yml" data-conkeyref="conrefs/keyword.cs" data-variable="keyword.cs" class="md-conref">keyword.cs</span>operator. You do not need to create a namespace and OperatorGroup. - If your IBM Cloud Pak namespace does not exist in your
cluster, then you need to create a namespace for your IBM Cloud Pak, and a OperatorGroup and subscription for the
<span data-key-file="/home/jenkins/workspace/workspace/dita-converter/git_repo/conrefs.yml" data-conkeyref="conrefs/keyword.cs" data-variable="keyword.cs" class="md-conref">keyword.cs</span>operator. In theSubscriptiondefinition, specify your IBM Cloud Pak namespace as thenamespaceparameter value.
See the following notes:
-
You can set the approval strategy to either
AutomaticorManual, as required. By default, the approval strategy is set toAutomatic, which automatically installs or upgrades the operator when a new version is available. If you set the strategy toManual, the operator is not automatically installed or upgraded. Instead, you get an install plan that needs to be manually approved before an upgrade. -
When you set the
InstallPlanApprovalfor the IBM Cloud Pak foundational services operator, it applies to all foundational services installed with this operator. -
If you install the IBM Cloud Pak foundational services operator in a namespace where another operator is installed that already has the
installPlanApproval: Manualset in its subscription, then the IBM Cloud Pak foundational services operator inherits this setting. The approval plan is set toManualand IBM Cloud Pak foundational services operator cannot be automatically installed or upgraded. For more information, see Approval strategy.
Complete these steps to install the resources:
-
Create a YAML file named
def.yamlwith the resources definitions that you need.apiVersion: v1 kind: Namespace metadata: name: <your IBM Cloud Pak namespace> --- apiVersion: operators.coreos.com/v1alpha2 kind: OperatorGroup metadata: name: operatorgroup namespace: <your IBM Cloud Pak namespace> spec: targetNamespaces: - <your IBM Cloud Pak namespace> --- apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: ibm-common-service-operator namespace: <your IBM Cloud Pak namespace> spec: channel: v4.6 installPlanApproval: Automatic name: ibm-common-service-operator source: <your-catalog-source> sourceNamespace: <your-catalog-source-namespace> -
Create the resources that you specified in the definition file.
oc apply -f def.yamlFollowing is a sample output:
namespace/cloud-pak-1 created operatorgroup.operators.coreos.com/operatorgroup created subscription.operators.coreos.com/ibm-common-service-operator created -
If you are using License Service, see Installing License Service.
-
If you are using License Service Reporter, see Installing License Service Reporter with the CLI.
-
If you are using the foundational services certificate manager, see Install the IBM Cert Manager Operator.
You can verify the status of the operators by running the following commands:
oc -n <operator-namespace> get csv
Following is a sample command and output:
oc -n <your IBM Cloud Pak namespace> get csv
NAME DISPLAY VERSION REPLACES PHASE
ibm-common-service-operator.v4.6.16 IBM Cloud Pak foundational services v4.6.16 ibm-common-service-operator.v4.6.17 Succeeded
Verify whether the CustomResourceDefinitions (CRDs) are created.
oc get crd | grep operandrequest
Following is a sample output:
NAME CREATED AT
operandrequests.operator.ibm.com 2020-09-18T10:10:22Z
Setting the hardware profile and accepting the license
-
Hardware profile: Set the hardware requirements profile based on the workloads in your cluster. For more information about the profiles, see Hardware requirements and recommendations for foundational services.
- The default profile is
starterset. You can change the profile tosmall,medium, orlarge, if required. - If you are using the foundational services certificate manager service, see Setting the hardware profile and accepting the license.
- The default profile is
-
License: Accept the license to use foundational services by adding
spec.license.accept: truein thespecsection.
Complete these steps:
- Edit the
common-serviceresource.oc -n <your-foundational-services-namespace> edit commonservice common-service - Update the
spec.sizeparameter to set the hardware profile, and add thespec.license.accept: trueparameter to accept the license.apiVersion: operator.ibm.com/v3 kind: CommonService metadata: name: common-service namespace: <your-foundational-services-namespace> spec: license: accept: true size: starterset
Configuring namespace permissions
For some topologies, you must authorize the foundational services operators to manage service workload across namespaces. For more information, see Authorizing foundational services to perform operations on workloads in a namespace.
Configuring the services
Before you deploy foundational services instance, you can customize the configuration of the foundational services that you are installing.
For more information, see Configuring foundational services .
ibm-im-operator creates
a default cluster administrator by the name cpadmin
during installation. If you already have a user by the name
cpadmin in your cluster, you must set the
defaultAdminUser parameter before you install
foundational services. This
setting is to avoid your cpadmin user from being
removed if you uninstall foundational services later.
For more information about setting this parameter, see Changing the default admin
username.What to do next
You installed the foundational services operators, and now you can apply your entitlement key for online installation. For more information, see Applying your entitlement key for online installation.
If you are using an air-gapped cluster, your entitlement key is already applied as a part of the air-gapped image mirroring process. You do not need to apply your entitlement key again. You can now deploy the foundational services instances. For more information, see Deploying the foundational services instances.