This is a cache of https://docs.okd.io/3.9/install_config/cfme/container_provider.html. It is a snapshot of the page at 2024-11-22T03:52:25.175+0000.
<strong>e</strong>nabling Contain<strong>e</strong>r Provid<strong>e</strong>r Int<strong>e</strong>gration - D<strong>e</strong>ploying R<strong>e</strong>d Hat CloudForms | Installation and Configuration | OKD 3.9
&times;

Adding a Single Container Provider

After deploying ManageIQ on OKD as described in Running the Installer, there are two methods for enabling container provider integration. You can manually add OKD as a container provider, or you can try the playbooks included with this role.

Adding Manually

See the following ManageIQ documentation for steps on manually adding your OKD cluster as a container provider:

Adding Automatically

Automated container provider integration can be accomplished using the playbooks included with this role.

This playbook:

  1. Gathers the necessary authentication secrets.

  2. Finds the public routes to the ManageIQ application and the cluster API.

  3. Makes a ReST call to add the OKD cluster as a container provider.

To run the container provider playbook:

# ansible-playbook -v [-i /path/to/inventory] \
    playbooks/openshift-management/add_container_provider.yml

Multiple Container Providers

As well as providing playbooks to integrate your current OKD cluster into your ManageIQ deployment, this role includes a script which allows you to add multiple container platforms as container providers in any arbitrary ManageIQ server. The container platforms can be OKD or OpenShift Container Platform.

Using the multiple provider script requires manual configuration and setting an eXTRA_VARS parameter on the CLI when running the playbook.

Preparing the Script

To prepare the multiple provider script, complete the following manual configuration:

  1. Copy the files/examples/container_providers.yml example somewhere, such as /tmp/cp.yml. You will be modifying this file.

  2. If you changed your ManageIQ name or password, update the hostname, user, and password parameters in the management_server key in the container_providers.yml file that you copied.

  3. Fill in an entry under the container_providers key for each container platform cluster you want to add as container providers.

    1. The following parameters must be configured:

      • auth_key - This is the token of a service account that has cluster-admin privileges.

      • hostname - This is the host name that points to the cluster API. each container provider must have a unique host name.

      • name - This is the name of the cluster to be displayed in the ManageIQ server container providers overview page. This must be unique.

      To obtain the auth_key bearer token from your clusters:

      $ oc serviceaccounts get-token -n management-infra management-admin
    2. The following parameters may be optionally configured:

      • port - Update this key if your container platform cluster runs the API on a port other than 8443.

      • endpoint - You may enable SSL verification (verify_ssl) or change the validation setting to ssl-with-validation. Support for custom trusted CA certificates is not currently available.

example

As an example, consider the following scenario:

  • You copied the container_providers.yml file to /tmp/cp.yml.

  • You want to add two OpenShift Container Platform clusters.

  • Your ManageIQ server runs on mgmt.example.com

For this scenario, you would customize /tmp/cp.yml as follows:

container_providers:
  - connection_configurations:
      - authentication: {auth_key: "<token>", authtype: bearer, type: AuthToken} (1)
        endpoint: {role: default, security_protocol: ssl-without-validation, verify_ssl: 0}
    hostname: "<provider_hostname1>"
    name: <display_name1>
    port: 8443
    type: "ManageIQ::Providers::Openshift::ContainerManager"
  - connection_configurations:
      - authentication: {auth_key: "<token>", authtype: bearer, type: AuthToken} (1)
        endpoint: {role: default, security_protocol: ssl-without-validation, verify_ssl: 0}
    hostname: "<provider_hostname2>"
    name: <display_name2>
    port: 8443
    type: "ManageIQ::Providers::Openshift::ContainerManager"
management_server:
  hostname: "<hostname>"
  user: <user_name>
  password: <password>
1 Replace <token> with the management token for this cluster.

Running the Playbook

To run the multiple-providers integration script, you must provide the path to the container providers configuration file as an eXTRA_VARS parameter to the ansible-playbook command. Use the -e (or --extra-vars) parameter to set container_providers_config to the configuration file path:

# ansible-playbook -v [-i /path/to/inventory] \
    -e container_providers_config=/tmp/cp.yml \
    playbooks/openshift-management/add_many_container_providers.yml

After the playbook completes, you should find two new container providers in your ManageIQ service. Navigate to the Compute → Containers → Providers page to see an overview.

Refreshing Providers

After adding either a single or multiple container providers, the new provider(s) must be refreshed in ManageIQ to get all the latest data about the container provider and the containers being managed. This involves navigating to each provider in the ManageIQ web console and clicking a refresh button for each.

See the following ManageIQ documentation for steps: