Skip to content

Commit

Permalink
Merge branch 'experimental' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hdamecharla authored Aug 16, 2023
2 parents 13feb58 + f634979 commit 8b29865
Show file tree
Hide file tree
Showing 43 changed files with 269 additions and 12,522 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ Webapp/.vs/ProjectEvaluation
Webapp/SDAF/Properties/ServiceDependencies
Webapp/.npmrc


# Ignore OS files - MKD 20221221
**/.DS_Store

# Additional files to ignore
owners.txt
NuGet.config

# Ignore Python cache directories
__pycache__

56 changes: 12 additions & 44 deletions deploy/ansible/playbook_00_validate_parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,27 +261,22 @@
no_log: true

- name: "0.0 Validations - Retrieve Subscription ID and Resource Group Name"
ansible.builtin.command: curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"
register: azure_metadata
no_log: true
changed_when: false
args:
warn: false
ansible.builtin.uri:
url: http://169.254.169.254/metadata/instance?api-version=2021-02-01
use_proxy: false
headers:
Metadata: true
register: azure_metadata

- name: "0.0 Validations - Show IMDS results"
- name: "0.0 Validations - Show IMDS results (JSON)"
ansible.builtin.debug:
var: azure_metadata
var: azure_metadata.json
verbosity: 2

- name: "0.0 Validations - Save the Json data to a Variable as a Fact"
ansible.builtin.set_fact:
json_azure_data: "{{ azure_metadata.stdout | from_json }}"
no_log: true

- name: "0.0 Validations - Extract details"
ansible.builtin.set_fact:
subscription_id: "{{ json_azure_data | json_query('compute.subscriptionId') }}"
resource_group_name: "{{ json_azure_data | json_query('compute.resourceGroupName') }}"
subscription_id: "{{ azure_metadata.json.compute.subscriptionId }}"
resource_group_name: "{{ azure_metadata.json.compute.resourceGroupName }}"
mnt_free_diskspace: "{{ ansible_mounts | json_query('[?mount == `/mnt`].size_available') }}"

- name: "0.0 Validations - Show IMDS results"
Expand Down Expand Up @@ -406,26 +401,6 @@
tags:
- 0.0-scs-pas-single

- name: "0.0 Validations - Check internet connectivity"
ansible.builtin.uri:
# url: "https://management.azure.com/subscriptions/{{ subscription_id }}/providers/Microsoft.Web/sites?api-version=2022-03-01"
url: "https://azure.status.microsoft/en-us/status"
# headers:
# Authorization: "Bearer {{ access_token }}"
# Content-Type: application/json
# Accept: application/json
status_code:
- 200
- 403
register: internet_check
vars:
ansible_python_interpreter: "{{ python_version }}"
when:
- (ansible_distribution | lower ~ ansible_distribution_major_version) in ['suse15', 'redhat8', 'redhat9', 'sles_sap15' ]
- ansible_os_family != "Windows"
tags:
- 0.0-internet

- name: "0.0 Validations - Check internet connectivity"
ansible.builtin.uri:
url: "https://management.azure.com/subscriptions/{{ subscription_id }}/providers/Microsoft.Web/sites?api-version=2022-03-01"
Expand All @@ -436,22 +411,17 @@
status_code:
- 200
- 403
register: internet_check
when:
- (ansible_distribution | lower ~ ansible_distribution_major_version) != 'suse15'
- (ansible_distribution | lower ~ ansible_distribution_major_version) != 'sles_sap15'
- (ansible_distribution | lower ~ ansible_distribution_major_version) != 'redhat8'
- (ansible_distribution | lower ~ ansible_distribution_major_version) != 'redhat9'
- (ansible_distribution | lower ~ ansible_distribution_major_version) in ['suse15', 'redhat8', 'redhat9', 'sles_sap15' ]
- ansible_os_family != "Windows"
- check_outbound | bool
tags:
- 0.0-internet

