Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2efc0d6
VPC Landingzone and SAP HANA in one click
tripan27 Sep 25, 2025
d61b9cd
feat: VPC Landing Zone and SAP HANA one-click deployment(address code…
tripan27 Sep 25, 2025
5198c78
refactor: vars
surajsbharadwaj Sep 25, 2025
2a7d7e1
Revert "refactor: vars"
surajsbharadwaj Sep 25, 2025
9eb4888
refactor: fix catalog json, reorg vars, remove dns var, invalid count…
surajsbharadwaj Sep 26, 2025
c19115a
chore: code change only for sap-ready-to-go, pending (sap-s4hana-bw4h…
tripan27 Oct 7, 2025
e0f453a
Update modules/pi-sap-system-type1/main.tf
tripan27 Oct 7, 2025
807f05d
Update modules/pi-sap-system-type1/main.tf
tripan27 Oct 7, 2025
25492f4
Update modules/pi-sap-system-type1/main.tf
tripan27 Oct 7, 2025
d90bc6f
Update modules/pi-sap-system-type1/main.tf
tripan27 Oct 7, 2025
1155c56
Update modules/pi-sap-system-type1/main.tf
tripan27 Oct 7, 2025
ce733b2
Update modules/pi-sap-system-type1/main.tf
tripan27 Oct 7, 2025
ec35565
chore: new end to end solution for sap
tripan27 Oct 10, 2025
9f56e80
chore: new end to end solution for sap
tripan27 Oct 10, 2025
c28fe9a
chore: refer arch updated
tripan27 Oct 10, 2025
865ea8b
chore: fix cra
surajsbharadwaj Oct 10, 2025
49568d6
chore: remove comments
surajsbharadwaj Oct 10, 2025
9b6c464
chore: cleanup
surajsbharadwaj Oct 10, 2025
50a8d21
chore: fix cra
surajsbharadwaj Oct 10, 2025
0b6be31
chore: fix cra prefix
surajsbharadwaj Oct 10, 2025
aa47079
chore(deps): update dependencies
terraform-ibm-modules-ops Oct 11, 2025
736b593
chore: fix cra ansible
surajsbharadwaj Oct 11, 2025
5236b9a
Merge branch 'main' into vpc-and-sap
surajsbharadwaj Oct 11, 2025
30c0cf8
chore: common dev assets
surajsbharadwaj Oct 11, 2025
7818935
chore: update var description
surajsbharadwaj Oct 11, 2025
5a212e1
chore: update var description
surajsbharadwaj Oct 11, 2025
3f231dd
fix: validaion for prefix
surajsbharadwaj Oct 11, 2025
84c1749
fix: validaion for prefix to use lowercase
surajsbharadwaj Oct 11, 2025
2f2873b
fix: refixes, depends_on
surajsbharadwaj Oct 11, 2025
d564833
fix: target ips
surajsbharadwaj Oct 11, 2025
a14824e
fix: validation regex
surajsbharadwaj Oct 11, 2025
5ee6c55
fix: add depends_on
surajsbharadwaj Oct 11, 2025
9354901
chore: change region
surajsbharadwaj Oct 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/pi-sap-system-type1/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
# Set server type based on region
#####################################################
locals {
p10_unsupported_regions = ["che01", "lon04", "lon06", "mon01", "syd04", "syd05", "tor01", "us-east"] # datacenters that don't support P10 yet
p10_unsupported_regions = ["che01", "lon04", "mon01", "syd04", "syd05", "tor01", "us-east"] # datacenters that don't support P10 yet
server_type = contains(local.p10_unsupported_regions, var.pi_region) ? "s922" : "s1022"
}

Expand All @@ -40,7 +40,7 @@ module "pi_hana_storage_calculation" {

module "pi_hana_instance" {
source = "terraform-ibm-modules/powervs-instance/ibm"
version = "2.7.0"
version = "2.8.0"

pi_workspace_guid = var.pi_workspace_guid
pi_instance_name = local.pi_hana_instance_name
Expand Down Expand Up @@ -84,7 +84,7 @@ resource "time_sleep" "wait_1_min" {

module "pi_netweaver_primary_instance" {
source = "terraform-ibm-modules/powervs-instance/ibm"
version = "2.7.0"
version = "2.8.0"
count = var.pi_netweaver_instance.instance_count > 0 ? 1 : 0
depends_on = [time_sleep.wait_1_min]

Expand Down Expand Up @@ -132,7 +132,7 @@ module "ansible_pi_netweaver_primary_instance_exportfs" {

module "pi_netweaver_secondary_instances" {
source = "terraform-ibm-modules/powervs-instance/ibm"
version = "2.7.0"
version = "2.8.0"
count = var.pi_netweaver_instance.instance_count > 1 ? var.pi_netweaver_instance.instance_count - 1 : 0
depends_on = [time_sleep.wait_1_min]

Expand Down
72 changes: 72 additions & 0 deletions solutions/ibm-catalog/sap-ready-to-go/images.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Stock image data (only if not using custom)
data "ibm_pi_catalog_images" "catalog_images_ds" {
count = local.use_custom_images ? 0 : 1

provider = ibm.ibm-pi
pi_cloud_instance_id = local.powervs_workspace_guid
sap = true
}

# Custom image data (only if using custom)
data "ibm_pi_image" "custom_images" {
count = local.use_custom_images ? 2 : 0
provider = ibm.ibm-pi
pi_image_name = element([local.selected_hana_image, local.selected_netweaver_image], count.index)
pi_cloud_instance_id = local.powervs_workspace_guid
}

locals {
selected_hana_image = var.os_image_distro == "SLES" ? var.powervs_default_sap_images.sles_hana_image : var.powervs_default_sap_images.rhel_hana_image
selected_netweaver_image = var.os_image_distro == "SLES" ? var.powervs_default_sap_images.sles_nw_image : var.powervs_default_sap_images.rhel_nw_image

fls_image_types = ["stock-sap-fls", "stock-sap-netweaver-fls"]

use_custom_images = (
length(local.powervs_custom_images) > 0 &&
alltrue([
for name in [local.selected_hana_image, local.selected_netweaver_image] : (
contains(keys(local.powervs_custom_images), name) ?
local.powervs_custom_images[name].image_vendor == "SAP" : false
)
])
)
}

locals {
hana_image_type = local.use_custom_images ? data.ibm_pi_image.custom_images[0].image_type : one([
for img in data.ibm_pi_catalog_images.catalog_images_ds[0].images :
img.image_type if img.name == local.selected_hana_image
])

netweaver_image_type = local.use_custom_images ? data.ibm_pi_image.custom_images[1].image_type : one([
for img in data.ibm_pi_catalog_images.catalog_images_ds[0].images :
img.image_type if img.name == local.selected_netweaver_image
])

hana_image_id = local.use_custom_images ? lookup(local.powervs_custom_images, local.selected_hana_image, null).image_id : one([
for img in data.ibm_pi_catalog_images.catalog_images_ds[0].images :
img.image_id if img.name == local.selected_hana_image
])

netweaver_image_id = local.use_custom_images ? lookup(local.powervs_custom_images, local.selected_netweaver_image, null).image_id : one([
for img in data.ibm_pi_catalog_images.catalog_images_ds[0].images :
img.image_id if img.name == local.selected_netweaver_image
])

hana_is_fls = contains(local.fls_image_types, local.hana_image_type)
netweaver_is_fls = contains(local.fls_image_types, local.netweaver_image_type)
images_mixed = local.hana_is_fls != local.netweaver_is_fls
use_fls = local.hana_is_fls && local.netweaver_is_fls
has_byol_creds = length(var.powervs_os_registration_username) > 0 && length(var.powervs_os_registration_password) > 0
byol_and_fls = local.use_fls && local.has_byol_creds
missing_byol_creds = !local.use_fls && !local.has_byol_creds

#images_mixed_msg = "You've selected an fls image and a byol image for hana and netweaver. Using byol on one and fls on another is currently not supported."
#validate_images_mixed = regex("^${local.images_mixed_msg}$", (local.images_mixed ? "" : local.images_mixed_msg))

#missing_byol_msg = "Missing byol credentials for activation of linux subscription."
#validate_byol_provided = regex("^${local.missing_byol_msg}$", (local.missing_byol_creds ? "" : local.missing_byol_msg))

#byol_and_fls_msg = "FLS images and user provided linux subscription detected. Can't use both at the same time."
#validate_byol_and_fls = regex("^${local.byol_and_fls_msg}$", (local.byol_and_fls ? "" : local.byol_and_fls_msg))
}
69 changes: 69 additions & 0 deletions solutions/ibm-catalog/sap-ready-to-go/locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
locals {
powervs_workspace_guid = module.standard.powervs_workspace_guid
powervs_sshkey_name = module.standard.powervs_ssh_public_key
powervs_custom_images = module.standard.powervs_images
# powervs_networks = module.standard.powervs_management_subnet.values
access_host_or_ip = module.standard.access_host_or_ip
proxy_host_or_ip_port = module.standard.proxy_host_or_ip_port
dns_host_or_ip = module.standard.dns_host_or_ip
ntp_host_or_ip = module.standard.ntp_host_or_ip
nfs_host_or_ip_path = module.standard.nfs_host_or_ip_path
ansible_host_or_ip = module.standard.ansible_host_or_ip
network_services_config = module.standard.network_services_config
scc_wp_instance = module.standard.scc_wp_instance
}

locals {
powervs_hana_instance = {
name = var.powervs_hana_instance_name
image_id = local.hana_image_id
sap_profile_id = var.powervs_hana_instance_sap_profile_id
additional_storage_config = var.powervs_hana_instance_additional_storage_config
}

powervs_netweaver_instance = {
instance_count = var.powervs_netweaver_instance_count
name = var.powervs_netweaver_instance_name
image_id = local.netweaver_image_id
processors = var.powervs_netweaver_cpu_number
memory = var.powervs_netweaver_memory_size
proc_type = "shared"
storage_config = var.powervs_netweaver_instance_storage_config
}
}

locals {
powervs_instance_init_linux = {
enable = true
bastion_host_ip = local.access_host_or_ip
ansible_host_or_ip = local.ansible_host_or_ip
ssh_private_key = var.ssh_private_key
custom_os_registration = local.use_fls ? null : {
"username" : var.powervs_os_registration_username,
"password" : var.powervs_os_registration_password
}
}

powervs_network_services_config = {
squid = {
enable = true
squid_server_ip_port = local.proxy_host_or_ip_port
no_proxy_hosts = "161.0.0.0/8,10.0.0.0/8"
}
nfs = {
enable = local.nfs_host_or_ip_path != "" ? true : false
nfs_server_path = local.nfs_host_or_ip_path
nfs_client_path = var.nfs_directory
opts = local.network_services_config.nfs.opts
fstype = local.network_services_config.nfs.fstype
}
dns = {
enable = local.dns_host_or_ip != "" ? true : false
dns_server_ip = local.dns_host_or_ip
}
ntp = {
enable = local.ntp_host_or_ip != "" ? true : false
ntp_server_ip = local.ntp_host_or_ip
}
}
}
135 changes: 0 additions & 135 deletions solutions/ibm-catalog/sap-ready-to-go/locals_schematics_data.tf

This file was deleted.

Loading