Skip to content

Commit

Permalink
feat: per enable dal10 DC (#594)
Browse files Browse the repository at this point in the history
* feat: Support PER enabled DC DAL10

* fix: rename us-south to dallas in catalog.json file

* feat: upgrade ibmi version to 7.5 in quickstart

* feat: support rhel8-6 and sles15-4 images


* fix: os registration scripts for dal10 DC
BREAKING CHANGE: support per environment
  • Loading branch information
surajsbharadwaj authored Sep 6, 2023
1 parent 0892cee commit ea0fe25
Show file tree
Hide file tree
Showing 24 changed files with 339 additions and 220 deletions.
8 changes: 4 additions & 4 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
"generated_at": "2023-07-20T11:43:53Z",
"generated_at": "2023-09-05T11:42:19Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -82,15 +82,15 @@
"hashed_secret": "91199272d5d6a574a51722ca6f3d1148edb1a0e7",
"is_secret": false,
"is_verified": false,
"line_number": 62,
"line_number": 63,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "a67ef662b9a11a96b15936764d77e118c9f155dd",
"is_secret": false,
"is_verified": false,
"line_number": 76,
"line_number": 77,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -100,7 +100,7 @@
"hashed_secret": "3a16a2d2850bbe557924aebe9f1f1294199bfbab",
"is_secret": false,
"is_verified": false,
"line_number": 709,
"line_number": 717,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ The Power Virtual Server with VPC landing zone module automates the following ta
- Creates an IBM® Power Virtual Server (PowerVS) workspace.
- Creates an SSH key.
- Creates two private networks: a management network and a backup network.
- Creates two [IBM Cloud connections](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-cloud-connections) with an option to reuse the connections.
- Attaches the IBM Cloud connections to a transit gateway.
- Attaches the private networks to the IBM Cloud connections.
- Installs and configures the Squid Proxy, DNS Forwarder, NTP Forwarder and NFS on specified host, and sets the host as server for these services by using Ansible roles.
- Creates two [IBM Cloud connections](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-cloud-connections) with an option to reuse the connections in Non PER environment
- Attaches the IBM Cloud connections to a transit gateway in Non PER environment
- Attaches the private networks to the IBM Cloud connections in Non PER environment
- Attaches the PowerVS workspace to Transit gateway in PER enabled DC
- Installs and configures the Squid Proxy, DNS Forwarder, NTP Forwarder and NFS on specified host, and sets the host as server for these services by using Ansible roles

The following limitations apply to the module:

- Only two IBM Cloud connections are supported.
- You cannot reuse IBM Cloud connections.
- Private networks in a PowerVS workspace must be in 10.0.0.0/8 range.
- Only the following operating systems are supported:
- SUSE Linux Enterprise Server (SLES) version 15 SP3
- Red Hat Enterprise Linux (RHEL) version 8.4
- Only the following operating systems are supported for OS configurations:
- SUSE Linux Enterprise Server (SLES) version 15 SP43and SP4
- Red Hat Enterprise Linux (RHEL) version 8.6 and 8.4

For more information about IBM Power Virtual Server see the [getting started](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-getting-started) IBM Cloud docs.

Expand Down Expand Up @@ -149,7 +150,7 @@ module "power-infrastructure" {
| <a name="input_ntp_forwarder_config"></a> [ntp\_forwarder\_config](#input\_ntp\_forwarder\_config) | Configuration for the NTP forwarder to an NTP service that is not reachable directly from PowerVS. | <pre>object({<br> ntp_enable = bool<br> server_host_or_ip = string<br> })</pre> | <pre>{<br> "ntp_enable": "false",<br> "server_host_or_ip": ""<br>}</pre> | no |
| <a name="input_perform_proxy_client_setup"></a> [perform\_proxy\_client\_setup](#input\_perform\_proxy\_client\_setup) | Proxy configuration to allow internet access for a VM or LPAR. | <pre>object(<br> {<br> squid_client_ips = list(string)<br> squid_server_ip = string<br> squid_port = string<br> no_proxy_hosts = string<br> }<br> )</pre> | `null` | no |
| <a name="input_powervs_backup_network"></a> [powervs\_backup\_network](#input\_powervs\_backup\_network) | Name of the IBM Cloud PowerVS backup network and CIDR to create. | <pre>object({<br> name = string<br> cidr = string<br> })</pre> | <pre>{<br> "cidr": "10.52.0.0/24",<br> "name": "bkp_net"<br>}</pre> | no |
| <a name="input_powervs_image_names"></a> [powervs\_image\_names](#input\_powervs\_image\_names) | List of Images to be imported into cloud account from catalog images. | `list(string)` | <pre>[<br> "SLES15-SP3-SAP",<br> "SLES15-SP3-SAP-NETWEAVER",<br> "RHEL8-SP4-SAP",<br> "RHEL8-SP4-SAP-NETWEAVER"<br>]</pre> | no |
| <a name="input_powervs_image_names"></a> [powervs\_image\_names](#input\_powervs\_image\_names) | List of Images to be imported into cloud account from catalog images. | `list(string)` | <pre>[<br> "SLES15-SP4-SAP",<br> "SLES15-SP4-SAP-NETWEAVER",<br> "RHEL8-SP6-SAP",<br> "RHEL8-SP6-SAP-NETWEAVER"<br>]</pre> | no |
| <a name="input_powervs_management_network"></a> [powervs\_management\_network](#input\_powervs\_management\_network) | Name of the IBM Cloud PowerVS management subnet and CIDR to create. | <pre>object({<br> name = string<br> cidr = string<br> })</pre> | <pre>{<br> "cidr": "10.51.0.0/24",<br> "name": "mgmt_net"<br>}</pre> | no |
| <a name="input_powervs_resource_group_name"></a> [powervs\_resource\_group\_name](#input\_powervs\_resource\_group\_name) | Existing IBM Cloud resource group name. | `string` | n/a | yes |
| <a name="input_powervs_sshkey_name"></a> [powervs\_sshkey\_name](#input\_powervs\_sshkey\_name) | Name of the PowerVS SSH key to create. | `string` | `"ssh-key-pvs"` | no |
Expand Down
2 changes: 1 addition & 1 deletion common-dev-assets
46 changes: 29 additions & 17 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,13 @@
"value": "sao01"
},
{
"displayname": "US-south (us-south)",
"displayname": "Dallas (dallas)",
"value": "us-south"
},
{
"displayname": "Dallas (dal10)",
"value": "dal10"
},
{
"displayname": "Dallas (dal12)",
"value": "dal12"
Expand Down Expand Up @@ -528,9 +532,13 @@
"value": "sao01"
},
{
"displayname": "US-south (us-south)",
"displayname": "Dallas (dallas)",
"value": "us-south"
},
{
"displayname": "Dallas (dal10)",
"value": "dal10"
},
{
"displayname": "Dallas (dal12)",
"value": "dal12"
Expand Down Expand Up @@ -801,9 +809,13 @@
"value": "sao01"
},
{
"displayname": "US-south (us-south)",
"displayname": "Dallas (dallas)",
"value": "us-south"
},
{
"displayname": "Dallas (dal10)",
"value": "dal10"
},
{
"displayname": "Dallas (dal12)",
"value": "dal12"
Expand Down Expand Up @@ -842,19 +854,19 @@
"value": "aix_l"
},
{
"displayname": "IBM i - XS (0.25cpu,8GB,disk-100GB,IBMi-73-13-2924-1)",
"displayname": "IBM i - XS (0.25cpu,8GB,disk-100GB,IBMi-75-01-2984-2)",
"value": "ibm_i_xs"
},
{
"displayname": "IBM i - S (1cpu,32GB,disk-500GB,IBMi-73-13-2924-1)",
"displayname": "IBM i - S (1cpu,32GB,disk-500GB,IBMi-75-01-2984-2)",
"value": "ibm_i_s"
},
{
"displayname": "IBM i - M (2cpu,64GB,disk-1000GB,IBMi-73-13-2924-1)",
"displayname": "IBM i - M (2cpu,64GB,disk-1000GB,IBMi-75-01-2984-2)",
"value": "ibm_i_m"
},
{
"displayname": "IBM i - L (4cpu,132GB,disk-2000GB,IBMi-73-13-2924-1)",
"displayname": "IBM i - L (4cpu,132GB,disk-2000GB,IBMi-75-01-2984-2)",
"value": "ibm_i_l"
},
{
Expand Down Expand Up @@ -924,32 +936,32 @@
"value": "7200-05-03"
},
{
"displayname": "IBM i - IBMi-73-13-2924-1",
"value": "IBMi-73-13-2924-1"
},
{
"displayname": "IBM i - IBMi-74-07-2924-1",
"value": "IBMi-74-07-2924-1"
"displayname": "IBM i - IBMi-75-01-2984-2",
"value": "IBMi-75-01-2984-2"
},
{
"displayname": "IBM i - IBMi-75-01-2924-2",
"value": "IBMi-75-01-2924-2"
},
{
"displayname": "IBM i - IBMi-74-07-2984-1",
"value": "IBMi-74-07-2984-1"
},
{
"displayname": "IBM i - IBMi_COR-74-07-2",
"value": "IBMi_COR-74-07-2"
},
{
"displayname": "SAP - RHEL8-SP4-SAP",
"value": "RHEL8-SP4-SAP"
"displayname": "SAP - RHEL8-SP6-SAP",
"value": "RHEL8-SP6-SAP"
},
{
"displayname": "SAP - SLES15-SP4-SAP",
"value": "SLES15-SP4-SAP"
},
{
"displayname": "SAP - RHEL8-SP4-SAP-NETWEAVER",
"value": "RHEL8-SP4-SAP-NETWEAVER"
"displayname": "SAP - RHEL8-SP6-SAP-NETWEAVER",
"value": "RHEL8-SP6-SAP-NETWEAVER"
},
{
"displayname": "SAP - SLES15-SP4-SAP-NETWEAVER",
Expand Down
23 changes: 17 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# IBM Cloud PowerVS Configuration
#####################################################

locals {
per_enabled_dc_list = ["dal10"]
per_enabled = contains(local.per_enabled_dc_list, var.powervs_zone)
}

module "initial_validation" {
source = "./submodules/terraform_initial_validation"
cloud_connection_validate = {
Expand Down Expand Up @@ -32,6 +37,7 @@ module "powervs_cloud_connection_create" {
powervs_resource_group_name = var.powervs_resource_group_name
powervs_workspace_name = var.powervs_workspace_name
transit_gateway_name = var.transit_gateway_name
per_enabled = local.per_enabled
cloud_connection_name_prefix = var.cloud_connection_name_prefix
cloud_connection_count = var.cloud_connection_count
cloud_connection_speed = var.cloud_connection_speed
Expand All @@ -42,6 +48,7 @@ module "powervs_cloud_connection_create" {

module "powervs_cloud_connection_attach" {
source = "./submodules/powervs_cloudconnection_attach"
count = local.per_enabled ? 0 : 1
depends_on = [module.powervs_workspace, module.powervs_cloud_connection_create]
powervs_zone = var.powervs_zone
powervs_resource_group_name = var.powervs_resource_group_name
Expand All @@ -50,11 +57,15 @@ module "powervs_cloud_connection_attach" {
powervs_subnet_names = [var.powervs_management_network.name, var.powervs_backup_network.name]
}


#####################################################
# VPC VSI Management Services OS configuration
#####################################################

module "configure_squid" {

source = "./submodules/configure_network_services"
depends_on = [module.powervs_cloud_connection_attach]
count = var.squid_config["squid_enable"] ? 1 : 0
source = "./submodules/configure_network_services"
count = var.squid_config["squid_enable"] ? 1 : 0

access_host_or_ip = var.access_host_or_ip
target_server_ip = var.squid_config["server_host_or_ip"]
Expand All @@ -73,7 +84,7 @@ resource "time_sleep" "wait_for_squid_setup_to_complete" {
module "configure_dns" {

source = "./submodules/configure_network_services"
depends_on = [module.powervs_cloud_connection_attach, module.configure_squid, time_sleep.wait_for_squid_setup_to_complete]
depends_on = [module.configure_squid, time_sleep.wait_for_squid_setup_to_complete]
count = var.dns_forwarder_config["dns_enable"] ? 1 : 0

access_host_or_ip = var.access_host_or_ip
Expand All @@ -86,7 +97,7 @@ module "configure_dns" {
module "configure_ntp" {

source = "./submodules/configure_network_services"
depends_on = [module.powervs_cloud_connection_attach, module.configure_squid, module.configure_dns, time_sleep.wait_for_squid_setup_to_complete]
depends_on = [module.configure_squid, module.configure_dns, time_sleep.wait_for_squid_setup_to_complete]
count = var.ntp_forwarder_config["ntp_enable"] ? 1 : 0

access_host_or_ip = var.access_host_or_ip
Expand All @@ -99,7 +110,7 @@ module "configure_ntp" {
module "configure_nfs" {

source = "./submodules/configure_network_services"
depends_on = [module.powervs_cloud_connection_attach, module.configure_squid, module.configure_dns, module.configure_ntp, time_sleep.wait_for_squid_setup_to_complete]
depends_on = [module.configure_squid, module.configure_dns, module.configure_ntp, time_sleep.wait_for_squid_setup_to_complete]
count = var.nfs_config["nfs_enable"] ? 1 : 0

access_host_or_ip = var.access_host_or_ip
Expand Down
Loading

0 comments on commit ea0fe25

Please sign in to comment.