# - name: "0.0 Validations - Get repository listing (SUSE)"
# ansible.builtin.command: zypper lr
# register: zypper_results
# changed_when: false
# args:
# warn: false # quieten warning about using zypper directly
# when:
# - (ansible_distribution | lower ~ ansible_distribution_major_version) in ['suse15', 'sles_sap15' ]
# tags:
Expand All @@ -469,8 +439,6 @@
# ansible.builtin.command: yum repolist
# register: yum_results
# changed_when: false
# args:
# warn: false # quieten warning about using yum directly
# when:
# - (ansible_distribution | lower ~ ansible_distribution_major_version) in ['redhat7', 'redhat8']
# tags:
Expand Down
2 changes: 1 addition & 1 deletion deploy/ansible/playbook_05_03_sap_app_install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
all_sids: "{% if MULTI_SIDS is defined %}{{ MULTI_SIDS }}{% else %}{{ all_sids | default([]) + [this_sid] }}{% endif %}"

- name: "Run the APP Installation on Linux"
become: true
when: ansible_os_family != "Windows"
block:

Expand All @@ -186,7 +187,6 @@
- 2.6-sap-mounts

- name: Run the APP installation Playbook
become: true
block:
- name: "APP Playbook - Install: Include 5.3-app-install"
ansible.builtin.include_role:
Expand Down
2 changes: 1 addition & 1 deletion deploy/ansible/playbook_bom_downloader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
connection: local
environment:
ANSIBLE_COLLECTIONS_PATHS: "/opt/ansible/collections"
become: "{{ bom_processing_become }}"
become: "{{ bom_processing_become }}"
become_user: "{{ orchestration_ansible_user }}"
vars_files:
- vars/ansible-input-api.yaml # API Input template with defaults
Expand Down
42 changes: 16 additions & 26 deletions deploy/ansible/roles-db/4.0.0-hdb-install/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,22 +155,17 @@
mode: 0755

- name: "Retrieve Subscription ID and Resource Group Name"
ansible.builtin.command: curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"
register: azure_metadata
no_log: true
changed_when: false
args:
warn: false

- name: "Save the Json data to a Variable as a Fact"
ansible.builtin.set_fact:
json_azure_data: "{{ azure_metadata.stdout | from_json }}"
no_log: true
ansible.builtin.uri:
url: http://169.254.169.254/metadata/instance?api-version=2021-02-01
use_proxy: false
headers:
Metadata: true
register: azure_metadata

- name: "Extract details"
ansible.builtin.set_fact:
subscription_id: "{{ json_azure_data | json_query('compute.subscriptionId') }}"
resource_group_name: "{{ json_azure_data | json_query('compute.resourceGroupName') }}"
subscription_id: "{{ azure_metadata.json.compute.subscriptionId }}"
resource_group_name: "{{ azure_metadata.json.compute.resourceGroupName }}"

- name: "Show the subscription and resource group"
ansible.builtin.debug:
Expand Down Expand Up @@ -232,22 +227,17 @@
- name: "SAP HANA: Successful installation"
block:
- name: "Retrieve Subscription ID and Resource Group Name"
ansible.builtin.command: curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"
register: azure_metadata
no_log: true
changed_when: false
args:
warn: false

- name: "Save the Json data to a Variable as a Fact"
ansible.builtin.set_fact:
json_azure_data: "{{ azure_metadata.stdout | from_json }}"
no_log: true
ansible.builtin.uri:
url: http://169.254.169.254/metadata/instance?api-version=2021-02-01
use_proxy: false
headers:
Metadata: true
register: azure_metadata

- name: "Extract details"
ansible.builtin.set_fact:
subscription_id_tmp: "{{ json_azure_data | json_query('compute.subscriptionId') }}"
resource_group_name_tmp: "{{ json_azure_data | json_query('compute.resourceGroupName') }}"
subscription_id_tmp: "{{ azure_metadata.json.compute.subscriptionId }}"
resource_group_name_tmp: "{{ azure_metadata.json.compute.resourceGroupName }}"

