Skip to content

Commit 584b73c

Browse files
authored
feat: ability to reference existing sm (#45)
* feat: bump submodule * feat: bump versions * feat: update stack reference architecture * docs: remove documentation around manual steps * fix: fix issue causing clashes in code engine names * feat: bump to rag app da v1.5.0 * chore: bump to Secret Manager to version v1.12.0 Security Compliance Center to version v1.6.3 * feat: allow to pass crn to existing secret manager instance * feat: add input wrt platform metrics and logging * chore: bump DA versions * chore: bump DA versions * fix: obs to use resource group * fix: missing secret manager region * fix: reverse sm config * feat: bump sm to v1.12.2 * fix: some minor improvements to deploy-many scripts * fix: missing rg config in sm stack * docs: update doc with new options * fix: point to correct region for existing sm
1 parent 1542b9b commit 584b73c

File tree

4 files changed

+41
-31
lines changed

4 files changed

+41
-31
lines changed

.secrets.baseline

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2024-04-29T15:33:54Z",
6+
"generated_at": "2024-04-30T13:49:16Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -82,23 +82,23 @@
8282
"hashed_secret": "bbc4e9d52252171a3a306be55086c65b126189e8",
8383
"is_secret": false,
8484
"is_verified": false,
85-
"line_number": 32,
85+
"line_number": 34,
8686
"type": "Secret Keyword",
8787
"verified_result": null
8888
},
8989
{
9090
"hashed_secret": "d9e9019d9eb455a3d72a3bc252c26927bb148a10",
9191
"is_secret": false,
9292
"is_verified": false,
93-
"line_number": 47,
93+
"line_number": 51,
9494
"type": "Secret Keyword",
9595
"verified_result": null
9696
},
9797
{
9898
"hashed_secret": "b13d7622394e85c3b2694f426bc096b093764462",
9999
"is_secret": false,
100100
"is_verified": false,
101-
"line_number": 51,
101+
"line_number": 55,
102102
"type": "Secret Keyword",
103103
"verified_result": null
104104
}

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ 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+
- 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
28+
- 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).
2729

2830
```json
2931
{
@@ -34,7 +36,9 @@ Before deploying the stack, ensure you have:
3436
"region": "<region where all resources are deployed>",
3537
"sample_app_git_url": "https://github.com/IBM/gen-ai-rag-watsonx-sample-application",
3638
"watsonx_admin_api_key": "<optional - admin key to use for watson if different from ibmcloud_api_key>",
37-
"signing_key": "signing key used to sign build artifacts"
39+
"signing_key": "signing key used to sign build artifacts",
40+
"existing_secrets_manager_crn": "<optional> - reuse an existing secret manager instance",
41+
"enable_platform_logs_metrics": "<optional> - set to true to enable observability instance to capture regional logs"
3842
}
3943
}
4044
```
@@ -49,7 +53,9 @@ Example:
4953
"region": "eu-de",
5054
"sample_app_git_url": "https://github.com/IBM/gen-ai-rag-watsonx-sample-application",
5155
"watsonx_admin_api_key": "<optional - admin key to use for watson if different from ibmcloud_api_key>",
52-
"signing_key": "signing key used to sign build artifacts"
56+
"signing_key": "signing key used to sign build artifacts",
57+
"enable_platform_logs_metrics": "false",
58+
"existing_secrets_manager_crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/190c293e9fda4c6684b5acf4b17871b8:14580411-4fa2-42d3-af3f-ab7fc6371b6d::"
5359
}
5460
}
5561
```

deploy-many.sh

Lines changed: 2 additions & 2 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" ]]; then
66+
if [[ "$STATE" != "validated" && "$STATE" != "deployed" && "$STATE" != "deploying_failed" && "$STATE" != "approved" ]]; 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" ]]; then
77+
if [[ "$STATE" == "validated" || "$STATE" == "deployed" || "$STATE" == "deploying_failed" || "$STATE" == "approved" || "$STATE" == "deploying" ]]; then
7878
break
7979
fi
8080

stack_definition.json

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"members": [
7272
{
7373
"name": "1 - Account Infrastructure Base",
74-
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.65c68525-b954-460c-96e6-ad7300c3b317",
74+
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.c8bf5993-d693-4cac-9479-83c5fb6f96e1",
7575
"inputs": [
7676
{
7777
"name": "prefix",
@@ -139,7 +139,7 @@
139139
},
140140
{
141141
"name": "2b - Security Service - Secret Manager",
142-
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.e9f80ad1-b9a0-4884-be72-650403bdcf76",
142+
"version_locator": "7df1e4ca-d54c-4fd0-82ce-3d13247308cd.7230f742-7f93-4647-b53d-89b7905fb5a6",
143143
"inputs": [
144144
{
145145
"name": "prefix",
@@ -162,8 +162,12 @@
162162
"value": "ref:../2a - Security Service - Key Management/outputs/key_protect_crn"
163163
},
164164
{
165-
"name": "existing_resource_group",
165+
"name": "use_existing_resource_group",
166166
"value": true
167+
},
168+
{
169+
"name": "existing_secrets_manager_crn",
170+
"value": "ref:../../inputs/existing_secrets_manager_crn"
167171
}
168172
]
169173
},
@@ -225,10 +229,10 @@
225229
"name": "prefix",
226230
"value": "ref:../../inputs/prefix"
227231
},
228-
{
229-
"name": "use_existing_resource_group",
230-
"value": true
231-
},
232+
{
233+
"name": "use_existing_resource_group",
234+
"value": true
235+
},
232236
{
233237
"name": "enable_platform_logs",
234238
"value": "ref:../../inputs/enable_platform_logs_metrics"
@@ -241,7 +245,7 @@
241245
},
242246
{
243247
"name": "4 - WatsonX SaaS services",
244-
"version_locator": "8bfb1293-8b85-4d3f-a89f-015d0a0719df.76f66c57-96b7-4ed9-a669-2ddbab72a3db",
248+
"version_locator": "8bfb1293-8b85-4d3f-a89f-015d0a0719df.72efd2d9-801d-49b1-bfe3-614de8f0a3d7",
245249
"inputs": [
246250
{
247251
"name": "ibmcloud_api_key",
@@ -314,21 +318,21 @@
314318
"value": "ref:../1 - Account Infrastructure Base/outputs/devops_resource_group_name"
315319
},
316320
{
317-
"name": "sm_secret_group",
318-
"value": "Default"
319-
},
320-
{
321-
"name": "sm_resource_group",
322-
"value": "ref:../2b - Security Service - Secret Manager/outputs/resource_group_name"
323-
},
324-
{
325-
"name": "sm_name",
326-
"value": "ref:../2b - Security Service - Secret Manager/outputs/secrets_manager_name"
327-
},
328-
{
329-
"name": "sm_location",
330-
"value": "ref:../2b - Security Service - Secret Manager/inputs/region"
331-
},
321+
"name": "sm_secret_group",
322+
"value": "Default"
323+
},
324+
{
325+
"name": "sm_resource_group",
326+
"value": "ref:../2b - Security Service - Secret Manager/outputs/resource_group_name"
327+
},
328+
{
329+
"name": "sm_name",
330+
"value": "ref:../2b - Security Service - Secret Manager/outputs/secrets_manager_name"
331+
},
332+
{
333+
"name": "sm_location",
334+
"value": "ref:../2b - Security Service - Secret Manager/outputs/secrets_manager_region"
335+
},
332336
{
333337
"name": "ci_code_engine_project",
334338
"value": "Generative_AI_Sample_App_CI_Project"

0 commit comments

Comments
 (0)