Skip to content

Commit a4114fb

Browse files
committed
feat: add alm DA in stack
1 parent 592694a commit a4114fb

File tree

2 files changed

+98
-29
lines changed

2 files changed

+98
-29
lines changed

deploy-many.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22

33
set -x
44

5-
PROJECT_ID="bdad81fb-e28b-4ce7-aea4-72ab81c8718d"
6-
CONFIG_IDS=("64271bc0-c3b6-4828-b7b5-b6024d9e3598")
5+
6+
7+
PROJECT_ID="440acf2a-896f-4426-968b-581fb0eb83f4"
8+
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")
9+
STACK_CONFIG_ID="abb2b55e-aa3f-42a9-9897-167cca2e5229"
10+
11+
function set_stack_inputs() {
12+
ibmcloud project config-update --project-id $PROJECT_ID --id $STACK_CONFIG_ID --definition @.def.json
13+
}
714

815
function validate_config() {
916
ibmcloud project config-validate --project-id $PROJECT_ID --id $CONFIG_ID --output json > /tmp/validation.json
@@ -64,6 +71,7 @@ function wait_for_deployment() {
6471
# 6. Loop through the configuration IDs and execute the functions
6572
for CONFIG_ID in "${CONFIG_IDS[@]}"
6673
do
74+
set_stack_inputs
6775
validate_config
6876
wait_for_validation
6977
approve_config

stack_definition.json

Lines changed: 88 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,39 @@
11
{
22
"inputs": [
3-
{
4-
"name": "prefix",
5-
"required": false,
6-
"type": "string",
7-
"hidden": false,
8-
"default": "rag-stack"
9-
},
10-
{
11-
"name": "ibmcloud_api_key",
12-
"required": true,
13-
"type": "password",
14-
"hidden": false
15-
},
16-
{
17-
"name": "resource_group_name",
18-
"required": false,
19-
"type": "string",
20-
"hidden": false
21-
},
22-
{
23-
"name": "region",
24-
"required": false,
25-
"type": "string",
26-
"hidden": false,
27-
"default": "us-south"
28-
}
29-
],
3+
{
4+
"name": "prefix",
5+
"required": false,
6+
"type": "string",
7+
"hidden": false,
8+
"default": "rag-stack"
9+
},
10+
{
11+
"name": "ibmcloud_api_key",
12+
"required": true,
13+
"type": "password",
14+
"hidden": false
15+
},
16+
{
17+
"name": "resource_group_name",
18+
"required": false,
19+
"type": "string",
20+
"hidden": false
21+
},
22+
{
23+
"name": "region",
24+
"required": false,
25+
"type": "string",
26+
"hidden": false,
27+
"default": "us-south"
28+
},
29+
{
30+
"name": "sample_app_git_url",
31+
"required": false,
32+
"type": "string",
33+
"hidden": false,
34+
"default": "https://github.com/IBM/gen-ai-rag-watsonx-sample-application"
35+
}
36+
],
3037
"members": [
3138
{
3239
"inputs": [
@@ -153,6 +160,60 @@
153160
}
154161
],
155162
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.fb52a84e-5ce4-4c5c-86ef-2adc4271107c"
163+
},
164+
{
165+
"inputs": [
166+
{
167+
"name": "ibmcloud_api_key",
168+
"value": "ref:../../inputs/ibmcloud_api_key"
169+
},
170+
{
171+
"name": "toolchain_name",
172+
"value": "Generative AI Sample App"
173+
},
174+
{
175+
"name": "toolchain_region",
176+
"value": "ref:../../inputs/region"
177+
},
178+
{
179+
"name": "toolchain_resource_group",
180+
"value": "ref:../../inputs/resource_group_name"
181+
},
182+
{
183+
"name": "sm_secret_group",
184+
"value": "Default"
185+
},
186+
{
187+
"name": "sm_resource_group",
188+
"value": "ref:../2b - Security Service - Secret Manager/outputs/resource_group_name"
189+
},
190+
{
191+
"name": "sm_name",
192+
"value": "ref:../2b - Security Service - Secret Manager/outputs/secrets_manager_name"
193+
},
194+
{
195+
"name": "sm_location",
196+
"value": "ref:../2b - Security Service - Secret Manager/inputs/region"
197+
},
198+
{
199+
"name": "ci_code_engine_project",
200+
"value": "Generative_AI_Sample_App_CI_Project"
201+
},
202+
{
203+
"name": "cd_code_engine_project",
204+
"value": "Generative_AI_Sample_App_CD_Project"
205+
},
206+
{
207+
"name": "registry_namespace",
208+
"value": "namespace-rag"
209+
},
210+
{
211+
"name": "ci_app_repo_clone_from_url",
212+
"value": "ref:../../inputs/sample_app_git_url"
213+
}
214+
],
215+
"name": "5 - Generative AI Sample App - Code Engine Toolchain Config",
216+
"version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.541b6240-1c09-455d-83c2-cbcc4a45af37-global"
156217
}
157218
]
158219
}

0 commit comments

Comments
 (0)