Skip to content

Commit 555a00a

Browse files
authored
feat: added a DA (Deployable Architecture) solution for IBM catalog (#450)
1 parent dedea88 commit 555a00a

20 files changed

+1023
-47
lines changed

.catalog-onboard-pipeline.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: v1
3+
offerings:
4+
- name: deploy-arch-ibm-icd-postgresql
5+
kind: solution
6+
catalog_id: 7df1e4ca-d54c-4fd0-82ce-3d13247308cd
7+
offering_id: 0298facd-3e69-43fa-87c0-4d3d0b3c887e
8+
variations:
9+
- name: standard
10+
mark_ready: true
11+
install_type: fullstack
12+
scc:
13+
instance_id: 1c7d5f78-9262-44c3-b779-b28fe4d88c37
14+
region: us-south

.github/settings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ repository:
2222

2323
# Uncomment this description property
2424
# and update the description to the current repo description.
25-
description: "Implements a ICD Postgresql instance with tags, users, memory allocation, disk allocation, cpu allocation and context based restrictions"
25+
description: "Implements an instance of the IBM Cloud Databases for PostgreSQL service."
2626

27-
topics: core-team, terraform, ibm-cloud, terraform-module, postgresql, supported, graduated
27+
topics: core-team, terraform, ibm-cloud, terraform-module, postgresql, supported, graduated, deployable-architecture

.releaserc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"assets": "false"
1010
}],
1111
["@semantic-release/exec", {
12-
"successCmd": "echo \"SEMVER_VERSION=${nextRelease.version}\" >> $GITHUB_ENV"
12+
"successCmd": "echo \"SEMVER_VERSION=${nextRelease.version}\" >> $GITHUB_ENV",
13+
"publishCmd": "./ci/trigger-catalog-onboarding-pipeline.sh --version=v${nextRelease.version}"
1314
}]
1415
]
1516
}

.secrets.baseline

Lines changed: 19 additions & 1 deletion
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-06-28T06:47:35Z",
6+
"generated_at": "2024-07-24T15:38:43Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -86,6 +86,24 @@
8686
"type": "Secret Keyword",
8787
"verified_result": null
8888
}
89+
],
90+
"solutions/standard/DA-types.md": [
91+
{
92+
"hashed_secret": "44cdfc3615970ada14420caaaa5c5745fca06002",
93+
"is_secret": false,
94+
"is_verified": false,
95+
"line_number": 58,
96+
"type": "Secret Keyword",
97+
"verified_result": null
98+
},
99+
{
100+
"hashed_secret": "bd0d0d73a240c29656fb8ae0dfa5f863077788dc",
101+
"is_secret": false,
102+
"is_verified": false,
103+
"line_number": 63,
104+
"type": "Secret Keyword",
105+
"verified_result": null
106+
}
89107
]
90108
},
91109
"version": "0.13.1+ibm.62.dss",

cra-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# More info about this file at https://github.com/terraform-ibm-modules/common-pipeline-assets/blob/main/.github/workflows/terraform-test-pipeline.md#cra-config-yaml
22
version: "v1"
33
CRA_TARGETS:
4-
- CRA_TARGET: "examples/fscloud"
4+
- CRA_TARGET: "solutions/standard"
55
CRA_IGNORE_RULES_FILE: "cra-tf-validate-ignore-rules.json"
66
PROFILE_ID: "0e6e7b5a-817d-4344-ab6f-e5d7a9c49520"
77
CRA_ENVIRONMENT_VARIABLES:
8-
TF_VAR_existing_at_instance_crn: "crn:v1:bluemix:public:logdnaat:eu-de:a/abac0df06b644a9cabc6e44f55b3880e:b1ef3365-dfbf-4d8f-8ac8-75f4f84d6f4a::"
9-
TF_VAR_existing_kms_instance_guid: "e6dce284-e80f-46e1-a3c1-830f7adff7a9"
8+
TF_VAR_existing_kms_instance_crn: "crn:v1:bluemix:public:hs-crypto:us-south:a/abac0df06b644a9cabc6e44f55b3880e:e6dce284-e80f-46e1-a3c1-830f7adff7a9::"
109
TF_VAR_kms_key_crn: "crn:v1:bluemix:public:hs-crypto:us-south:a/abac0df06b644a9cabc6e44f55b3880e:e6dce284-e80f-46e1-a3c1-830f7adff7a9:key:76170fae-4e0c-48c3-8ebe-326059ebb533"
11-
TF_VAR_region: "us-south"
12-
TF_VAR_prefix: "test-postgres-fscloud"
10+
TF_VAR_prefix: "test-postgres-standard"
11+
TF_VAR_use_existing_resource_group: true
12+
TF_VAR_resource_group_name: "geretain-test-postgres"

