Skip to content

Commit 98b6407

Browse files
feat: switch tok04 osa21 syd05 to PER (#633)
1 parent 223e910 commit 98b6407

File tree

23 files changed

+130
-81
lines changed

23 files changed

+130
-81
lines changed

ibm_catalog.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@
107107
"value": "lon04"
108108
},
109109
{
110-
"displayname": "London 06 (lon06)",
110+
"displayname": "London 06 (lon06) PER",
111111
"value": "lon06"
112112
},
113113
{
114114
"displayname": "Montreal 01 (mon01)",
115115
"value": "mon01"
116116
},
117117
{
118-
"displayname": "Osaka 21 (osa21)",
118+
"displayname": "Osaka 21 (osa21) PER",
119119
"value": "osa21"
120120
},
121121
{
@@ -131,11 +131,11 @@
131131
"value": "syd04"
132132
},
133133
{
134-
"displayname": "Sydney 05 (syd05)",
134+
"displayname": "Sydney 05 (syd05) PER",
135135
"value": "syd05"
136136
},
137137
{
138-
"displayname": "Tokyo 04 (tok04)",
138+
"displayname": "Tokyo 04 (tok04) PER",
139139
"value": "tok04"
140140
},
141141
{
@@ -422,15 +422,15 @@
422422
"value": "lon04"
423423
},
424424
{
425-
"displayname": "London 06 (lon06)",
425+
"displayname": "London 06 (lon06) PER",
426426
"value": "lon06"
427427
},
428428
{
429429
"displayname": "Montreal 01 (mon01)",
430430
"value": "mon01"
431431
},
432432
{
433-
"displayname": "Osaka 21 (osa21)",
433+
"displayname": "Osaka 21 (osa21) PER",
434434
"value": "osa21"
435435
},
436436
{
@@ -446,11 +446,11 @@
446446
"value": "syd04"
447447
},
448448
{
449-
"displayname": "Sydney 05 (syd05)",
449+
"displayname": "Sydney 05 (syd05) PER",
450450
"value": "syd05"
451451
},
452452
{
453-
"displayname": "Tokyo 04 (tok04)",
453+
"displayname": "Tokyo 04 (tok04) PER",
454454
"value": "tok04"
455455
},
456456
{

modules/ibmcloud-cos/main.tf

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
#####################################################
32
# 1. Download objects from IBMCLOUD COS
43
#####################################################
@@ -18,7 +17,11 @@ locals {
1817
# 1. Download objects from IBMCLOUD COS
1918
#####################################################
2019

21-
resource "null_resource" "download_objects" {
20+
resource "terraform_data" "trigger_cos_configuration" {
21+
input = var.ibmcloud_cos_configuration
22+
}
23+
24+
resource "terraform_data" "download_objects" {
2225

2326
connection {
2427
type = "ssh"
@@ -30,10 +33,10 @@ resource "null_resource" "download_objects" {
3033
timeout = "10m"
3134
}
3235

33-
provisioner "remote-exec" {
36+
triggers_replace = terraform_data.trigger_cos_configuration
3437

38+
provisioner "remote-exec" {
3539
inline = ["mkdir -p ${local.dst_files_dir}", "chmod 777 ${local.dst_files_dir}", ]
36-
3740
}
3841

3942
####### Copy Template file to target host ############
@@ -55,7 +58,7 @@ resource "null_resource" "download_objects" {
5558
provisioner "remote-exec" {
5659
inline = [
5760
"chmod +x ${local.dst_script_ibmcloud_cos_sh_path}",
58-
"${local.dst_script_ibmcloud_cos_sh_path} -i ${var.ibmcloud_cos_configuration.cos_apikey} > ${local.log_file}",
61+
"${local.dst_script_ibmcloud_cos_sh_path} -i ${var.ibmcloud_cos_configuration.cos_apikey} &> ${local.log_file} || { exit 1; } ",
5962
"chmod 777 -R ${var.ibmcloud_cos_configuration.download_dir_path}"
6063
]
6164
}
@@ -65,5 +68,4 @@ resource "null_resource" "download_objects" {
6568
"cat ${local.log_file}"
6669
]
6770
}
68-
6971
}

modules/ibmcloud-cos/templates/ibmcloud_cos.sh.tfpl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ ibmcloud config --check-version false
5050
ibmcloud plugin install cloud-object-storage -f
5151

5252
# LogIn to the IBM Cloud with IBM API key:
53-
ibmcloud login --no-region --apikey $IBMCLOUD_API_KEY
53+
# Attempt login
54+
if ibmcloud login --no-region --apikey "$IBMCLOUD_API_KEY"; then
55+
echo "Login successful. Continuing with the script..."
56+
else
57+
echo "Failed to login to IBM Cloud. Exiting..."
58+
exit 1
59+
fi
5460

5561
# Config COS CRN
5662
ibmcloud cos config crn --crn $IBMCOS_SERVICE_INSTANCE_CRN --force
@@ -62,10 +68,8 @@ IBMCOS_BUCKET_FILES_LIST=$(ibmcloud cos objects --bucket $IBMCOS_BUCKET --region
6268
for FILENAME in $IBMCOS_BUCKET_FILES_LIST; do
6369
echo "Downloading $FILENAME"
6470
FILENAME_ONLY=$(echo $FILENAME | awk '{gsub(".*/", ""); print}')
65-
if [ ! -f $IBMCOS_DOWNLOAD_DIRECTORY/$FILENAME_ONLY ]; then
66-
71+
if [ ! -f $DOWNLOAD_DIRECTORY/$COS_FOLDER_NAME/$FILENAME_ONLY ]; then
6772
yes y | ibmcloud cos object-get --bucket $IBMCOS_BUCKET --key $FILENAME --region=$IBMCOS_REGION $DOWNLOAD_DIRECTORY/$COS_FOLDER_NAME/$FILENAME_ONLY
68-
6973
else
7074
echo "File already exists"
7175
fi

modules/ibmcloud-cos/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
variable "access_host_or_ip" {
3-
description = "Public IP of Bastion Host"
3+
description = "Public IP of Bastion Host."
44
type = string
55
}
66

@@ -16,7 +16,7 @@ variable "ssh_private_key" {
1616
}
1717

1818
variable "ibmcloud_cos_configuration" {
19-
description = "IBM Cloud Object Storage details to download the files to the target host"
19+
description = "IBM Cloud Object Storage details to download the files to the target host."
2020
type = object({
2121
cos_apikey = string
2222
cos_region = string

modules/ibmcloud-cos/version.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,4 @@
44

55
terraform {
66
required_version = ">= 1.3"
7-
required_providers {
8-
null = {
9-
source = "hashicorp/null"
10-
version = ">= 3.2.1"
11-
}
12-
}
137
}

modules/pi-hana-storage-config/main.tf

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,50 @@
11
#######################################################
22
### Storage Calculation for HANA Instance
33
#######################################################
4+
45
locals {
6+
memory_size = tonumber(element(split("x", var.pi_hana_instance_sap_profile_id), 1))
7+
auto_cal_storage_config = {
8+
"memory_lt_900" = {
9+
shared_disk = { tier = "tier3", count = "1", size = local.memory_size }, #3 IOPS/GB
10+
log_disk = { tier = "tier5k", count = "4", size = ceil((local.memory_size / 2) / 4) }, #fixed 5k iops
11+
data_disk = { tier = "tier0", count = "4", size = local.memory_size < 256 ? 77 : ceil((local.memory_size * 1.2) / 4) } #25 IOPS/GB
12+
},
13+
"memory_bt_900_2100" = {
14+
shared_disk = { tier = "tier3", count = "1", size = 1000 }, #3 IOPS/GB
15+
log_disk = { tier = "tier0", count = "4", size = 128 }, #25 IOPS/GB
16+
data_disk = { tier = "tier3", count = "4", size = 648 } #3 IOPS/GB
17+
},
18+
"memory_gt_2100" = {
19+
shared_disk = { tier = "tier3", count = "1", size = 1000 }, #3 IOPS/GB
20+
log_disk = { tier = "tier0", count = "4", size = 128 }, #25 IOPS/GB
21+
data_disk = { tier = "tier3", count = "4", size = floor((local.memory_size * 1.2) / 4) } #3 IOPS/GB
22+
}
23+
}
24+
25+
storage_config = local.memory_size < 900 ? local.auto_cal_storage_config["memory_lt_900"] : local.memory_size > 2100 ? local.auto_cal_storage_config["memory_gt_2100"] : local.auto_cal_storage_config["memory_bt_900_2100"]
526

6-
auto_cal_memory_size = tonumber(element(split("x", var.pi_hana_instance_sap_profile_id), 1)) < 256 ? 256 : tonumber(element(split("x", var.pi_hana_instance_sap_profile_id), 1))
7-
auto_cal_data_volume_size = floor((local.auto_cal_memory_size * 1.1) / 4) + 1
8-
auto_cal_log_volume_size = floor((local.auto_cal_memory_size * 0.5) / 4) + 1 > 512 ? 512 : floor((local.auto_cal_memory_size * 0.5) / 4) + 1
9-
auto_cal_shared_volume_size = floor(local.auto_cal_memory_size > 1024 ? 1024 : local.auto_cal_memory_size)
1027
auto_cal_hana_storage_config = [
1128
{
12-
name = "data", size = local.auto_cal_data_volume_size, count = "4", tier = "tier1", mount = "/hana/data"
29+
name = "data"
30+
size = local.storage_config["data_disk"]["size"]
31+
count = local.storage_config["data_disk"]["count"]
32+
tier = local.storage_config["data_disk"]["tier"]
33+
mount = "/hana/data"
1334
},
1435
{
15-
name = "log", size = local.auto_cal_log_volume_size, count = "4", tier = "tier1", mount = "/hana/log"
36+
name = "log"
37+
size = local.storage_config["log_disk"]["size"]
38+
count = local.storage_config["log_disk"]["count"]
39+
tier = local.storage_config["log_disk"]["tier"]
40+
mount = "/hana/log"
1641
},
1742
{
18-
name = "shared", size = local.auto_cal_shared_volume_size, count = "1", tier = "tier3", mount = "/hana/shared"
43+
name = "shared"
44+
size = local.storage_config["shared_disk"]["size"]
45+
count = local.storage_config["shared_disk"]["count"]
46+
tier = local.storage_config["shared_disk"]["tier"]
47+
mount = "/hana/shared"
1948
}
2049
]
2150

modules/pi-sap-system-type1/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ The Power Virtual Server for SAP module automates the following tasks:
3434
| <a name="module_ansible_netweaver_sapmnt_mount"></a> [ansible\_netweaver\_sapmnt\_mount](#module\_ansible\_netweaver\_sapmnt\_mount) | ../remote-exec-ansible | n/a |
3535
| <a name="module_ansible_sap_instance_init"></a> [ansible\_sap\_instance\_init](#module\_ansible\_sap\_instance\_init) | ../remote-exec-ansible | n/a |
3636
| <a name="module_ansible_sharefs_instance_exportfs"></a> [ansible\_sharefs\_instance\_exportfs](#module\_ansible\_sharefs\_instance\_exportfs) | ../remote-exec-ansible | n/a |
37-
| <a name="module_pi_attach_sap_network"></a> [pi\_attach\_sap\_network](#module\_pi\_attach\_sap\_network) | terraform-ibm-modules/powervs-workspace/ibm//modules/pi-cloudconnection-attach | 1.7.3 |
38-
| <a name="module_pi_hana_instance"></a> [pi\_hana\_instance](#module\_pi\_hana\_instance) | terraform-ibm-modules/powervs-instance/ibm | 1.0.3 |
37+
| <a name="module_pi_attach_sap_network"></a> [pi\_attach\_sap\_network](#module\_pi\_attach\_sap\_network) | terraform-ibm-modules/powervs-workspace/ibm//modules/pi-cloudconnection-attach | 1.11.0 |
38+
| <a name="module_pi_hana_instance"></a> [pi\_hana\_instance](#module\_pi\_hana\_instance) | terraform-ibm-modules/powervs-instance/ibm | 1.1.0 |
3939
| <a name="module_pi_hana_storage_calculation"></a> [pi\_hana\_storage\_calculation](#module\_pi\_hana\_storage\_calculation) | ../pi-hana-storage-config | n/a |
40-
| <a name="module_pi_netweaver_instance"></a> [pi\_netweaver\_instance](#module\_pi\_netweaver\_instance) | terraform-ibm-modules/powervs-instance/ibm | 1.0.3 |
41-
| <a name="module_pi_sharefs_instance"></a> [pi\_sharefs\_instance](#module\_pi\_sharefs\_instance) | terraform-ibm-modules/powervs-instance/ibm | 1.0.3 |
40+
| <a name="module_pi_netweaver_instance"></a> [pi\_netweaver\_instance](#module\_pi\_netweaver\_instance) | terraform-ibm-modules/powervs-instance/ibm | 1.1.0 |
41+
| <a name="module_pi_sharefs_instance"></a> [pi\_sharefs\_instance](#module\_pi\_sharefs\_instance) | terraform-ibm-modules/powervs-instance/ibm | 1.1.0 |
4242

4343
### Resources
4444

modules/pi-sap-system-type1/main.tf

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
resource "ibm_pi_network" "sap_network" {
66
pi_cloud_instance_id = var.pi_workspace_guid
7-
pi_network_name = "${var.prefix}-net"
7+
pi_network_name = "${var.prefix}-sap-net"
88
pi_cidr = var.pi_sap_network_cidr
99
pi_network_type = "vlan"
1010
pi_network_mtu = 9000
@@ -15,13 +15,13 @@ resource "ibm_pi_network" "sap_network" {
1515
#####################################################
1616

1717
locals {
18-
per_enabled_dc_list = ["dal10", "dal12", "wdc06", "wdc07", "mad02", "mad04", "eu-de-1", "eu-de-2", "sao01", "sao04"]
18+
per_enabled_dc_list = ["dal10", "dal12", "wdc06", "wdc07", "mad02", "mad04", "eu-de-1", "eu-de-2", "sao01", "sao04", "tok04", "osa21", "syd05", "lon06"]
1919
per_enabled = contains(local.per_enabled_dc_list, var.pi_zone)
2020
}
2121

2222
module "pi_attach_sap_network" {
2323
source = "terraform-ibm-modules/powervs-workspace/ibm//modules/pi-cloudconnection-attach"
24-
version = "1.7.3"
24+
version = "1.11.0"
2525
count = local.per_enabled ? 0 : 1
2626

2727
pi_workspace_guid = var.pi_workspace_guid
@@ -45,15 +45,17 @@ locals {
4545

4646
module "pi_sharefs_instance" {
4747
source = "terraform-ibm-modules/powervs-instance/ibm"
48-
version = "1.0.3"
49-
count = var.pi_sharefs_instance.enable ? 1 : 0
48+
version = "1.1.0"
49+
50+
count = var.pi_sharefs_instance.enable ? 1 : 0
5051

5152
pi_workspace_guid = var.pi_workspace_guid
5253
pi_instance_name = local.pi_sharefs_instance_name
5354
pi_ssh_public_key_name = var.pi_ssh_public_key_name
5455
pi_image_id = var.pi_sharefs_instance.image_id
5556
pi_networks = local.pi_networks
5657
pi_sap_profile_id = null
58+
pi_boot_image_storage_tier = "tier3"
5759
pi_number_of_processors = var.pi_sharefs_instance.processors
5860
pi_memory_size = var.pi_sharefs_instance.memory
5961
pi_server_type = "s922"
@@ -112,14 +114,15 @@ module "pi_hana_storage_calculation" {
112114

113115
module "pi_hana_instance" {
114116
source = "terraform-ibm-modules/powervs-instance/ibm"
115-
version = "1.0.3"
117+
version = "1.1.0"
116118

117119
pi_workspace_guid = var.pi_workspace_guid
118120
pi_instance_name = local.pi_hana_instance_name
119121
pi_ssh_public_key_name = var.pi_ssh_public_key_name
120122
pi_image_id = var.pi_hana_instance.image_id
121123
pi_networks = local.pi_networks
122124
pi_sap_profile_id = var.pi_hana_instance.sap_profile_id
125+
pi_boot_image_storage_tier = "tier3"
123126
pi_storage_config = module.pi_hana_storage_calculation.pi_hana_storage_config
124127
pi_instance_init_linux = var.pi_instance_init_linux
125128
pi_network_services_config = var.sap_network_services_config
@@ -149,7 +152,7 @@ resource "time_sleep" "wait_1_min" {
149152

150153
module "pi_netweaver_instance" {
151154
source = "terraform-ibm-modules/powervs-instance/ibm"
152-
version = "1.0.3"
155+
version = "1.1.0"
153156
count = var.pi_netweaver_instance.instance_count
154157
depends_on = [time_sleep.wait_1_min]
155158

@@ -159,6 +162,7 @@ module "pi_netweaver_instance" {
159162
pi_image_id = var.pi_netweaver_instance.image_id
160163
pi_networks = local.pi_networks
161164
pi_sap_profile_id = null
165+
pi_boot_image_storage_tier = "tier3"
162166
pi_number_of_processors = var.pi_netweaver_instance.processors
163167
pi_memory_size = var.pi_netweaver_instance.memory
164168
pi_server_type = "s922"

reference-architectures/sap-ready-to-go/deploy-arch-ibm-pvs-sap-ready-to-go.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22

33
copyright:
4-
years: 2024
5-
lastupdated: "2024-02-07"
4+
years: 2023, 2024
5+
lastupdated: "2024-04-04"
66

77
keywords:
88

@@ -12,7 +12,7 @@ authors:
1212
- name: Arnold Beilmann
1313
- name: Suraj Bharadwaj
1414

15-
version: v1.8.0
15+
version: v1.9.0
1616

1717
# Whether the reference architecture is published to Cloud Docs production.
1818
# When set to false, the file is available only in staging. Default is false.
@@ -53,7 +53,7 @@ content-type: reference-architecture
5353
{: toc-industry="Technology"}
5454
{: toc-use-case="ITServiceManagement"}
5555
{: toc-compliance="SAPCertified"}
56-
{: toc-version="1.8.0"}
56+
{: toc-version="1.9.0"}
5757

5858
The SAP-ready PowerVS variation of the Power Virtual Server for SAP HANA creates a basic and expandable SAP system landscape. The variation builds on the foundation of the VPC landing zone and Power Virtual Server with VPC landing zone. PowerVS instances for SAP HANA, SAP NetWeaver, and optionally for shared SAP files are deployed and preconfigured for SAP installation.
5959

reference-architectures/sap-s4hana-bw4hana/deploy-arch-ibm-pvs-sap-s4hana-bw4hana.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22

33
copyright:
4-
years: 2024
5-
lastupdated: "2024-02-07"
4+
years: 2023, 2024
5+
lastupdated: "2024-04-04"
66

77
keywords:
88

@@ -12,7 +12,7 @@ authors:
1212
- name: Arnold Beilmann
1313
- name: Suraj Bharadwaj
1414

15-
version: v1.8.0
15+
version: v1.9.0
1616

1717
# Whether the reference architecture is published to Cloud Docs production.
1818
# When set to false, the file is available only in staging. Default is false.
@@ -53,7 +53,7 @@ content-type: reference-architecture
5353
{: toc-industry="Technology"}
5454
{: toc-use-case="ITServiceManagement"}
5555
{: toc-compliance="SAPCertified"}
56-
{: toc-version="1.8.0"}
56+
{: toc-version="1.9.0"}
5757

5858
'SAP S/4HANA or BW/4HANA' variation of 'Power Virtual Server for SAP HANA' creates a basic and expandable SAP system landscape built on the foundation of 'Power Virtual Server with VPC landing zone'. PowerVS instances for SAP HANA, SAP NetWeaver, and optionally for shared SAP files are deployed and preconfigured for SAP installation. The S/4HANA or BW/4HANA solution is installed based on the selected version.
5959

0 commit comments

Comments
 (0)