manage
create-physical-location
Install the Cloud Pak for Data agents on a remote cluster so that users can run workloads on the remote cluster.
- Required role
- To run this command, you must have the following permissions:
- Cluster administrator You must be a cluster administrator on the remote cluster.
- You must have the Manage physical locations
(
manage_locations
) permission in the primary instance of IBM Cloud Pak for Data (the hub).
Prerequisites
- Set up a remote cluster.
- On the remote cluster, create a management project and a workload project.
- On the remote cluster, create an image pull secret in the management project and the workload project.
- Get your platform API key from the primary instance of IBM Cloud Pak for Data.
- Generate a base64 encoded version of your platform API key by running the following command:
'echo "<username>:<api_key>" | base64'
Extended description
In a typical installation, IBM Cloud Pak for Data runs in a set of projects (namespaces) on a single Red Hat® OpenShift® Container Platform cluster. You can use remote physical locations to expand your Cloud Pak for Data deployment to a remote cluster by installing Cloud Pak for Data agents on the remote cluster.
Syntax
cpd-cli manage create-physical-location \
--physical_location_name=<unique-ID> \
--physical_location_host=<hostname> \
--management_ns=<project-name> \
--workload_ns=<project-name> \
--cpd_hub_url=<route> \
--cpd_hub_api_key=<base64-encoded-API-key> \
--block_storage_class=<RWO-storage-class> \
--release=<version> \
[--image_pull_secret=<pull-secret-name>] \
[--image-prefix=<image-registry-prefix>] \
[--upgrade=true|false] \
[--generate_digests=true|false]
Arguments
The create-physical-location
command has no arguments.
Options
Option | Description |
---|---|
--block_storage_class |
The name of a
block storage class on the remote cluster where you want to create a remote physical location. The
storage class must be associated with a supported storage option.
|
--cpd_hub_api_key |
Your base64-encoded API key for the primary instance of Cloud Pak for
Data that you want to connect to.
|
--cpd_hub_url |
The route to the primary instance of Cloud Pak for Data that you want
to connect to.
|
--generate_digests |
Specify whether to update the image digest in the
physical_location_image_digests.yml file, if it exists. The image digest is based on the value in the
|
--image-prefix |
The registry to pull the required images from.
|
--image_pull_secret |
The name of the image pull secret that you created on the remote
cluster.
|
--management_ns |
The project on the remote cluster where you want to install the
required agents, operators, and custom resources.
|
--physical_location_host |
The fully qualified domain name of the remote
cluster.
|
--physical_location_name |
The unique name to use to identify the physical
location.
|
--release |
The version of the Cloud Pak for Data agents to
install on the physical location. Important: The version on the remote physical location
must be the same as the version on the primary instance of Cloud Pak for Data (the hub).
|
--upgrade |
Specify whether you are upgrading an existing installation. You must
set this option to true to upgrade the software.
|
--workload_ns |
The project where you want to run workloads on the remote
cluster.
|
Examples
It is strongly recommended that you use a script to create environment variables with the correct values for your remote physical location. For details, see Setting up environment variables for a remote physical location.
- Create a physical location that pulls images from the IBM Entitled Registry
-
The cluster uses namespace-scoped pull secrets
cpd-cli manage create-physical-location \ --physical_location_name=${REMOTE_PHYSICAL_LOCATION_ID} \ --physical_location_host=${REMOTE_OCP_URL} \ --block_storage_class=${REMOTE_STG_CLASS_BLOCK} \ --management_ns=${REMOTE_PROJECT_MANAGEMENT} \ --workload_ns=${REMOTE_PROJECT_WORKLOAD} \ --cpd_hub_url=${CPD_HUB_URL} \ --cpd_hub_api_key=${CPD_HUB_API_KEY} \ --release=${VERSION} \ --image_pull_secret=${REMOTE_PULL_SECRET}
- Create a physical location that pulls images from a private container registry
-
The cluster uses namespace-scoped pull secrets
cpd-cli manage create-physical-location \ --physical_location_name=${REMOTE_PHYSICAL_LOCATION_ID} \ --physical_location_host=${REMOTE_OCP_URL} \ --block_storage_class=${REMOTE_STG_CLASS_BLOCK} \ --management_ns=${REMOTE_PROJECT_MANAGEMENT} \ --workload_ns=${REMOTE_PROJECT_WORKLOAD} \ --cpd_hub_url=${CPD_HUB_URL} \ --cpd_hub_api_key=${CPD_HUB_API_KEY} \ --release=${VERSION} \ --image-prefix=${PRIVATE_REGISTRY_LOCATION} \ --image_pull_secret=${REMOTE_PULL_SECRET}