Skip to content

Commit d619143

Browse files
authored
0.0.11-beta (#52)
1 parent 366e578 commit d619143

File tree

4 files changed

+49
-22
lines changed

4 files changed

+49
-22
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ Before deploying the stack, ensure you have:
2424
**Important**:
2525
- Ensure region is either us-south or eu-de as watsonx can only be deployed in those 2 locations for now.
2626
- 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.
2827
- 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
2928
- 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).
30-
29+
3130
```json
3231
{
3332
"inputs": {

deploy-many.sh

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function validate_config() {
6363

6464
STATE=$(get_validation_state)
6565

66-
if [[ "$STATE" != "validated" && "$STATE" != "deployed" && "$STATE" != "deploying_failed" && "$STATE" != "approved" ]]; then
66+
if [[ "$STATE" != "validated" && "$STATE" != "deployed" && "$STATE" != "deploying_failed" && "$STATE" != "approved" && "$STATE" != "deleting" && "$STATE" != "deleting_failed" ]]; then
6767
$CLI_CMD project config-validate --project-id "$PROJECT_ID" --id "$CONFIG_ID" --output json > /tmp/validation.json
6868
fi
6969
}
@@ -74,7 +74,7 @@ function wait_for_validation() {
7474

7575
STATE=$(get_validation_state)
7676

77-
if [[ "$STATE" == "validated" || "$STATE" == "deployed" || "$STATE" == "deploying_failed" || "$STATE" == "approved" || "$STATE" == "deploying" ]]; then
77+
if [[ "$STATE" == "validated" || "$STATE" == "deployed" || "$STATE" == "deploying_failed" || "$STATE" == "approved" || "$STATE" == "deploying" || "$STATE" == "deleting" || "$STATE" == "deleting_failed" ]]; then
7878
break
7979
fi
8080

@@ -98,7 +98,7 @@ function deploy_config() {
9898

9999
STATE=$(get_deployment_state)
100100

101-
if [[ "$STATE" != "deployed" ]]; then
101+
if [[ "$STATE" != "deployed" && "$STATE" != "deleting" && "$STATE" != "deleting_failed" ]]; then
102102
$CLI_CMD project config-deploy --project-id "$PROJECT_ID" --id "$CONFIG_ID"
103103
fi
104104
}
@@ -109,7 +109,7 @@ function wait_for_deployment() {
109109
STATE=$(get_deployment_state)
110110

111111
# If the state is "deployed" or "deploying_failed", exit the loop
112-
if [[ "$STATE" == "deployed" || "$STATE" == "deploying_failed" ]]; then
112+
if [[ "$STATE" == "deployed" || "$STATE" == "deploying_failed" || "$STATE" == "deleting" || "$STATE" == "deleting_failed" ]]; then
113113
break
114114
fi
115115

@@ -138,16 +138,44 @@ function keep_iam_session_active()
138138
ibmcloud iam oauth-tokens > /dev/null
139139
}
140140

141-
parse_params "$@"
142-
get_config_ids
143-
set_stack_inputs
144-
145-
# Loop through the configuration IDs and execute the functions
146-
for CONFIG_ID in "${CONFIG_IDS[@]}"
147-
do
141+
function validate_and_deploy()
142+
{
148143
validate_config
149144
wait_for_validation
150145
approve_config
151146
deploy_config
152147
wait_for_deployment
148+
}
149+
150+
parse_params "$@"
151+
get_config_ids
152+
set_stack_inputs
153+
154+
# Loop through the configuration IDs and execute the functions
155+
# for CONFIG_ID in "${CONFIG_IDS[@]}"
156+
# do
157+
# validate_and_deploy
158+
# done
159+
160+
161+
####
162+
163+
# Run base config + key management first
164+
for CONFIG_ID in "${CONFIG_IDS[@]:0:2}"; do
165+
validate_and_deploy
166+
done
167+
168+
169+
# Run secret manager, security compliance, observability, and WatsonX SaaS services in parallel
170+
parallel_configs=("${CONFIG_IDS[2]}" "${CONFIG_IDS[3]}" "${CONFIG_IDS[4]}" "${CONFIG_IDS[5]}")
171+
for CONFIG_ID in "${parallel_configs[@]}"; do
172+
(
173+
validate_and_deploy
174+
) &
175+
done
176+
wait
177+
178+
# Run ALM + RAG DA at the end
179+
for CONFIG_ID in "${CONFIG_IDS[@]:6}"; do
180+
validate_and_deploy
153181
done

ibm_catalog.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
"required": false,
181181
"type": "boolean",
182182
"hidden": false,
183-
"default_value": true
183+
"default_value": false
184184
}
185185
],
186186
"install_type": "fullstack"

stack_definition.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"required": false,
6666
"type": "boolean",
6767
"hidden": false,
68-
"default": true
68+
"default": false
6969
}
7070
],
7171
"members": [
@@ -139,7 +139,7 @@
139139
},
140140
{
141141
"name": "2b - Security Service - Secret Manager",
142-
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.7230f742-7f93-4647-b53d-89b7905fb5a6",
142+
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.2bc1285e-9979-4903-98ae-537c08d50eb1",
143143
"inputs": [
144144
{
145145
"name": "prefix",
@@ -207,7 +207,7 @@
207207
},
208208
{
209209
"name": "3 - Observability - Logging Monitoring Activity Tracker",
210-
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.826011ab-274b-4010-8935-a463d74f5d31",
210+
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.58843031-95a7-4e8e-9abc-13c478a8bd16",
211211
"inputs": [
212212
{
213213
"name": "ibmcloud_api_key",
@@ -245,7 +245,7 @@
245245
},
246246
{
247247
"name": "4 - WatsonX SaaS services",
248-
"version_locator": "8bfb1293-8b85-4d3f-a89f-015d0a0719df.72efd2d9-801d-49b1-bfe3-614de8f0a3d7",
248+
"version_locator": "8bfb1293-8b85-4d3f-a89f-015d0a0719df.02313717-33ba-43cd-8a6d-c661c0538cf3",
249249
"inputs": [
250250
{
251251
"name": "ibmcloud_api_key",
@@ -298,7 +298,7 @@
298298
]
299299
},
300300
{
301-
"name": "5 - Generative AI Sample App - Code Engine Toolchain Config",
301+
"name": "5 - Sample RAG app - Application Lifecycle Management (CI,CD,CC)",
302302
"version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.c9d011c4-f1eb-4dae-87e9-fe20372d90a5-global",
303303
"inputs": [
304304
{
@@ -401,7 +401,7 @@
401401
},
402402
{
403403
"name": "6 - Sample RAG app configuration",
404-
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.bbcb2591-5e49-4633-8f59-6bc996ba3da7",
404+
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.9ac0688e-437b-4559-8f7f-992818e9fa6c",
405405
"inputs": [
406406
{
407407
"name": "toolchain_region",
@@ -429,11 +429,11 @@
429429
},
430430
{
431431
"name": "cd_pipeline_id",
432-
"value": "ref:../5 - Generative AI Sample App - Code Engine Toolchain Config/outputs/cd_pipeline_id"
432+
"value": "ref:../5 - Sample RAG app - Application Lifecycle Management (CI,CD,CC)/outputs/cd_pipeline_id"
433433
},
434434
{
435435
"name": "ci_pipeline_id",
436-
"value": "ref:../5 - Generative AI Sample App - Code Engine Toolchain Config/outputs/ci_pipeline_id"
436+
"value": "ref:../5 - Sample RAG app - Application Lifecycle Management (CI,CD,CC)/outputs/ci_pipeline_id"
437437
},
438438
{
439439
"name": "watson_machine_learning_instance_guid",

0 commit comments

Comments
 (0)