Creating a service instance for Product Master with the cpd-cli
manage
apply-cr command
Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.8 reaches end of support. For more information, see Upgrading from IBM Cloud Pak for Data Version 4.8 to IBM Software Hub Version 5.1.
After you install Product Master, you must create the Product Master service instance in the operands project. If you are an instance
administrator, you can use the cpd-cli
manage
apply-cr command to create the service instance after you install
Product Master.
- Who needs to complete this task?
-
Instance administrator To create a service instance by using the
cpd-cli manage apply-crcommand, you must be an instance administrator. An instance administrator has permission to install software in any projects that are associated with an instance of Cloud Pak for Data.
- When do you need to complete this task?
- Complete this task only if you want to create a service instance from the
cpd-cliby using thecpd-cli manage apply-crcommand.
Alternative methods for creating a service instance
- From the web client. For more information, see Creating a service instance for Product Master from the web client.
- By using the
cpd-cli service-instance createcommand. For more information, see Creating a service instance for Product Master with the cpd-cli service-instance create command. - By using the
/v3/service_instancesREST API call. For more information, see Creating a service instance for Product Master programmatically.
Information you need to complete this task
Review the following information before you create a service instance for Product Master:
- Version requirements
-
All of the components that are associated with an instance of Cloud Pak for Data must be installed or created at the same release. For example, if Product Master is installed at Version 4.8.9, you must create the service instance at Version 4.8.9.
- Environment variables
-
The commands in this task use environment variables so that you can run the commands exactly as written.
- If you don't have the script that defines the environment variables, see Setting up installation environment variables.
- To use the environment variables from the script, you must source the environment variables
before you run the commands in this task. For example,
run:
source ./cpd_vars.sh
Before you begin
This task assumes that the following prerequisites are met:
| Prerequisite | Where to find more information |
|---|---|
| Product Master is installed. | If this task is not complete, see Installing Product Master. |
The cpd-cli command-line interface is installed on the
workstation from which you will create the service instance. |
If this task is not complete, see Setting up a client workstation. |
Procedure
Complete the following tasks to create a service instance:
Creating a service instance
- Log in to your Red Hat® OpenShift® cluster as an
instance administrator by using the following command.
oc login OpenShift_URL:port - Change to the project (namespace) where Cloud Pak for Data is installed by using the following command.
oc project <cpd-instance> - Provision the Product Master instance by using the following command:
The command that you run depends on the storage on your cluster:
Red Hat OpenShift Data Foundation storage
Run the following command to create the custom resource.
cpd-cli manage apply-cr \ --components=productmaster_instance \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --extra-vars=productmaster_instance_scale_config=<TSHIRT_SIZE> \ --license_acceptance=true \ --upgrade=true
IBM Storage Fusion Data Foundation storage
Run the following command to create the custom resource.
cpd-cli manage apply-cr \ --components=productmaster_instance \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --block_storage_class=${STG_CLASS_BLOCK} \ --extra-vars=productmaster_instance_scale_config=<TSHIRT_SIZE> \ --file_storage_class=${STG_CLASS_FILE} \ --license_acceptance=true \ --upgrade=true
IBM Storage Fusion Global Data Platform storage
Remember: When you use IBM Storage Fusion storage, both${STG_CLASS_BLOCK}and${STG_CLASS_FILE}point to the same storage class, typicallyibm-spectrum-scale-sc.Run the following command to create the custom resource.
cpd-cli manage apply-cr \ --components=productmaster_instance \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --extra-vars=productmaster_instance_scale_config=<TSHIRT_SIZE> \ --license_acceptance=true \ --upgrade=true
IBM Storage Scale Container Native storage
Remember: When you use IBM Storage Scale Container Native storage, both${STG_CLASS_BLOCK}and${STG_CLASS_FILE}point to the same storage class, typicallyibm-spectrum-scale-sc.Run the following command to create the custom resource.
cpd-cli manage apply-cr \ --components=productmaster_instance \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --extra-vars=productmaster_instance_scale_config=<TSHIRT_SIZE> \ --license_acceptance=true \ --upgrade=true
Portworx storage
Run the following command to create the custom resource.
cpd-cli manage apply-cr \ --components=productmaster_instance \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --extra-vars=productmaster_instance_scale_config=<TSHIRT_SIZE> \ --license_acceptance=true \ --upgrade=true
AWS with EFS and EBS storage
Run the following command to create the custom resource.
cpd-cli manage apply-cr \ --components=productmaster_instance \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --extra-vars=productmaster_instance_scale_config=<TSHIRT_SIZE> \ --license_acceptance=true \ --upgrade=true
NetApp Trident
Remember: When you use NetApp Trident storage, both${STG_CLASS_BLOCK}and${STG_CLASS_FILE}point to the same storage class.Run the following command to create the custom resource.
cpd-cli manage apply-cr \ --components=productmaster_instance \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --extra-vars=productmaster_instance_scale_config=<TSHIRT_SIZE> \ --license_acceptance=true \ --upgrade=true
- Verify that the Product Master instance (productmaster-cr) is provisioned correctly by using the
following command.
cpd-cli manage get-cr-status \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --components=productmaster_instanceVerify that the command returns
Completed.The provisioning process can take some time to complete. Wait for the process to complete before you log in to Product Master.
Validating that the service instance was created
To validate that the service instance was created, run the following command:
cpd-cli manage get-cr-status \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--components=productmaster_instance