generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 8
chore: VPC Landingzone and SAP HANA in one click #873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 d61b9cd
feat: VPC Landing Zone and SAP HANA one-click deployment(address code…
tripan27 5198c78
refactor: vars
surajsbharadwaj 2a7d7e1
Revert "refactor: vars"
surajsbharadwaj 9eb4888
refactor: fix catalog json, reorg vars, remove dns var, invalid count…
surajsbharadwaj c19115a
chore: code change only for sap-ready-to-go, pending (sap-s4hana-bw4h…
tripan27 e0f453a
Update modules/pi-sap-system-type1/main.tf
tripan27 807f05d
Update modules/pi-sap-system-type1/main.tf
tripan27 25492f4
Update modules/pi-sap-system-type1/main.tf
tripan27 d90bc6f
Update modules/pi-sap-system-type1/main.tf
tripan27 1155c56
Update modules/pi-sap-system-type1/main.tf
tripan27 ce733b2
Update modules/pi-sap-system-type1/main.tf
tripan27 ec35565
chore: new end to end solution for sap
tripan27 9f56e80
chore: new end to end solution for sap
tripan27 c28fe9a
chore: refer arch updated
tripan27 865ea8b
chore: fix cra
surajsbharadwaj 49568d6
chore: remove comments
surajsbharadwaj 9b6c464
chore: cleanup
surajsbharadwaj 50a8d21
chore: fix cra
surajsbharadwaj 0b6be31
chore: fix cra prefix
surajsbharadwaj aa47079
chore(deps): update dependencies
terraform-ibm-modules-ops 736b593
chore: fix cra ansible
surajsbharadwaj 5236b9a
Merge branch 'main' into vpc-and-sap
surajsbharadwaj 30c0cf8
chore: common dev assets
surajsbharadwaj 7818935
chore: update var description
surajsbharadwaj 5a212e1
chore: update var description
surajsbharadwaj 3f231dd
fix: validaion for prefix
surajsbharadwaj 84c1749
fix: validaion for prefix to use lowercase
surajsbharadwaj 2f2873b
fix: refixes, depends_on
surajsbharadwaj d564833
fix: target ips
surajsbharadwaj a14824e
fix: validation regex
surajsbharadwaj 5ee6c55
fix: add depends_on
surajsbharadwaj 9354901
chore: change region
surajsbharadwaj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| locals { | ||
| powervs_workspace_guid = module.standard.powervs_workspace_guid | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| powervs_sshkey_name = module.standard.powervs_ssh_public_key | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| powervs_custom_images = module.standard.powervs_images | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # powervs_networks = module.standard.powervs_management_subnet.values | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| access_host_or_ip = module.standard.access_host_or_ip | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| proxy_host_or_ip_port = module.standard.proxy_host_or_ip_port | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| dns_host_or_ip = module.standard.dns_host_or_ip | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ntp_host_or_ip = module.standard.ntp_host_or_ip | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| nfs_host_or_ip_path = module.standard.nfs_host_or_ip_path | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ansible_host_or_ip = module.standard.ansible_host_or_ip | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| network_services_config = module.standard.network_services_config | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| scc_wp_instance = module.standard.scc_wp_instance | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| 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 | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ansible_host_or_ip = local.ansible_host_or_ip | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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 | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| nfs_server_path = local.nfs_host_or_ip_path | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| nfs_client_path = var.nfs_directory | ||
| opts = local.network_services_config.nfs.opts | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fstype = local.network_services_config.nfs.fstype | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| dns = { | ||
| enable = local.dns_host_or_ip != "" ? true : false | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| dns_server_ip = local.dns_host_or_ip | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| ntp = { | ||
| enable = local.ntp_host_or_ip != "" ? true : false | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ntp_server_ip = local.ntp_host_or_ip | ||
surajsbharadwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
| } | ||
135 changes: 0 additions & 135 deletions
135
solutions/ibm-catalog/sap-ready-to-go/locals_schematics_data.tf
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.