Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 4. Setting up Red Hat Ansible Lightspeed for your organization
As a Red Hat customer portal administrator, you must configure Red Hat Ansible Lightspeed to connect to your IBM watsonx Code Assistant instance. This chapter provides information about configuring both the Red Hat Ansible Lightspeed cloud service and on-premise deployment.
4.1. Configuration requirements Link kopierenLink in die Zwischenablage kopiert!
Ensure that you meet the licensing and setup requirements specified below before you begin setting up Red Hat Ansible Lightspeed.
4.1.1. Licensing requirements Link kopierenLink in die Zwischenablage kopiert!
Red Hat Ansible Lightspeed cloud service
To use the Red Hat Ansible Lightspeed cloud service, you must meet one of the following requirements:
- Your organization has a trial or paid subscription to both the Red Hat Ansible Automation Platform and IBM watsonx Code Assistant.
Your organization has a trial or paid subscription to the Red Hat Ansible Automation Platform, and you have a Red Hat Ansible Lightspeed trial account.
NoteA Red Hat Ansible Lightspeed trial account does not require an IBM watsonx Code Assistant subscription.
Red Hat Ansible Lightspeed on-premise deployment
To use an on-premise deployment of Red Hat Ansible Lightspeed, your organization must have the following subscriptions:
- A trial or paid subscription to the Red Hat Ansible Automation Platform
- An installation of IBM watsonx Code Assistant for Red Hat Ansible Lightspeed on Cloud Pak for Data
4.1.2. Setup requirements Link kopierenLink in die Zwischenablage kopiert!
To set up Red Hat Ansible Lightspeed for your organization, you need the following IBM watsonx Code Assistant information:
API key
A unique 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 API key. An authenticated RH-SSO user creating a task in Red Hat Ansible Lightspeed is authenticated to IBM watsonx Code Assistant through the user’s Red Hat organization API key.
Model ID
A unique 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.
You must configure both the API key and the model ID when you are initially configuring Red Hat Ansible Lightspeed.
4.2. Setting up Red Hat Ansible Lightspeed cloud service Link kopierenLink in die Zwischenablage kopiert!
As a Red Hat customer portal administrator, you must configure Red Hat Ansible Lightspeed cloud service to connect to your IBM watsonx Code Assistant instance.
The IBM Cloud service instance of IBM watsonx Code Assistant is available in the following data centers:
-
Dallas (
us-south) -
Frankfurt (
eu-de) -
Sydney (
au-syd) (Essentials plan only)
Ansible Lightspeed cloud deployments are configured to connect exclusively to the US (Dallas) IBM data center. Attempts to connect from non-US data centers will result in connection failure. If you want to use a non-Dallas IBM data center, then you must set up Ansible Lightspeed in hybrid deployment model. For more information about IBM’s supported data centers, see the topic Setting up your watsonx Code Assistant for Red Hat Ansible Lightspeed service in IBM watsonx Code Assistant documentation.
4.2.1. Logging in to the Ansible Lightspeed administrator portal Link kopierenLink in die Zwischenablage kopiert!
Use the Ansible Lightspeed administrator portal to connect Red Hat Ansible Lightspeed to IBM watsonx Code Assistant.
Prerequisites
- You have organization administrator privileges to a Red Hat Customer Portal organization with a valid Red Hat Ansible Automation Platform subscription.
Procedure
- Log in to the Ansible Lightspeed portal as an organization administrator.
-
Click
. Enter your Red Hat account username and password. The Ansible Lightspeed Service uses Red Hat Single Sign-On (RH-SSO) for authentication.
As part of the authentication process, the Ansible Lightspeed Service checks whether your organization has an active Ansible Automation Platform subscription. On successful authentication, the login screen is displayed along with your username and your assigned user role.
From the login screen, click Admin Portal.
You are redirected to the Red Hat Ansible Lightspeed with IBM watsonx Code Assistant administrator portal where you can connect Red Hat Ansible Lightspeed to your IBM watsonx Code Assistant instance.
4.2.2. Configuring Red Hat Ansible Lightspeed cloud service Link kopierenLink in die Zwischenablage kopiert!
Use this procedure to configure the Red Hat Ansible Lightspeed cloud service.
Prerequisites
You have obtained an API key and a model ID from IBM watsonx Code Assistant that you want to use in Red Hat Ansible Lightspeed.
For information about how to obtain an API key and model ID from IBM watsonx Code Assistant, see the IBM watsonx Code Assistant documentation.
Procedure
- Log in to the Ansible Lightspeed portal as an organization administrator.
- From the login screen, click Admin Portal.
Specify the API key of your IBM watsonx Code Assistant instance:
- Under IBM Cloud API Key, click Add API key. A screen to enter the API Key is displayed.
- Enter the API Key.
- Optional: Click Test to validate the API key.
- Click Save.
Specify the model ID of the model that you want to use:
- Click Model Settings.
- Under Model ID, click Add Model ID. A screen to enter the Model Id is displayed.
- Enter the Model ID that you obtained in the previous procedure as the default model for your organization.
- Optional: Click Test model ID to validate the model ID.
Click Save.
When the API key and model ID is successfully validated, Red Hat Ansible Lightspeed is connected to your IBM watsonx Code Assistant instance.
4.3. Setting up Red Hat Ansible Lightspeed on-premise deployment Link kopierenLink in die Zwischenablage kopiert!
As an Red Hat Ansible Automation Platform administrator, you can set up a Red Hat Ansible Lightspeed on-premise deployment and connect it to an IBM watsonx Code Assistant instance. After the on-premise deployment is successful, you can start using the Ansible Lightspeed service with the Ansible Visual Studio (VS) Code extension.
- Red Hat Ansible Lightspeed on-premise deployments are supported on Red Hat Ansible Automation Platform version 2.4 and later.
The IBM Cloud service instance of IBM watsonx Code Assistant is available in the following data centers:
-
Dallas (
us-south) -
Frankfurt (
eu-de) -
Sydney (
au-syd) (Essentials plan only)
-
Dallas (
Ansible Lightspeed cloud deployments are configured to connect exclusively to the US (Dallas) IBM data center. Attempts to connect from non-US data centers will result in connection failure. If you want to use a non-Dallas IBM data center, then you must set up Ansible Lightspeed in hybrid deployment model. For more information about IBM’s supported data centers, see the topic Setting up your watsonx Code Assistant for Red Hat Ansible Lightspeed service in IBM watsonx Code Assistant documentation.
4.3.1. Overview Link kopierenLink in die Zwischenablage kopiert!
This section provides information about the system requirements, prerequisites, and the process for setting up a Red Hat Ansible Lightspeed on-premise deployment.
4.3.1.1. Deployment models Link kopierenLink in die Zwischenablage kopiert!
You can use one of the following modes of deployment:
On-premise deployment
Both Red Hat Ansible Lightspeed and the IBM watsonx Code Assistant model (IBM Cloud Pak for Data) are on-premise deployments. Telemetry data is not collected for an on-premise mode of deployment.
Hybrid deployment
Red Hat Ansible Lightspeed is an on-premise deployment, while IBM watsonx Code Assistant model is a cloud deployment. Telemetry data is not collected for hybrid deployments.
A hybrid deployment model provides the following benefits:
- Enables you to set up an on-premise deployment of Red Hat Ansible Lightspeed, with IBM watsonx Code Assistant model on a cloud environment.
- Provides the freedom and flexibility to choose an environment that best suits your organizational needs.
- Enables organizations to use the Ansible Automation Platform for user authentication, instead of logging into the Red Hat cloud.
- Enables organizations to deploy the Ansible Automation Platform in their preferred region.
4.3.1.2. System requirements Link kopierenLink in die Zwischenablage kopiert!
Your system must meet the following minimum system requirements to install and run the Red Hat Ansible Lightspeed on-premise deployment.
| Requirement | Minimum requirement |
|---|---|
| RAM | 5 GB |
| CPU | 1 |
| Local disk | 40 GB |
To see the rest of the Red Hat Ansible Automation Platform system requirements, see the System requirements section of Planning your installation.
You must also have installed IBM watsonx Code Assistant for Red Hat Ansible Lightspeed on Cloud Pak for Data. The installation includes a base model that you can use to set up your Red Hat Ansible Lightspeed on-premise deployment. For installation information, see the watsonx Code Assistant for Red Hat Ansible Lightspeed on Cloud Pak for Data documentation.
4.3.1.3. Prerequisites Link kopierenLink in die Zwischenablage kopiert!
- You have installed Red Hat Ansible Automation Platform on your Red Hat OpenShift Container Platform environment.
- You have administrator privileges for Red Hat Ansible Automation Platform.
- You have installed IBM watsonx Code Assistant for Red Hat Ansible Lightspeed on Cloud Pak for Data.
- Your system meets the minimum system requirements to set up Red Hat Ansible Lightspeed on-premise deployment.
You have obtained an API key and a model ID from IBM watsonx Code Assistant.
For information about obtaining an API key and model ID from IBM watsonx Code Assistant, see the IBM watsonx Code Assistant documentation. For information about installing IBM watsonx Code Assistant for Red Hat Ansible Lightspeed on Cloud Pak for Data, see the watsonx Code Assistant for Red Hat Ansible Lightspeed on Cloud Pak for Data documentation.
- You have an existing external PostgreSQL database configured for the Red Hat Ansible Automation Platform, or have a database created for you when configuring the Red Hat Ansible Lightspeed on-premise deployment.
4.3.2. Installing the Red Hat Ansible Automation Platform operator Link kopierenLink in die Zwischenablage kopiert!
Use this procedure to install the Ansible Automation Platform operator on the Red Hat OpenShift Container Platform.
Prerequisites
- You have installed and configured automation controller.
Procedure
- Log in to the Red Hat OpenShift Container Platform as an administrator.
Create a namespace:
-
Go to
. - Click Create Namespace.
- Enter a unique name for the namespace.
- Click Create.
-
Go to
Install the operator:
-
Go to
. - Select the namespace where you want to install the Red Hat Ansible Automation Platform operator.
- Search for the Ansible Automation Platform operator.
- From the search results, select the Ansible Automation Platform (provided by Red Hat) tile.
- Select an Update Channel. You can select either stable-2.x or stable-2.x-cluster-scoped as the channel.
- Select the destination namespace if you selected “stable-2.x” as the update channel.
- Select Install. It takes a few minutes for the operator to be installed.
-
Go to
- Click View Operator to see the details of your newly installed Red Hat Ansible Automation Platform operator.
4.3.3. Creating a model configuration secret Link kopierenLink in die Zwischenablage kopiert!
You must create a configuration secret to connect to an IBM watsonx Code Assistant model, which can be either an on-premise deployment or a cloud deployment.
Prerequisites
- You have installed the Ansible Automation Platform operator 2.5.0-0.1753402603 or later on the Red Hat OpenShift Container Platform.
- You have created an OAuth application in the automation controller.
You have obtained an API key and a model ID from IBM watsonx Code Assistant.
For information about obtaining an API key and model ID from IBM watsonx Code Assistant, see the IBM watsonx Code Assistant documentation. For information about installing IBM watsonx Code Assistant for Red Hat Ansible Lightspeed on Cloud Pak for Data, see the watsonx Code Assistant for Red Hat Ansible Lightspeed on Cloud Pak for Data documentation.
Procedure
- Go to the Red Hat OpenShift Container Platform.
-
Select
. -
Click
. - From the Projects list, select the namespace that you created when you installed the Red Hat Ansible Automation Platform operator.
-
Click
. -
In Secret name, enter a unique name for the secret. For example,
model-aiconnect. Add the following keys and their associated values individually:
Expand Key Value usernameFor on-premise deployment only
Enter the username you use to connect to an IBM Cloud Pak for Data deployment.
model_typeEnter one of the following values per your IBM watsonx Code Assistant model:
-
For on-premise deployment (IBM Cloud Pak for Data):
wca-onprem -
For cloud deployment (IBM Cloud):
wca
model_urlEnter the URL of the IBM watsonx Code Assistant model. For cloud deployment, the model URL could be
https://api.dataplatform.cloud.ibm.com.model_api_keyEnter the API key of your IBM watsonx Code Assistant model that was generated during the model installation.
model_idEnter the ID of your IBM watsonx Code Assistant model.
model_verify_sslOptional, and supported on Ansible Automation Platform 2.5 and later
This key controls whether the SSL certificate of the IBM watsonx Code Assistant model is verified.
Default =
truemodel_enable_anonymizationOptional and supported on Ansible Automation Platform 2.5.250730 and later
This key controls whether the anonymization of Personally Identifiable Information (PII) is enabled. PII information includes passwords, IP addresses, email addresses, and other sensitive data. When is enabled, users' personal information is modified to some generic values to protect their data and reduce the risk of data leaks.
You can turn off anonymization by setting the value to
falseto retain all original information entered by users and improve the quality of the answers. Disabling anonymization for Ansible Lightspeed hybrid deployments (the model is in IBM watsonx Code Assistant on IBM Cloud) results in users' PII being sent to IBM Cloud.Default =
trueImportantEnsure that you do not accidentally add any whitespace characters (extra line, space, and so on) to the value fields. If there are any extra or erroneous characters in the secret, the connection to IBM watsonx Code Assistant fails.
-
For on-premise deployment (IBM Cloud Pak for Data):
Click Create.
After you create the model configuration secret, you must update the YAML file of the Ansible Automation Platform operator.
4.3.4. Updating the YAML file of the Ansible Automation Platform operator Link kopierenLink in die Zwischenablage kopiert!
After you create the model configuration secret, you must update the YAML file of the Ansible Automation Platform operator to use the secret.
Procedure
- Go to the Red Hat OpenShift Container Platform.
-
Select
. - From the list of installed operators, select the Ansible Automation Platform operator.
- Locate and select the Ansible Automation Platform custom resource, and then click the required app.
- Select the YAML tab.
Scroll the text to find the
Lightspeedcategory, and add the following details under thespec:section:spec: lightspeed: disabled: false model_config_secret_name: <Name of the model configuration secret that you recently created.>- Click Save. The Ansible Lightspeed service takes a few minutes to set up.
4.3.5. Configuring Ansible VS Code extension for Red Hat Ansible Lightspeed on-premise deployment Link kopierenLink in die Zwischenablage kopiert!
To access the on-premise deployment of Red Hat Ansible Lightspeed, all Ansible users within your organization must install the Ansible Visual Studio (VS) Code extension in their VS Code editor, and configure the extension to connect to the on-premise deployment.
Prerequisites
- You have installed VS Code version 1.70.1 or later.
Procedure
Obtain the URL of your Ansible Lightspeed instance:
-
In Red Hat OpenShift Container Platform, select
and locate the Red Hat Ansible Lightspeed instance that was created. From the Location column, copy the URL of your Ansible Lightspeed instance.
The URL will be in the following format:
https://<lightspeed_route>/complete/aap/
-
In Red Hat OpenShift Container Platform, select
- Open the VS Code application.
- From the Activity bar, click the Extensions icon.
- From the Installed Extensions list, select Ansible.
-
From the Ansible extension page, click the Settings icon (
) and select Extension Settings.
Select Ansible Lightspeed settings and specify the following information:
In the URL for Ansible Lightspeed field, enter the Route URL of the Red Hat Ansible Lightspeed on-premise deployment. Ansible users must have Ansible Automation Platform controller credentials.
After configuring Ansible VS Code extension to connect to Red Hat Ansible Lightspeed on-premise deployment, you must log in to Ansible Lightspeed through the Ansible VS Code extension.
NoteIf your organization recently subscribed to the Red Hat Ansible Automation Platform, it might take a few hours for Red Hat Ansible Lightspeed to detect the new subscription. In VS Code, use the Refresh button in the Ansible extension from the Activity bar to check again.
4.3.6. Connecting to a different IBM watsonx Code Assistant model Link kopierenLink in die Zwischenablage kopiert!
After you have set up the Red Hat Ansible Lightspeed on-premise deployment successfully, you can modify the deployment if you want to connect to another IBM watsonx Code Assistant model.
For example, you connected to the default IBM watsonx Code Assistant model but now want to connect to a custom model instead. To connect to another IBM watsonx Code Assistant model, you must create new connection secrets, and then update the connection secrets and parameters on an existing Ansible Automation Platform operator.
Prerequisites
- You have set up a Red Hat Ansible Lightspeed on-premise deployment.
- You have obtained an API key and a model ID of the IBM watsonx Code Assistant model you want to connect to.
- You have created a new model configuration secret for the IBM watsonx Code Assistant model that you want to connect to. For information about creating a model configuration secrets, see Creating a model configuration secret.
Procedure
- Go to the Red Hat OpenShift Container Platform.
-
Select
. - From the list of installed operators, select the Ansible Automation Platform operator.
- Locate and select the Ansible Automation Platform custom resource, and then click the required app.
- Select the YAML tab.
Scroll the text to find the
specsection underLightspeedcategory. For example:spec: lightspeed: disabled: false model_config_secret_name: <Name of the model configuration secret that you recently created.>-
Replace the
model_config_secret_namevalue with the name of the IBM watsonx Code Assistant that you want to connect to. Click Save.
The new Ansible Lightspeed pods are created. After the new pods are running successfully, the old Ansible Lightspeed pods are terminated.
4.3.7. Monitoring your Red Hat Ansible Lightspeed on-premise deployment Link kopierenLink in die Zwischenablage kopiert!
After the Red Hat Ansible Lightspeed on-premise deployment is successful, use the following procedure to monitor the metrics on an API endpoint /metrics.
Procedure
Create a system auditor user:
- Create a user with a system auditor role in the Red Hat Ansible Automation Platform. For the procedure, see the Creating a user section of Getting started with Ansible Automation Platform.
-
Verify that you can log in to the Ansible Lightspeed portal for on-premise deployment (
https://<lightspeed_route>/) as the newly-created system auditor user, and then log out.
Create a token for the system auditor user:
Log in to the Ansible Lightspeed portal for on-premise deployment (
https://<lightspeed_route>/admin) as an administrator by using the following credentials:- Username: admin
-
Password: The secret that is named as
<lightspeed-custom-resource-name>-admin-passwordin the Red Hat OpenShift Container Platform cluster namespace where Red Hat Ansible Lightspeed is deployed.
- On the Django administration window, select Users from the Users area. A list of users is displayed.
- Verify that the user with the system auditor role is listed in the Users list.
-
From the Django Oauth toolkit area, select
. Provide the following information and click Save:
- User: Use the magnifying glass icon to search and select the user with the system auditor role.
- Token: Specify a token for the user. Copy this token for later use.
- Id token: Select the token ID.
- Application: Select Ansible Lightspeed for VS Code.
- Expires: Select the date and time when you want the token to expire.
Scope: Specify the scope as read write.
An access token is created for the user with a system auditor role.
- Log out from the Ansible Lightspeed portal for on-premise deployment.
-
Monitor your Red Hat Ansible Lightspeed on-premise deployment, by using the authorization token of the user with the system auditor role, to access the metrics endpoint
https://<lightspeed_route>/metrics.
4.3.8. Using the Ansible Lightspeed REST API Link kopierenLink in die Zwischenablage kopiert!
As the platform administrator, you can configure and use the Ansible Lightspeed REST API to build a custom automation development and tooling workflow outside of VS Code. For information about the Ansible Lightspeed REST API, see Ansible AI Connect. 1.0.0 (v1) in the API catalog.
The Ansible Lightspeed REST API is available for Ansible Automation Platform 2.5 and later.
Prerequisite
- Ensure that you are using the Red Hat Ansible Automation Platform operator patch version 2.5-20250305.9 or later and Red Hat Ansible Lightspeed operator version 2.5.250225 or later.
Procedure
Select the platform user for whom you want to grant REST API access.
You can select an existing user or create a platform user in the Red Hat Ansible Automation Platform. For the procedure, see the Creating a user section of Getting started with Ansible Automation Platform.
-
Verify that you can log in to the Ansible Lightspeed portal for on-premise deployment (
https://<lightspeed_route>/) as the platform user you selected or created, and then log out. Create a token for the platform user:
Log in to the Ansible Lightspeed portal for on-premise deployment (
https://<lightspeed_route>/admin) as an administrator by using the following credentials:- Username: admin
-
Password: The secret that is named as
<lightspeed-custom-resource-name>-admin-passwordin the Red Hat OpenShift Container Platform cluster namespace where Red Hat Ansible Lightspeed is deployed.
- On the Django administration window, select Users from the Users area. A list of users is displayed.
- Verify that the platform user is listed in the Users list.
-
From the Django Oauth toolkit area, select
. Provide the following information and click Save:
- User: Use the magnifying glass icon to search and select the newly-created or existing user for whom you want to grant API access.
- Token: Specify a token for the user. Copy this token for later use.
- Id token: Select the token ID.
- Application: Select Ansible Lightspeed for VS Code.
- Expires: Select the date and time when you want the token to expire.
Scope: Specify the scope as read write.
An access token is created for the user.
- Log out from the Ansible Lightspeed portal for on-premise deployment.
Make a direct call to the Ansible Lightspeed REST API by specifying the newly-created token in the authorization header:
curl -H "Authorization: Bearer <token>" https://<lightspeed_route>/api/v1/me/