This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from berndfinger/master
- Loading branch information
Showing
14 changed files
with
481 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#/bin/bash | ||
|
||
_HDBLCM_PID=$(ps -ef | awk '/hdblcm/&&/instlog_dir/&&!/awk/{print $2}') | ||
|
||
if [[ ${_HDBLCM_PID}. != "." ]]; then | ||
_HDBLCM_TRC_FILE=/var/tmp/hdblcm_$(ps -ef | grep hdblcm | awk 'BEGIN{RS=" "}/instlog_dir/{split ($0, a, "install_"); print a[2]}')*.trc | ||
echo "hdblcm trace file: ${_HDBLCM_TRC_FILE}" | ||
tail -100f ${_HDBLCM_TRC_FILE} | ||
else | ||
echo "No hdblcm process found." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
galaxy_info: | ||
author: Red Hat SAP Community of Practice | ||
description: Deploys `SAP HANA` on the given host(s) | ||
description: Deploys SAP HANA | ||
company: Red Hat, Inc. | ||
license: Apache | ||
min_ansible_version: 2.5 | ||
min_ansible_version: 2.7 | ||
platforms: | ||
- name: EL | ||
versions: [ 7, 8 ] | ||
|
||
galaxy_tags: [ 'hana', 'rhel', 'sap' ] | ||
|
||
galaxy_tags: [ 'sap', 'hana', 'rhel' ] | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
|
||
# loop block for hana_deploy.yml | ||
|
||
- name: Get permissions of {{ line_item.name }} | ||
stat: | ||
path: "{{ line_item.name }}" | ||
register: __sap_hana_deployment_register_stat | ||
|
||
- name: Assert that permissions of {{ line_item.name }} are '{{ line_item.mode }}' | ||
assert: | ||
that: "__sap_hana_deployment_register_stat.stat.mode == '{{ line_item.mode }}'" | ||
fail_msg: "FAIL: Directory {{ line_item.name }} has permissions '{{ __sap_hana_deployment_register_stat.stat.mode }}' | ||
but needs to have '{{ line_item.mode }}'!" | ||
success_msg: "PASS: Directory {{ line_item.name }} has correct permissions '{{ __sap_hana_deployment_register_stat.stat.mode }}'." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
|
||
- name: Check if file 'hdblcm' is in the SAP HANA installation directory | ||
stat: | ||
path: "{{ sap_hana_installdir + '/hdblcm' }}" | ||
register: __sap_hana_deployment_register_hdblcm_stat | ||
failed_when: not __sap_hana_deployment_register_hdblcm_stat.stat.exists | ||
when: sap_hana_deployment_install_primary|d(true) | ||
|
||
- name: Create temporary directory to store the processed template | ||
tempfile: | ||
state: directory | ||
suffix: hanaconfig | ||
register: __sap_hana_deployment_register_tmpdir | ||
|
||
- name: Process HANA configfile template | ||
template: | ||
src: "{{ role_path }}/templates/configfile.j2" | ||
dest: "{{ __sap_hana_deployment_register_tmpdir.path }}/configfile.cfg" | ||
mode: '0644' | ||
register: __sap_hana_deployment_register_cftemplate | ||
|
||
- name: Install SAP HANA | ||
block: | ||
|
||
- name: Copy file tail-f-hdblcm-install-trc.sh to '{{ __sap_hana_deployment_register_tmpdir.path }}' | ||
copy: | ||
src: tmp/tail-f-hdblcm-install-trc.sh | ||
dest: "{{ __sap_hana_deployment_register_tmpdir.path }}/tail-f-hdblcm-install-trc.sh" | ||
owner: root | ||
group: root | ||
mode: '0755' | ||
|
||
- name: Show how to watch the install process in real time | ||
debug: | ||
msg: | ||
- 'Once the task "Perform the SAP HANA installation" has started, you can use the following command' | ||
- 'in a terminal session on the managed node to watch the install progress in real time:' | ||
- "{{ __sap_hana_deployment_register_tmpdir.path }}/tail-f-hdblcm-install-trc.sh" | ||
- 'Alternatively, you can run the following command on the control node:' | ||
- "ssh {{ inventory_hostname }} {{ __sap_hana_deployment_register_tmpdir.path }}/tail-f-hdblcm-install-trc.sh" | ||
|
||
- name: Perform the SAP HANA installation | ||
command: "./hdblcm {{ sap_hana_deployment_hdblcm_extraargs }} | ||
--configfile={{ __sap_hana_deployment_register_tmpdir.path }}/configfile.cfg | ||
-b" | ||
register: __sap_hana_deployment_register_hdblcm_install | ||
args: | ||
chdir: "{{ sap_hana_installdir }}" | ||
changed_when: "'SAP HANA Lifecycle Management' in __sap_hana_deployment_register_hdblcm_install.stdout" | ||
|
||
when: sap_hana_deployment_install_primary|d(true) | ||
|
||
- name: Add hosts to the existing SAP HANA installation | ||
command: "./hdblcm {{ sap_hana_deployment_hdblcm_extraargs }} | ||
--action=add_hosts | ||
--addhosts={{ sap_hana_deployment_addhosts }} | ||
--password={{ sap_hana_deployment_sidadm_password }} | ||
--configfile={{ __sap_hana_deployment_register_tmpdir.path }}/configfile.cfg | ||
-b" | ||
register: __sap_hana_deployment_register_hdblcm_add_hosts | ||
args: | ||
chdir: "{{ sap_hana_deployment_hana_install_path }}/{{ sap_hana_deployment_hana_sid }}/hdblcm" | ||
changed_when: "'SAP HANA Lifecycle Management' in __sap_hana_deployment_register_hdblcm_add_hosts.stdout" | ||
when: not sap_hana_deployment_install_primary|d(true) | ||
|
||
- name: Show the result of hdblcm add_hosts | ||
debug: | ||
var: __sap_hana_deployment_register_hdblcm_add_hosts.stdout | ||
when: not sap_hana_deployment_install_primary|d(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,49 @@ | ||
--- | ||
|
||
- name: show sap_hana_deployment_hana_userid | ||
debug: | ||
var: sap_hana_deployment_hana_userid | ||
|
||
- name: show sap_hana_deployment_hana_groupid | ||
debug: | ||
var: sap_hana_deployment_hana_groupid | ||
|
||
- import_tasks: ev_user.yml | ||
when: | ||
- sap_hana_deployment_hana_userid == '' | ||
- not sap_hana_deployment_apply_license | ||
- ((sap_hana_deployment_hana_userid is undefined) or | ||
(sap_hana_deployment_hana_userid is none) or | ||
(sap_hana_deployment_hana_userid | trim == '') | ||
) | ||
- not sap_hana_deployment_apply_license_only | ||
- sap_hana_deployment_install_primary|d(true) | ||
|
||
- import_tasks: ev_group.yml | ||
when: | ||
- sap_hana_deployment_hana_groupid == '' | ||
- not sap_hana_deployment_apply_license | ||
- ((sap_hana_deployment_hana_groupid is undefined) or | ||
(sap_hana_deployment_hana_groupid is none) or | ||
(sap_hana_deployment_hana_groupid | trim == '') | ||
) | ||
- not sap_hana_deployment_apply_license_only | ||
- sap_hana_deployment_install_primary|d(true) | ||
|
||
- import_tasks: password_facts.yml | ||
when: sap_hana_deployment_use_master_password == 'y' | ||
|
||
- import_tasks: hana_deploy.yml | ||
when: not sap_hana_deployment_apply_license | ||
- import_tasks: set_or_verify_permissions.yml | ||
when: | ||
- not sap_hana_deployment_apply_license_only | ||
- sap_hana_deployment_install_primary|d(true) | ||
|
||
- import_tasks: license.yml | ||
when: sap_hana_deployment_apply_license | ||
- import_tasks: provide_hana_installation_bundle.yml | ||
when: | ||
- (( sap_hana_installdir is none ) or ( sap_hana_installdir | trim == '')) | ||
- not sap_hana_deployment_apply_license_only | ||
- sap_hana_deployment_install_primary|d(true) | ||
|
||
- import_tasks: install_hana.yml | ||
when: not sap_hana_deployment_apply_license_only | ||
|
||
- import_tasks: apply_hana_license.yml | ||
when: | ||
- (sap_hana_deployment_apply_license_only or sap_hana_deployment_apply_license) | ||
- sap_hana_deployment_install_primary|d(true) |
Oops, something went wrong.