Deploying the IBM Cloud Pak for Multicloud Management - Monitoring Data Collector image

To install the IBM Cloud Pak® for Multicloud Management - Monitoring Data Collector, you must deploy the Operator Docker image on Red Hat® OpenShift® Container Platform.

Procedure

  1. Log in to Red Hat OpenShift Container Platform where IBM Cloud Pak for Multicloud Management - Monitoring services are installed and get the namespace details. Follow the command:
    oc login -u ocadmin
    Authentication required for https://<myserver.ibm.com>:8443 (openshift)
    Username: ocadmin
    Password:
    Login successful.
    
    You have access to the following projects and can switch between them with 'oc project <projectname>':
    
        cert-manager
        default
        glusterfs
        ibmcom
        icam-ns-1-1
        icam-ns-2-1
        icam-ns-3-1
        kube-public
        kube-service-catalog
      * kube-system
        local-cluster
        management-infra
        openshift
        openshift-ansible-service-broker
        openshift-console
        openshift-infra
        openshift-logging
        openshift-metrics-server
        openshift-monitoring
        openshift-node
        openshift-sdn
        openshift-template-service-broker
        openshift-web-console
        services
        sysdig-agent
        sysdig-navmenu
    
    For example, management-monitoring is the namespace where the IBM Cloud Pak for Multicloud Management - Monitoring services are available.
  2. Follow these commands to create a secret for IBM Cloud Pak for Multicloud Management - Monitoring Data Collector:
    oc create secret docker-registry <secret_name>-secret \
        --docker-server=<Registry_Server> \
        --docker-username=<Registry_Server_User> \
        --docker-password=<Registry_Server_User_Password> \
        --docker-email=<Registry_Server_User_Email>
    Where,
    • <secret_name> is the name of your choice unique to the chosen namespace.
    • <Registry_Server> is the IP address or hostname of registry server.
    • <Registry_Server_User> is the username who has access to pull images from <Registry_Server>.
    • <Registry_Server_User_Password> is the password for <Registry_Server_User>.
    • <Registry_Server_User_Email> is the email for <Registry_Server_User>.
    For example,
    oc create secret docker-registry icamsvcdc-regcred \
        --docker-server=my.reg.io \
        --docker-username=dockerUser \
        --docker-password=dockerUserPassword@123 \
        --docker-email=sample_email@example.com
  3. Update the user-defined secret name in the following configuration files:
    • /deploy/operator.yaml
      Update the line with the secret.
      imagePullSecrets:
              - name: icamsvcdc-regcred
    • /deploy/crds/icamsvcdc.ibm.com_v1_icamsvcdc_cr.yaml
      Update the line with the secret.
      icamsvcdcsecret: icamsvcdc-regcred
  4. Update the registry name and image name in the following configuration files:
    1. In the /deploy/crds/icamsvcdc.ibm.com_v1_icamsvcdc_cr.yaml file, enter the IBM partner registry and image name.
      • IBM partner registry:
        image:
            registry: cp.icr.io
            pullpolicy: Always
      • Image name:
        icamsvcdc:
                   replica_count: 1
                   appname: icamsvcdc
                   image: cp/icabi/icabi-icam-dc
                   imagetag: 1.1.7.0
    2. Enter the registry name for the operator image in the /deploy/operator.yaml file. Image name value for data collector operator is formed by using <registry_url>/<namespace>/<image_name>:<image_tag>.
      containers:
              - name: icamsvcdc-operator
                # Replace this with the built image name
                image: "cp.icr.io/cp/icabi/icabi-icam-operator:1.1.7.0"
                imagePullPolicy: "Always"
  5. Deploy the IBM Cloud Pak for Multicloud Management - Monitoring Data Collector Operator docker image by using the following command:
    make install
    The following output is seen:
    make install
    make install
    ....... Creating namespace .......
    kubectl create namespace management-monitoring
    Error from server (AlreadyExists): namespaces "management-monitoring" already exists
    make: [Makefile:9: install] Error 1 (ignored)
    ....... Applying CRDs .......
    kubectl apply -f deploy/crds/icamsvcdc.ibm.com_icamsvcdcs_crd.yaml -n management-monitoring
    Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
    customresourcedefinition.apiextensions.k8s.io/icamsvcdcs.icamsvcdc.ibm.com created
    ....... Applying Rules and Service Account .......
    kubectl apply -f deploy/service_account.yaml -n management-monitoring
    serviceaccount/icamsvcdc-operator created
    kubectl apply -f deploy/role.yaml -n management-monitoring
    role.rbac.authorization.k8s.io/icamsvcdc-operator created
    kubectl apply -f deploy/role_binding.yaml -n management-monitoring
    rolebinding.rbac.authorization.k8s.io/icamsvcdc-operator created
    ....... Applying Operator .......
    kubectl apply -f deploy/operator.yaml -n management-monitoring
    deployment.apps/icamsvcdc-operator created
    #@echo ....... Creating the CRs .......
    kubectl apply -f deploy/crds/icamsvcdc.ibm.com_v1_icamsvcdc_cr.yaml -n management-monitoring
    icamsvcdc.icamsvcdc.ibm.com/icamsvcdc created
  6. Check IBM Cloud Pak for Multicloud Management - Monitoring Data Collector Pod with the command:
    oc get pods | grep icam
    icamsvcdc-datacollector-65994b6447-4zmtb          0/1     ContainerCreating   0          16s
    icamsvcdc-operator-6bb497f69b-n82sh               1/1     Running             0          84s
    You can also use kubectl describe pod icamsvcdc-datacollector-65994b6447-4zmtb command to see more details about the Pod.
  7. Get the Route for IBM Cloud Pak for Multicloud Management - Monitoring Data Collector with the following command:
    oc get route | grep icam
    icamsvcdc-route  icamsvcdc-route-management-<myserver>.ibm.com
    icamsvcdc-service            9050             passthrough     None 
    
    icamsvcdc-route icamsvcdc-route-management-<myserver>.ibm.com is the URL that can be used in the URL field in creating the Connector Source for Monitoring.
  8. To uninstall the IBM Cloud Pak for Multicloud Management - Monitoring Data Collector from management-monitoring namespace, run the following command:
    make uninstall
    The following output is seen:
    ....... Uninstalling .......
    ....... Deleting CRs.......
    kubectl delete -f deploy/crds/icamsvcdc.ibm.com_v1_icamsvcdc_cr.yaml -n management-monitoring
    icamsvcdc.icamsvcdc.ibm.com "icamsvcdc" deleted
    ....... Deleting Operator ......
    kubectl delete -f deploy/operator.yaml -n management-monitoring
    deployment.apps "icamsvcdc-operator" deleted
    ....... Deleting Rules and Service Account .......
    kubectl delete -f deploy/role_binding.yaml -n management-monitoring
    rolebinding.rbac.authorization.k8s.io "icamsvcdc-operator" deleted
    kubectl delete -f deploy/role.yaml -n management-monitoring
    role.rbac.authorization.k8s.io "icamsvcdc-operator" deleted
    kubectl delete -f deploy/service_account.yaml -n management-monitoring
    serviceaccount "icamsvcdc-operator" deleted
    ....... Deleting CRDs.......
    kubectl delete -f deploy/crds/icamsvcdc.ibm.com_icamsvcdcs_crd.yaml -n management-monitoring
    warning: deleting cluster-scoped resources, not scoped to the provided namespace
    Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
    customresourcedefinition.apiextensions.k8s.io "icamsvcdcs.icamsvcdc.ibm.com" deleted
    # @echo ....... Deleting namespace management-monitoring.......
    #- kubectl delete namespace management-monitoring

What to do next

Configuring IBM Cloud Pak for Multicloud Management - Monitoring Connector Sources