Skip to content

Commit

Permalink
Merge pull request #38 from sap-linuxlab/dev
Browse files Browse the repository at this point in the history
1.0.0 release
  • Loading branch information
sean-freeman authored Jan 31, 2024
2 parents e790ade + f6a8664 commit 94a93ae
Show file tree
Hide file tree
Showing 148 changed files with 1,724 additions and 7,088 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
terraform_module_ansible: [ansible_sap_bw4hana_install, ansible_sap_ecc_hana_install, ansible_sap_ecc_hana_system_copy_hdb, ansible_sap_ecc_ibmdb2_install, ansible_sap_ecc_oracledb_install, ansible_sap_ecc_sapase_install, ansible_sap_ecc_sapmaxdb_install, ansible_sap_hana_install, ansible_sap_nwas_abap_hana_install, ansible_sap_nwas_abap_ibmdb2_install, ansible_sap_nwas_abap_oracledb_install, ansible_sap_nwas_abap_sapase_install, ansible_sap_nwas_abap_sapmaxdb_install, ansible_sap_nwas_java_ibmdb2_install, ansible_sap_nwas_java_sapase_install, ansible_sap_s4hana_distributed_install_maintplan, ansible_sap_s4hana_install, ansible_sap_s4hana_install_maintplan, ansible_sap_s4hana_system_copy_hdb, ansible_sap_solman_sapase_install, ansible_sap_solman_saphana_install]
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
with:
path: gh_repo
- name: Ansible setup
Expand Down Expand Up @@ -72,6 +72,7 @@ jobs:
echo 'import sys' >> python_module_fuzzy_call_script.py
echo 'input_search_file=sys.argv[1]' >> python_module_fuzzy_call_script.py
echo 'input_search_file_name_and_version_only=sys.argv[2]' >> python_module_fuzzy_call_script.py
echo 'from module_utils.sap_id_sso import sap_sso_login' >> python_module_fuzzy_call_script.py
echo 'from module_utils.sap_launchpad_software_center_download_search_fuzzy import *' >> python_module_fuzzy_call_script.py
echo "username='$sap_user_id'" >> python_module_fuzzy_call_script.py
echo "password='$sap_user_id_password'" >> python_module_fuzzy_call_script.py
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/terraform_validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
fail-fast: false
max-parallel: 10
matrix:
terraform_ver: [~1.0.0, ~1.1.0, ~1.2.0, ~1.3.0]
terraform_ver: [~1.0.0, ~1.1.0, ~1.2.0, ~1.3.0, ~1.4.0, =1.5.5]
terraform_module_parent: [all, aws_ec2_instance, gcp_ce_vm, ibmcloud_vs, ibmcloud_powervs, ibmpowervc, msazure_vm, vmware_vm]
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2.0.3
uses: hashicorp/setup-terraform@v3.0.0
with:
terraform_version: ${{ matrix.terraform_ver }}
- name: Terraform Init
Expand Down
36 changes: 36 additions & 0 deletions all/ansible_sap_bw4hana_install/ansible_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,42 @@
# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation
tasks:

# For end user ease of use, the host specifications dictionary uses disk_count to indicate how many disks will be provisioned
# However the sap_storage_setup Ansible Role can not detect disk_count, and requires the key to be renamed lvm_lv_stripes
- name: Convert sap_vm_provision_*_host_specifications_dictionary.storage_definition to sap_storage_setup.sap_storage_setup_definition
ansible.builtin.set_fact:
sap_storage_setup_definition: "{{ sap_storage_setup_definition | default([]) + [converted_element] }}"
vars:
converted_element: |
{% set current_element = (convert_item | dict2items) %}
{% set new_element = [] %}
{% for entry in current_element %}
{%- if "disk_count" in entry.key %}
{%- set conv = new_element.extend([
{
'key': 'lvm_lv_stripes',
'value': entry.value,
}
]) %}
{%- elif not "disk_type" in entry.key %}
{%- set add_entry = new_element.extend([
{
'key': entry.key,
'value': entry.value,
}
]) %}
{%- endif -%}
{% endfor %}
{{ new_element | items2dict }}
loop: "{{ terraform_host_specification_storage_definition | list }}"
loop_control:
loop_var: convert_item
label: "{{ convert_item.name }}"

- name: Execute Ansible Role sap_storage_setup
include_role:
name: { role: community.sap_install.sap_storage_setup }

# Set facts based on the install dictionary and the default template selected
- name: Set fact x86_64 softwarecenter_search_list_bw4hana_install
set_fact:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,18 @@ collections:
version: 1.33.0
- name: community.sap_install
type: galaxy
version: 1.2.3
# - name: community.sap_launchpad
# type: galaxy
# version: 0.0.0
# - name: community.sap_operations
# type: galaxy
# version: 0.0.0
version: 1.3.4
- name: community.sap_launchpad
type: galaxy
version: 1.1.0
- name: community.sap_operations
type: galaxy
version: 0.9.1

