Skip to content

Commit 65b1a69

Browse files
authored
Merge pull request #29 from sap-linuxlab/dev
0.7.2 release
2 parents acc865c + ff48eb3 commit 65b1a69

25 files changed

+1432
-55
lines changed

README.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44

55
Terraform Modules for SAP are a subcomponent designed to be used from the [Terraform Templates for SAP](https://github.com/sap-linuxlab/terraform.templates_for_sap), but can be executed individually.
66

7-
These custom Terraform Modules for SAP enable different solution scenarios of SAP software installations, and are used where there is siginificant repeated code, such as bootstraping a new Cloud Account with a new Resource Group, VPC and Subnets.
7+
These custom Terraform Modules for SAP enable different solution scenarios of SAP software installations, and are used where there is siginificant repeated code, such as bootstraping a new Cloud Account with a new Resource Group, VPC and Subnets - i.e. a 'Minimal Landing Zone'.
88

99
Every Terraform Template (e.g. `/sap_hana_single_node_install/aws_ec2_instance`):
1010
- will reference Terraform Modules for SAP infrastructure platforms (e.g. `/aws_ec2_instance/host_provision`)
1111
- will reference Terraform Modules for SAP solution scenarios (e.g. `/all/ansible_sap_s4hana_install_maintplan`)
1212

13+
It is possible to create your own Terraform Templates and re-use [other Terraform Modules from the Terraform Registry](https://registry.terraform.io/browse/modules), although these combinations are not tested; for example:
14+
- Terraform Module for the Cloud Service Provider's defined landing zone patterns (e.g. [Azure Cloud Adoption Framework (CAF)](https://registry.terraform.io/modules/Azure/caf-enterprise-scale/azurerm/latest))
15+
- Terraform Module for SAP Host provision to a specified Infrastructure Platform (e.g. `/msazure_vm/host_provision` subdirectory)
16+
- any of the Terraform Modules for SAP installations using Ansible (e.g. `/all/ansible_sap_s4hana_install_maintplan` subdirectory)
17+
1318
For more information which explains Terraform Modules, please see:
1419
- [Terraform HCL Language - Syntax of Module Blocks](https://www.terraform.io/docs/language/modules/syntax.html)
1520
- [Terraform HCL Language - Creating Modules](https://www.terraform.io/docs/language/modules/develop/index.html)
@@ -44,27 +49,42 @@ The below table lists the Terraform Modules for SAP, and any detailed documentat
4449
| **Terraform Modules for SAP** | **Link** |
4550
|:---|:---|
4651
| **TF Modules for Infrastructure Platforms** | - |
47-
|  Amazon Web Services Elastic Compute Cloud (EC2) Instance | |
52+
|  Amazon Web Services Elastic Compute Cloud (EC2) Virtual Server | |
4853
|  ~~Google Cloud Platform Compute Engine (CE) Virtual Machine~~ | N/A |
4954
|  IBM Cloud Virtual Servers | N/A |
5055
|  IBM Cloud, IBM Power Virtual Servers | |
5156
|  IBM Power Virtualization Center | N/A |
5257
|  Microsoft Azure Virtual Machine| N/A |
5358
|  ~~oVirt KVM Virtual Machine~~ | N/A |
5459
|  ~~VMware vSphere Virtual Machine~~ | N/A |
60+
| &emsp;Generic documentation | <ul><li>[**/host_network_access_sap](/docs/tf_modules/tf_mod_host_network_access_sap.md)</li></ul> |
5561
| **TF Modules as wrapper to Ansible for SAP solution scenarios** | - |
56-
| &emsp;SAP HANA single-node installation | [modules_for_sap/all/ansible_sap_hana_install](../docs/tf_modules/tf_mod_ansible_sap_hana_install.md) |
57-
| &emsp;SAP S/4HANA single-node System Copy (Homogeneous with SAP HANA Backup / Recovery) installation | [modules_for_sap/all/ansible_sap_s4hana_system_copy_hdb](../docs/tf_modules/tf_mod_ansible_sap_s4hana_system_copy_hdb.md) |
58-
| &emsp;SAP S/4HANA single-node installation, using SAP Maintenance Planner | [modules_for_sap/all/ansible_sap_s4hana_install_maintplan](../docs/tf_modules/tf_mod_ansible_sap_s4hana_install_maintplan.md) |
59-
| &emsp;SAP ECC on SAP HANA single-node System Copy | [modules_for_sap/all/ansible_sap_ecc_hana_system_copy_hdb](../docs/tf_modules/tf_mod_ansible_sap_ecc_hana_system_copy_hdb.md) |
62+
| &emsp; SAP BW/4HANA single-node | /all/ansible_sap_bw4hana_install |
63+
| &emsp; SAP ECC on SAP HANA single-node | /all/ansible_sap_ecc_hana_install |
64+
| &emsp; SAP ECC on SAP HANA single-node System Copy<br/>&emsp; (Homogeneous with SAP HANA Backup / Recovery) | /all/ansible_sap_ecc_hana_system_copy_hdb |
65+
| &emsp; SAP ECC on IBM Db2 single-node | /all/ansible_sap_ecc_ibmdb2_install |
66+
| &emsp; SAP ECC on Oracle DB single-node | /all/ansible_sap_ecc_oracledb_install |
67+
| &emsp; SAP ECC on SAP ASE single-node | /all/ansible_sap_ecc_sapase_install |
68+
| &emsp; SAP ECC on SAP MaxDB single-node | /all/ansible_sap_ecc_sapmaxdb_install |
69+
| &emsp; SAP HANA 2.0 single-node | /all/ansible_sap_hana_install |
70+
| &emsp; SAP NetWeaver AS (ABAP) with SAP HANA single-node | /all/ansible_sap_nwas_abap_hana_install |
71+
| &emsp; SAP NetWeaver AS (ABAP) with IBM Db2 single-node | /all/ansible_sap_nwas_abap_ibmdb2_install |
72+
| &emsp; SAP NetWeaver AS (ABAP) with Oracle DB single-node | /all/ansible_sap_nwas_abap_oracledb_install |
73+
| &emsp; SAP NetWeaver AS (ABAP) with SAP ASE single-node | /all/ansible_sap_nwas_abap_sapase_install |
74+
| &emsp; SAP NetWeaver AS (ABAP) with SAP MaxDB single-node | /all/ansible_sap_nwas_abap_sapmaxdb_install |
75+
| &emsp; SAP NetWeaver AS (JAVA) with IBM Db2 single-node | /all/ansible_sap_nwas_java_ibmdb2_install |
76+
| &emsp; SAP NetWeaver AS (JAVA) with SAP ASE single-node | /all/ansible_sap_nwas_java_sapase_install |
77+
| &emsp; SAP S/4HANA single-node | /all/ansible_sap_s4hana_install |
78+
| &emsp; SAP S/4HANA single-node,<br/>&emsp; using SAP Maintenance Planner Stack XML<br/>&emsp; (to run SUM and SPAM / SAINT) | [/all/ansible_sap_s4hana_install_maintplan](/docs/tf_modules/tf_mod_ansible_sap_s4hana_install_maintplan.md) |
79+
| &emsp; SAP S/4HANA single-node System Copy<br/>&emsp; (Homogeneous with SAP HANA Backup / Recovery) | /all/ansible_sap_s4hana_system_copy_hdb |
6080

6181
## Infrastructure provisioning parity comparison
6282

6383
| Infrastructure Platform | **Amazon Web Services (AWS)** | **Microsoft Azure** | **IBM Cloud** | **IBM Cloud** | **IBM PowerVC** |
6484
|:---|:---:|:---:|:---:|:---:|:---:|
65-
| &emsp;&emsp;*Product* | EC2 instance | VM | Virtual Server | IBM Power Virtual Server | LPAR |
66-
| &emsp;&emsp;*Compute*<br/>&emsp;&emsp;*Type* | Virtual Machine<br> (Type 2) | Virtual Machine<br> (Type 2) | Virtual Machine<br> (Type 2) | Virtual Machine<br> (Type 1) | Virtual Machine<br> (Type 1) |
67-
| &emsp;&emsp;*Compute*<br/>&emsp;&emsp;*Hypervisor* | KVM | HyperV | KVM | IBM PowerVM (PHYP) | IBM PowerVM (PHYP) |
85+
| &emsp;&emsp;*Product* | EC2 Virtual Server | VM | Virtual Server | IBM Power Virtual Server | LPAR |
86+
| &emsp;&emsp;*Compute*<br/>&emsp;&emsp;*Type* | Virtual Machine<br> (Type 1) | Virtual Machine<br> (Type 1) | Virtual Machine<br> (Type 1) | Virtual Machine<br> (Type 1) | Virtual Machine<br> (Type 1) |
87+
| &emsp;&emsp;*Compute*<br/>&emsp;&emsp;*Hypervisor* | KVM | HyperV | KVM | IBM PowerVM<br> (PHYP LE) | IBM PowerVM<br> (PHYP LE) |
6888
| <br/><br/>***Account Init*** | | | | | |
6989
| Create Resource Group, or re-use existing Resource Group | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | N/A |
7090
| Create VPC/VNet, or re-use existing VPC/VNet | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | N/A |
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
- name: Ansible Playbook execution for SAP ECC on HANA One Host
3+
hosts: all
4+
become: true
5+
6+
# Use include_role inside Task block, instead of using roles declaration or Task block with import_roles.
7+
# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation
8+
tasks:
9+
10+
# Set facts based on the install dictionary and the default template selected
11+
- name: Set fact x86_64 softwarecenter_search_list_ecc_hana_install
12+
set_fact:
13+
softwarecenter_search_list_ecc_hana_install: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['softwarecenter_search_list_x86_64'] }}"
14+
when:
15+
- ansible_architecture == "x86_64"
16+
17+
# Set facts based on the install dictionary and the default template selected
18+
- name: Set fact ppc64le softwarecenter_search_list_ecc_hana_install
19+
set_fact:
20+
softwarecenter_search_list_ecc_hana_install: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['softwarecenter_search_list_ppc64le'] }}"
21+
when:
22+
- ansible_architecture == "ppc64le"
23+
24+
- name: Set fact for sap_install_media_detect
25+
set_fact:
26+
sap_install_media_detect_export: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_install_media_detect_export'] }}"
27+
28+
- name: Update etc hosts
29+
lineinfile:
30+
dest: /etc/hosts
31+
line: "{{ ansible_default_ipv4.address }}\t{{ ansible_hostname }}.{{ ansible_domain }}\t{{ ansible_hostname }}"
32+
state: present
33+
become: yes
34+
35+
- name: Install Python package manager pip3 to system Python
36+
ansible.builtin.package:
37+
name: python3-pip
38+
state: present
39+
40+
- name: Install Python package manager lxml to system Python when ppc64le
41+
ansible.builtin.package:
42+
name:
43+
- python3-lxml
44+
- libxslt-devel
45+
- libxml2-devel
46+
state: present
47+
when:
48+
- ansible_architecture == "ppc64le"
49+
50+
- name: Install Python dependency wheel to system Python
51+
ansible.builtin.pip:
52+
name:
53+
- wheel
54+
# executable: pip3.6
55+
56+
- name: Install Python dependencies for Ansible Modules to system Python
57+
ansible.builtin.pip:
58+
name:
59+
- urllib3
60+
- requests
61+
- beautifulsoup4
62+
- lxml
63+
# executable: pip3.6
64+
65+
- name: Create directories if does not exist
66+
ansible.builtin.file:
67+
path: "{{ item }}"
68+
state: directory
69+
mode: '0755'
70+
with_items:
71+
- "{{ sap_install_media_detect_directory }}"
72+
73+
# Use task block to call Ansible Module
74+
- name: Execute Ansible Module with system Python to download installation media for SAP HANA and SAP NetWeaver for hosting SAP ECC on HANA
75+
community.sap_launchpad.software_center_download:
76+
suser_id: "{{ suser_id }}"
77+
suser_password: "{{ suser_password }}"
78+
softwarecenter_search_query: "{{ item }}"
79+
dest: "{{ sap_install_media_detect_directory }}"
80+
with_items: "{{ softwarecenter_search_list_ecc_hana_install }}"
81+
# vars:
82+
# ansible_python_interpreter: python3.6
83+
84+
85+
- name: Execute Ansible Role sap_install_media_detect
86+
include_role:
87+
name: { role: community.sap_install.sap_install_media_detect }
88+
89+
- name: Execute Ansible Role sap_general_preconfigure
90+
include_role:
91+
name: { role: community.sap_install.sap_general_preconfigure }
92+
93+
- name: Execute Ansible Role sap_netweaver_preconfigure
94+
include_role:
95+
name: { role: community.sap_install.sap_netweaver_preconfigure }
96+
97+
- name: Execute Ansible Role sap_hana_preconfigure
98+
include_role:
99+
name: { role: community.sap_install.sap_hana_preconfigure }
100+
101+
- name: Execute Ansible Role sap_hana_install
102+
include_role:
103+
name: { role: community.sap_install.sap_hana_install }
104+
105+
- name: Execute Ansible Role sap_swpm with SAP ECC on HANA One Host
106+
include_role:
107+
name: { role: community.sap_install.sap_swpm }
108+
109+
# - name: Execute Ansible Role sap_profile_update to update Profile for ICM HTTPS
110+
# include_role:
111+
# name: { role: community.sap_operations.sap_profile_update }
112+
113+
# - name: Execute Ansible Role sap_control to restart SAP System/s for Profile update changes
114+
# include_role:
115+
# name: { role: community.sap_operations.sap_control }
116+
# vars:
117+
# sap_control_function: "restart_all_sap"
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
- name: Ansible Playbook dry-run for SAP ECC on HANA installation media
3+
hosts: all
4+
become: false
5+
6+
collections:
7+
- community.sap_launchpad
8+
9+
# Use include_role inside Task block, instead of using roles declaration or Task block with import_roles.
10+
# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation
11+
tasks:
12+
13+
- name: Ensure packages are available for the Python used by Ansible on the localhost
14+
ansible.builtin.pip:
15+
name:
16+
- urllib3
17+
- requests
18+
- beautifulsoup4
19+
- lxml
20+
21+
# Use task block to call Ansible Module
22+
- name: Test x86_64 software availability - Execute Ansible Module with system Python to download installation media for SAP HANA and SAP NetWeaver for hosting SAP ECC
23+
community.sap_launchpad.software_center_download:
24+
suser_id: "{{ suser_id }}"
25+
suser_password: "{{ suser_password }}"
26+
softwarecenter_search_query: "{{ item }}"
27+
dest: "{{ playbook_dir }}"
28+
dry_run: True
29+
with_items:
30+
- "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['softwarecenter_search_list_x86_64'] }}"
31+
when:
32+
- dry_run_test == "x86_64"
33+
# vars:
34+
# ansible_python_interpreter: python3.6
35+
36+
# Use task block to call Ansible Module
37+
- name: Test ppc64le software availability - Execute Ansible Module with system Python to download installation media for SAP HANA and SAP NetWeaver for hosting SAP ECC
38+
community.sap_launchpad.software_center_download:
39+
suser_id: "{{ suser_id }}"
40+
suser_password: "{{ suser_password }}"
41+
softwarecenter_search_query: "{{ item }}"
42+
dest: "{{ playbook_dir }}"
43+
dry_run: True
44+
with_items:
45+
- "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['softwarecenter_search_list_ppc64le'] }}"
46+
when:
47+
- dry_run_test == "ppc64le"
48+
# vars:
49+
# ansible_python_interpreter: python3.6
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
collections:
3+
4+
# Collections from Ansible Galaxy
5+
- name: community.general
6+
type: galaxy
7+
version: 6.1.0
8+
- name: fedora.linux_system_roles
9+
type: galaxy
10+
version: 1.33.0
11+
- name: community.sap_install
12+
type: galaxy
13+
version: 1.2.0
14+
# - name: community.sap_launchpad
15+
# type: galaxy
16+
# version: 0.0.0
17+
# - name: community.sap_operations
18+
# type: galaxy
19+
# version: 0.0.0
20+
21+
# Collections from public repositories via HTTPS
22+
# - name: https://github.com/sap-linuxlab/community.sap_install.git
23+
# type: git
24+
# version: main
25+
- name: https://github.com/sap-linuxlab/community.sap_launchpad.git
26+
type: git
27+
version: main
28+
- name: https://github.com/sap-linuxlab/community.sap_operations.git
29+
type: git
30+
version: main
31+
32+
# Collections from private repositories via use SSH (embedded GitHub PAT does not work)
33+
# Used for customised/forked Ansible Collections
34+
# - name: git@github.domain.com:gheorg/namespace.sap_install.git
35+
# type: git
36+
# version: main
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
# Roles from Ansible Galaxy
3+
#- name: linux-system-roles.storage
4+
5+
# Roles from public repositories (e.g. upstream Linux System Roles)
6+
#- src: https://github.com/linux-system-roles/storage.git
7+
8+
# Roles from private repositories via GitHub PAT
9+
#- src: https://PAT_TOKEN@github.com/infrasap/repo.git

0 commit comments

Comments
 (0)