Skip to content

Commit e983bbb

Browse files
bksagarSagar BK
andauthored
feat: Support for the Pay Go version on LSF
* Code pushed on the public repo for the lSF Pay Go model * changes on the precommit check --------- Co-authored-by: Sagar BK <Sagar.BK1@ibm.com>
1 parent 6a1e32f commit e983bbb

File tree

25 files changed

+210
-145
lines changed

25 files changed

+210
-145
lines changed

.catalog-onboard-pipeline.yaml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,3 @@ offerings:
2222
region: us-south
2323
# pre_validation: tests/scripts/pre-validation.sh # optionally run a command before validation runs
2424
# post_validation: tests/scripts/post-validation.sh # optionally run a command after validation completes
25-
- name: deploy-arch-ibm-storage-scale # must match the offering name in the ibm_catalog.json
26-
kind: solution
27-
catalog_id: 90717ada-be34-4b82-a0d9-0f225f8dbd76
28-
offering_id: 33105573-84df-4279-9efa-48887456fa6d
29-
# list all of the variations (flavors) you have included in the ibm_catalog.json
30-
variations:
31-
- name: Cluster-with-Scale
32-
mark_ready: false # have pipeline mark as visible if validation passes
33-
install_type: fullstack # ensure value matches what is in ibm_catalog.json (fullstack or extension)
34-
destroy_resources_on_failure: false # defaults to false if not specified so resources can be inspected to debug failures during validation
35-
destroy_workspace_on_failure: false # defaults to false if not specified so schematics workspace can be inspected to debug failures during validation
36-
import_only: false # defaults to false - set to true if you do not want to do any validation, but be aware offering can't be publish if not validated
37-
validation_rg: validation # the resource group in which to do validation in. Will be created if does not exist. If not specified, default value is 'validation'
38-
# scc details needed if your offering is claiming any compliance controls
39-
scc:
40-
# must be an instance in the same account the validation is being done in
41-
instance_id: 1c7d5f78-9262-44c3-b779-b28fe4d88c37
42-
region: us-south
43-
# pre_validation: tests/scripts/pre-validation.sh # optionally run a command before validation runs
44-
# post_validation: tests/scripts/post-validation.sh # optionally run a command after validation completes

.secrets.baseline

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2025-11-07T08:08:33Z",
6+
"generated_at": "2025-10-29T15:24:27Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"

ci 2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
common-dev-assets/module-assets/ci