# Collections from public repositories via HTTPS
# - name: https://github.com/sap-linuxlab/community.sap_install.git
# type: git
# version: main
- name: https://github.com/sap-linuxlab/community.sap_launchpad.git
type: git
version: main
- name: https://github.com/sap-linuxlab/community.sap_operations.git
type: git
version: main

# Collections from private repositories via use SSH (embedded GitHub PAT does not work)
# Used for customised/forked Ansible Collections
Expand Down
12 changes: 12 additions & 0 deletions all/ansible_sap_bw4hana_install/create_ansible_extravars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -202,5 +202,17 @@ sap_swpm_templates_install_dictionary:
# For dual host installation, change the sap_swpm_db_host to appropriate value
sap_storage_setup_sid: "${var.module_var_sap_swpm_sid}"
# hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers
sap_storage_setup_host_type:
- hana_primary
- nwas_abap_ascs
- nwas_abap_pas
# Use Ansible Task to convert JSON (as string) to sap_storage_setup_definition Dictionary
terraform_host_specification_storage_definition: "{{ '${replace(jsonencode(var.module_var_terraform_host_specification_storage_definition),"\"","\\\"")}' | from_json }}"
EOF
}
4 changes: 4 additions & 0 deletions all/ansible_sap_bw4hana_install/module_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ variable "module_var_sap_swpm_template_selected" {}
variable "module_var_dry_run_test" {
default = ""
}

variable "module_var_terraform_host_specification_storage_definition" {
default = {}
}
36 changes: 36 additions & 0 deletions all/ansible_sap_ecc_hana_install/ansible_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,42 @@
# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation
tasks:

# For end user ease of use, the host specifications dictionary uses disk_count to indicate how many disks will be provisioned
# However the sap_storage_setup Ansible Role can not detect disk_count, and requires the key to be renamed lvm_lv_stripes
- name: Convert sap_vm_provision_*_host_specifications_dictionary.storage_definition to sap_storage_setup.sap_storage_setup_definition
ansible.builtin.set_fact:
sap_storage_setup_definition: "{{ sap_storage_setup_definition | default([]) + [converted_element] }}"
vars:
converted_element: |
{% set current_element = (convert_item | dict2items) %}
{% set new_element = [] %}
{% for entry in current_element %}
{%- if "disk_count" in entry.key %}
{%- set conv = new_element.extend([
{
'key': 'lvm_lv_stripes',
'value': entry.value,
}
]) %}
{%- elif not "disk_type" in entry.key %}
{%- set add_entry = new_element.extend([
{
'key': entry.key,
'value': entry.value,
}
]) %}
{%- endif -%}
{% endfor %}
{{ new_element | items2dict }}
loop: "{{ terraform_host_specification_storage_definition | list }}"
loop_control:
loop_var: convert_item
label: "{{ convert_item.name }}"

- name: Execute Ansible Role sap_storage_setup
include_role:
name: { role: community.sap_install.sap_storage_setup }

# Set facts based on the install dictionary and the default template selected
- name: Set fact x86_64 softwarecenter_search_list_ecc_hana_install
set_fact:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,18 @@ collections:
version: 1.33.0
- name: community.sap_install
type: galaxy
version: 1.2.3
# - name: community.sap_launchpad
# type: galaxy
# version: 0.0.0
# - name: community.sap_operations
# type: galaxy
# version: 0.0.0
version: 1.3.4
- name: community.sap_launchpad
type: galaxy
version: 1.1.0
- name: community.sap_operations
type: galaxy
version: 0.9.1

# Collections from public repositories via HTTPS
# - name: https://github.com/sap-linuxlab/community.sap_install.git
# type: git
# version: main
- name: https://github.com/sap-linuxlab/community.sap_launchpad.git
type: git
version: main
- name: https://github.com/sap-linuxlab/community.sap_operations.git
type: git
version: main

# Collections from private repositories via use SSH (embedded GitHub PAT does not work)
# Used for customised/forked Ansible Collections
Expand Down
13 changes: 13 additions & 0 deletions all/ansible_sap_ecc_hana_install/create_ansible_extravars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -389,5 +389,18 @@ sap_swpm_templates_install_dictionary:
- '51050036_17'
- '51050036_18'
sap_storage_setup_sid: "${var.module_var_sap_swpm_sid}"
# hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers
sap_storage_setup_host_type:
- hana_primary
- nwas_abap_ascs
- nwas_abap_pas
# Use Ansible Task to convert JSON (as string) to sap_storage_setup_definition Dictionary
terraform_host_specification_storage_definition: "{{ '${replace(jsonencode(var.module_var_terraform_host_specification_storage_definition),"\"","\\\"")}' | from_json }}"
EOF
}
4 changes: 4 additions & 0 deletions all/ansible_sap_ecc_hana_install/module_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ variable "module_var_sap_swpm_template_selected" {}
variable "module_var_dry_run_test" {
default = ""
}

variable "module_var_terraform_host_specification_storage_definition" {
default = {}
}
36 changes: 36 additions & 0 deletions all/ansible_sap_ecc_hana_system_copy_hdb/ansible_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,42 @@
# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation
tasks:

