Specifying a custom namespace for IBM Cloud Pak Foundational Services
You must set the WebSphere Automation to reflect the custom
namespace if the IBM Cloud Pak® foundational
services
are deployed to a namespace other than the default (ibm-common-services). Setting
up your WebSphere Automation instance, make sure that you establish
only one WebSphereAutomation CR and incorporate any changes into this CR.
If necessary, configure the WebSphereAutomation CR by using the following instructions. Create only one WebSphereAutomation CR. If you create the WebSphereAutomation CR with one set of instructions and later need to use another set, then modify your existing WebSphereAutomation CR instead of creating a new one.
Configuring the commonServices.registryNamespace parameter by using the Red Hat OpenShift console
- Go to the Installed Operators page. In the Red Hat OpenShift console, click from the navigation menu.
- If you haven't already done so, create a namespace in which to create the WebSphere Automation instance. Open the Project menu
and click Create Project. Specify a name, for example,
websphere-automation. If the installation mode for the operator was A specific namespace on the cluster, select that same namespace from the Projects list.Note: For security considerations applicable at the namespace level, see Using the ResourceQuota resource. - Click the IBM WebSphere Automation operator.
- Click the WebSphereAutomation tab.
- In the WebSphereAutomation tab:
- If no instance is listed on the WebSphereAutomation tab, select
Create WebSphereAutomation to create an instance. The creation panel opens,
and offers two methods for configuring the resource: the Form view and the YAML view. The Form view
is selected by default. Switch to the YAML view and copy and paste the following YAML., make sure to
replace my_custom_namespace with your specific namespace:
apiVersion: automation.websphere.ibm.com/v1 kind: WebSphereAutomation metadata: name: wsa spec: license: accept: true commonServices: registryNamespace: my_custom_namespaceEnsure that you replace the value for the registryNamespace parameter with your specific namespace.
- If you see an instance listed on the WebSphereAutomation tab, click on
the listed instance. From the Actions drop-down menu, select Edit
WebSphereAutomation to edit the existing instance. The YAML view is only available for
configuring the resource. Copy and paste the following YAML under the
specelement, make sure to replace my_custom_namespace with your specific namespace:commonServices: registryNamespace: my_custom_namespaceEnsure that you replace the value for the registryNamespace parameter with your specific namespace.
- If no instance is listed on the WebSphereAutomation tab, select
Create WebSphereAutomation to create an instance. The creation panel opens,
and offers two methods for configuring the resource: the Form view and the YAML view. The Form view
is selected by default. Switch to the YAML view and copy and paste the following YAML., make sure to
replace my_custom_namespace with your specific namespace:
- Save the changes.
Configuring the commonServices.registryNamespace parameter using the command-line interface
- Ensure that the
WSA_INSTANCE_NAMESPACEenvironment variable is set to your instance namespace.export WSA_INSTANCE_NAMESPACE=websphere-automation - Determine whether you already have an instance of WebSphereAutomation CR by running the
following command:
oc get websphereautomation -n $WSA_INSTANCE_NAMESPACE -
- If no instance is found, the following information is
listed.
No resources found in websphere-automation namespace.Skip to step 4 to create an instance.
- The existing instance is listed as shown in the following
example.
oc get websphereautomation -n $WSA_INSTANCE_NAMESPACE NAME READY AGE wsa False 18dSkip to step 5 to update an existing instance.
- If no instance is found, the following information is
listed.
-
- If no instance is listed, apply the custom namespace to your WebSphereAutomation CR with the
following
occommand:cat <<EOF | oc apply -f - apiVersion: automation.websphere.ibm.com/v1 kind: WebSphereAutomation metadata: name: wsa namespace: $WSA_INSTANCE_NAMESPACE spec: license: accept: true commonServices: registryNamespace: my_custom_namespace EOF - Replace the value for the registryNamespace parameter with the appropriate value for your installation.
- If no instance is listed, apply the custom namespace to your WebSphereAutomation CR with the
following
-
- If an existing instance is listed, ensure that the
WSA_INSTANCE_NAMEenvironment variable is set to your instance name.export WSA_INSTANCE_NAME=wsa - To patch the instance, run the following command. Replace the value for the
my_custom_namespace parameter with the appropriate value for your
installation.
oc patch websphereautomation $WSA_INSTANCE_NAME -n $WSA_INSTANCE_NAMESPACE -p "{\"spec\": {\"commonServices\": {\"registryNamespace\": \"my_custom_namespace\"}}}" --type=merge - On successful execution of the command, the following information is
listed.
websphereautomation.automation.websphere.ibm.com/wsa patched
- If an existing instance is listed, ensure that the