Skip to content
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

fix: input for VPC instance images #998

Merged
merged 4 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
147 changes: 46 additions & 101 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@
"key": "enable_monitoring",
"required": true
},
{
"key": "vpc_intel_images",
"required": true,
"hidden": true
},
{
"key": "powervs_custom_images",
"custom_config": {
Expand Down Expand Up @@ -430,33 +435,23 @@
],
"iam_permissions": [
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "appid"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "cloud-object-storage"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "hs-crypto"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Administrator"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Administrator"],
"service_name": "iam-identity"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "kms"
},
{
Expand All @@ -467,27 +462,19 @@
"service_name": "is.vpc"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "is.vpc"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "transit.gateway"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "directlink.connect"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "power-iaas"
}
],
Expand Down Expand Up @@ -530,7 +517,7 @@
{
"diagram": {
"caption": "Power Virtual Server with VPC landing zone 'Standard' variation",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/main/reference-architectures/standard/deploy-arch-ibm-pvs-inf-standard.svg",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.1.2/reference-architectures/standard/deploy-arch-ibm-pvs-inf-standard.svg",
"type": "image/svg+xml"
},
"description": "The Power Virtual Server with VPC landing zone as variation 'Create a new architecture' deploys VPC services and a Power Virtual Server workspace and interconnects them.\n \nRequired and optional management components are configured."
Expand Down Expand Up @@ -784,6 +771,11 @@
"key": "enable_monitoring",
"required": true
},
{
"key": "vpc_intel_images",
"required": true,
"hidden": true
},
{
"key": "custom_profile_instance_boot_image",
"type": "string",
Expand Down Expand Up @@ -1058,33 +1050,23 @@
],
"iam_permissions": [
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "appid"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "cloud-object-storage"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "hs-crypto"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Administrator"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Administrator"],
"service_name": "iam-identity"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "kms"
},
{
Expand All @@ -1095,27 +1077,19 @@
"service_name": "is.vpc"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "is.vpc"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "transit.gateway"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "directlink.connect"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "power-iaas"
}
],
Expand Down Expand Up @@ -1158,7 +1132,7 @@
{
"diagram": {
"caption": "Power Virtual Server with VPC landing zone 'Quickstart' variation",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/main/reference-architectures/standard-plus-vsi/deploy-arch-ibm-pvs-inf-standard-plus-vsi.svg",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.1.2/reference-architectures/standard-plus-vsi/deploy-arch-ibm-pvs-inf-standard-plus-vsi.svg",
"type": "image/svg+xml"
},
"description": "The Power Virtual Server with VPC landing zone as 'Quickstart' variation of 'Create a new architecture' option deploys VPC services and a Power Virtual Server workspace and interconnects them. It also creates one Power virtual server instance of chosen t-shirt size or custom configuration.\n \nRequired and optional management components are configured."
Expand Down Expand Up @@ -1395,33 +1369,23 @@
],
"iam_permissions": [
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "appid"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "cloud-object-storage"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "hs-crypto"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Administrator"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Administrator"],
"service_name": "iam-identity"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "kms"
},
{
Expand All @@ -1432,27 +1396,19 @@
"service_name": "is.vpc"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "is.vpc"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "transit.gateway"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "directlink.connect"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "power-iaas"
}
],
Expand Down Expand Up @@ -1483,7 +1439,7 @@
{
"diagram": {
"caption": "Power Virtual Server with VPC landing zone 'Import' variation",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/main/reference-architectures/import/deploy-arch-ibm-pvs-inf-import.svg",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.1.2/reference-architectures/import/deploy-arch-ibm-pvs-inf-import.svg",
"type": "image/svg+xml"
},
"description": "This solution helps to install the deployable architecture 'Power Virtual Server for SAP HANA' on top of a pre-existing Power Virtual Server(PowerVS) landscape. 'Power Virtual Server for SAP HANA' automation requires a schematics workspace id for installation. The 'Import' solution creates a schematics workspace by taking pre-existing VPC and PowerVS infrastructure resource details as inputs. The ID of this schematics workspace will be the pre-requisite workspace id required by 'Power Virtual Server for SAP HANA' to create and configure the PowerVS instances for SAP on top of the existing infrastructure.\n \nRequired and optional management components are configured."
Expand All @@ -1500,10 +1456,7 @@
"compliance": {},
"dependencies": [
{
"flavors": [
"standard",
"standard-plus-vsi"
],
"flavors": ["standard", "standard-plus-vsi"],
"install_type": "fullstack",
"catalogID": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc",
"id": "2dd486c7-b317-4aaa-907b-42671485ad96-global",
Expand Down Expand Up @@ -1762,27 +1715,19 @@
],
"iam_permissions": [
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "is.vpc"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "transit.gateway"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::role:Editor"
],
"role_crns": ["crn:v1:bluemix:public:iam::::role:Editor"],
"service_name": "directlink.connect"
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
],
"role_crns": ["crn:v1:bluemix:public:iam::::serviceRole:Manager"],
"service_name": "power-iaas"
}
],
Expand All @@ -1797,7 +1742,7 @@
{
"diagram": {
"caption": "Power Virtual Server with VPC landing zone 'Standard Extend' variation",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/main/reference-architectures/standard-extend/deploy-arch-ibm-pvs-inf-standard-extend.svg",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.1.2/reference-architectures/standard-extend/deploy-arch-ibm-pvs-inf-standard-extend.svg",
"type": "image/svg+xml"
},
"description": "The Power Virtual Server with VPC landing zone as variation 'Extend Power Virtual Server with VPC landing zone' creates an additional Power Virtual Server workspace and connects it with already created Power Virtual Server with VPC landing zone. It builds on existing Power Virtual Server with VPC landing zone deployed as a variation 'Create a new architecture'."
Expand Down
1 change: 1 addition & 0 deletions modules/powervs-vpc-landing-zone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Creates VPC Landing Zone | Performs VPC VSI OS Config | Creates PowerVS Infrastr
| <a name="input_ssh_public_key"></a> [ssh\_public\_key](#input\_ssh\_public\_key) | Public SSH Key for VSI creation. Must be an RSA key with a key size of either 2048 bits or 4096 bits (recommended). Must be a valid SSH key that does not already exist in the deployment region. | `string` | n/a | yes |
| <a name="input_tags"></a> [tags](#input\_tags) | List of tag names for the IBM Cloud PowerVS workspace | `list(string)` | `[]` | no |
| <a name="input_transit_gateway_global"></a> [transit\_gateway\_global](#input\_transit\_gateway\_global) | Connect to the networks outside the associated region. | `bool` | `false` | no |
| <a name="input_vpc_intel_images"></a> [vpc\_intel\_images](#input\_vpc\_intel\_images) | Stock OS image names for creating VPC landing zone VSI instances: RHEL (management and network services) and SLES (monitoring). | <pre>object({<br/> rhel_image = string<br/> sles_image = string<br/> })</pre> | n/a | yes |

### Outputs

Expand Down
4 changes: 2 additions & 2 deletions modules/powervs-vpc-landing-zone/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ locals {
override_json_string = templatefile("${path.module}/presets/slz-preset.json.tftpl",
{
external_access_ip = local.external_access_ip,
rhel_image = "ibm-redhat-9-4-amd64-sap-applications-3",
rhel_image = var.vpc_intel_images.rhel_image,
network_services_vsi_profile = var.network_services_vsi_profile,
transit_gateway_global = var.transit_gateway_global,
enable_monitoring = var.enable_monitoring,
sles_image = "ibm-sles-15-5-amd64-sap-applications-3"
sles_image = var.vpc_intel_images.sles_image
}
)
}
Expand Down
1 change: 0 additions & 1 deletion modules/powervs-vpc-landing-zone/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module "landing_zone" {
region = lookup(local.ibm_powervs_zone_cloud_region_map, var.powervs_zone, null)
prefix = var.prefix
override_json_string = local.override_json_string

}

#####################################################
Expand Down
16 changes: 16 additions & 0 deletions modules/powervs-vpc-landing-zone/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ variable "client_to_site_vpn" {
}
}

variable "vpc_intel_images" {
description = "Stock OS image names for creating VPC landing zone VSI instances: RHEL (management and network services) and SLES (monitoring)."
type = object({
rhel_image = string
sles_image = string
})
validation {
condition = var.vpc_intel_images.rhel_image != ""
error_message = "The rhel_image attribute of vpc_intel_images must not be empty. Please specify an OS image name to be used for creating management and network services VSI instances."
}
validation {
condition = var.enable_monitoring ? (var.vpc_intel_images.sles_image != "" ? true : false) : true
error_message = "The sles_image attribute of var.vpc_intel_images cannot be empty when enable_monitoring is set to true. Please provide a valid SLES OS stock image name to create monitoring VSI."
}
}

variable "ssh_public_key" {
description = "Public SSH Key for VSI creation. Must be an RSA key with a key size of either 2048 bits or 4096 bits (recommended). Must be a valid SSH key that does not already exist in the deployment region."
type = string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
copyright:
years: 2024, 2025
lastupdated: "2025-01-07"
lastupdated: "2025-01-16"
keywords:
subcollection: deployable-reference-architectures
authors:
Expand All @@ -15,7 +15,7 @@ use-case: ITServiceManagement
industry: Technology
compliance:
content-type: reference-architecture
version: v8.1.1
version: v8.1.2

---

Expand All @@ -26,7 +26,7 @@ version: v8.1.1
{: toc-industry="Technology"}
{: toc-use-case="ITServiceManagement"}
{: toc-compliance="SAPCertified"}
{: toc-version="8.1.1"}
{: toc-version="8.1.2"}

This solution helps to install the deployable architecture ['Power Virtual Server for SAP HANA'](https://cloud.ibm.com/catalog/architecture/deploy-arch-ibm-pvs-sap-9aa6135e-75d5-467e-9f4a-ac2a21c069b8-global) on top of a pre-existing Power Virtual Server(PowerVS) landscape. 'Power Virtual Server for SAP HANA' automation requires a schematics workspace id for installation. The 'Import' solution creates a schematics workspace by taking pre-existing VPC and PowerVS infrastructure resource details as inputs. The ID of this schematics workspace will be the pre-requisite workspace id required by 'Power Virtual Server for SAP HANA' to create and configure the PowerVS instances for SAP on top of the existing infrastructure.

Expand Down
Loading