ibm_catalog.json

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
{
2+
"products": [
3+
{
4+
"name": "deploy-arch-ibm-icd-postgresql",
5+
"label": "Databases for PostgreSQL",
6+
"product_kind": "solution",
7+
"tags": [
8+
"ibm_created",
9+
"target_terraform",
10+
"terraform",
11+
"data_management",
12+
"solution"
13+
],
14+
"keywords": [
15+
"postgresql",
16+
"postgres",
17+
"IaC",
18+
"infrastructure as code",
19+
"terraform",
20+
"solution",
21+
"postgresql standard",
22+
"database",
23+
"relational"
24+
],
25+
"short_description": "Creates and configures an instance of IBM Cloud Databases for PostgreSQL.",
26+
"long_description": "This architecture supports creating and configuring an instance of Databases for PostgreSQL with KMS encryption.",
27+
"offering_docs_url": "https://github.com/terraform-ibm-modules/terraform-ibm-icd-postgresql/blob/main/README.md",
28+
"offering_icon_url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-icd-postgresql/main/images/postgresql.svg",
29+
"provider_name": "IBM",
30+
"features": [
31+
{
32+
"title": "Creates an instance of Databases for PostgreSQL",
33+
"description": "Creates and configures an IBM Cloud Databases for PostgreSQL instance."
34+
},
35+
{
36+
"title": "Supports KMS encryption",
37+
"description": "Provides KMS encryption for the data that you store in the database."
38+
},
39+
{
40+
"title": "Supports autoscaling",
41+
"description": "Provides the autoscaling to allow the database to increase resources in response to usage."
42+
}
43+
],
44+
"flavors": [
45+
{
46+
"label": "Standard",
47+
"name": "standard",
48+
"install_type": "fullstack",
49+
"working_directory": "solutions/standard",
50+
"compliance": {
51+
"authority": "scc-v3",
52+
"profiles": [
53+
{
54+
"profile_name": "IBM Cloud Framework for Financial Services",
55+
"profile_version": "1.6.0"
56+
}
57+
]},
58+
"iam_permissions": [
59+
{
60+
"role_crns": [
61+
"crn:v1:bluemix:public:iam::::role:Administrator"
62+
],
63+
"service_name": "all-account-management-services"
64+
},
65+
{
66+
"role_crns": [
67+
"crn:v1:bluemix:public:iam::::role:Editor"
68+
],
69+
"service_name": "databases-for-postgresql"
70+
},
71+
{
72+
"role_crns": [
73+
"crn:v1:bluemix:public:iam::::serviceRole:Manager",
74+
"crn:v1:bluemix:public:iam::::role:Editor"
75+
],
76+
"service_name": "kms"
77+
}
78+
],
79+
"architecture": {
80+
"descriptions": "This architecture creates an instance of IBM Cloud Databases for PostgreSQL instance with KMS encryption. Supports autoscaling.",
81+
"features": [
82+
{
83+
"title": " Creates an instance of Databases for PostgreSQL",
84+
"description": "This architecture creates an instance of IBM Cloud Databases for PostgreSQL with KMS encryption. It accepts or creates a resource group, and provides autoscaling rules."
85+
}
86+
],
87+
"diagrams": [
88+
{
89+
"diagram": {
90+
"caption": "Databases for PostgreSQL instance on IBM Cloud",
91+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-icd-postgresql/main/reference-architecture/deployable-architecture-postgresql.svg",
92+
"type": "image/svg+xml"
93+
},
94+
"description": "This architecture supports creating and configuring an instance of Databases for PostgreSQL instance with KMS encryption."
95+
}
96+
]
97+
},
98+
"configuration": [
99+
{
100+
"key": "ibmcloud_api_key"
101+
},
102+
{
103+
"key": "use_existing_resource_group"
104+
},
105+
{
106+
"key": "resource_group_name"
107+
},
108+
{
109+
"key": "prefix"
110+
},
111+
{
112+
"key": "name"
113+
},
114+
{
115+
"key": "region",
116+
"required": true,
117+
"default_value": "us-south",
118+
"options": [
119+
{
120+
"displayname": "Chennai (che01)",
121+
"value": "che01"
122+
},
123+
{
124+
"displayname": "Dallas (us-south)",
125+
"value": "us-south"
126+
},
127+
{
128+
"displayname": "Frankfurt (eu-de)",
129+
"value": "eu-de"
130+
},
131+
{
132+
"displayname": "London (eu-gb)",
133+
"value": "eu-gb"
134+
},
135+
{
136+
"displayname": "Madrid (eu-es)",
137+
"value": "eu-es"
138+
},
139+
{
140+
"displayname": "Osaka (jp-osa)",
141+
"value": "jp-osa"
142+
},
143+
{
144+
"displayname": "Paris (par01)",
145+
"value": "par01"
146+
},
147+
{
148+
"displayname": "Sao Paulo (br-sao)",
149+
"value": "br-sao"
150+
},
151+
{
152+
"displayname": "Sydney (au-syd)",
153+
"value": "au-syd"
154+
},
155+
{
156+
"displayname": "Toronto (ca-tor)",
157+
"value": "ca-tor"
158+
},
159+
{
160+
"displayname": "Tokyo (jp-tok)",
161+
"value": "jp-tok"
162+
},
163+
{
164+
"displayname": "Washington (us-east)",
165+
"value": "us-east"
166+
}
167+
]
168+
},
169+
{
170+
"key": "pg_version",
171+
"required": true,
172+
"options": [
173+
{
174+
"displayname": "12",
175+
"value": "12"
176+
},
177+
{
178+
"displayname": "13",
179+
"value": "13"
180+
},
181+
{
182+
"displayname": "14",
183+
"value": "14"
184+
},
185+
{
186+
"displayname": "15",
187+
"value": "15"
188+
},
189+
{
190+
"displayname": "16",
191+
"value": "16"
192+
}
193+
]
194+
},
195+
{
196+
"key": "members"
197+
},
198+
{
199+
"key": "member_memory_mb"
200+
},
201+
{
202+
"key": "member_cpu_count"
203+
},
204+
{
205+
"key": "member_disk_mb"
206+
},
207+
{
208+
"key": "member_host_flavor"
209+
},
210+
{
211+
"key": "configuration"
212+
},
213+
{
214+
"key": "service_credential_names"
215+
},
216+
{
217+
"key": "admin_pass"
218+
},
219+
{
220+
"key": "users"
221+
},
222+
{
223+
"key": "resource_tags"
224+
},
225+
{
226+
"key": "access_tags"
227+
},
228+
{
229+
"key": "ibmcloud_kms_api_key"
230+
},
231+
{
232+
"key": "existing_kms_instance_crn"
233+
},
234+
{
235+
"key": "existing_kms_key_crn"
236+
},
237+
{
238+
"key": "kms_endpoint_type",
239+
"options": [
240+
{
241+
"displayname": "public",
242+
"value": "public"
243+
},
244+
{
245+
"displayname": "private",
246+
"value": "private"
247+
}
248+
]
249+
},
250+
{
251+
"key": "skip_iam_authorization_policy"
252+
},
253+
{
254+
"key": "key_ring_name"
255+
},
256+
{
257+
"key": "key_name"
258+
},
259+
{
260+
"key": "auto_scaling"
261+
}
262+
]
263+
}
264+
]
265+
}
266+
]
267+
}

