Skip to content

Commit f137a94

Browse files
feat: introduce ocp tshirts and cluster destroy automation (#1193)
* fix: make it so ansible only reinstalls modules if it detects an outdated version * chore(deps): update instance to v2.8.3 * feat: prototype ocp tshirts * chore(docs): improve variable descriptions * refactor: move locals to new file * feat: update tshirt sizes based on Michael's recommendations * chore: change order of the tiles, put standard last * feat: destroy automation with variable trigger * fix: remove notes, add quotes to cpu count * fix: add count to cluster deployment playbooks so they're destroyed when the cluster is destroyed. This allows to deploy the cluster again * fix: switch to only full cpu cores until we figure out why fractional cores are causing an error * docs: toc version and lastupdated * chore: add validation for processors to only support full numbers * chore: improve tshirt displayname
1 parent 477e8d6 commit f137a94

File tree

11 files changed

+255
-56
lines changed

11 files changed

+255
-56
lines changed

.secrets.baseline

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,16 @@
159159
"verified_result": null
160160
}
161161
],
162+
"solutions/standard-openshift/ansible/templates-ansible/deploy-openshift-cluster/playbook-destroy-ocp-cluster.yml.tftpl": [
163+
{
164+
"hashed_secret": "d2e2ab0f407e4ee3cf2ab87d61c31b25a74085e5",
165+
"is_secret": false,
166+
"is_verified": false,
167+
"line_number": 32,
168+
"type": "Secret Keyword",
169+
"verified_result": null
170+
}
171+
],
162172
"solutions/standard-plus-vsi/catalogValidationValues.json.template": [
163173
{
164174
"hashed_secret": "fa501f2ceec739604d621b521446b88d41a7f76b",

ibm_catalog.json

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"label": "Standard Landscape",
6565
"name": "standard",
6666
"install_type": "fullstack",
67-
"index": 2,
67+
"index": 9,
6868
"working_directory": "solutions/standard",
6969
"compliance": {
7070
"authority": "scc-v3",
@@ -561,7 +561,7 @@
561561
{
562562
"diagram": {
563563
"caption": "Power Virtual Server with VPC landing zone 'Standard Landscape' variation",
564-
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v10.2.1/reference-architectures/standard/deploy-arch-ibm-pvs-inf-standard.svg",
564+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v10.3.0/reference-architectures/standard/deploy-arch-ibm-pvs-inf-standard.svg",
565565
"type": "image/svg+xml"
566566
},
567567
"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."
@@ -1266,7 +1266,7 @@
12661266
{
12671267
"diagram": {
12681268
"caption": "Power Virtual Server with VPC landing zone 'Quickstart' variation",
1269-
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v10.2.1/reference-architectures/standard-plus-vsi/deploy-arch-ibm-pvs-inf-standard-plus-vsi.svg",
1269+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v10.3.0/reference-architectures/standard-plus-vsi/deploy-arch-ibm-pvs-inf-standard-plus-vsi.svg",
12701270
"type": "image/svg+xml"
12711271
},
12721272
"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."
@@ -1429,6 +1429,9 @@
14291429
"type": "string",
14301430
"required": true
14311431
},
1432+
{
1433+
"key": "destroy_cluster"
1434+
},
14321435
{
14331436
"key": "openshift_release",
14341437
"type": "string"
@@ -1442,15 +1445,39 @@
14421445
}
14431446
},
14441447
{
1445-
"key": "cluster_master_node_config",
1448+
"key": "tshirt_size",
1449+
"type": "string",
1450+
"default_value": "xs",
1451+
"options": [
1452+
{
1453+
"displayname": "xs (2xW:1x32 3xM:1x32)",
1454+
"value": "xs"
1455+
},
1456+
{
1457+
"displayname": "s (3xW:1x32 3xM:1x32)",
1458+
"value": "s"
1459+
},
1460+
{
1461+
"displayname": "m (4xW:2x32 3xM:1x32)",
1462+
"value": "m"
1463+
},
1464+
{
1465+
"displayname": "l (4xW:1x64 3xM:1x32)",
1466+
"value": "l"
1467+
}
1468+
],
1469+
"custom_config": {}
1470+
},
1471+
{
1472+
"key": "custom_master_node_config",
14461473
"custom_config": {
14471474
"grouping": "deployment",
14481475
"original_grouping": "deployment",
14491476
"type": "code_editor"
14501477
}
14511478
},
14521479
{
1453-
"key": "cluster_worker_node_config",
1480+
"key": "custom_worker_node_config",
14541481
"custom_config": {
14551482
"grouping": "deployment",
14561483
"original_grouping": "deployment",
@@ -1740,7 +1767,7 @@
17401767
{
17411768
"diagram": {
17421769
"caption": "Power Virtual Server with VPC landing zone 'Quickstart OpenShift' variation",
1743-
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v10.2.1/reference-architectures/standard-openshift/deploy-arch-ibm-pvs-inf-standard-openshift.svg",
1770+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v10.3.0/reference-architectures/standard-openshift/deploy-arch-ibm-pvs-inf-standard-openshift.svg",
17441771
"type": "image/svg+xml"
17451772
},
17461773
"description": "The Power Virtual Server with VPC landing zone as variation 'Quickstart OpenShift' deploys VPC services and an Openshift Cluster on PowerVS and interconnects them.\n \nRequired and optional management components are configured."

reference-architectures/standard-openshift/deploy-arch-ibm-pvs-inf-standard-openshift.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
copyright:
33
years: 2024, 2025
4-
lastupdated: "2025-10-24"
4+
lastupdated: "2025-11-19"
55
keywords:
66
subcollection: deployable-reference-architectures
77
authors:
@@ -15,7 +15,7 @@ image_source: https://github.com/terraform-ibm-modules/terraform-ibm-powervs-inf
1515
use-case: ITServiceManagement
1616
industry: Technology
1717
content-type: reference-architecture
18-
version: v10.2.1
18+
version: v10.3.0
1919
compliance:
2020

2121
---
@@ -27,7 +27,7 @@ compliance:
2727
{: toc-content-type="reference-architecture"}
2828
{: toc-industry="Technology"}
2929
{: toc-use-case="ITServiceManagement"}
30-
{: toc-version="v10.2.1"}
30+
{: toc-version="v10.3.0"}
3131

3232
The Quickstart OpenShift deployment on Power Virtual Server with a VPC landing zone uses the Red Hat IPI installer to set up an OpenShift cluster. Before the deployment begins, it provisions VPC services and creates a Power Virtual Server workspace, which together form the landing zone used to access and manage the cluster.
3333

reference-architectures/standard-plus-vsi/deploy-arch-ibm-pvs-inf-standard-plus-vsi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
copyright:
33
years: 2024, 2025
4-
lastupdated: "2025-10-24"
4+
lastupdated: "2025-11-19"
55
keywords:
66
subcollection: deployable-reference-architectures
77
authors:
@@ -16,7 +16,7 @@ image_source: https://github.com/terraform-ibm-modules/terraform-ibm-powervs-inf
1616
use-case: ITServiceManagement
1717
industry: Technology
1818
content-type: reference-architecture
19-
version: v10.2.1
19+
version: v10.3.0
2020
compliance:
2121

2222
---
@@ -28,7 +28,7 @@ compliance:
2828
{: toc-content-type="reference-architecture"}
2929
{: toc-industry="Technology"}
3030
{: toc-use-case="ITServiceManagement"}
31-
{: toc-version="v10.2.1"}
31+
{: toc-version="v10.3.0"}
3232

3333
Quickstart deployment of the Power Virtual Server with VPC landing zone creates VPC services, a Power Virtual Server workspace, and interconnects them. It also deploys a Power Virtual Server of chosen T-shirt size or custom configuration. Supported Os are Aix, IBM i, and Linux images.
3434

reference-architectures/standard/deploy-arch-ibm-pvs-inf-standard.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
copyright:
33
years: 2024, 2025
4-
lastupdated: "2025-10-24"
4+
lastupdated: "2025-11-19"
55
keywords:
66
subcollection: deployable-reference-architectures
77
authors:
@@ -15,7 +15,7 @@ image_source: https://github.com/terraform-ibm-modules/terraform-ibm-powervs-inf
1515
use-case: ITServiceManagement
1616
industry: Technology
1717
content-type: reference-architecture
18-
version: v10.2.1
18+
version: v10.3.0
1919
compliance: SAPCertified
2020

2121
---
@@ -28,7 +28,7 @@ compliance: SAPCertified
2828
{: toc-industry="Technology"}
2929
{: toc-use-case="ITServiceManagement"}
3030
{: toc-compliance="SAPCertified"}
31-
{: toc-version="v10.2.1"}
31+
{: toc-version="v10.3.0"}
3232

3333
The Standard deployment of the Power Virtual Server with VPC landing zone creates VPC services and a Power Virtual Server workspace and interconnects them.
3434

solutions/standard-openshift/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Due to technical limitations, the cost estimate Projects gives does not include
5959
| <a name="module_ocp_cluster_deployment"></a> [ocp\_cluster\_deployment](#module\_ocp\_cluster\_deployment) | ./ansible | n/a |
6060
| <a name="module_ocp_cluster_install_configuration"></a> [ocp\_cluster\_install\_configuration](#module\_ocp\_cluster\_install\_configuration) | ./ansible | n/a |
6161
| <a name="module_ocp_cluster_manifest_creation"></a> [ocp\_cluster\_manifest\_creation](#module\_ocp\_cluster\_manifest\_creation) | ./ansible | n/a |
62+
| <a name="module_ocp_destroy_cluster"></a> [ocp\_destroy\_cluster](#module\_ocp\_destroy\_cluster) | ./ansible | n/a |
6263
| <a name="module_standard"></a> [standard](#module\_standard) | ../../modules/powervs-vpc-landing-zone | n/a |
6364

6465
### Resources
@@ -75,10 +76,11 @@ Due to technical limitations, the cost estimate Projects gives does not include
7576
| <a name="input_ansible_vault_password"></a> [ansible\_vault\_password](#input\_ansible\_vault\_password) | Vault password to encrypt ansible playbooks that contain sensitive information. Password requirements: 15-100 characters and at least one uppercase letter, one lowercase letter, one number, and one special character. Allowed characters: A-Z, a-z, 0-9, !#$%&()*+-.:;<=>?@[]\_{\|}~. | `string` | n/a | yes |
7677
| <a name="input_client_to_site_vpn"></a> [client\_to\_site\_vpn](#input\_client\_to\_site\_vpn) | VPN configuration - the client ip pool and list of users email ids to access the environment. If enabled, then a Secret Manager instance is also provisioned with certificates generated. See optional parameters to reuse an existing Secrets manager instance. | <pre>object({<br/> enable = bool<br/> client_ip_pool = string<br/> vpn_client_access_group_users = list(string)<br/> })</pre> | <pre>{<br/> "client_ip_pool": "192.168.0.0/16",<br/> "enable": true,<br/> "vpn_client_access_group_users": []<br/>}</pre> | no |
7778
| <a name="input_cluster_base_domain"></a> [cluster\_base\_domain](#input\_cluster\_base\_domain) | The base domain name that will be used by the cluster. Only .test, .example, and .invalid domains are supported (ie: domain.example). | `string` | n/a | yes |
78-
| <a name="input_cluster_master_node_config"></a> [cluster\_master\_node\_config](#input\_cluster\_master\_node\_config) | Configuration for the master nodes of the OpenShift cluster, including CPU, system type, processor type, and replica count. If system\_type is null, it's chosen based on whether it's supported in the region. This can be overwritten by passing a value, e.g. 's1022' or 's922'. Memory is in GB. | <pre>object({<br/> processors = number<br/> memory = number<br/> system_type = string<br/> proc_type = string<br/> replicas = number<br/> })</pre> | <pre>{<br/> "memory": "32",<br/> "proc_type": "Shared",<br/> "processors": "4",<br/> "replicas": "3",<br/> "system_type": null<br/>}</pre> | no |
7979
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | The name of the cluster and a unique identifier used as prefix for resources. Must begin with a lowercase letter and end with a lowercase letter or number. Must contain only lowercase letters, numbers, and - characters. This prefix will be prepended to any resources provisioned by this template. Prefixes must be 16 or fewer characters. | `string` | n/a | yes |
8080
| <a name="input_cluster_network_config"></a> [cluster\_network\_config](#input\_cluster\_network\_config) | Configuration object for the OpenShift cluster and service network CIDRs. | <pre>object({<br/> cluster_network_cidr = string<br/> cluster_service_network_cidr = string<br/> cluster_machine_network_cidr = string<br/> })</pre> | <pre>{<br/> "cluster_machine_network_cidr": "10.72.0.0/24",<br/> "cluster_network_cidr": "10.128.0.0/14",<br/> "cluster_service_network_cidr": "10.67.0.0/16"<br/>}</pre> | no |
81-
| <a name="input_cluster_worker_node_config"></a> [cluster\_worker\_node\_config](#input\_cluster\_worker\_node\_config) | Configuration for the worker nodes of the OpenShift cluster, including CPU, system type, processor type, and replica count. If system\_type is null, it's chosen based on whether it's supported in the region. This can be overwritten by passing a value, e.g. 's1022' or 's922'. Memory is in GB. | <pre>object({<br/> processors = number<br/> memory = number<br/> system_type = string<br/> proc_type = string<br/> replicas = number<br/> })</pre> | <pre>{<br/> "memory": "32",<br/> "proc_type": "Shared",<br/> "processors": "4",<br/> "replicas": "3",<br/> "system_type": null<br/>}</pre> | no |
81+
| <a name="input_custom_master_node_config"></a> [custom\_master\_node\_config](#input\_custom\_master\_node\_config) | This value is ignored if 'tshirt\_size' is not set to 'custom'. Configuration for the master nodes of the OpenShift cluster, including CPU, system type, processor type, and replica count. If system\_type is null, it's chosen based on whether it's supported in the region. This can be overwritten by passing a value, e.g. 's1022' or 's922'. Memory is in GB. | <pre>object({<br/> processors = number<br/> memory = number<br/> system_type = string<br/> proc_type = string<br/> replicas = number<br/> })</pre> | <pre>{<br/> "memory": "32",<br/> "proc_type": "Shared",<br/> "processors": "4",<br/> "replicas": "3",<br/> "system_type": null<br/>}</pre> | no |
82+
| <a name="input_custom_worker_node_config"></a> [custom\_worker\_node\_config](#input\_custom\_worker\_node\_config) | This value is ignored if 'tshirt\_size' is not set to 'custom'. Configuration for the worker nodes of the OpenShift cluster, including CPU, system type, processor type, and replica count. If system\_type is null, it's chosen based on whether it's supported in the region. This can be overwritten by passing a value, e.g. 's1022' or 's922'. Memory is in GB. | <pre>object({<br/> processors = number<br/> memory = number<br/> system_type = string<br/> proc_type = string<br/> replicas = number<br/> })</pre> | <pre>{<br/> "memory": "32",<br/> "proc_type": "Shared",<br/> "processors": "4",<br/> "replicas": "3",<br/> "system_type": null<br/>}</pre> | no |
83+
| <a name="input_destroy_cluster"></a> [destroy\_cluster](#input\_destroy\_cluster) | Destroying this environment is a 2-step process. 1. set this value to true and apply - this will destroy the cluster resources. 2. trigger a terraform destroy - this will destroy the landing zone resources. | `bool` | `false` | no |
8284
| <a name="input_enable_monitoring"></a> [enable\_monitoring](#input\_enable\_monitoring) | Specify whether Monitoring will be enabled. This creates a new IBM Cloud Monitoring Instance. | `bool` | `false` | no |
8385
| <a name="input_enable_scc_wp"></a> [enable\_scc\_wp](#input\_enable\_scc\_wp) | Enable SCC Workload Protection and install and configure the SCC Workload Protection agent on all intel VSIs in this deployment. | `bool` | `true` | no |
8486
| <a name="input_existing_sm_instance_guid"></a> [existing\_sm\_instance\_guid](#input\_existing\_sm\_instance\_guid) | An existing Secrets Manager GUID. If not provided a new instance will be provisioned. | `string` | `null` | no |
@@ -94,6 +96,7 @@ Due to technical limitations, the cost estimate Projects gives does not include
9496
| <a name="input_ssh_private_key"></a> [ssh\_private\_key](#input\_ssh\_private\_key) | Private SSH key (RSA format) to login to Intel VSIs to configure network management services (SQUID, NTP, DNS and ansible). Should match to public SSH key referenced by 'ssh\_public\_key'. The key is not uploaded or stored. If you're unsure how to create one, check [Generate a SSH Key Pair](https://cloud.ibm.com/docs/powervs-vpc?topic=powervs-vpc-powervs-automation-prereqs#powervs-automation-ssh-key) in our docs. For more information about SSH keys, see [SSH keys](https://cloud.ibm.com/docs/vpc?topic=vpc-ssh-keys) in the VPC docs. | `string` | n/a | yes |
9597
| <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. If you're unsure how to create one, check [Generate a SSH Key Pair](https://cloud.ibm.com/docs/powervs-vpc?topic=powervs-vpc-powervs-automation-prereqs#powervs-automation-ssh-key) in our docs. For more information about SSH keys, see [SSH keys](https://cloud.ibm.com/docs/vpc?topic=vpc-ssh-keys) in the VPC docs. | `string` | n/a | yes |
9698
| <a name="input_tags"></a> [tags](#input\_tags) | List of tag names for the IBM Cloud PowerVS workspace | `list(string)` | `[]` | no |
99+
| <a name="input_tshirt_size"></a> [tshirt\_size](#input\_tshirt\_size) | OpenShift Cluster profiles for the master and worker nodes. These profiles can be overridden by setting this value to 'custom' and specifying 'custom\_master\_node\_config' and 'custom\_worker\_node\_config' values in the optional parameters section. | `string` | `"xs"` | no |
97100
| <a name="input_user_id"></a> [user\_id](#input\_user\_id) | The IBM Cloud login user ID associated with the account where the cluster will be deployed. | `string` | n/a | yes |
98101
| <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> | <pre>{<br/> "rhel_image": "ibm-redhat-9-4-amd64-sap-applications-7",<br/> "sles_image": "ibm-sles-15-7-amd64-sap-applications-1"<br/>}</pre> | no |
99102

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
- name: Destroy the OpenShift Cluster
3+
hosts: all
4+
5+
vars:
6+
cluster_dir: "${CLUSTER_DIR}"
7+
cluster_name: $"{CLUSTER_NAME}"
8+
openshift_install_bootstrap_timeout: "${OPENSHIFT_INSTALL_BOOTSTRAP_TIMEOUT}"
9+
openshift_install_machine_wait_timeout: "${OPENSHIFT_INSTALL_MACHINE_WAIT_TIMEOUT}"
10+
openshift_install_cluster_timeout: "${OPENSHIFT_INSTALL_CLUSTER_TIMEOUT}"
11+
openshift_install_destroy_timeout: "${OPENSHIFT_INSTALL_DESTROY_TIMEOUT}"
12+
13+
tasks:
14+
- name: Destroy the Cluster resources
15+
block:
16+
- name: Run openshift-install destroy cluster
17+
ansible.builtin.shell: |
18+
openshift-install destroy cluster --dir={{ cluster_dir }} --log-level=debug
19+
environment:
20+
OPENSHIFT_INSTALL_BOOTSTRAP_TIMEOUT: "{{ openshift_install_bootstrap_timeout }}"
21+
OPENSHIFT_INSTALL_MACHINE_WAIT_TIMEOUT: "{{ openshift_install_machine_wait_timeout }}"
22+
OPENSHIFT_INSTALL_CLUSTER_TIMEOUT: "{{ openshift_install_cluster_timeout }}"
23+
OPENSHIFT_INSTALL_DESTROY_TIMEOUT: "{{ openshift_install_destroy_timeout }}"
24+
ignore_errors: false
25+
retries: 3
26+
delay: 30
27+
28+
- name: Delete the Service IDs
29+
ansible.builtin.shell: |
30+
ccoctl ibmcloud delete-service-id --credentials-requests-dir {{ cluster_dir }}/credreqs --name {{ cluster_name }}
31+
environment:
32+
IBMCLOUD_API_KEY: "{{ lookup('env', 'IBMCLOUD_API_KEY') }}"
33+
OPENSHIFT_INSTALL_BOOTSTRAP_TIMEOUT: "{{ openshift_install_bootstrap_timeout }}"
34+
OPENSHIFT_INSTALL_MACHINE_WAIT_TIMEOUT: "{{ openshift_install_machine_wait_timeout }}"
35+
OPENSHIFT_INSTALL_CLUSTER_TIMEOUT: "{{ openshift_install_cluster_timeout }}"
36+
OPENSHIFT_INSTALL_DESTROY_TIMEOUT: "{{ openshift_install_destroy_timeout }}"
37+
ignore_errors: false

0 commit comments

Comments
 (0)