ibm_catalog.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666
"key": "existing_resource_group",
6767
"required": true
6868
},
69+
{
70+
"key": "lsf_pay_per_use",
71+
"required": true
72+
},
6973
{
7074
"key": "ssh_keys",
7175
"required": true
@@ -669,7 +673,7 @@
669673
"service_name": "dns-svcs"
670674
},
671675
{
672-
"service_name": "kms",
676+
"service_name": "Key Protect",
673677
"role_crns": [
674678
"crn:v1:bluemix:public:iam::::serviceRole:Manager",
675679
"crn:v1:bluemix:public:iam::::role:ConfigReader"
@@ -720,6 +724,12 @@
720724
"crn:v1:bluemix:public:iam::::serviceRole:Manager",
721725
"crn:v1:bluemix:public:iam::::role:Administrator"
722726
]
727+
},
728+
{
729+
"service_name": "All Account Management services",
730+
"role_crns": [
731+
"crn:v1:bluemix:public:iam::::role:Administrator"
732+
]
723733
}
724734
],
725735
"architecture": {

main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ module "landing_zone_vsi" {
134134
client_security_group_name = var.client_security_group_name
135135
gklm_security_group_name = var.gklm_security_group_name
136136
ldap_security_group_name = var.ldap_security_group_name
137+
lsf_pay_per_use = var.lsf_pay_per_use
137138
}
138139

139140
module "prepare_tf_input" {
@@ -237,6 +238,7 @@ module "prepare_tf_input" {
237238
bms_boot_drive_encryption = var.bms_boot_drive_encryption
238239
scale_afm_bucket_config_details = local.scale_afm_bucket_config_details
239240
scale_afm_cos_hmac_key_params = local.scale_afm_cos_hmac_key_params
241+
lsf_pay_per_use = var.lsf_pay_per_use
240242
depends_on = [module.deployer]
241243
}
242244

@@ -378,6 +380,7 @@ module "write_compute_cluster_inventory" {
378380
compute_subnet_crn = local.compute_subnet_crn
379381
kms_encryption_enabled = local.kms_encryption_enabled
380382
boot_volume_encryption_key = var.boot_volume_encryption_key
383+
lsf_pay_per_use = var.lsf_pay_per_use
381384
depends_on = [time_sleep.wait_for_vsi_syncup, module.landing_zone_vsi]
382385
}
383386

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
11
{
2-
"templates": [
3-
{
4-
"templateId": "Template-1",
5-
"maxNumber": "{{ rc_max_num }}",
6-
"attributes": {
7-
"type": ["String", "X86_64"],
8-
"ncores": ["Numeric", "{{ rc_ncores }}"],
9-
"ncpus": ["Numeric", "{{ rc_ncpus }}"],
10-
"mem": ["Numeric", "{{ rc_mem_in_mb }}"],
11-
"icgen2host": ["Boolean", "1"]
12-
},
13-
"crn": "{{ boot_volume_encryption_key }}",
14-
"imageId": "{{ image_id }}",
15-
"subnetId": "{{ compute_subnet_crn }}",
16-
"vpcId": "{{ vpc_id }}",
17-
"vmType": "{{ rc_profile }}",
18-
"securityGroupIds": ["{{ compute_security_group_id | first }}"],
19-
"resourceGroupId": "{{ resource_group_id }}",
20-
"sshkey_id": "{{ compute_ssh_keys_ids | first }}",
21-
"region": "{{ region_name }}",
22-
"zone": "{{ zone_name | first }}"
23-
}
24-
]
2+
"templates": [
3+
{
4+
"templateId": "Template-1",
5+
"maxNumber": "{{ rc_max_num }}",
6+
"attributes": {
7+
"type": ["String", "X86_64"],
8+
"ncores": ["Numeric", "{{ rc_ncores }}"],
9+
"ncpus": ["Numeric", "{{ rc_ncpus }}"],
10+
"mem": ["Numeric", "{{ rc_mem_in_mb }}"],
11+
"icgen2host": ["Boolean", "1"]
12+
},
13+
"volumeProfile": "general-purpose",
14+
"encryptionKey": "{{ boot_volume_encryption_key }}",
15+
{% if lsf_pay_per_use %}
16+
"catalogOffering": {
17+
"version_crn": "{{ catalog_offering.version_crn }}",
18+
"plan_crn": "{{ catalog_offering.plan_crn }}"
19+
},
20+
{% else %}
21+
"imageId": "{{ image_id }}",
22+
{% endif %}
23+
"subnetId": "{{ compute_subnet_crn }}",
24+
"vpcId": "{{ vpc_id }}",
25+
"vmType": "{{ rc_profile }}",
26+
"securityGroupIds": ["{{ compute_security_group_id | first }}"],
27+
"resourceGroupId": "{{ resource_group_id }}",
28+
"sshkeyIds": {{ compute_ssh_keys_ids | to_json }},
29+
"region": "{{ region_name }}",
30+
"zone": "{{ zone_name | first }}"
31+
}
32+
]
2533
}

modules/deployer/image_map.tf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
locals {
22
image_region_map = {
3-
"hpc-lsf-fp15-deployer-rhel810-v1" = {
4-
"eu-es" = "r050-e7b874c1-f370-41c4-8ee6-50efb07aa340"
5-
"eu-gb" = "r018-eb14c522-cb0f-4b72-948f-2c029957665a"
6-
"eu-de" = "r010-00629ef3-324c-4651-a7a7-76830d2ad660"
7-
"us-east" = "r014-ac586488-de00-490e-8962-5e2a7fcab076"
8-
"us-south" = "r006-f2b7871c-54c9-4b02-837c-1d28294f0842"
9-
"jp-tok" = "r022-dd715ea3-d2dc-4936-bff0-51c9cd63b3a9"
10-
"jp-osa" = "r034-82d648ed-fd3e-4248-955c-6009c973aa5f"
11-
"au-syd" = "r026-b47e4863-f5e7-440c-8734-c058f6b8ce33"
12-
"br-sao" = "r042-8b5ac031-3e65-4afb-9679-b7e2b907a2ad"
13-
"ca-tor" = "r038-c55b1ab4-500f-4842-9e78-dc64a16a746a"
14-
"ca-mon" = "r058-fc93c3f9-f97c-4d9b-b8d6-dd40db891913"
3+
"hpc-lsf-fp15-deployer-rhel810-v2" = {
4+
"eu-es" = "r050-92ce36d5-20c3-4c7d-8d38-a5d16e553d6a"
5+
"eu-gb" = "r018-da0c8368-8b87-428b-b63e-1d4acd3764f0"
6+
"eu-de" = "r010-4625705f-a2af-46fc-9694-864fb8a4b02f"
7+
"us-east" = "r014-79497f2e-d71c-4390-93d6-8ccdb19f594a"
8+
"us-south" = "r006-390958ed-07cc-4489-98d3-8e3350174cf9"
9+
"jp-tok" = "r022-f4d7ac54-1707-42e7-acf9-a74f46b4aa66"
10+
"jp-osa" = "r034-e5363d7e-f4e3-4fdc-a642-3a89c1c86b6b"
11+
"au-syd" = "r026-a52653e5-2d96-4470-bb28-5903d562099b"
12+
"br-sao" = "r042-61f7226d-5ebc-40fa-ae81-1554344b9640"
13+
"ca-tor" = "r038-4ccdcbb5-5d1a-4a86-9fdf-847f57dd1588"
14+
"ca-mon" = "r058-9a37637f-07a1-4048-9a6c-6ab75441f74a"
1515
},
1616
"hpc-lsf-fp14-deployer-rhel810-v1" = {
1717
"eu-es" = "r050-a530edc3-d053-41cd-899b-2c61d53d5efd"

modules/landing_zone_vsi/image_map.tf

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
locals {
22
image_region_map = {
3-
"hpc-lsf-fp15-rhel810-v1" = {
4-
"eu-es" = "r050-deeeb734-2523-4aff-96e3-2be8d2b0d634"
5-
"eu-gb" = "r018-8edcd9a1-dbca-462f-bf74-017c15ca4b71"
6-
"eu-de" = "r010-394c5295-1704-4066-b57e-ae9bca1968de"
7-
"us-east" = "r014-1777cdcb-8a68-4ef0-becf-84ec0d2e9a26"
8-
"us-south" = "r006-40caf671-28a8-42c5-b83e-b2ba3ceb86af"
9-
"jp-tok" = "r022-01531301-d100-44ba-b1a3-12e7c8d65469"
10-
"jp-osa" = "r034-ac455775-c667-4d3e-b281-9ef845080599"
11-
"au-syd" = "r026-eff4d59c-5006-46cc-8b03-60514f763a87"
12-
"br-sao" = "r042-1e1bbeeb-3ef7-4f7a-a44c-9f50609bb538"
13-
"ca-tor" = "r038-bb9fcdb7-d200-4cdd-af04-6848007c9cb2"
3+
"hpc-lsf-fp15-rhel810-v2" = {
4+
"eu-es" = "r050-bb9be81c-7026-4b53-9768-b46fe6ff35af"
5+
"eu-gb" = "r018-d85fbab9-5573-4a25-8cd9-b584e0266ed3"
6+
"eu-de" = "r010-b5259da3-11f9-434d-87f9-0eed1030f593"
7+
"us-east" = "r014-1dffabd0-bb20-4c97-b73a-3a745ccfa53d"
8+
"us-south" = "r006-829c9fbc-ecb6-4f3d-be37-1f652d26ec58"
9+
"jp-tok" = "r022-1c956e0e-17e0-4ce3-833b-d79173d68fe0"
10+
"jp-osa" = "r034-7a3733eb-c2eb-4e8e-8b10-4b5bc97331c3"
11+
"au-syd" = "r026-4d4d012d-a023-4a32-9a58-fe3b0903be7a"
12+
"br-sao" = "r042-7d242646-c928-4eae-8176-b6a4c6aad06b"
13+
"ca-tor" = "r038-023f8697-5b44-469e-a021-6898b46ea0a5"
14+
"ca-mon" = "r058-e952898e-71cf-4921-8e3c-1e2b00382f07"
1415
},
15-
"hpc-lsf-fp15-compute-rhel810-v1" = {
16-
"eu-es" = "r050-f0608e39-9dcf-4aca-9e92-7719474b3e86"
17-
"eu-gb" = "r018-db8b97a8-6f87-4cf7-a044-847da6ab5c59"
18-
"eu-de" = "r010-957efd6b-e7b3-4249-8644-6184f1531915"
19-
"us-east" = "r014-5fdd6a25-5943-4084-9c57-b900a80579a3"
20-
"us-south" = "r006-5c0e462a-679c-4a18-81a5-0fe036f483a3"
21-
"jp-tok" = "r022-8087a984-8912-42ff-9576-c5cab8edda3a"
22-
"jp-osa" = "r034-728d1f12-7842-412c-97a0-9deb66c23962"
23-
"au-syd" = "r026-f957ed22-9565-441c-bce6-f716360e02ea"
24-
"br-sao" = "r042-7bf7d508-a7b1-4434-ae6a-6986f7042d4e"
25-
"ca-tor" = "r038-a658da44-f1b4-4e02-826a-38b16e6ae98a"
16+
"hpc-lsf-fp15-compute-rhel810-v2" = {
17+
"eu-es" = "r050-91d88518-bc52-42f4-a794-f64e9d0e9fac"
18+
"eu-gb" = "r018-923c06c7-f077-44b7-9ed2-7d9817d9df26"
19+
"eu-de" = "r010-2dd07456-e9ad-4b39-a131-ad786fb1f725"
20+
"us-east" = "r014-f464db9b-5951-48ab-908d-8d36614ac086"
21+
"us-south" = "r006-cb59a6b6-7a58-489b-905c-47ca13f2e60b"
22+
"jp-tok" = "r022-1026bca9-163d-4852-a071-7481ebc19255"
23+
"jp-osa" = "r034-5551a235-92eb-4316-98e3-5b100b7563c8"
24+
"au-syd" = "r026-30a9c1d9-1803-4cf2-9175-bab4f7866f77"
25+
"br-sao" = "r042-1f4b2fa5-eb39-472c-acd9-96cba25d46ab"
26+
"ca-tor" = "r038-bebb2cdc-530a-4d37-ada7-f8f0fbb17a5f"
27+
"ca-mon" = "r058-12b6c1f4-1377-478d-ba39-bd4b38a94e8b"
2628
},
2729
"hpc-lsf-fp14-rhel810-v1" = {
2830
"eu-es" = "r050-12a3533c-5fa1-4bcc-8765-7150a06e122e"

modules/landing_zone_vsi/locals.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,3 +482,10 @@ locals {
482482
ldap_security_group_name_id = var.ldap_security_group_name != null ? data.ibm_is_security_group.ldap_security_group[*].id : []
483483
compute_security_group_name_id = var.compute_security_group_name != null ? data.ibm_is_security_group.compute_security_group[*].id : []
484484
}
485+
486+
locals {
487+
catalog_offering = {
488+
version_crn = "crn:v1:bluemix:public:globalcatalog-collection:global:a/77efe1030c00b5c89cfd08648d3480bf:0d89ec0d-d39a-494d-ac5b-9d940d8cc65f:version:61e655c5-40b6-4b68-a6ab-e6c77a457fce/e08b9ca5-699c-4779-8369-1a0c1ed54b30"
489+
plan_crn = "crn:v1:bluemix:public:globalcatalog-collection:global:a/77efe1030c00b5c89cfd08648d3480bf:0d89ec0d-d39a-494d-ac5b-9d940d8cc65f:plan:sw.0d89ec0d-d39a-494d-ac5b-9d940d8cc65f.d114e7ab-4f7e-40c4-98cc-f0c000cbf3a7"
490+
}
491+
}

0 commit comments

Comments
 (0)