Creating a remote physical location by installing the IBM Software Hub agents

To create a remote physical location, you must install the IBM Software Hub agents in the management project.

Who needs to complete this task?

Cluster administrator A cluster administrator must complete this task.

Important: In addition, you must have the Manage physical location (manage_locations) permission on the instance of IBM Software Hub that you want to connect to from the remote physical location.
When do you need to complete this task?

Repeat as needed You must complete this task for each physical location that you want to create.

Remember: Each management project and workload project can be used for exactly one remote physical location.

Before you begin

Best practice: You can run the commands in this task exactly as written if you use set up environment variables for the remote physical location in addition to the installation environment variables script. For instructions, see Setting up environment variables for a remote physical location.
Before you run the commands in this task, ensure that you source the environment variables for:
  • The primary cluster
  • The remote physical location

Before you complete this task, ensure that you completed Creating the projects for a remote physical location.

About this task

Run the create-physical-location command to install the IBM Software Hub agents in the projects associated with the physical location.

Procedure

  1. Log the cpd-cli in to the Red Hat® OpenShift® Container Platform cluster:
    ${REMOTE_CPDM_OC_LOGIN}
    Remember: REMOTE_CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command when you are connecting to a remote cluster.
  2. Install the IBM Software Hub agents.
    The command that you run depends on whether you want to pull the required images from the IBM Entitled Registry or from a private container registry:
    The remote cluster pulls images from the IBM Entitled Registry
    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} \
    --generate_digests=true

    The remote cluster pulls images from a private container registry
    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} \
    --generate_digests=true

What to do next

Now that you've created the physical location, you're ready to complete Installing service-specific software on remote physical locations.