Chapter 3. Configuring Red Hat Ansible Lightspeed to connect with IBM watsonx Code Assistant

As a Red Hat customer portal administrator, you must configure Red Hat Ansible Lightspeed to connect to your IBM watsonx Code Assistant instance.

3.1. About the Watsonx Code Assistant key and model ID

You need the following IBM watsonx Code Assistant information to connect Red Hat Ansible Lightspeed to your IBM watsonx Code Assistant:

  • Watsonx Code Assistant (WCA) API key

    A WCA API key authenticates all requests made from Red Hat Ansible Lightspeed to IBM watsonx Code Assistant. Each Red Hat organization with a valid Ansible Automation Platform subscription must have a configured WCA API key. When an authenticated RH-SSO user creates a task request in Red Hat Ansible Lightspeed, the WCA API key associated with the user’s Red Hat organization is used to authenticate the request to IBM watsonx Code Assistant.

  • Model ID

    A unique WCA model ID identifies an IBM watsonx Code Assistant model in your IBM Cloud account. The model ID that you configure in the Ansible Lightspeed administrator portal is used as the default model, and can be accessed by all Ansible Lightspeed users within your organization.

Important

You must configure both the WCA key and the model ID when you are initially configuring Red Hat Ansible Lightspeed.

3.2. Connecting Red Hat Ansible Lightspeed to IBM watsonx Code Assistant

Prerequisites

  • You have obtained a WCA API key and a model ID from the IBM watsonx Code Assistant that you want to use in Red Hat Ansible Lightspeed.

    For information about how to obtain a WCA API key and model ID from IBM watsonx Code Assistant, see the IBM watsonx Code Assistant documentation.

Procedure

  1. Log in to the Ansible Lightspeed portal as an organization administrator.
  2. From the login screen, click Admin Portal.
  3. Specify the WCA key of your IBM watsonx Code Assistant instance:

    1. Under IBM Cloud API Key, click Add API key. A screen to enter the API Key is displayed.
    2. Enter the API Key.
    3. Optional: Click Test to validate the WCA key.
    4. Click Save.
  4. Specify the model ID of the model that you want to use:

    1. Click Model Settings.
    2. Under Model ID, click Add Model ID. A screen to enter the Model Id is displayed.
    3. Enter the Model ID that you obtained in the previous procedure as the default model for your organization.
    4. Optional: Click Test model ID to validate the model ID.
    5. Click Save.

      When the WCA API key and model ID is successfully validated, Red Hat Ansible Lightspeed is connected to your IBM watsonx Code Assistant instance.

3.2.1. Additional resources