Using a custom hostname (IBM Concert Operate on Red Hat OpenShift)

Learn how to update default routes with a custom hostname for a deployment of IBM Concert Operate or Infrastructure Automation on Red Hat OpenShift.

Note:
  • If you want to use a custom certificate as well as a custom hostname, use the instructions in Using a custom certificate and hostname instead of this procedure.
  • You cannot update the hostname on Linux, the values are hard coded. To use a custom certificate for a deployment of IBM Concert Operate on Linux, use the procedure in Using a custom certificate (IBM Concert Operate on Linux).
  • This procedure only updates the hostnames for the IBM Concert Operate consoles, not the domain. If you also want to change the domain, you must provide a certificate with the fully qualified hostnames and follow the instructions in the Red Hat OpenShift documentation Replacing the default ingress certificate. Otherwise, browsers will display warnings about accessing an untrusted site.

Prerequisites

  • The custom hostnames that you use must be unique, especially within the Red Hat OpenShift cluster.
  • The custom hostnames that you use must be resolvable from inside and outside of the Red Hat OpenShift cluster.

1. Set hostname and environment variables

Export environment variables for your project and the custom hostnames that you want to use.

export PROJECT=<project>
export CUSTOM_HOSTNAME=<custom_hostname>
export CPCONSOLE_HOSTNAME=<custom_cp_hostname>
oc project $PROJECT

Where

  • <project> is the project (namespace) where IBM Concert Operate or Infrastructure Automation is deployed.
  • <custom_hostname> is the custom hostname that you want to use for the IBM Concert Operate homepage. For example, concert-operate.apps.mycluster.ocp.mycompany.com.
  • <custom_cp_hostname> is the custom hostname that you want to use for the authentication console. For example, concert-operate-cpconsole.apps.mycluster.ocp.mycompany.com.

2. Update cp-console route with custom hostname

Run the following command:

INSTALLATION=$(oc get installations.orchestrator.aiops.ibm.com -o jsonpath='{.items[0].metadata.name}')
oc patch commonservice "${INSTALLATION}" --type=merge -p='{"spec": {"services": [{"name": "ibm-im-operator","spec": {"authentication": {"config": {"ingress": {"hostname": "'$CPCONSOLE_HOSTNAME'","secret": "'$CUSTOM_TLS_SECRET'"}}}}}]}}'

3. Update cpd route with custom hostname

Run the following command:

oc patch ZenService/iaf-zen-cpdservice --type merge -p '{"spec":{"zenCustomRoute":{"route_reencrypt":true, "route_host":"'$CUSTOM_HOSTNAME'"}}}'

4. Restart pods

  1. Run the following commands:

    oc delete pod -l component=ibm-nginx
    oc delete pod -l name=ibm-zen-operator
    oc delete pod -l component=usermgmt
    oc delete pod -l app=platform-identity-provider
    
  2. Monitor the progress of the new configuration updates.

    Run the following command:

    watch oc get zenservice iaf-zen-cpdservice -o jsonpath=\''{"Progress: "}{.status.progress}{" "}{.status.progressMessage}{"\n"}'\'

    Wait for about 15 minutes for the system to begin recognizing the updates, and for Progress to be less than 100%. After that, it typically takes another 30–60 minutes for all of the changes to be fully processed. When Progress returns to 100%, all of the changes are complete and you can log in to the IBM Concert Operate or Infrastructure Automation console.

5. Verify routes

Run the following command to verify that your routes are using the new custom hostname.

oc get routes -o=custom-columns=NAME:.metadata.name,HOST:.spec.host

Example output:

NAME                                        HOST
cp-console                                  concert-operate-cpconsole.mycompany.com
cpd                                         concert-operate.mycompany.com
iaf-system-kafka-0                          iaf-system-kafka-0-concert-operate.apps.mycluster.ocp.mycompany.com
iaf-system-kafka-bootstrap                  iaf-system-kafka-bootstrap-concert-operate.apps.mycluster.ocp.mycompany.com
id-mgmt                                     concert-operate-cpconsole.mycompany.com
platform-auth                               concert-operate-cpconsole.mycompany.com
platform-id-auth                            concert-operate-cpconsole.mycompany.com
platform-id-provider                        concert-operate-cpconsole.mycompany.com
platform-login                              concert-operate-cpconsole.mycompany.com
platform-oidc                               concert-operate-cpconsole.mycompany.com
saml-ui-callback                            concert-operate-cpconsole.mycompany.com
social-login-callback                       concert-operate-cpconsole.mycompany.com
whconn-04e8ca21-eb4d-4393--route-991df384   whconn-04e8ca21-eb4d-4393-bd46-3ae1b2367e61-concert-operate.apps.mycluster.ocp.mycompany.com

6. Restart Managed services pods (Managed services users only)

Skip this step if you are not using Managed services .

  1. If you are using Managed services, run the following command to restart the pods:

    oc delete pod -l release=cam
    
  2. When all the pods are up and running, go to the Library and Instances pages in the Infrastructure Automation UI console and check for problems.

  3. If any problem persists, check the cam-tenant-api pod logs. Search the logs for the term apikey in configboot, and verify that a valid key is displayed. If the key is empty, restart the cam-tenant-api pod.

  4. Go to the Service catalog page. If the page shows an error, restart the following two pods:

    oc delete pod -l app=cam-service-library-ui-api
    oc delete pod -l app=cam-service-library-ui
    

If errors persist, contact IBM Support.

7. Refresh ChatOps pods (ChatOps users only)

Skip this step if you are not using ChatOps.

If you are using ChatOps, run the following commands to pass in an updated URL and restart the deployments.

Run the following commands:

oc set env deployment/$(oc get deploy -l app.kubernetes.io/component=chatops-orchestrator -o jsonpath='{.items[*].metadata.name }') ZEN_URL=$CUSTOM_HOSTNAME
oc set env deployment/$(oc get deploy -l app.kubernetes.io/component=chatops-slack-integrator -o jsonpath='{.items[*].metadata.name }') ZEN_URL=$CUSTOM_HOSTNAME
oc set env deployment/$(oc get deploy -l app.kubernetes.io/component=chatops-teams-integrator -o jsonpath='{.items[*].metadata.name }') ZEN_URL=$CUSTOM_HOSTNAME

Where <new_url> is the new URL for the cp-console route that uses your custom hostname.