Skip to content

Commit

Permalink
fix: add workaround for unique watson project name
Browse files Browse the repository at this point in the history
  • Loading branch information
vburckhardt committed Apr 10, 2024
1 parent a3d8f51 commit f3b711d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Click the "Add to project" button, and select create in new project.

## 2. Prereqs in target account

- 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 )
- Create a resource group in the target account (this steps is temporary in current alpha version).
- Create an API key in the target account. Keep note of it. Give it admin privilege for now. Exact permissions will be narrowed down in future version.
- Create a resource group in the target account. This steps is temporary in current alpha version - resource groups will be created in the base account DA in future versions.


## 3. Set the input configuration for the stack

- Clone this repository locally
- Create a file with name ".def.json" with the following content. Ensure region is either us-south or eu-de (watsonx limitation for now)
- Clone this repository locally - and checkout the dev branch.
- Create a file with name ".def.json" with the following content. Important: ensure region is either us-south or eu-de as watsonx can only be deployed in those 2 locations for now.

```json
{
Expand All @@ -28,7 +28,8 @@ Click the "Add to project" button, and select create in new project.
"region": "<region where resources are deployed>",
"sample_app_git_url": "https://github.com/IBM/gen-ai-rag-watsonx-sample-application"
}
}```
}
```

Example:
```json
Expand All @@ -45,11 +46,9 @@ Example:

## 4. Get the configuration ids for each element of the stack

Run `ibmcloud project configs --project-id <project_id>`

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.

Take note the id of each config.
Run `ibmcloud project configs --project-id <project_id>` to get the list of configurations in the project.
- Project id is the id of the project created in step 1. The project id can be found under the Manage -> Details tab in the project UI.
- Take note the id of each config. The first config is the "stack" config.

## 5. Edit your local copy of deploy-many.sh

Expand All @@ -59,10 +58,12 @@ In deploy-many.sh:
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")
- Set STACK_CONFIG_ID to the id of the config corresponding to the stack

Tips: to accelerate iteration you may deploy only a subset of the configurations: the bare minimum are key management, security manager, watson saas, alm and rag configuration da. Base account, observability and SCC are not on the critical path to get the app running.

## 6. Run ./deploy-many.sh

- Ensure you are login using ibmcloud login --sso
- Execute ./deploy-many.sh

Tips: If deployment fail in one of the DA, you may need to remove the configuration id of the deployment that already passes before re-running the script.

6 changes: 3 additions & 3 deletions deploy-many.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -x



PROJECT_ID="f24554c3-a402-48c6-9293-12ebd066baa1"
CONFIG_IDS=("91d1f479-b586-49c0-a696-a261550c8125" "6b74f33f-a9ea-421a-b18f-1de7b55c21bb")
STACK_CONFIG_ID="9f66a3df-9717-41c2-8380-347e641f817d"
PROJECT_ID="546993cb-c1ba-49cd-a975-187a2b924c21"
CONFIG_IDS=("b79d03d5-edfe-4cd4-8787-7d70738c6529" "853c369d-3dbd-41e4-8e79-006d2c3408b2" "736fd03d-190a-4bcd-a1a5-18334d868f20" "3d76faf5-663e-4a7a-bb1d-3c98a9fa6628" "70667b97-6bb5-425b-8e6a-47c931740604")
STACK_CONFIG_ID="53ef9a25-3aad-4167-b548-41b19c57cad4"

function set_stack_inputs() {
ibmcloud project config-update --project-id $PROJECT_ID --id $STACK_CONFIG_ID --definition @.def.json
Expand Down
4 changes: 4 additions & 0 deletions stack_definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@
{
"name": "watson_governance_plan",
"value": "do not install"
},
{
"name": "project_name",
"value": "ref:../../inputs/prefix"
}
],
"name": "4 - WatsonX SaaS services",
Expand Down

0 comments on commit f3b711d

Please sign in to comment.