|
1 | | -# stack-ibm-template |
| 1 | +# Retrievel Augmented Generation (RAG) stack |
| 2 | + |
| 3 | +To run the full stack. These steps will be updated as development progresses on the stack and underlaying DAs. |
| 4 | + |
| 5 | +## 1. Deploy the stack in a new project from catalog |
| 6 | + |
| 7 | +Catalog url: https://cloud.ibm.com/catalog/7df1e4ca-d54c-4fd0-82ce-3d13247308cd/architecture/Retrieval_Augmented_Generation_Pattern-5fdd0045-30fc-4013-a8bc-6db9d5447a52?bss_account=9f9af00a96104f49b6509aa715f9d6a5 |
| 8 | + |
| 9 | +Click the "Add to project" button, and select create in new project. |
| 10 | + |
| 11 | +## 2. Prereqs in target account |
| 12 | + |
| 13 | +- Create an API key in the target account. Keep note of it. Give it admin privilege for now ( will be narrowed down in future version ) |
| 14 | +- Create a resource group in the target account (this steps is temporary in current alpha version). |
| 15 | + |
| 16 | + |
| 17 | +## 3. Set the input configuration for the stack |
| 18 | + |
| 19 | +- Clone this repository locally |
| 20 | +- Create a file with name ".def.json" with the following content. Ensure region is either us-south or eu-de (watsonx limitation for now) |
| 21 | + |
| 22 | +```json |
| 23 | +{ |
| 24 | + "inputs": { |
| 25 | + "prefix": "<prefix for resources name>", |
| 26 | + "ibmcloud_api_key": "<API Key of the target account with sufficient permissions>", |
| 27 | + "resource_group_name": "<target resource group - must be existing in account>", |
| 28 | + "region": "<region where resources are deployed>", |
| 29 | + "sample_app_git_url": "https://github.com/IBM/gen-ai-rag-watsonx-sample-application" |
| 30 | + } |
| 31 | +}``` |
| 32 | + |
| 33 | +Example: |
| 34 | +```json |
| 35 | +{ |
| 36 | + "inputs": { |
| 37 | + "prefix": "0410", |
| 38 | + "ibmcloud_api_key": "<your api key>", |
| 39 | + "resource_group_name": "0411-stack-service-rg", |
| 40 | + "region": "eu-de", |
| 41 | + "sample_app_git_url": "https://github.com/IBM/gen-ai-rag-watsonx-sample-application" |
| 42 | + } |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +## 4. Get the configuration ids for each element of the stack |
| 47 | + |
| 48 | +Run `ibmcloud project configs --project-id <project_id>` |
| 49 | + |
| 50 | +Project id is the id of the project created in step 1. The id can be found under the Manage -> Details tab in the project. |
| 51 | + |
| 52 | +Take note the id of each config. |
| 53 | + |
| 54 | +## 5. Edit your local copy of deploy-many.sh |
| 55 | + |
| 56 | +In deploy-many.sh: |
| 57 | +- Set PROJECT_ID to the id of the project |
| 58 | +- Add set the CONFIG_IDS to the array of configurations (ensuring ordering) |
| 59 | +CONFIG_IDS=("9618c574-4e0d-4e89-ac55-440717c8b378" "545c1a92-fa21-447f-96ed-fbefb7c50b35" "9aca1cae-36e3-4d1a-96fe-a4ddec057c01" "3eab3b42-f8d4-4532-b0d2-05ef2cc9c250" "b3dbe0de-1512-4351-b0f5-bb8ae8be4d4b") |
| 60 | +- Set STACK_CONFIG_ID to the id of the config corresponding to the stack |
| 61 | + |
| 62 | + |
| 63 | +## 6. Run ./deploy-many.sh |
| 64 | + |
| 65 | +- Ensure you are login using ibmcloud login --sso |
| 66 | +- Execute ./deploy-many.sh |
| 67 | + |
| 68 | + |
0 commit comments