Creating a service instance for Product
Master with the cpd-cli
manage
apply-cr command
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 IBM® Software Hub.
- 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 IBM Software Hub must be installed or created at the same release. For example, if Product Master is installed at Version 5.4.0, you must create the service instance at Version 5.4.0.
- 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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --license_acceptance=true \Run the appropriate command to create the custom resource.
- Default installation (without installation options)
-
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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --license_acceptance=true \ - Custom installation (with installation options)
-
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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --param-file=/tmp/work/install-options.yml \ --license_acceptance=true \
IBM 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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --file_storage_class=${STG_CLASS_FILE} \ --license_acceptance=true \Run the appropriate command to create the custom resource.
- Default installation (without installation options)
-
cpd-cli manage apply-cr \ --components=productmaster_instance \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --license_acceptance=true \ - Custom installation (with installation options)
-
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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --param-file=/tmp/work/install-options.yml \ --license_acceptance=true \
IBM Fusion Global Data Platform storage
Remember: When you use IBM 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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --license_acceptance=true \Run the appropriate command to create the custom resource.
- Default installation (without installation options)
-
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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --license_acceptance=true \ - Custom installation (with installation options)
-
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} \ --param-file=/tmp/work/install-options.yml \ --license_acceptance=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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --license_acceptance=true \Run the appropriate command to create the custom resource.
- Default installation (without installation options)
-
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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --license_acceptance=true \ - Custom installation (with installation options)
-
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} \ --param-file=/tmp/work/install-options.yml \ --license_acceptance=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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --license_acceptance=true \Run the appropriate command to create the custom resource.
- Default installation (without installation options)
-
cpd-cli manage apply-cr \ --components=productmaster_instance \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --storage_vendor=portworx \ --license_acceptance=true \ - Custom installation (with installation options)
-
cpd-cli manage apply-cr \ --components=productmaster_instance \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --storage_vendor=portworx \ --param-file=/tmp/work/install-options.yml \ --license_acceptance=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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --license_acceptance=true \Run the appropriate command to create the custom resource.
- Default installation (without installation options)
-
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} \ #{TSHIRT_SIZE}=small_mincpureq, small, medium, large, or xlarge --extra-vars=productmaster_instance_scale_config={TSHIRT_SIZE} \ --license_acceptance=true \ - Custom installation (with installation options)
-
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} \ --param-file=/tmp/work/install-options.yml \ --license_acceptance=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