# For end user ease of use, the host specifications dictionary uses disk_count to indicate how many disks will be provisioned
# However the sap_storage_setup Ansible Role can not detect disk_count, and requires the key to be renamed lvm_lv_stripes
- name: Convert sap_vm_provision_*_host_specifications_dictionary.storage_definition to sap_storage_setup.sap_storage_setup_definition
ansible.builtin.set_fact:
sap_storage_setup_definition: "{{ sap_storage_setup_definition | default([]) + [converted_element] }}"
vars:
converted_element: |
{% set current_element = (convert_item | dict2items) %}
{% set new_element = [] %}
{% for entry in current_element %}
{%- if "disk_count" in entry.key %}
{%- set conv = new_element.extend([
{
'key': 'lvm_lv_stripes',
'value': entry.value,
}
]) %}
{%- elif not "disk_type" in entry.key %}
{%- set add_entry = new_element.extend([
{
'key': entry.key,
'value': entry.value,
}
]) %}
{%- endif -%}
{% endfor %}
{{ new_element | items2dict }}
loop: "{{ terraform_host_specification_storage_definition | list }}"
loop_control:
loop_var: convert_item
label: "{{ convert_item.name }}"

- name: Execute Ansible Role sap_storage_setup
include_role:
name: { role: community.sap_install.sap_storage_setup }

# Set facts based on the install dictionary and the default template selected
- name: Set fact x86_64 softwarecenter_search_list_ecc_syscopy
set_fact:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,18 @@ collections:
version: 1.33.0
- name: community.sap_install
type: galaxy
version: 1.2.3
# - name: community.sap_launchpad
# type: galaxy
# version: 0.0.0
# - name: community.sap_operations
# type: galaxy
# version: 0.0.0
version: 1.3.4
- name: community.sap_launchpad
type: galaxy
version: 1.1.0
- name: community.sap_operations
type: galaxy
version: 0.9.1

# Collections from public repositories via HTTPS
# - name: https://github.com/sap-linuxlab/community.sap_install.git
# type: git
# version: main
- name: https://github.com/sap-linuxlab/community.sap_launchpad.git
type: git
version: main
- name: https://github.com/sap-linuxlab/community.sap_operations.git
type: git
version: main

# Collections from private repositories via use SSH (embedded GitHub PAT does not work)
# Used for customised/forked Ansible Collections
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,5 +259,18 @@ sap_swpm_templates_install_dictionary:
- 'IMDB_CLIENT20_007_26-80002095.SAR' # SAP HANA Client
- 'SAPHOSTAGENT51_51-70002261.SAR'
sap_storage_setup_sid: "${var.module_var_sap_swpm_sid}"
# hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers
sap_storage_setup_host_type:
- hana_primary
- nwas_abap_ascs
- nwas_abap_pas
# Use Ansible Task to convert JSON (as string) to sap_storage_setup_definition Dictionary
terraform_host_specification_storage_definition: "{{ '${replace(jsonencode(var.module_var_terraform_host_specification_storage_definition),"\"","\\\"")}' | from_json }}"
EOF
}
4 changes: 4 additions & 0 deletions all/ansible_sap_ecc_hana_system_copy_hdb/module_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ variable "module_var_sap_swpm_template_selected" {}
variable "module_var_dry_run_test" {
default = ""
}

variable "module_var_terraform_host_specification_storage_definition" {
default = {}
}
36 changes: 36 additions & 0 deletions all/ansible_sap_ecc_ibmdb2_install/ansible_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,42 @@
# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation
tasks:

# For end user ease of use, the host specifications dictionary uses disk_count to indicate how many disks will be provisioned
# However the sap_storage_setup Ansible Role can not detect disk_count, and requires the key to be renamed lvm_lv_stripes
- name: Convert sap_vm_provision_*_host_specifications_dictionary.storage_definition to sap_storage_setup.sap_storage_setup_definition
ansible.builtin.set_fact:
sap_storage_setup_definition: "{{ sap_storage_setup_definition | default([]) + [converted_element] }}"
vars:
converted_element: |
{% set current_element = (convert_item | dict2items) %}
{% set new_element = [] %}
{% for entry in current_element %}
{%- if "disk_count" in entry.key %}
{%- set conv = new_element.extend([
{
'key': 'lvm_lv_stripes',
'value': entry.value,
}
]) %}
{%- elif not "disk_type" in entry.key %}
{%- set add_entry = new_element.extend([
{
'key': entry.key,
'value': entry.value,
}
]) %}
{%- endif -%}
{% endfor %}
{{ new_element | items2dict }}
loop: "{{ terraform_host_specification_storage_definition | list }}"
loop_control:
loop_var: convert_item
label: "{{ convert_item.name }}"

- name: Execute Ansible Role sap_storage_setup
include_role:
name: { role: community.sap_install.sap_storage_setup }

# Set facts based on the install dictionary and the default template selected
- name: Set fact x86_64 softwarecenter_search_list_ecc_ibmdb2_install
set_fact:
Expand Down
Loading

0 comments on commit 94a93ae

Please sign in to comment.