Skip to content

Commit 9c09cd5

Browse files
fix: remove anslble galaxy collection dependencies from shell script (#751)
1 parent 6bff22d commit 9c09cd5

File tree

14 files changed

+60
-46
lines changed

14 files changed

+60
-46
lines changed

ibm_catalog.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"name": "deploy-arch-ibm-pvs-inf",
6161
"install_type": "fullstack",
6262
"optional": true,
63-
"version": ">=5.0.0"
63+
"version": ">=8.0.0"
6464
}
6565
],
6666
"configuration": [
@@ -71,7 +71,7 @@
7171
"config_constraints": {
7272
"catalogID": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc",
7373
"offeringID": "2dd486c7-b317-4aaa-907b-42671485ad96-global",
74-
"versionConstraint": ">=5.0.0"
74+
"versionConstraint": ">=8.0.0"
7575
},
7676
"grouping": "deployment",
7777
"original_grouping": "deployment",
@@ -373,7 +373,7 @@
373373
"name": "deploy-arch-ibm-pvs-inf",
374374
"install_type": "fullstack",
375375
"optional": true,
376-
"version": ">=5.0.0"
376+
"version": ">=8.0.0"
377377
}
378378
],
379379
"configuration": [
@@ -384,7 +384,7 @@
384384
"config_constraints": {
385385
"catalogID": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc",
386386
"offeringID": "2dd486c7-b317-4aaa-907b-42671485ad96-global",
387-
"versionConstraint": ">=5.0.0"
387+
"versionConstraint": ">=8.0.0"
388388
},
389389
"grouping": "deployment",
390390
"original_grouping": "deployment",

modules/ansible/ansible_node_packages.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
############################################################
99

1010
GLOBAL_RHEL_PACKAGES="rhel-system-roles rhel-system-roles-sap expect"
11-
GLOBAL_GALAXY_COLLECTIONS="ibm.power_linux_sap:>=3.0.0,<4.0.0 ansible.posix:1.5.4 ansible.utils:4.1.0 community.general:10.0.1"
11+
GLOBAL_GALAXY_COLLECTIONS="ibm.power_linux_sap:>=3.0.0,<4.0.0"
1212

1313
############################################################
1414
# Start functions
@@ -90,6 +90,7 @@ main::install_packages() {
9090
done
9191
done
9292

93+
ansible-galaxy collection install -r '/root/.ansible/collections/ansible_collections/ibm/power_linux_sap/requirements.yml' -f
9394
main::log_info "All packages installed successfully"
9495
fi
9596

modules/ansible/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ locals {
2424
##############################################################
2525

2626
resource "terraform_data" "setup_ansible_host" {
27+
count = var.configure_ansible_host ? 1 : 0
2728

2829
connection {
2930
type = "ssh"

modules/ansible/templates-ansible/s4hanab4hana-solution/playbook-sap-swpm-install.yml.tftpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# ------------------------------------------------------------------------
2-
# This playbook uses:
3-
# 1. ansible-galaxy collection community.sap_install
4-
# 2. ansible-galaxy collection community.general
2+
# This playbook uses the RHEL Linux System Roles.
53
# ------------------------------------------------------------------------
64
# Install directory **should not contain** any IMDB files. Otherwise swpm roll will run into error. However exception is IMDB_CLIENT*.SAR file.
75
# 1. IMDB_SERVER*SAR file must be absent

modules/ansible/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ variable "ssh_private_key" {
1414
sensitive = true
1515
}
1616

17+
variable "configure_ansible_host" {
18+
description = "If set to true, bash script will be executed to install and configure the collections and packages on ansible node."
19+
type = bool
20+
}
21+
1722
variable "src_script_template_name" {
1823
description = "Name of the bash script template file located within the 'templates-ansible' directory."
1924
type = string

modules/pi-sap-system-type1/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ The Power Virtual Server for SAP module automates the following tasks:
3434
| <a name="module_ansible_netweaver_sapmnt_mount"></a> [ansible\_netweaver\_sapmnt\_mount](#module\_ansible\_netweaver\_sapmnt\_mount) | ../ansible | n/a |
3535
| <a name="module_ansible_sap_instance_init"></a> [ansible\_sap\_instance\_init](#module\_ansible\_sap\_instance\_init) | ../ansible | n/a |
3636
| <a name="module_ansible_sharefs_instance_exportfs"></a> [ansible\_sharefs\_instance\_exportfs](#module\_ansible\_sharefs\_instance\_exportfs) | ../ansible | n/a |
37-
| <a name="module_pi_hana_instance"></a> [pi\_hana\_instance](#module\_pi\_hana\_instance) | terraform-ibm-modules/powervs-instance/ibm | 2.2.1 |
37+
| <a name="module_pi_hana_instance"></a> [pi\_hana\_instance](#module\_pi\_hana\_instance) | terraform-ibm-modules/powervs-instance/ibm | 2.2.3 |
3838
| <a name="module_pi_hana_storage_calculation"></a> [pi\_hana\_storage\_calculation](#module\_pi\_hana\_storage\_calculation) | ../pi-hana-storage-config | n/a |
39-
| <a name="module_pi_netweaver_instance"></a> [pi\_netweaver\_instance](#module\_pi\_netweaver\_instance) | terraform-ibm-modules/powervs-instance/ibm | 2.2.1 |
40-
| <a name="module_pi_sharefs_instance"></a> [pi\_sharefs\_instance](#module\_pi\_sharefs\_instance) | terraform-ibm-modules/powervs-instance/ibm | 2.2.1 |
39+
| <a name="module_pi_netweaver_instance"></a> [pi\_netweaver\_instance](#module\_pi\_netweaver\_instance) | terraform-ibm-modules/powervs-instance/ibm | 2.2.3 |
40+
| <a name="module_pi_sharefs_instance"></a> [pi\_sharefs\_instance](#module\_pi\_sharefs\_instance) | terraform-ibm-modules/powervs-instance/ibm | 2.2.3 |
4141

4242
### Resources
4343

modules/pi-sap-system-type1/main.tf

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ locals {
2525

2626
module "pi_sharefs_instance" {
2727
source = "terraform-ibm-modules/powervs-instance/ibm"
28-
version = "2.2.1"
28+
version = "2.2.3"
2929
count = var.pi_sharefs_instance.enable ? 1 : 0
3030

3131
pi_workspace_guid = var.pi_workspace_guid
@@ -62,12 +62,13 @@ locals {
6262

6363
module "ansible_sharefs_instance_exportfs" {
6464

65-
source = "../ansible"
66-
depends_on = [module.pi_sharefs_instance]
67-
count = var.pi_sharefs_instance.enable ? 1 : 0
68-
bastion_host_ip = var.pi_instance_init_linux.bastion_host_ip
69-
ansible_host_or_ip = var.pi_instance_init_linux.ansible_host_or_ip
70-
ssh_private_key = var.pi_instance_init_linux.ssh_private_key
65+
source = "../ansible"
66+
depends_on = [module.pi_sharefs_instance]
67+
count = var.pi_sharefs_instance.enable ? 1 : 0
68+
bastion_host_ip = var.pi_instance_init_linux.bastion_host_ip
69+
ansible_host_or_ip = var.pi_instance_init_linux.ansible_host_or_ip
70+
ssh_private_key = var.pi_instance_init_linux.ssh_private_key
71+
configure_ansible_host = false
7172

7273
src_script_template_name = "configure-network-services/ansible_exec.sh.tftpl"
7374
dst_script_file_name = "${local.sap_instance_names[count.index]}_configure_nfs_server.sh"
@@ -103,7 +104,7 @@ module "pi_hana_storage_calculation" {
103104

104105
module "pi_hana_instance" {
105106
source = "terraform-ibm-modules/powervs-instance/ibm"
106-
version = "2.2.1"
107+
version = "2.2.3"
107108

108109
pi_workspace_guid = var.pi_workspace_guid
109110
pi_instance_name = local.pi_hana_instance_name
@@ -141,7 +142,7 @@ resource "time_sleep" "wait_1_min" {
141142

142143
module "pi_netweaver_instance" {
143144
source = "terraform-ibm-modules/powervs-instance/ibm"
144-
version = "2.2.1"
145+
version = "2.2.3"
145146
count = var.pi_netweaver_instance.instance_count
146147
depends_on = [time_sleep.wait_1_min]
147148

@@ -173,12 +174,13 @@ locals {
173174

174175
module "ansible_netweaver_sapmnt_mount" {
175176

176-
source = "../ansible"
177-
depends_on = [module.ansible_sharefs_instance_exportfs, module.pi_netweaver_instance]
178-
count = var.pi_sharefs_instance.enable && local.valid_sharefs_nfs_config ? var.pi_netweaver_instance.instance_count : 0
179-
bastion_host_ip = var.pi_instance_init_linux.bastion_host_ip
180-
ansible_host_or_ip = var.pi_instance_init_linux.ansible_host_or_ip
181-
ssh_private_key = var.pi_instance_init_linux.ssh_private_key
177+
source = "../ansible"
178+
depends_on = [module.ansible_sharefs_instance_exportfs, module.pi_netweaver_instance]
179+
count = var.pi_sharefs_instance.enable && local.valid_sharefs_nfs_config ? var.pi_netweaver_instance.instance_count : 0
180+
bastion_host_ip = var.pi_instance_init_linux.bastion_host_ip
181+
ansible_host_or_ip = var.pi_instance_init_linux.ansible_host_or_ip
182+
ssh_private_key = var.pi_instance_init_linux.ssh_private_key
183+
configure_ansible_host = true
182184

183185
src_script_template_name = "configure-network-services/ansible_exec.sh.tftpl"
184186
dst_script_file_name = "${local.sap_instance_names[count.index]}_sapmnt_mount.sh"
@@ -208,12 +210,13 @@ locals {
208210

209211
module "ansible_sap_instance_init" {
210212

211-
source = "../ansible"
212-
depends_on = [module.pi_hana_instance, module.pi_netweaver_instance, module.ansible_netweaver_sapmnt_mount]
213-
count = length(local.target_server_ips)
214-
bastion_host_ip = var.pi_instance_init_linux.bastion_host_ip
215-
ansible_host_or_ip = var.pi_instance_init_linux.ansible_host_or_ip
216-
ssh_private_key = var.pi_instance_init_linux.ssh_private_key
213+
source = "../ansible"
214+
depends_on = [module.pi_hana_instance, module.pi_netweaver_instance, module.ansible_netweaver_sapmnt_mount]
215+
count = length(local.target_server_ips)
216+
bastion_host_ip = var.pi_instance_init_linux.bastion_host_ip
217+
ansible_host_or_ip = var.pi_instance_init_linux.ansible_host_or_ip
218+
ssh_private_key = var.pi_instance_init_linux.ssh_private_key
219+
configure_ansible_host = false
217220

218221
src_script_template_name = "configure-os-for-sap/ansible_exec.sh.tftpl"
219222
dst_script_file_name = "${local.sap_instance_names[count.index]}_configure_os_for_sap.sh"

reference-architectures/sap-ready-to-go/deploy-arch-ibm-pvs-sap-ready-to-go.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
copyright:
44
years: 2024
5-
lastupdated: "2024-12-02"
5+
lastupdated: "2024-12-11"
66
keywords:
77
subcollection: deployable-reference-architectures
88
authors:
@@ -16,7 +16,7 @@ use-case: ITServiceManagement
1616
industry: Technology
1717
compliance: SAPCertified
1818
content-type: reference-architecture
19-
version: v3.2.0
19+
version: v3.2.1
2020
related_links:
2121
- title: 'SAP in IBM Cloud documentation'
2222
url: 'https://cloud.ibm.com/docs/sap'
@@ -38,7 +38,7 @@ related_links:
3838
{: toc-industry="Technology"}
3939
{: toc-use-case="ITServiceManagement"}
4040
{: toc-compliance="SAPCertified"}
41-
{: toc-version="3.2.0"}
41+
{: toc-version="3.2.1"}
4242

4343
The SAP-ready PowerVS variation of the Power Virtual Server for SAP HANA creates a basic and expandable SAP system landscape. The variation builds on the foundation of the VPC landing zone and Power Virtual Server with VPC landing zone. PowerVS instances for SAP HANA, SAP NetWeaver, and optionally for shared SAP files are deployed and preconfigured for SAP installation.
4444

reference-architectures/sap-s4hana-bw4hana/deploy-arch-ibm-pvs-sap-s4hana-bw4hana.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
copyright:
44
years: 2024
5-
lastupdated: "2024-12-02"
5+
lastupdated: "2024-12-11"
66
keywords:
77
subcollection: deployable-reference-architectures
88
authors:
@@ -16,7 +16,7 @@ use-case: ITServiceManagement
1616
industry: Technology
1717
compliance: SAPCertified
1818
content-type: reference-architecture
19-
version: v3.2.0
19+
version: v3.2.1
2020
related_links:
2121
- title: 'SAP in IBM Cloud documentation'
2222
url: 'https://cloud.ibm.com/docs/sap'
@@ -38,7 +38,7 @@ related_links:
3838
{: toc-industry="Technology"}
3939
{: toc-use-case="ITServiceManagement"}
4040
{: toc-compliance="SAPCertified"}
41-
{: toc-version="3.2.0"}
41+
{: toc-version="3.2.1"}
4242

4343
'SAP S/4HANA or BW/4HANA' variation of 'Power Virtual Server for SAP HANA' creates a basic and expandable SAP system landscape built on the foundation of 'Power Virtual Server with VPC landing zone'. PowerVS instances for SAP HANA, SAP NetWeaver, and optionally for shared SAP files are deployed and preconfigured for SAP installation. The S/4HANA or BW/4HANA solution is installed based on the selected version.
4444

solutions/e2e/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ The end-to-end solution automates the following tasks:
5959

6060
| Name | Source | Version |
6161
|------|--------|---------|
62-
| <a name="module_powervs_infra"></a> [powervs\_infra](#module\_powervs\_infra) | terraform-ibm-modules/powervs-infrastructure/ibm//modules/powervs-vpc-landing-zone | 8.0.1 |
62+
| <a name="module_powervs_infra"></a> [powervs\_infra](#module\_powervs\_infra) | terraform-ibm-modules/powervs-infrastructure/ibm//modules/powervs-vpc-landing-zone | 8.0.3 |
6363
| <a name="module_sap_system"></a> [sap\_system](#module\_sap\_system) | ../../modules/pi-sap-system-type1 | n/a |
6464

6565
### Resources
6666

6767
| Name | Type |
6868
|------|------|
69-
| [time_sleep.wait_10_mins](https://registry.terraform.io/providers/hashicorp/time/0.12.1/docs/resources/sleep) | resource |
69+
| [time_sleep.wait_15_mins](https://registry.terraform.io/providers/hashicorp/time/0.12.1/docs/resources/sleep) | resource |
7070

7171
### Inputs
7272

0 commit comments

Comments
 (0)