Skip to content

Commit e949783

Browse files
nupurg-ibmSagar BK
and
Sagar BK
authored
fix: Ubuntu Image vulnerability fixed<br>* Addition of P1, P2 test cases (#173)
Co-authored-by: Sagar BK <[email protected]>
1 parent 75c46e2 commit e949783

20 files changed

+700
-206
lines changed

ibm_catalog.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,15 @@
331331
"key": "bastion_security_group_id"
332332
},
333333
{
334-
"key": "bastion_ssh_private_key"
334+
"key": "bastion_ssh_private_key",
335+
"type": "multiline_secure_value",
336+
"display_name": "Multiline secure value",
337+
"required": false,
338+
"custom_config": {
339+
"grouping": "deployment",
340+
"original_grouping": "deployment",
341+
"type": "multiline_secure_value"
342+
}
335343
},
336344
{
337345
"hidden": true,

modules/bootstrap/locals.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ locals {
2626
bastion_node_name = format("%s-%s", local.prefix, "bastion")
2727

2828
bastion_machine_type = "cx2-4x8"
29-
bastion_image_name = "ibm-ubuntu-22-04-3-minimal-amd64-1"
29+
bastion_image_name = "ibm-ubuntu-22-04-4-minimal-amd64-3"
3030

3131
bastion_image_id = data.ibm_is_image.bastion.id
3232

modules/custom/subnet_cidr_check/main.tf

-17
This file was deleted.

modules/custom/subnet_cidr_check/outputs.tf

-4
This file was deleted.

modules/custom/subnet_cidr_check/variables.tf

-12
This file was deleted.

modules/custom/subnet_cidr_check/version.tf

-3
This file was deleted.

modules/landing_zone_vsi/image_map.tf

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
locals {
22
image_region_map = {
3-
"hpcaas-lsf10-rhel88-v8" = {
4-
"us-east" = "r014-ee8b808f-e129-4d9e-965e-fed7003132e7"
5-
"eu-de" = "r010-bfad7737-77f9-4af7-9446-4783fb582258"
6-
"us-south" = "r006-d314bc1d-e904-4124-9055-0862e1a56579"
3+
"hpcaas-lsf10-rhel88-v9" = {
4+
"us-east" = "r014-d2b18006-c0c4-428f-96f3-e033b970c582"
5+
"eu-de" = "r010-3bf3f57e-1985-431d-aefe-e9914ab7919c"
6+
"us-south" = "r006-7b0aa90b-f52c-44b1-bab7-ccbfae9f1816"
77
},
88
"hpcaas-lsf10-rhel88-compute-v5" = {
99
"us-east" = "r014-deb34fb1-edbf-464c-9af3-7efa2efcff3f"
1010
"eu-de" = "r010-2d04cfff-6f54-45d1-b3b3-7e259083d71f"
1111
"us-south" = "r006-236ee1f4-38de-4845-b7ec-e2ffa7df5d08"
1212
},
13-
"hpcaas-lsf10-ubuntu2204-compute-v4" = {
14-
"us-east" = "r014-b15b5e51-ccb6-40e4-9d6b-d0d47864a8a2"
15-
"eu-de" = "r010-39f4de94-2a55-431e-ad86-613c5b23a030"
16-
"us-south" = "r006-fe0e6afd-4d01-4794-a9ed-dd5353dda482"
13+
"hpcaas-lsf10-ubuntu2204-compute-v5" = {
14+
"us-east" = "r014-ecbf4c89-16a3-472e-8bab-1e76d744e264"
15+
"eu-de" = "r010-9811d8bf-a7f8-4ee6-8342-e5af217bc513"
16+
"us-south" = "r006-ed76cb75-f086-48e9-8090-e2dbc411abe7"
1717
}
1818
}
1919
}

modules/landing_zone_vsi/variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ variable "ldap_vsi_profile" {
313313

314314
variable "ldap_vsi_osimage_name" {
315315
type = string
316-
default = "ibm-ubuntu-22-04-3-minimal-amd64-1"
316+
default = "ibm-ubuntu-22-04-4-minimal-amd64-3"
317317
description = "Image name to be used for provisioning the LDAP instances."
318318
}
319319

samples/configs/hpc_catalog_values.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"enable_cos_integration" : "false",
2121
"cos_instance_name" : "__NULL__",
2222
"enable_fip" : "true",
23-
"management_image_name" : "hpcaas-lsf10-rhel88-v8",
23+
"management_image_name" : "hpcaas-lsf10-rhel88-v9",
2424
"compute_image_name" : "hpcaas-lsf10-rhel88-compute-v5",
2525
"login_image_name" : "hpcaas-lsf10-rhel88-compute-v5",
2626
"login_node_instance_type" : "bx2-2x8",
@@ -48,7 +48,7 @@
4848
"ldap_user_name" : "",
4949
"ldap_user_password" : "",
5050
"ldap_vsi_profile" : "cx2-2x4",
51-
"ldap_vsi_osimage_name" : "ibm-ubuntu-22-04-3-minimal-amd64-1",
51+
"ldap_vsi_osimage_name" : "ibm-ubuntu-22-04-4-minimal-amd64-3",
5252
"skip_iam_authorization_policy" : "false",
5353
"skip_iam_share_authorization_policy" : "false",
5454
"scc_enable" : "false",

samples/configs/hpc_schematics_values.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
},
198198
{
199199
"name": "management_image_name",
200-
"value": "hpcaas-lsf10-rhel88-v8",
200+
"value": "hpcaas-lsf10-rhel88-v9",
201201
"type": "string",
202202
"secure": false,
203203
"description": "Name of the custom image that you want to use to create virtual server instances in your IBM Cloud account to deploy the IBM Cloud HPC cluster management nodes. By default, the solution uses a RHEL88 base image with additional software packages mentioned [here](https://cloud.ibm.com/docs/ibm-spectrum-lsf#create-custom-image). If you would like to include your application-specific binary files, follow the instructions in [ Planning for custom images ](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images) to create your own custom image and use that to build the IBM Cloud HPC cluster through this offering."
@@ -207,15 +207,15 @@
207207
"value": "hpcaas-lsf10-rhel88-compute-v5",
208208
"type": "string",
209209
"secure": false,
210-
"description": "Name of the custom image that you want to use to create virtual server instances in your IBM Cloud account to deploy the IBM Cloud HPC cluster dynamic compute nodes. By default, the solution uses a RHEL 8-6 OS image with additional software packages mentioned [here](https://cloud.ibm.com/docs/ibm-spectrum-lsf#create-custom-image). The solution also offers, Ubuntu 22-04 OS base image (hpcaas-lsf10-ubuntu2204-compute-v4). If you would like to include your application-specific binary files, follow the instructions in [ Planning for custom images ](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images) to create your own custom image and use that to build the IBM Cloud HPC cluster through this offering."
210+
"description": "Name of the custom image that you want to use to create virtual server instances in your IBM Cloud account to deploy the IBM Cloud HPC cluster dynamic compute nodes. By default, the solution uses a RHEL 8-6 OS image with additional software packages mentioned [here](https://cloud.ibm.com/docs/ibm-spectrum-lsf#create-custom-image). The solution also offers, Ubuntu 22-04 OS base image (hpcaas-lsf10-ubuntu2204-compute-v5). If you would like to include your application-specific binary files, follow the instructions in [ Planning for custom images ](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images) to create your own custom image and use that to build the IBM Cloud HPC cluster through this offering."
211211

212212
},
213213
{
214214
"name": "login_image_name",
215215
"value": "hpcaas-lsf10-rhel88-compute-v5",
216216
"type": "string",
217217
"secure": false,
218-
"description": "Name of the custom image that you want to use to create virtual server instances in your IBM Cloud account to deploy the IBM Cloud HPC cluster login node. By default, the solution uses a RHEL 8-6 OS image with additional software packages mentioned [here](https://cloud.ibm.com/docs/ibm-spectrum-lsf#create-custom-image). The solution also offers, Ubuntu 22-04 OS base image (hpcaas-lsf10-ubuntu2204-compute-v4). If you would like to include your application-specific binary files, follow the instructions in [ Planning for custom images ](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images) to create your own custom image and use that to build the IBM Cloud HPC cluster through this offering."
218+
"description": "Name of the custom image that you want to use to create virtual server instances in your IBM Cloud account to deploy the IBM Cloud HPC cluster login node. By default, the solution uses a RHEL 8-6 OS image with additional software packages mentioned [here](https://cloud.ibm.com/docs/ibm-spectrum-lsf#create-custom-image). The solution also offers, Ubuntu 22-04 OS base image (hpcaas-lsf10-ubuntu2204-compute-v5). If you would like to include your application-specific binary files, follow the instructions in [ Planning for custom images ](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images) to create your own custom image and use that to build the IBM Cloud HPC cluster through this offering."
219219
},
220220
{
221221
"name": "login_node_instance_type",
@@ -377,7 +377,7 @@
377377
},
378378
{
379379
"name": "ldap_vsi_osimage_name",
380-
"value": "ibm-ubuntu-22-04-3-minimal-amd64-1",
380+
"value": "ibm-ubuntu-22-04-4-minimal-amd64-3",
381381
"type": "string",
382382
"secure": false,
383383
"description": "Image name to be used for provisioning the LDAP instances."
@@ -456,28 +456,28 @@
456456
"value": "__NULL__",
457457
"type": "string",
458458
"secure": false,
459-
"description" : "Bastion instance name. If none given then new bastion will be created."
459+
"description" : "Provide the name of the bastion instance. If none given then new bastion will be created."
460460
},
461461
{
462462
"name": "bastion_instance_public_ip",
463463
"value": "__NULL__",
464464
"type": "string",
465465
"secure": false,
466-
"description" : "Bastion instance public ip address."
466+
"description" : "Provide the public ip address of the bastion instance to establish the remote connection."
467467
},
468468
{
469469
"name": "bastion_security_group_id",
470470
"value": "__NULL__",
471471
"type": "string",
472472
"secure": false,
473-
"description" : "Bastion security group id."
473+
"description" : "Provide the security group ID of the bastion server. This security group ID will be added as an allowlist rule on the HPC cluster nodes to establish an SSH connection through the bastion node."
474474
},
475475
{
476476
"name": "bastion_ssh_private_key",
477477
"value": "__NULL__",
478478
"type": "string",
479479
"secure": false,
480-
"description" : "Bastion SSH private key path, which will be used to login to bastion host."
480+
"description" : "Provide the private SSH key (named id_rsa) used during the creation and configuration of the bastion server to securely authenticate and connect to the bastion server. This allows access to internal network resources from a secure entry point. Note: The corresponding public SSH key (named id_rsa.pub) must already be available in the ~/.ssh/authorized_keys file on the bastion host to establish authentication."
481481
}
482482
]
483483
}

solutions/hpc/datasource.tf

-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ data "ibm_is_vpc" "vpc" {
3939
depends_on = [module.landing_zone.vpc_name, data.ibm_is_vpc.existing_vpc]
4040
}
4141

42-
data "ibm_is_vpc_address_prefixes" "existing_vpc" {
43-
#count = var.vpc_name != "" ? 1 : 0
44-
vpc = data.ibm_is_vpc.vpc.id
45-
}
46-
4742
data "ibm_is_subnet" "existing_subnet" {
4843
# Lookup for this Subnet resources only if var.cluster_subnet_ids is not empty
4944
count = (length(var.cluster_subnet_ids) == 1 && var.vpc_name != null) ? length(var.cluster_subnet_ids) : 0

solutions/hpc/input_validation.tf

-24
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,7 @@
66
# This file contains the complete information on all the validations performed from the code during the generate plan process
77
# Validations are performed to make sure, the appropriate error messages are displayed to user in-order to provide required input parameter
88

9-
# Module for the private cluster_subnet and login subnet cidr validation.
10-
module "ipvalidation_cluster_subnet" {
11-
count = length(var.vpc_cluster_private_subnets_cidr_blocks)
12-
source = "../../modules/custom/subnet_cidr_check"
13-
subnet_cidr = var.vpc_cluster_private_subnets_cidr_blocks[count.index]
14-
vpc_address_prefix = [local.prefixes_in_given_zone_1][count.index]
15-
}
16-
17-
module "ipvalidation_login_subnet" {
18-
source = "../../modules/custom/subnet_cidr_check"
19-
subnet_cidr = var.vpc_cluster_login_private_subnets_cidr_blocks[0]
20-
vpc_address_prefix = local.prefixes_in_given_zone_login
21-
}
22-
239
locals {
24-
# Copy address prefixes and CIDR of given zone into a new tuple
25-
prefixes_in_given_zone_login = [
26-
for prefix in data.ibm_is_vpc_address_prefixes.existing_vpc[*].address_prefixes[0] :
27-
prefix.cidr if prefix.zone[0].name == var.zones[0]]
28-
29-
# To get the address prefix of zone1
30-
prefixes_in_given_zone_1 = [
31-
for prefix in data.ibm_is_vpc_address_prefixes.existing_vpc[*].address_prefixes[0] :
32-
prefix.cidr if var.zones[0] == prefix.zone[0].name]
33-
3410
# validation for the boot volume encryption toggling.
3511
validate_enable_customer_managed_encryption = anytrue([alltrue([var.kms_key_name != null, var.kms_instance_name != null]), (var.kms_key_name == null), (var.key_management != "key_protect")])
3612
validate_enable_customer_managed_encryption_msg = "Please make sure you are passing the kms_instance_name if you are passing kms_key_name."

solutions/hpc/variables.tf

+8-8
Original file line numberDiff line numberDiff line change
@@ -176,21 +176,21 @@ variable "login_node_instance_type" {
176176
}
177177
variable "management_image_name" {
178178
type = string
179-
default = "hpcaas-lsf10-rhel88-v8"
179+
default = "hpcaas-lsf10-rhel88-v9"
180180
description = "Name of the custom image that you want to use to create virtual server instances in your IBM Cloud account to deploy the IBM Cloud HPC cluster management nodes. By default, the solution uses a RHEL88 base image with additional software packages mentioned [here](https://cloud.ibm.com/docs/ibm-spectrum-lsf#create-custom-image). If you would like to include your application-specific binary files, follow the instructions in [ Planning for custom images ](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images) to create your own custom image and use that to build the IBM Cloud HPC cluster through this offering."
181181

182182
}
183183

184184
variable "compute_image_name" {
185185
type = string
186186
default = "hpcaas-lsf10-rhel88-compute-v5"
187-
description = "Name of the custom image that you want to use to create virtual server instances in your IBM Cloud account to deploy the IBM Cloud HPC cluster dynamic compute nodes. By default, the solution uses a RHEL 8-8 base OS image with additional software packages mentioned [here](https://cloud.ibm.com/docs/ibm-spectrum-lsf#create-custom-image). The solution also offers, Ubuntu 22-04 OS base image (hpcaas-lsf10-ubuntu2204-compute-v4). If you would like to include your application-specific binary files, follow the instructions in [ Planning for custom images ](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images) to create your own custom image and use that to build the IBM Cloud HPC cluster through this offering."
187+
description = "Name of the custom image that you want to use to create virtual server instances in your IBM Cloud account to deploy the IBM Cloud HPC cluster dynamic compute nodes. By default, the solution uses a RHEL 8-8 base OS image with additional software packages mentioned [here](https://cloud.ibm.com/docs/ibm-spectrum-lsf#create-custom-image). The solution also offers, Ubuntu 22-04 OS base image (hpcaas-lsf10-ubuntu2204-compute-v5). If you would like to include your application-specific binary files, follow the instructions in [ Planning for custom images ](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images) to create your own custom image and use that to build the IBM Cloud HPC cluster through this offering."
188188
}
189189

190190
variable "login_image_name" {
191191
type = string
192192
default = "hpcaas-lsf10-rhel88-compute-v5"
193-
description = "Name of the custom image that you want to use to create virtual server instances in your IBM Cloud account to deploy the IBM Cloud HPC cluster login node. By default, the solution uses a RHEL 8-8 OS image with additional software packages mentioned [here](https://cloud.ibm.com/docs/ibm-spectrum-lsf#create-custom-image). The solution also offers, Ubuntu 22-04 OS base image (hpcaas-lsf10-ubuntu2204-compute-v4). If you would like to include your application-specific binary files, follow the instructions in [ Planning for custom images ](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images) to create your own custom image and use that to build the IBM Cloud HPC cluster through this offering."
193+
description = "Name of the custom image that you want to use to create virtual server instances in your IBM Cloud account to deploy the IBM Cloud HPC cluster login node. By default, the solution uses a RHEL 8-8 OS image with additional software packages mentioned [here](https://cloud.ibm.com/docs/ibm-spectrum-lsf#create-custom-image). The solution also offers, Ubuntu 22-04 OS base image (hpcaas-lsf10-ubuntu2204-compute-v5). If you would like to include your application-specific binary files, follow the instructions in [ Planning for custom images ](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images) to create your own custom image and use that to build the IBM Cloud HPC cluster through this offering."
194194
}
195195

196196
variable "management_node_instance_type" {
@@ -496,7 +496,7 @@ variable "ldap_vsi_profile" {
496496

497497
variable "ldap_vsi_osimage_name" {
498498
type = string
499-
default = "ibm-ubuntu-22-04-3-minimal-amd64-1"
499+
default = "ibm-ubuntu-22-04-4-minimal-amd64-3"
500500
description = "Image name to be used for provisioning the LDAP instances. By default ldap server are created on Ubuntu based OS flavour."
501501
}
502502

@@ -560,24 +560,24 @@ variable "TF_VALIDATION_SCRIPT_FILES" {
560560
variable "bastion_instance_name" {
561561
type = string
562562
default = null
563-
description = "Bastion instance name. If none given then new bastion will be created."
563+
description = "Provide the name of the bastion instance. If none given then new bastion will be created."
564564
}
565565

566566
variable "bastion_instance_public_ip" {
567567
type = string
568568
default = null
569-
description = "Bastion instance public ip address."
569+
description = "Provide the public ip address of the bastion instance to establish the remote connection."
570570
}
571571

572572
variable "bastion_security_group_id" {
573573
type = string
574574
default = null
575-
description = "Bastion security group id."
575+
description = "Provide the security group ID of the bastion server. This security group ID will be added as an allowlist rule on the HPC cluster nodes to establish an SSH connection through the bastion node."
576576
}
577577

578578
variable "bastion_ssh_private_key" {
579579
type = string
580580
sensitive = true
581581
default = null
582-
description = "Bastion SSH private key path, which will be used to login to bastion host."
582+
description = "Provide the private SSH key (named id_rsa) used during the creation and configuration of the bastion server to securely authenticate and connect to the bastion server. This allows access to internal network resources from a secure entry point. Note: The corresponding public SSH key (named id_rsa.pub) must already be available in the ~/.ssh/authorized_keys file on the bastion host to establish authentication."
583583
}

0 commit comments

Comments
 (0)