- name: "Show the subscription and resource group"
ansible.builtin.debug:
Expand Down
21 changes: 8 additions & 13 deletions deploy/ansible/roles-db/4.1.0-ora-install/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -426,22 +426,17 @@
- name: "ORACLE: Successful installation"
block:
- name: "Retrieve Subscription ID and Resource Group Name"
ansible.builtin.command: curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"
register: azure_metadata
no_log: true
changed_when: false
args:
warn: false

- name: "ORACLE: Save the Json data to a Variable as a Fact"
ansible.builtin.set_fact:
json_azure_data: "{{ azure_metadata.stdout | from_json }}"
no_log: true
ansible.builtin.uri:
url: http://169.254.169.254/metadata/instance?api-version=2021-02-01
use_proxy: false
headers:
Metadata: true
register: azure_metadata

- name: "ORACLE: Extract details"
ansible.builtin.set_fact:
subscription_id: "{{ json_azure_data | json_query('compute.subscriptionId') }}"
resource_group_name: "{{ json_azure_data | json_query('compute.resourceGroupName') }}"
subscription_id: "{{ azure_metadata.json.compute.subscriptionId }}"
resource_group_name: "{{ azure_metadata.json.compute.resourceGroupName }}"

- name: "ORACLE: Show the subscription and resource group"
ansible.builtin.debug:
Expand Down
21 changes: 8 additions & 13 deletions deploy/ansible/roles-db/4.1.2-ora-asm-db-install/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -632,22 +632,17 @@
- name: "ORACLE: Successful installation"
block:
- name: "Retrieve Subscription ID and Resource Group Name"
ansible.builtin.command: curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"
register: azure_metadata
no_log: true
changed_when: false
args:
warn: false

- name: "ORACLE: Save the Json data to a Variable as a Fact"
ansible.builtin.set_fact:
json_azure_data: "{{ azure_metadata.stdout | from_json }}"
no_log: true
ansible.builtin.uri:
url: http://169.254.169.254/metadata/instance?api-version=2021-02-01
use_proxy: false
headers:
Metadata: true
register: azure_metadata

- name: "ORACLE: Extract details"
ansible.builtin.set_fact:
subscription_id: "{{ json_azure_data | json_query('compute.subscriptionId') }}"
resource_group_name: "{{ json_azure_data | json_query('compute.resourceGroupName') }}"
subscription_id: "{{ azure_metadata.json.compute.subscriptionId }}"
resource_group_name: "{{ azure_metadata.json.compute.resourceGroupName }}"

- name: "ORACLE: Show the subscription and resource group"
ansible.builtin.debug:
Expand Down
27 changes: 11 additions & 16 deletions deploy/ansible/roles-db/4.2.0-db2-install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
sap_db_hostname: "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_DB') | first }}"
db2_encryption_algo_type: "AES"
db2_ase_encryption_length: "256"
db2_encryption_keystore_dir: /db2/db2{{ db_sid }}/keystore
db2_encryption_keystore_dir: /db2/db2{{ db_sid | lower }}/keystore
db2_sslencryption_label: "sap_db2{{ db_sid }}_{{ sap_db_hostname }}_ssl_comm_000"
sap_scs_hostname: "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_SCS') | first }}"
sap_profile_dir: "/sapmnt/{{ sap_sid | upper }}/profile"
Expand All @@ -80,8 +80,8 @@
param_directory: "{{ dir_params }}"
# +--------------------------------4--------------------------------------*/
#
# - name: "SAP DB2 install: variables"
- name: "DB2 Install: install variables"
# - name: "SAP DB2 install: variables"
- name: "DB2 Install: install variables"
ansible.builtin.debug:
msg:
- "INSTALLED: {{ db2_installed.stat.exists }}"
Expand Down Expand Up @@ -129,22 +129,17 @@
- name: "DB2 Install: Successful installation"
block:
- name: "Retrieve Subscription ID and Resource Group Name"
ansible.builtin.command: curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"
register: azure_metadata
no_log: true
changed_when: false
args:
warn: false

