Skip to main contentCloud Pak Deployer Monitor

Deployment of Platform Global Connections using the IBM Cloud Pak Deployer

Configure authentication secrets in the vault used by the Cloud Pak Deployer

By default the CP4D monitors codes are pulled from this public Github repository and the CP4D monitors images are pushed into the internal image registry of OpenShift. For this setup no credentials are required to either build the monitor images or push them into the internal OpenShift registry.

Optionally, if the Monitor Github repo is cloned into a private Github registry which does require authentication, a vault secret must be created which is used to authenticate to the private Github repo. For example:

More information can be found here: IBM Cloud Pak Deployer - Monitoring

export STATUS_DIR=<Status directory of the Cloud Pak Deployer>
export CONFIG_DIR=<Configuration folder used by the Cloud Pak Deployer>
# Monitor Source Repo secret
./cp-deploy.sh vault set --vault-secret monitors_source_repo_secret --vault-secret-value ThisIsMyGitAccessToken!

Optionally, if the build monitor image should be pushed to an external image registry which does require authentication (so not use the internal OpenShift image registry), a vault secret must be created which is used to authenticate to the external image registry. For example:

export STATUS_DIR=<Status directory of the Cloud Pak Deployer>
export CONFIG_DIR=<Configuration folder used by the Cloud Pak Deployer>
# External Image Registry Credentials
./cp-deploy.sh vault set --vault-secret default_monitor_target_cr_user_secret --vault-secret-value TargetCRUserName
./cp-deploy.sh vault set --vault-secret monitors_target_cr_password --vault-secret-value TargetCRPassword

Validate the created secrets are available:

export STATUS_DIR=<Status directory of the Cloud Pak Deployer>
export CONFIG_DIR=<Configuration folder used by the Cloud Pak Deployer>
# List all secrets
./cp-deploy.sh vault list
# Optionally retrieve the values to confirm the correct values are loaded
./cp-deploy.sh vault get --vault-secret monitors_source_repo_secret

Add OpenShift Monitoring to the Cloud Pak Deployer configuration

Deploying monitors requires the OpenShift Monitoring to be enabled on the OpenShift cluster. If not already part of the Cloud Pak Deployer configuration, add the openshift_monitoring configuration. This can be added to an existing yaml configuration file, or a new yaml file can be added to the configuration.

openshift_monitoring:
- openshift_cluster_name: <OC_CLUSTER_NAME>
user_workload: enabled
# Optional properties to persist OpenShift Monitoring
pvc_storage_class: ibmc-vpc-block-retain-general-purpose
pvc_storage_size_gb: 100
# Optional Remote Rewrite
#remote_rewrite_url: http://remote_rewrite_url:<port>/write
# Optional install local instance of Grafana on OpenShift
PropertyDescriptionMandatoryAllowed values
openshift_cluster_nameThe name of the openshift cluster setYes
user_workloadFlag to enable or disable OpenShift User workload monitoringYesenabled, disabled
pvc_storage_classStorage class used to persist the OpenShift monitoringNo
pvc_storage_size_gbSize of the Persistent Volume Claim for storing OpenShift monitoringNo
remote_rewrite_urlPush the Prometheus metrics to a remote systemNo
grafana_operatorInstall the Red Hat Community Grafana OperatorNoenabled, disabled
grafana_projectTarget OpenShift Project for the deployment of GrafanaNo

Add the monitor to the Cloud Pak Deployer configuration

Add the following section to the Cloud Pak Deployer configuration, or add the monitor to an existing monitors section.

The cp4d_monitors can be added to an existing configuration yaml file in the config folder, or create a seperate yaml file:

  • OC_PROJECT: The Project name in which Cloud Pak for Data is deployed where the monitors will be added
  • OC_CUSTER_NAME: The name of the OpenShift Cluster
# List of cp4d_monitors
cp4d_monitors:
- name: cp4d-monitor-set-1
cp4d_instance: <OC_PROJECT>
openshift_cluster_name: <OC_CLUSTER_NAME>
default_monitor_source_repo: https://github.com/IBM/cp4d-monitors
#default_monitor_source_token_secret: monitors_source_repo_secret
#Optional target Container Registry
#default_monitor_target_cr: de.icr.io/monitorrepo

Run the Cloud Pak Deployer

Run the Cloud Pak Deployer to implement the changes and deploy the monitors.

export STATUS_DIR=<Status directory of the Cloud Pak Deployer>
export CONFIG_DIR=<Configuration folder used by the Cloud Pak Deployer>
./cp-deploy.sh env apply