You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-25Lines changed: 28 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,42 +1,45 @@
1
-
# Retrieval Augmented Generation (RAG) stack
1
+
# Retrieval Augmented Generation Pattern for Watsonx on IBM Cloud
2
2
3
-
To run the full stack, follow these steps. These steps will be updated as development progresses on the stack and underlying DAs.
3
+
The following [deployable architecture](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-understand-module-da#what-is-da) automates the deployment of a sample GenAI Pattern on IBM Cloud, including all underlying infrastructure. This architecture implements the best practices for Watsonx GenAI Pattern deployment on IBM Cloud, as described in the [reference architecture](https://cloud.ibm.com/docs/pattern-genai-rag?topic=pattern-genai-rag-genai-pattern).
4
4
5
-
## 1. Deploy the stack in a new project from catalog
Click the "Add to Project" button and select "Create in new project."
14
+
15
+
## 2. Prerequisites in Target Account
12
16
13
17
Before deploying the stack, ensure you have:
14
-
- Created an API key in the target account with sufficient permissions. Note the API key, as it will be used later.
15
-
- For now, grant it admin privileges. The exact permissions required will be refined in future versions.
16
-
- Install the IBM Cloud CLI's Project addon using `ibmcloud plugin install project` command. More info here: https://cloud.ibm.com/docs/cli?topic=cli-projects-cli
17
18
19
+
* Created an API key in the target account with sufficient permissions. Note the API key, as it will be used later. For now, grant it admin privileges. The exact permissions required will be refined in future versions.
20
+
* Installed the IBM Cloud CLI's Project add-on using the `ibmcloud plugin install project` command. More information is available here: https://cloud.ibm.com/docs/cli?topic=cli-projects-cli
18
21
19
-
## 3. Set the input configuration for the stack
22
+
## 3. Set the Input Configuration for the Stack
20
23
21
-
- Clone this repository locally.
22
-
- Create a file with name ".def.json" with the following content.
24
+
* Clone this repository locally.
25
+
* Create a file named ".def.json" with the following content:
23
26
24
27
**Important**:
25
-
- Ensure region is either us-south or eu-de as watsonx can only be deployed in those 2 locations for now.
26
-
- Ensure that the prefix is globally unique. It is used for the container registry namespace (which needs to be globally unique) in this alpha version.
27
-
- The signing key is the base64 key obtained from the `gpg --export-secret-key <Email Address> | base64` command. See https://cloud.ibm.com/docs/devsecops?topic=devsecops-devsecops-image-signing#cd-devsecops-gpg-export for details.
28
-
- If specifying `existing_secrets_manager_crn`, the ibmcloud_api_key that is passed as an input must have the documented read and write access to the instance
29
-
- If specifying `existing_secrets_manager_crn`, ensure that the default security group does not contain secrets named `signing-key` and `ibmcloud-api-key` . The RAG DA currently always attempt to create secret with those names (temporary issue - to be fixed).
28
+
* Ensure the region is either us-south or eu-de, as Watsonx can only be deployed in those two locations for now.
29
+
* Ensure that the prefix is globally unique. It is used for the container registry namespace (which needs to be globally unique) in this alpha version.
30
+
* If specifying `existing_secrets_manager_crn`, the `ibmcloud_api_key` that is passed as an input must have the documented read and write access to the instance.
31
+
* If specifying `existing_secrets_manager_crn`, ensure that the default security group does not contain secrets named `signing-key` and `ibmcloud-api-key`. The RAG DA currently always attempts to create a secret with those names (temporary issue - to be fixed).
32
+
* The signing key is the base64 key obtained from the `gpg --export-secret-key <Email Address> | base64` command. See https://cloud.ibm.com/docs/devsecops?topic=devsecops-devsecops-image-signing#cd-devsecops-gpg-export for details.
30
33
31
34
```json
32
35
{
33
36
"inputs": {
34
37
"prefix": "<prefix for resources name - ensure unique>",
35
38
"ibmcloud_api_key": "<API Key of the target account with sufficient permissions>",
36
-
"resource_group_name": "<target resource group - name of a new resource group that the stack will creates>",
39
+
"resource_group_name": "<target resource group - name of a new resource group that the stack will create>",
37
40
"region": "<region where all resources are deployed>",
- Ensure you are login into the account containing the Cloud project with the stack using ibmcloud login --sso
68
-
- Execute ./deploy-many.sh with project name, stack name and optional configuration name pattern. The selected non-stack configruations will be processed by their name in alphabetical order. Using configuration name pattern (regex can be used - make sure to enclose it in quotes) you can chose which configurations are deployed
70
+
* Ensure you are logged in to the account containing the Cloud project with the stack using `ibmcloud login --sso`.
71
+
* Execute `./deploy-many.sh` with the project name, stack name, and optional configuration name pattern. The selected non-stack configurations will be processed by their name in alphabetical order. Using the configuration name pattern (regex can be used - make sure to enclose it in quotes), you can choose which configurations are deployed.
69
72
70
-
Example 1 - update stack inputs for stack configuration `RAG` and process all non-stack configurations in the project:
73
+
Example 1 - Update stack inputs for stack configuration `RAG` and process all non-stack configurations in the project:
71
74
```bash
72
75
./deploy-many.sh my-test-project RAG
73
76
```
74
77
75
-
Example 2 - update stack inputs and process some configurations in the project:
78
+
Example 2 - Update stack inputs and process some configurations in the project:
Example 3 - simulate updating stack inputs and validating some configurations in the project in dry-run mode (no changes or actual validation or deployments is done):
83
+
Example 3 - Simulate updating stack inputs and validating some configurations in the project in dry-run mode (no changes or actual validation or deployments are done):
Copy file name to clipboardExpand all lines: ibm_catalog.json
+35-29Lines changed: 35 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
"watson",
15
15
"ai"
16
16
],
17
-
"short_description": "An automated solution that deploys a sample application illustrating how to implement the RAG Pattern with watsonx.ai and IBM Cloud services.",
17
+
"short_description": "An automated solution that deploys a sample application illustrating how to implement the RAG Pattern with watson.ai and IBM Cloud services.",
"title": "Deploy a customer care generative AI app to Code Engine using Continous Delivery",
107
+
"title": "Deploy a banking retrieval augmented generation (RAG) app to IBM Cloud Code Engine using Continous Delivery.",
108
108
"description": ""
109
109
}
110
110
],
@@ -133,30 +133,28 @@
133
133
{
134
134
"key": "prefix",
135
135
"type": "string",
136
-
"default_value": "rag",
137
-
"description": "A prefix added to the name of all resources created by this solution. Used to avoid name clashes in the target account.",
136
+
"default_value": "sample",
137
+
"description": "A prefix added to the name of all resources created by this solution. Used to avoid name clashes in the target account when existing this solution multiple times.",
138
138
"required": true
139
139
},
140
-
{
141
-
"key": "enable_platform_logs_metrics",
142
-
"type": "boolean",
143
-
"default_value": false,
144
-
"description": "Whether to provision logging and monitoring instances are configured to receive all platform logs and metrics in the target region. There can only be one instance per region provisioned for platform logs/metrics.",
145
-
"required": false
146
-
},
147
-
{
148
-
"key": "existing_secrets_manager_crn",
149
-
"type": "string",
150
-
"default_value": "__NULL__",
151
-
"description": "The CRN of an existing secret manager instance to use in this solution. If not set, a new secret manager instance is provisioned. ",
152
-
"required": false
153
-
},
154
140
{
155
141
"key": "ibmcloud_api_key",
156
142
"type": "password",
157
143
"description": "The API Key used to provision all resources created in this solution.",
158
144
"required": true
159
145
},
146
+
{
147
+
"key": "signing_key",
148
+
"type": "password",
149
+
"description": "The key used to sign the application image built by the CI pipeline deployed in this solution. Please refer to the documentation for details on generating the key.",
150
+
"display_name": "Multiline secure value",
151
+
"required": true,
152
+
"custom_config": {
153
+
"type": "multiline_secure_value",
154
+
"grouping": "deployment",
155
+
"original_grouping": "deployment"
156
+
}
157
+
},
160
158
{
161
159
"key": "region",
162
160
"type": "string",
@@ -177,15 +175,14 @@
177
175
{
178
176
"key": "resource_group_name",
179
177
"type": "string",
180
-
"default_value": "rag-services-rc",
178
+
"default_value": "rag-services",
181
179
"description": "The name of the resource group that is created by this solution. The actual name is prefixed with the value of the input 'prefix'. All resources created by this solution are deployed in this resource group. ",
"description": "The URL to the public git repository containing the sample rag application code.",
183
+
"key": "watsonx_admin_api_key",
184
+
"type": "password",
185
+
"description": "The API Key used to provision the watson project resources. If not set, the ibmcloud_api_key is used.",
189
186
"required": false
190
187
},
191
188
{
@@ -206,15 +203,24 @@
206
203
]
207
204
},
208
205
{
209
-
"key": "signing_key",
210
-
"type": "password",
211
-
"description": "The key used to sign the application image built by the CI pipeline deployed in this solution.",
206
+
"key": "enable_platform_logs_metrics",
207
+
"type": "boolean",
208
+
"default_value": false,
209
+
"description": "Whether to provision logging and monitoring instances are configured to receive all platform logs and metrics in the target region. There can only be one instance per region provisioned for platform logs/metrics.",
212
210
"required": false
213
211
},
214
212
{
215
-
"key": "watsonx_admin_api_key",
216
-
"type": "password",
217
-
"description": "The API Key used to provision the watson project resources. If not set, the ibmcloud_api_key is used.",
213
+
"key": "existing_secrets_manager_crn",
214
+
"type": "string",
215
+
"default_value": "__NULL__",
216
+
"description": "The CRN of an existing secret manager instance to use in this solution. If not set, a new secret manager instance is provisioned. ",
0 commit comments