images/postgresql.svg

Lines changed: 1 addition & 0 deletions
Loading

modules/fscloud/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,14 @@ No resources.
5858
| Name | Description |
5959
|------|-------------|
6060
| <a name="output_adminuser"></a> [adminuser](#output\_adminuser) | Database admin user name |
61+
| <a name="output_cbr_rule_ids"></a> [cbr\_rule\_ids](#output\_cbr\_rule\_ids) | CBR rule ids created to restrict Postgresql |
6162
| <a name="output_certificate_base64"></a> [certificate\_base64](#output\_certificate\_base64) | Database connection certificate |
6263
| <a name="output_crn"></a> [crn](#output\_crn) | Postgresql instance crn |
6364
| <a name="output_guid"></a> [guid](#output\_guid) | Postgresql instance guid |
6465
| <a name="output_hostname"></a> [hostname](#output\_hostname) | Database connection hostname |
6566
| <a name="output_id"></a> [id](#output\_id) | Postgresql instance id |
6667
| <a name="output_port"></a> [port](#output\_port) | Database connection port |
68+
| <a name="output_service_credentials_json"></a> [service\_credentials\_json](#output\_service\_credentials\_json) | Service credentials json map |
69+
| <a name="output_service_credentials_object"></a> [service\_credentials\_object](#output\_service\_credentials\_object) | Service credentials object |
6770
| <a name="output_version"></a> [version](#output\_version) | Postgresql instance version |
6871
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

modules/fscloud/outputs.tf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,20 @@ output "certificate_base64" {
4242
value = module.postgresql_db.certificate_base64
4343
sensitive = true
4444
}
45+
46+
output "service_credentials_json" {
47+
description = "Service credentials json map"
48+
value = module.postgresql_db.service_credentials_json
49+
sensitive = true
50+
}
51+
52+
output "service_credentials_object" {
53+
description = "Service credentials object"
54+
value = module.postgresql_db.service_credentials_object
55+
sensitive = true
56+
}
57+
58+
output "cbr_rule_ids" {
59+
description = "CBR rule ids created to restrict Postgresql"
60+
value = module.postgresql_db.cbr_rule_ids
61+
}

reference-architecture/deployable-architecture-postgresql.svg

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)