- name: "Save the Json data to a Variable as a Fact"
ansible.builtin.set_fact:
json_azure_data: "{{ azure_metadata.stdout | from_json }}"
no_log: true
ansible.builtin.uri:
url: http://169.254.169.254/metadata/instance?api-version=2021-02-01
use_proxy: false
headers:
Metadata: true
register: azure_metadata

- name: "Extract details"
ansible.builtin.set_fact:
subscription_id: "{{ json_azure_data | json_query('compute.subscriptionId') }}"
resource_group_name: "{{ json_azure_data | json_query('compute.resourceGroupName') }}"
subscription_id: "{{ azure_metadata.json.compute.subscriptionId }}"
resource_group_name: "{{ azure_metadata.json.compute.resourceGroupName }}"

- name: "Show the subscription and resource group"
ansible.builtin.debug:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
sap_db_hostname: "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_DB') | first }}"
db2_encryption_algo_type: "AES"
db2_ase_encryption_length: "256"
db2_encryption_keystore_dir: /db2/db2{{ db_sid }}/keystore
db2_encryption_keystore_dir: /db2/db2{{ db_sid | lower }}/keystore
db2_sslencryption_label: "sap_db2{{ db_sid }}_{{ sap_db_hostname }}_ssl_comm_000"
sap_scs_hostname: "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_SCS') | first }}"
sap_profile_dir: "/sapmnt/{{ sap_sid | upper }}/profile"
Expand Down Expand Up @@ -176,22 +176,17 @@
- name: "DB2 Install: Successful installation"
block:
- name: "Retrieve Subscription ID and Resource Group Name"
ansible.builtin.command: curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"
register: azure_metadata
no_log: true
changed_when: false
args:
warn: false

- name: "Save the Json data to a Variable as a Fact"
ansible.builtin.set_fact:
json_azure_data: "{{ azure_metadata.stdout | from_json }}"
no_log: true
ansible.builtin.uri:
url: http://169.254.169.254/metadata/instance?api-version=2021-02-01
use_proxy: false
headers:
Metadata: true
register: azure_metadata

- name: "Extract details"
ansible.builtin.set_fact:
subscription_id: "{{ json_azure_data | json_query('compute.subscriptionId') }}"
resource_group_name: "{{ json_azure_data | json_query('compute.resourceGroupName') }}"
subscription_id: "{{ azure_metadata.json.compute.subscriptionId }}"
resource_group_name: "{{ azure_metadata.json.compute.resourceGroupName }}"

- name: "Show the subscription and resource group"
ansible.builtin.debug:
Expand All @@ -217,22 +212,17 @@
- name: "DB2 Install: Successful installation"
block:
- name: "Retrieve Subscription ID and Resource Group Name"
ansible.builtin.command: curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"
register: azure_metadata
no_log: true
changed_when: false
args:
warn: false

- name: "Save the Json data to a Variable as a Fact"
ansible.builtin.set_fact:
json_azure_data: "{{ azure_metadata.stdout | from_json }}"
no_log: true
ansible.builtin.uri:
url: http://169.254.169.254/metadata/instance?api-version=2021-02-01
use_proxy: false
headers:
Metadata: true
register: azure_metadata

- name: "Extract details"
ansible.builtin.set_fact:
subscription_id_tmp: "{{ json_azure_data | json_query('compute.subscriptionId') }}"
resource_group_name: "{{ json_azure_data | json_query('compute.resourceGroupName') }}"
subscription_id_tmp: "{{ azure_metadata.json.compute.subscriptionId }}"
resource_group_name: "{{ azure_metadata.json.compute.resourceGroupName }}"

- name: "Show the subscription and resource group"
ansible.builtin.debug:
Expand Down
Loading

0 comments on commit 8b29865

Please sign in to comment.