Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Shellfixes for running in CloudShell #1233

Merged
merged 40 commits into from Sep 12, 2021
Merged

Shellfixes for running in CloudShell #1233

merged 40 commits into from Sep 12, 2021

Conversation

hdamecharla
Copy link
Member

@hdamecharla hdamecharla commented Aug 18, 2021

Problem

The client_id and object_id are not populated when running from CloudShell as documented here:
hashicorp/terraform-provider-azurerm#7787

Solution

export the client_id of executing user when running from cloudshell

Tests

run prepre_region.sh

Notes

hdamecharla and others added 25 commits August 17, 2021 11:45
…E.tfvars sample file to use the location=azurelocation as that's what we use in the script
…user_environment_variables after az session is available
prompt on error to login using spn credentials
@KimForss KimForss changed the base branch from beta to alfa September 7, 2021 08:11
@hdamecharla hdamecharla changed the title Hemanth shellfixes Shellfixes for running in CloudShell Sep 10, 2021
@hdamecharla hdamecharla marked this pull request as ready for review September 10, 2021 17:17
@hdamecharla hdamecharla requested a review from a team as a code owner September 10, 2021 17:17
@hdamecharla hdamecharla requested review from KimForss and removed request for a team September 10, 2021 17:17
Copy link
Collaborator

@KimForss KimForss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@KimForss KimForss merged commit 7b2832c into alfa Sep 12, 2021
@hdamecharla hdamecharla deleted the hemanth-shellfixes branch September 13, 2021 06:58
PmeshramPM added a commit to PmeshramPM/sap-hana that referenced this pull request Sep 13, 2021
…ature branch "patch-1" (#4)

* Merge updates

* Update playbook_03_bom_processing.yaml

call to 1.16 needs to happen after 2.3

* Documenation updates

* restructure samples for Azure docs move

* Broken links

* broken link

* broken link

* tfvars documentation

* Update Getting_started_with_the_SAP_Deployment_Automation_bash.md

* Update Getting_started_with_the_SAP_Deployment_Automation_cloudshell.md

* Update 02-prepare-environment.md

* Deployer tfvars documentation

* Add validation to ensure logon is not using a managed identity

* Corrected the logic for credential validation

* Update the az login prompt

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 04-sdu.md

* Update workshops.md

* Update 01-ansible.md

* Update readme.md

* Update 01-ansible-download.md

* changes to 1.9-kernel parameters to add tier support

* SWPM updates

* Patch 2 for SOFTWARE UPDATE MANAGER 2.0 SP11

* better defaults for sap-parameters

* Bootstrapping debugging

* Key vault changes

* Key vault changes

* merge

* remove duplicate

* try statement

* Taking either object or client id

* No keyvaults in sap library

* persist deployer details

* persist deployer details

* typos

* missing quote

* typos

* store the access key

* atore sapbits access key

* More detailed steps

* Update 01-ansible-download.md

* Update 01-ansible-download.md

* Patch 3 for SOFTWARE UPDATE MANAGER 2.0 SP11

* Updated URL

* use full names for ansible modules

* Fixed the services list

* Fix BOM retrieval

* Add support for sas-token

* Update documentation for sas token

* use full names for ansible modules

* Fixed the services list

* Fix BOM retrieval

* Add support for sas-token

* Update documentation for sas token

* Web dispatcher product ID

* Web Dispatcher Product ID

* Update BOM-Agent.yaml for Azure Pipelines

* Update BOM-Agent.yaml for Azure Pipelines

* Update BOM playbooks

* Update BOM playbooks

* Update 01-ansible-download.md

* consistency between json and tfvars

* Update BOM-Agent.yaml for Azure Pipelines

* Patch 3 for SOFTWARE UPDATE MANAGER 2.0 SP1

* Update playbook_06_00_00_pacemaker.yaml (Azure#1230)

setup kernel parameters required for cluster VMs

* RHEL - Generic Pacemaker Setup  (Azure#1231)

* Update playbook_06_00_00_pacemaker.yaml

setup kernel parameters required for cluster VMs

* Update playbook_06_00_00_pacemaker.yaml (Azure#1230) (#2)

setup kernel parameters required for cluster VMs

* Update cluster-Suse.yml

Updated to the same as alfa

* Delete sbd_device_setup.yml

We are using Azure fence agent, SBD setup not required.

* Create start_hana.yml

* Update start_hana.yml

* Create stop_hana.yml

* RHEL Generic Pacemaker

* Script updates to return the error code from TF (Azure#1232)

Merging changes into beta

* Script updates to return the error code from TF (Azure#1232)

Merging changes into beta

* Update BOM-Agent.yaml for Azure Pipelines

* SWPM20SP09 update

* Add additional parameters

* Add error code for failed init

* debug

* ado switch added

* install_library updates

* whitespace

* local

* script fixes

* Update BOM-Agent.yaml for Azure Pipelines

* Provide a way to control the deployment of load balancers for non-HA deployments (Azure#1235)

* Provide a way to control the deployment of load balancers for non-HA deployments

* fixes for the supporting resources

* Updates for scaling down

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Provide a way to control the deployment of load balancers for non-HA deployments (Azure#1235)

* Provide a way to control the deployment of load balancers for non-HA deployments

* fixes for the supporting resources

* Updates for scaling down

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* sample updates

* sample updates and tag support for db VM

* typo

* whitespace

* HA playbooks (Azure#1236)

* Draft Services Task-  Testing pending

* Update Services Code - Tested

* Issues Resovled for 1.16-services Role

* Added states for services

* removed duplicate service names

* Pacemaker Draft push

* Added Rhel generic and hana pacemaker playbooks

* HSR playbooks Draft

* Changes to HSR - pre_checks.yml

* changes to HSR - prechecks 2

* HSR build runtime and trust

* HSR work 05 july2021

* HSR Working version

* HSR working version with added documentation

* HSR variable secondary instance name fix

* Create the fencing SPN and store in keyvault (Azure#1214)

* SUSE Generic Cluster Setup

* Delete app-inifile-param

* Delete create-sapsystem-steps.yml

* Delete prepare-agent.yml

* Delete HANA_2_00_055_v0003ms.yaml

* Delete myDownloadBasketFiles.txt

* Delete MP_Excel_2001100478_20210324_SWC.xls

* Delete MP_Stack_2001100478_20210324_.txt

* Delete myDownloadBasketFiles.txt

* Delete S41909SPS03_v0003ms-app-inifile-param.j2

* Delete S41909SPS03_v0003ms-dbload-inifile-param.j2

* Delete S41909SPS03_v0003ms-pas-inifile-param.j2

* Delete S41909SPS03_v0003ms-web-inifile-param.j2

* Delete S41909SPS03_v0003ms-scs-inifile-param.j2

* Delete web-inifile-param

* Delete deploy_utils.sh

* Delete install_deployer.sh

* Delete MP_Stack_2001100478_20210324_.xml

* Delete S41909SPS03_v0004ms.yaml

* Delete install_library.sh

* Add debug info

* Use the current credentials

* small tweaks

* Small tweaks

* tier fix

* Update playbook_03_bom_processing.yaml

remove the call to 1.16 services upfront. we need to complete 2.3 before we call it.

* Update playbook_06_00_00_pacemaker.yaml

* Update playbook_06_00_00_pacemaker.yaml

Target DB hosts for now

* Update main.yml

let's see if this works

* Update playbook_06_00_03_pacemaker_hana.yaml

* Update playbook_06_00_03_pacemaker_hana.yaml

* Update playbook_06_00_03_pacemaker_hana.yaml

* refactoring

* Refactor 2

* Kernel parameter changes for SUSE pacemaker Cluster  (Azure#1227)

* hana resorces config v1.0

* kernel parameter update for Suse pacemaker

* Update parameters.yaml

* commented dirty cache settings in cluster-Suse.yam

* Update playbook_06_00_03_pacemaker_hana.yaml

Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>

* changes to 1.9-kernel parameters to add tier support

* Update playbook_06_00_00_pacemaker.yaml (Azure#1230)

setup kernel parameters required for cluster VMs

* RHEL - Generic Pacemaker Setup  (Azure#1231)

* Update playbook_06_00_00_pacemaker.yaml

setup kernel parameters required for cluster VMs

* Update playbook_06_00_00_pacemaker.yaml (Azure#1230) (#2)

setup kernel parameters required for cluster VMs

* Update cluster-Suse.yml

Updated to the same as alfa

* Delete sbd_device_setup.yml

We are using Azure fence agent, SBD setup not required.

* Create start_hana.yml

* Update start_hana.yml

* Create stop_hana.yml

* RHEL Generic Pacemaker

Co-authored-by: PankajMeshramCSA <pankaj.meshram@microsoft.com>
Co-authored-by: PankajMeshramCSA <41123792+PankajMeshramCSA@users.noreply.github.com>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>
Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>

* documentation updates

* FQDNs for Ansible modules

* merge

* FQDN updates

* FQDN Updates

* Support providing the database SID

* fixes

* web dispatcher

* Fixes

* debugging info

* HANA db pacemaker changes

* remove obsolete

* Improve Terraform driven initial deployer setup (Azure#1188)

Update the sap_deployer module to generate a configure_deployer.sh
script under /tmp on the deployer node which is then run using a
remote-exec operation.

The new configure_deployer.sh script is derived from the previous
remote-exec inline scripting, with changes to leverage a Python
virtualenv to host Ansible and other Python tools and depenencies,
rather than pip installing them into the system Python environment
which risks both breaking the system package management, and being
broken by any subsequent Python related package installs.

The generated /etc/profile.d/deployer_setup.sh script should also
correctly add the new Terraform and Ansible bin directories to the
session PATH, rather than replacing the session PATH with a fixed
list of paths that pertained when the terraform remote-exec was
triggered. Note that this script is only included in interactive
sessions, such as a user login via SSH, but not from non-interactive
sessions such as using SSH to run a specific command on a system.

The deploy/ansible/*test_menu.sh scripts have been updated to set
their PATH and ANSIBLE_COLLECTIONS_PATHS environment variables
appropriately to ensure that they can access the required tools
even when run from a non-interactive session.

Similarly update the deploy/scripts shell scripts to ensure that
they also include the relevant paths in their PATH settings to
ensure that they can find the relevant tools when running under
non-interactive sessions. Note that this change may need to be
re-visited if it is expected that non-deployer environmemnts that
may run these scripts will have the relevant path entries setup
in an incompatible fashion.

* How to connect Azure DevOps

* Setup ADO

* Configure the agent

* Pacemaker tests

* add support for re-running dbload

* documentation updates

* Updates

* documentation updates

* cluster updates

* RHEL check online

* RedHat 8.2 and documentation fixes

* Workaround Azure CLI installer script prompt for input (Azure#1237)

The Azure CLI installer script is prompting for input to confirm the
target install path; we are happy with the default path suggested in
the prompt message, and can ensure that the default is accepted by
redirecting the stdin for the shell action to /dev/null, effectively
making it a non-interactive session, causing the default to be used.

* deployer terraform updates

* Fixes for deployer setup script. (Azure#1238)

Correctly generate the symlink for the terraform command under the
/opt/terraform/bin directory.

Use the appropriate AzureInstallCLI... script to install the package
based version of the Azure CLI rather than AzureInstallCLI which
just installs a venv tarball in the local user account.

* Added tags to the SAP roles

* copy the parameter files to the deployer

* comment out the access key for now

* ANYDB fixes

* Add --only_deployer option to prepare_region.sh (Azure#1239)

When the --only_deployer option is used with the prepare_region.sh
script it causes to stop once the deployer has been successfully
created. At this point the user can now copy the relevant config
and state files to the deployer and run prepare_region.sh from there
to complete to region setup.

* tests

* Azure CLI updates

* CLI updates

* script updates

* updating the configuration script

* fixes

* updates

* CLI

* 2004 fixes

* cli

* CLI Tests

* apt-get upgrade -y

* Final version

* remove MSI endpoint

* add checks for controlling exeuction location

* reset

* Debugging

* debugging

* removed the SPN creation

* block the fencing spn

* TFvars fixes

* BOM update

* HANA BOM Updates

* SAP HANA AFL Rev 56.5 only for HANA 2.0 Rev 56

* Added the return code

* Create users (Azure#1241)

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Revert to 055

* 057 Update

* Tests

* extraneous spaces

* Correct default sizing

* corrected the path

* directory permissions

* add flags

* Updates

* User creation fixes

* Kimforss create sap password (Azure#1244)

* Create users

* Create SAP password

* add password for the created users

* update the password field for users

* updated groups for hana and scs based on documentation from SAP

* User creation

* hash the password

* Limit the length to 14

* merge

* increase vg_sap

* fixes

* password logic

* merge

* trace playbook execution

* added deployment flags

* Update playbook_04_00_01_hana_hsr.yaml

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>

* remove error redirect

* remove error redirect

* Don't track the python bytecode files (Azure#1240)

* Kimforss deployer dependencies (Azure#1245)

* Add explicit dependencies

* control dependencies

* remove the removal ot error.log

* more tests

* whitespace

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Kimforss store deployer kv in workload (Azure#1246)

* Store the Deployer Keyvault name in the state file

* store the keyvault id in the state file

* whitespace

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Store the SAP Library Storage account details in deployer key vault (Azure#1247)

* Save the sapbits details to deployer keyvault

* changed secret name

* formatdate

* Update 02-prepare-environment.md

Add WEEU as a demo option

* Update 02-prepare-environment.md

* retrieve the created password

* Update providers.tf

fix the missing features issue when running prepare_region from alfa

* add both providers

* Update module.tf

commenting out the provider aliases. The rest of the codes does not seem to realize the new aliases

* shorter password

* GET SAP Library information from keyvault (Azure#1248)

* SA detail updates

* Update module.tf

commenting out the dual provider configuration

* Create the correct SAS type

* flag directories

* anydb updates

* Merge alfa

* feng shui

* SAS token update

* Review updates

* Correct PATH fro RHEL

* typo

* Kimforss anf support (Azure#1249)

* ANF Account and pool creation

* missing curly brace

* ANF for system

* ANF tests

* Updates

* hana ANF works

* lifecycle

* merge updates

* sapmnt updates

* AutoFS fixes

* further tests

* updates

* Updates

* merge alfa

* ANF updates

* BOM update

* SCS NFS updates

* anf updates

* always restart autofs

* ANF updates

* remove the ~

* ANF troubleshooting

* ANF updates

* ANF tests

* Create users

* Updates

* Create SAP password

* troubleshooting

* add password for the created users

* update the password field for users

* updated groups for hana and scs based on documentation from SAP

* User creation

* hash the password

* Limit the length to 14

* merge

* increase vg_sap

* fixes

* password logic

* merge

* trace playbook execution

* added deployment flags

* merge alfa

* local edits

* ANF Updates

* Debugging updates

* merge

* changes to mounts based on current discussion

* Final fixes

* Update main.yaml

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>

* Fixes

* ANF documentation updates

* Instance number updates

* merge issues

* final tweaks

* Fixes

* Deployer configuration

* arm_client_id

* Update 03-workload-zone.md

Add more examples

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 02-prepare-environment.md

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 04-sdu.md

* Update 04-sdu.md

* Update 04-sdu.md

* Update 04-sdu.md

* Update 04-sdu.md

* Updates

* Shellfixes for running in CloudShell (Azure#1233)

* add handling of environment variables export to deploy_utils script

* [Aug 17 14:24:26 IST 2021] -> updating variable definitions and some comments

* [Aug 17 18:44:46 IST 2021] -> updating variable definitions and some comments

* [Aug 17 18:55:46 IST 2021] -> add comments when unset ARM vars, echo to stdout

* [Aug 17 20:30:46 IST 2021]: updated the MGMT-WEEU-DEP00-INFRASTRUCTURE.tfvars sample file to use the location=azurelocation as that's what we use in the script

* [Aug 17 22:32:27 IST 2021]: updated remover.sh to call set_executing_user_environment_variables after az session is available

* install_library updates

* Update prepare_region.sh

prompt on error to login using spn credentials

* [19 August 2021 00:15:40 IST] : Updates for reading inputs a little better

* turn off kv results to stdout

* Update MGMT-WEEU-DEP00-INFRASTRUCTURE.tfvars

remove space

* Update cloud shell documentation

* fix the issue

* splitting the prepare_region

* removed the Azure AD lookup

* updated parameters file

* offload call to unset variables

* updates to shell logging

* 1st commit of logger module

* silly mistake

* additional helper functions

* merge changes from local to remote

* updates to deploy_utils

* added few checks

* shell fixes

* procedural updates

* whitespace

* Fixes

* fixes for SAS token and resource copying

* testing

* persist tfstate

* workload zone fixes

* Fixes

* Fix remove_region

* if statements broken

* dependency fixes

* Updates and whitespace

Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: Kimmo Forss <kimmo.forss@microsoft.com>

* Merge latest

* merges from alfa

* Merge

* merge changes from alfa

* Merge updates

* merge and ANF updates

* Only create fencing agent once

* restore original criteria

* Include resource-agents-sap-hana package

Co-authored-by: Kimmo Forss <kimmo.forss@microsoft.com>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>
Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>
Co-authored-by: Fergal Mc Carthy <rahn.tamalin@gmail.com>
Co-authored-by: Ondra Machacek <machacek.ondra@gmail.com>
KimForss added a commit that referenced this pull request Oct 17, 2021
* PR to pull all the changes happenned in PankajMeshramCSA-alfa into feature branch "patch-1"  (#4)

* Merge updates

* Update playbook_03_bom_processing.yaml

call to 1.16 needs to happen after 2.3

* Documenation updates

* restructure samples for Azure docs move

* Broken links

* broken link

* broken link

* tfvars documentation

* Update Getting_started_with_the_SAP_Deployment_Automation_bash.md

* Update Getting_started_with_the_SAP_Deployment_Automation_cloudshell.md

* Update 02-prepare-environment.md

* Deployer tfvars documentation

* Add validation to ensure logon is not using a managed identity

* Corrected the logic for credential validation

* Update the az login prompt

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 04-sdu.md

* Update workshops.md

* Update 01-ansible.md

* Update readme.md

* Update 01-ansible-download.md

* changes to 1.9-kernel parameters to add tier support

* SWPM updates

* Patch 2 for SOFTWARE UPDATE MANAGER 2.0 SP11

* better defaults for sap-parameters

* Bootstrapping debugging

* Key vault changes

* Key vault changes

* merge

* remove duplicate

* try statement

* Taking either object or client id

* No keyvaults in sap library

* persist deployer details

* persist deployer details

* typos

* missing quote

* typos

* store the access key

* atore sapbits access key

* More detailed steps

* Update 01-ansible-download.md

* Update 01-ansible-download.md

* Patch 3 for SOFTWARE UPDATE MANAGER 2.0 SP11

* Updated URL

* use full names for ansible modules

* Fixed the services list

* Fix BOM retrieval

* Add support for sas-token

* Update documentation for sas token

* use full names for ansible modules

* Fixed the services list

* Fix BOM retrieval

* Add support for sas-token

* Update documentation for sas token

* Web dispatcher product ID

* Web Dispatcher Product ID

* Update BOM-Agent.yaml for Azure Pipelines

* Update BOM-Agent.yaml for Azure Pipelines

* Update BOM playbooks

* Update BOM playbooks

* Update 01-ansible-download.md

* consistency between json and tfvars

* Update BOM-Agent.yaml for Azure Pipelines

* Patch 3 for SOFTWARE UPDATE MANAGER 2.0 SP1

* Update playbook_06_00_00_pacemaker.yaml (#1230)

setup kernel parameters required for cluster VMs

* RHEL - Generic Pacemaker Setup  (#1231)

* Update playbook_06_00_00_pacemaker.yaml

setup kernel parameters required for cluster VMs

* Update playbook_06_00_00_pacemaker.yaml (#1230) (#2)

setup kernel parameters required for cluster VMs

* Update cluster-Suse.yml

Updated to the same as alfa

* Delete sbd_device_setup.yml

We are using Azure fence agent, SBD setup not required.

* Create start_hana.yml

* Update start_hana.yml

* Create stop_hana.yml

* RHEL Generic Pacemaker

* Script updates to return the error code from TF (#1232)

Merging changes into beta

* Script updates to return the error code from TF (#1232)

Merging changes into beta

* Update BOM-Agent.yaml for Azure Pipelines

* SWPM20SP09 update

* Add additional parameters

* Add error code for failed init

* debug

* ado switch added

* install_library updates

* whitespace

* local

* script fixes

* Update BOM-Agent.yaml for Azure Pipelines

* Provide a way to control the deployment of load balancers for non-HA deployments (#1235)

* Provide a way to control the deployment of load balancers for non-HA deployments

* fixes for the supporting resources

* Updates for scaling down

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Provide a way to control the deployment of load balancers for non-HA deployments (#1235)

* Provide a way to control the deployment of load balancers for non-HA deployments

* fixes for the supporting resources

* Updates for scaling down

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* sample updates

* sample updates and tag support for db VM

* typo

* whitespace

* HA playbooks (#1236)

* Draft Services Task-  Testing pending

* Update Services Code - Tested

* Issues Resovled for 1.16-services Role

* Added states for services

* removed duplicate service names

* Pacemaker Draft push

* Added Rhel generic and hana pacemaker playbooks

* HSR playbooks Draft

* Changes to HSR - pre_checks.yml

* changes to HSR - prechecks 2

* HSR build runtime and trust

* HSR work 05 july2021

* HSR Working version

* HSR working version with added documentation

* HSR variable secondary instance name fix

* Create the fencing SPN and store in keyvault (#1214)

* SUSE Generic Cluster Setup

* Delete app-inifile-param

* Delete create-sapsystem-steps.yml

* Delete prepare-agent.yml

* Delete HANA_2_00_055_v0003ms.yaml

* Delete myDownloadBasketFiles.txt

* Delete MP_Excel_2001100478_20210324_SWC.xls

* Delete MP_Stack_2001100478_20210324_.txt

* Delete myDownloadBasketFiles.txt

* Delete S41909SPS03_v0003ms-app-inifile-param.j2

* Delete S41909SPS03_v0003ms-dbload-inifile-param.j2

* Delete S41909SPS03_v0003ms-pas-inifile-param.j2

* Delete S41909SPS03_v0003ms-web-inifile-param.j2

* Delete S41909SPS03_v0003ms-scs-inifile-param.j2

* Delete web-inifile-param

* Delete deploy_utils.sh

* Delete install_deployer.sh

* Delete MP_Stack_2001100478_20210324_.xml

* Delete S41909SPS03_v0004ms.yaml

* Delete install_library.sh

* Add debug info

* Use the current credentials

* small tweaks

* Small tweaks

* tier fix

* Update playbook_03_bom_processing.yaml

remove the call to 1.16 services upfront. we need to complete 2.3 before we call it.

* Update playbook_06_00_00_pacemaker.yaml

* Update playbook_06_00_00_pacemaker.yaml

Target DB hosts for now

* Update main.yml

let's see if this works

* Update playbook_06_00_03_pacemaker_hana.yaml

* Update playbook_06_00_03_pacemaker_hana.yaml

* Update playbook_06_00_03_pacemaker_hana.yaml

* refactoring

* Refactor 2

* Kernel parameter changes for SUSE pacemaker Cluster  (#1227)

* hana resorces config v1.0

* kernel parameter update for Suse pacemaker

* Update parameters.yaml

* commented dirty cache settings in cluster-Suse.yam

* Update playbook_06_00_03_pacemaker_hana.yaml

Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>

* changes to 1.9-kernel parameters to add tier support

* Update playbook_06_00_00_pacemaker.yaml (#1230)

setup kernel parameters required for cluster VMs

* RHEL - Generic Pacemaker Setup  (#1231)

* Update playbook_06_00_00_pacemaker.yaml

setup kernel parameters required for cluster VMs

* Update playbook_06_00_00_pacemaker.yaml (#1230) (#2)

setup kernel parameters required for cluster VMs

* Update cluster-Suse.yml

Updated to the same as alfa

* Delete sbd_device_setup.yml

We are using Azure fence agent, SBD setup not required.

* Create start_hana.yml

* Update start_hana.yml

* Create stop_hana.yml

* RHEL Generic Pacemaker

Co-authored-by: PankajMeshramCSA <pankaj.meshram@microsoft.com>
Co-authored-by: PankajMeshramCSA <41123792+PankajMeshramCSA@users.noreply.github.com>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>
Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>

* documentation updates

* FQDNs for Ansible modules

* merge

* FQDN updates

* FQDN Updates

* Support providing the database SID

* fixes

* web dispatcher

* Fixes

* debugging info

* HANA db pacemaker changes

* remove obsolete

* Improve Terraform driven initial deployer setup (#1188)

Update the sap_deployer module to generate a configure_deployer.sh
script under /tmp on the deployer node which is then run using a
remote-exec operation.

The new configure_deployer.sh script is derived from the previous
remote-exec inline scripting, with changes to leverage a Python
virtualenv to host Ansible and other Python tools and depenencies,
rather than pip installing them into the system Python environment
which risks both breaking the system package management, and being
broken by any subsequent Python related package installs.

The generated /etc/profile.d/deployer_setup.sh script should also
correctly add the new Terraform and Ansible bin directories to the
session PATH, rather than replacing the session PATH with a fixed
list of paths that pertained when the terraform remote-exec was
triggered. Note that this script is only included in interactive
sessions, such as a user login via SSH, but not from non-interactive
sessions such as using SSH to run a specific command on a system.

The deploy/ansible/*test_menu.sh scripts have been updated to set
their PATH and ANSIBLE_COLLECTIONS_PATHS environment variables
appropriately to ensure that they can access the required tools
even when run from a non-interactive session.

Similarly update the deploy/scripts shell scripts to ensure that
they also include the relevant paths in their PATH settings to
ensure that they can find the relevant tools when running under
non-interactive sessions. Note that this change may need to be
re-visited if it is expected that non-deployer environmemnts that
may run these scripts will have the relevant path entries setup
in an incompatible fashion.

* How to connect Azure DevOps

* Setup ADO

* Configure the agent

* Pacemaker tests

* add support for re-running dbload

* documentation updates

* Updates

* documentation updates

* cluster updates

* RHEL check online

* RedHat 8.2 and documentation fixes

* Workaround Azure CLI installer script prompt for input (#1237)

The Azure CLI installer script is prompting for input to confirm the
target install path; we are happy with the default path suggested in
the prompt message, and can ensure that the default is accepted by
redirecting the stdin for the shell action to /dev/null, effectively
making it a non-interactive session, causing the default to be used.

* deployer terraform updates

* Fixes for deployer setup script. (#1238)

Correctly generate the symlink for the terraform command under the
/opt/terraform/bin directory.

Use the appropriate AzureInstallCLI... script to install the package
based version of the Azure CLI rather than AzureInstallCLI which
just installs a venv tarball in the local user account.

* Added tags to the SAP roles

* copy the parameter files to the deployer

* comment out the access key for now

* ANYDB fixes

* Add --only_deployer option to prepare_region.sh (#1239)

When the --only_deployer option is used with the prepare_region.sh
script it causes to stop once the deployer has been successfully
created. At this point the user can now copy the relevant config
and state files to the deployer and run prepare_region.sh from there
to complete to region setup.

* tests

* Azure CLI updates

* CLI updates

* script updates

* updating the configuration script

* fixes

* updates

* CLI

* 2004 fixes

* cli

* CLI Tests

* apt-get upgrade -y

* Final version

* remove MSI endpoint

* add checks for controlling exeuction location

* reset

* Debugging

* debugging

* removed the SPN creation

* block the fencing spn

* TFvars fixes

* BOM update

* HANA BOM Updates

* SAP HANA AFL Rev 56.5 only for HANA 2.0 Rev 56

* Added the return code

* Create users (#1241)

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Revert to 055

* 057 Update

* Tests

* extraneous spaces

* Correct default sizing

* corrected the path

* directory permissions

* add flags

* Updates

* User creation fixes

* Kimforss create sap password (#1244)

* Create users

* Create SAP password

* add password for the created users

* update the password field for users

* updated groups for hana and scs based on documentation from SAP

* User creation

* hash the password

* Limit the length to 14

* merge

* increase vg_sap

* fixes

* password logic

* merge

* trace playbook execution

* added deployment flags

* Update playbook_04_00_01_hana_hsr.yaml

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>

* remove error redirect

* remove error redirect

* Don't track the python bytecode files (#1240)

* Kimforss deployer dependencies (#1245)

* Add explicit dependencies

* control dependencies

* remove the removal ot error.log

* more tests

* whitespace

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Kimforss store deployer kv in workload (#1246)

* Store the Deployer Keyvault name in the state file

* store the keyvault id in the state file

* whitespace

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Store the SAP Library Storage account details in deployer key vault (#1247)

* Save the sapbits details to deployer keyvault

* changed secret name

* formatdate

* Update 02-prepare-environment.md

Add WEEU as a demo option

* Update 02-prepare-environment.md

* retrieve the created password

* Update providers.tf

fix the missing features issue when running prepare_region from alfa

* add both providers

* Update module.tf

commenting out the provider aliases. The rest of the codes does not seem to realize the new aliases

* shorter password

* GET SAP Library information from keyvault (#1248)

* SA detail updates

* Update module.tf

commenting out the dual provider configuration

* Create the correct SAS type

* flag directories

* anydb updates

* Merge alfa

* feng shui

* SAS token update

* Review updates

* Correct PATH fro RHEL

* typo

* Kimforss anf support (#1249)

* ANF Account and pool creation

* missing curly brace

* ANF for system

* ANF tests

* Updates

* hana ANF works

* lifecycle

* merge updates

* sapmnt updates

* AutoFS fixes

* further tests

* updates

* Updates

* merge alfa

* ANF updates

* BOM update

* SCS NFS updates

* anf updates

* always restart autofs

* ANF updates

* remove the ~

* ANF troubleshooting

* ANF updates

* ANF tests

* Create users

* Updates

* Create SAP password

* troubleshooting

* add password for the created users

* update the password field for users

* updated groups for hana and scs based on documentation from SAP

* User creation

* hash the password

* Limit the length to 14

* merge

* increase vg_sap

* fixes

* password logic

* merge

* trace playbook execution

* added deployment flags

* merge alfa

* local edits

* ANF Updates

* Debugging updates

* merge

* changes to mounts based on current discussion

* Final fixes

* Update main.yaml

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>

* Fixes

* ANF documentation updates

* Instance number updates

* merge issues

* final tweaks

* Fixes

* Deployer configuration

* arm_client_id

* Update 03-workload-zone.md

Add more examples

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 02-prepare-environment.md

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 04-sdu.md

* Update 04-sdu.md

* Update 04-sdu.md

* Update 04-sdu.md

* Update 04-sdu.md

* Updates

* Shellfixes for running in CloudShell (#1233)

* add handling of environment variables export to deploy_utils script

* [Aug 17 14:24:26 IST 2021] -> updating variable definitions and some comments

* [Aug 17 18:44:46 IST 2021] -> updating variable definitions and some comments

* [Aug 17 18:55:46 IST 2021] -> add comments when unset ARM vars, echo to stdout

* [Aug 17 20:30:46 IST 2021]: updated the MGMT-WEEU-DEP00-INFRASTRUCTURE.tfvars sample file to use the location=azurelocation as that's what we use in the script

* [Aug 17 22:32:27 IST 2021]: updated remover.sh to call set_executing_user_environment_variables after az session is available

* install_library updates

* Update prepare_region.sh

prompt on error to login using spn credentials

* [19 August 2021 00:15:40 IST] : Updates for reading inputs a little better

* turn off kv results to stdout

* Update MGMT-WEEU-DEP00-INFRASTRUCTURE.tfvars

remove space

* Update cloud shell documentation

* fix the issue

* splitting the prepare_region

* removed the Azure AD lookup

* updated parameters file

* offload call to unset variables

* updates to shell logging

* 1st commit of logger module

* silly mistake

* additional helper functions

* merge changes from local to remote

* updates to deploy_utils

* added few checks

* shell fixes

* procedural updates

* whitespace

* Fixes

* fixes for SAS token and resource copying

* testing

* persist tfstate

* workload zone fixes

* Fixes

* Fix remove_region

* if statements broken

* dependency fixes

* Updates and whitespace

Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: Kimmo Forss <kimmo.forss@microsoft.com>

* Merge latest

* merges from alfa

* Merge

* merge changes from alfa

* Merge updates

* merge and ANF updates

* Only create fencing agent once

* restore original criteria

* Include resource-agents-sap-hana package

Co-authored-by: Kimmo Forss <kimmo.forss@microsoft.com>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>
Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>
Co-authored-by: Fergal Mc Carthy <rahn.tamalin@gmail.com>
Co-authored-by: Ondra Machacek <machacek.ondra@gmail.com>

* Merge

* SAP SCS ERS Install and Pacemaker

* Delete vm-webdisp.tf

* Delete 02-prepare-environment.md

* Delete vm-app.tf

* Delete nsg-app-subnet.tf

Co-authored-by: Kimmo Forss <kimmo.forss@microsoft.com>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>
Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>
Co-authored-by: Fergal Mc Carthy <rahn.tamalin@gmail.com>
Co-authored-by: Ondra Machacek <machacek.ondra@gmail.com>
hdamecharla added a commit that referenced this pull request Oct 29, 2021
* Draft Services Task-  Testing pending

* Update Services Code - Tested

* Issues Resovled for 1.16-services Role

* Added states for services

* removed duplicate service names

* Pacemaker Draft push

* Added Rhel generic and hana pacemaker playbooks

* HSR playbooks Draft

* Changes to HSR - pre_checks.yml

* changes to HSR - prechecks 2

* HSR build runtime and trust

* HSR work 05 july2021

* HSR Working version

* HSR working version with added documentation

* HSR variable secondary instance name fix

* Create the fencing SPN and store in keyvault (#1214)

* SUSE Generic Cluster Setup

* Delete app-inifile-param

* Delete create-sapsystem-steps.yml

* Delete prepare-agent.yml

* Delete HANA_2_00_055_v0003ms.yaml

* Delete myDownloadBasketFiles.txt

* Delete MP_Excel_2001100478_20210324_SWC.xls

* Delete MP_Stack_2001100478_20210324_.txt

* Delete myDownloadBasketFiles.txt

* Delete S41909SPS03_v0003ms-app-inifile-param.j2

* Delete S41909SPS03_v0003ms-dbload-inifile-param.j2

* Delete S41909SPS03_v0003ms-pas-inifile-param.j2

* Delete S41909SPS03_v0003ms-web-inifile-param.j2

* Delete S41909SPS03_v0003ms-scs-inifile-param.j2

* Delete web-inifile-param

* Delete deploy_utils.sh

* Delete install_deployer.sh

* Delete MP_Stack_2001100478_20210324_.xml

* Delete S41909SPS03_v0004ms.yaml

* Delete install_library.sh

* Add debug info

* Use the current credentials

* small tweaks

* Small tweaks

* tier fix

* Update playbook_03_bom_processing.yaml

remove the call to 1.16 services upfront. we need to complete 2.3 before we call it.

* Update playbook_06_00_00_pacemaker.yaml

* Update playbook_06_00_00_pacemaker.yaml

Target DB hosts for now

* Update main.yml

let's see if this works

* Update playbook_06_00_03_pacemaker_hana.yaml

* Update playbook_06_00_03_pacemaker_hana.yaml

* Update playbook_06_00_03_pacemaker_hana.yaml

* refactoring

* Refactor 2

* Kernel parameter changes for SUSE pacemaker Cluster  (#1227)

* hana resorces config v1.0

* kernel parameter update for Suse pacemaker

* Update parameters.yaml

* commented dirty cache settings in cluster-Suse.yam

* Update playbook_06_00_03_pacemaker_hana.yaml

Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>

* changes to 1.9-kernel parameters to add tier support

* Update playbook_06_00_00_pacemaker.yaml

setup kernel parameters required for cluster VMs

* Update playbook_06_00_00_pacemaker.yaml (#1230)

setup kernel parameters required for cluster VMs

* Update playbook_06_00_00_pacemaker.yaml (#1230) (#2)

setup kernel parameters required for cluster VMs

* Update cluster-Suse.yml

Updated to the same as alfa

* Delete sbd_device_setup.yml

We are using Azure fence agent, SBD setup not required.

* Create start_hana.yml

* Update start_hana.yml

* Create stop_hana.yml

* RHEL Generic Pacemaker

* RHEL - Generic Pacemaker Setup  (#1231)

* Update playbook_06_00_00_pacemaker.yaml

setup kernel parameters required for cluster VMs

* Update playbook_06_00_00_pacemaker.yaml (#1230) (#2)

setup kernel parameters required for cluster VMs

* Update cluster-Suse.yml

Updated to the same as alfa

* Delete sbd_device_setup.yml

We are using Azure fence agent, SBD setup not required.

* Create start_hana.yml

* Update start_hana.yml

* Create stop_hana.yml

* RHEL Generic Pacemaker

* web dispatcher

* SUSE HANA resources for pacemaker

* RHEL HANA Resources pacemaker

* Updates

* Merge alfa

* feng shui

* Review updates

* Correct PATH fro RHEL

* typo

* Fixes

* Instance number updates

* merge issues

* final tweaks

* Fixes

* Updates

* merges from alfa

* Merge

* merge changes from alfa

* Merge updates

* merge and ANF updates

* Only create fencing agent once

* restore original criteria

* Include resource-agents-sap-hana package

* remove redendant calls

* alignment

* SAP SCS ERS HA Install and Pacemaker Configuration (#1297)

* PR to pull all the changes happenned in PankajMeshramCSA-alfa into feature branch "patch-1"  (#4)

* Merge updates

* Update playbook_03_bom_processing.yaml

call to 1.16 needs to happen after 2.3

* Documenation updates

* restructure samples for Azure docs move

* Broken links

* broken link

* broken link

* tfvars documentation

* Update Getting_started_with_the_SAP_Deployment_Automation_bash.md

* Update Getting_started_with_the_SAP_Deployment_Automation_cloudshell.md

* Update 02-prepare-environment.md

* Deployer tfvars documentation

* Add validation to ensure logon is not using a managed identity

* Corrected the logic for credential validation

* Update the az login prompt

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 04-sdu.md

* Update workshops.md

* Update 01-ansible.md

* Update readme.md

* Update 01-ansible-download.md

* changes to 1.9-kernel parameters to add tier support

* SWPM updates

* Patch 2 for SOFTWARE UPDATE MANAGER 2.0 SP11

* better defaults for sap-parameters

* Bootstrapping debugging

* Key vault changes

* Key vault changes

* merge

* remove duplicate

* try statement

* Taking either object or client id

* No keyvaults in sap library

* persist deployer details

* persist deployer details

* typos

* missing quote

* typos

* store the access key

* atore sapbits access key

* More detailed steps

* Update 01-ansible-download.md

* Update 01-ansible-download.md

* Patch 3 for SOFTWARE UPDATE MANAGER 2.0 SP11

* Updated URL

* use full names for ansible modules

* Fixed the services list

* Fix BOM retrieval

* Add support for sas-token

* Update documentation for sas token

* use full names for ansible modules

* Fixed the services list

* Fix BOM retrieval

* Add support for sas-token

* Update documentation for sas token

* Web dispatcher product ID

* Web Dispatcher Product ID

* Update BOM-Agent.yaml for Azure Pipelines

* Update BOM-Agent.yaml for Azure Pipelines

* Update BOM playbooks

* Update BOM playbooks

* Update 01-ansible-download.md

* consistency between json and tfvars

* Update BOM-Agent.yaml for Azure Pipelines

* Patch 3 for SOFTWARE UPDATE MANAGER 2.0 SP1

* Update playbook_06_00_00_pacemaker.yaml (#1230)

setup kernel parameters required for cluster VMs

* RHEL - Generic Pacemaker Setup  (#1231)

* Update playbook_06_00_00_pacemaker.yaml

setup kernel parameters required for cluster VMs

* Update playbook_06_00_00_pacemaker.yaml (#1230) (#2)

setup kernel parameters required for cluster VMs

* Update cluster-Suse.yml

Updated to the same as alfa

* Delete sbd_device_setup.yml

We are using Azure fence agent, SBD setup not required.

* Create start_hana.yml

* Update start_hana.yml

* Create stop_hana.yml

* RHEL Generic Pacemaker

* Script updates to return the error code from TF (#1232)

Merging changes into beta

* Script updates to return the error code from TF (#1232)

Merging changes into beta

* Update BOM-Agent.yaml for Azure Pipelines

* SWPM20SP09 update

* Add additional parameters

* Add error code for failed init

* debug

* ado switch added

* install_library updates

* whitespace

* local

* script fixes

* Update BOM-Agent.yaml for Azure Pipelines

* Provide a way to control the deployment of load balancers for non-HA deployments (#1235)

* Provide a way to control the deployment of load balancers for non-HA deployments

* fixes for the supporting resources

* Updates for scaling down

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Provide a way to control the deployment of load balancers for non-HA deployments (#1235)

* Provide a way to control the deployment of load balancers for non-HA deployments

* fixes for the supporting resources

* Updates for scaling down

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* sample updates

* sample updates and tag support for db VM

* typo

* whitespace

* HA playbooks (#1236)

* Draft Services Task-  Testing pending

* Update Services Code - Tested

* Issues Resovled for 1.16-services Role

* Added states for services

* removed duplicate service names

* Pacemaker Draft push

* Added Rhel generic and hana pacemaker playbooks

* HSR playbooks Draft

* Changes to HSR - pre_checks.yml

* changes to HSR - prechecks 2

* HSR build runtime and trust

* HSR work 05 july2021

* HSR Working version

* HSR working version with added documentation

* HSR variable secondary instance name fix

* Create the fencing SPN and store in keyvault (#1214)

* SUSE Generic Cluster Setup

* Delete app-inifile-param

* Delete create-sapsystem-steps.yml

* Delete prepare-agent.yml

* Delete HANA_2_00_055_v0003ms.yaml

* Delete myDownloadBasketFiles.txt

* Delete MP_Excel_2001100478_20210324_SWC.xls

* Delete MP_Stack_2001100478_20210324_.txt

* Delete myDownloadBasketFiles.txt

* Delete S41909SPS03_v0003ms-app-inifile-param.j2

* Delete S41909SPS03_v0003ms-dbload-inifile-param.j2

* Delete S41909SPS03_v0003ms-pas-inifile-param.j2

* Delete S41909SPS03_v0003ms-web-inifile-param.j2

* Delete S41909SPS03_v0003ms-scs-inifile-param.j2

* Delete web-inifile-param

* Delete deploy_utils.sh

* Delete install_deployer.sh

* Delete MP_Stack_2001100478_20210324_.xml

* Delete S41909SPS03_v0004ms.yaml

* Delete install_library.sh

* Add debug info

* Use the current credentials

* small tweaks

* Small tweaks

* tier fix

* Update playbook_03_bom_processing.yaml

remove the call to 1.16 services upfront. we need to complete 2.3 before we call it.

* Update playbook_06_00_00_pacemaker.yaml

* Update playbook_06_00_00_pacemaker.yaml

Target DB hosts for now

* Update main.yml

let's see if this works

* Update playbook_06_00_03_pacemaker_hana.yaml

* Update playbook_06_00_03_pacemaker_hana.yaml

* Update playbook_06_00_03_pacemaker_hana.yaml

* refactoring

* Refactor 2

* Kernel parameter changes for SUSE pacemaker Cluster  (#1227)

* hana resorces config v1.0

* kernel parameter update for Suse pacemaker

* Update parameters.yaml

* commented dirty cache settings in cluster-Suse.yam

* Update playbook_06_00_03_pacemaker_hana.yaml

Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>

* changes to 1.9-kernel parameters to add tier support

* Update playbook_06_00_00_pacemaker.yaml (#1230)

setup kernel parameters required for cluster VMs

* RHEL - Generic Pacemaker Setup  (#1231)

* Update playbook_06_00_00_pacemaker.yaml

setup kernel parameters required for cluster VMs

* Update playbook_06_00_00_pacemaker.yaml (#1230) (#2)

setup kernel parameters required for cluster VMs

* Update cluster-Suse.yml

Updated to the same as alfa

* Delete sbd_device_setup.yml

We are using Azure fence agent, SBD setup not required.

* Create start_hana.yml

* Update start_hana.yml

* Create stop_hana.yml

* RHEL Generic Pacemaker

Co-authored-by: PankajMeshramCSA <pankaj.meshram@microsoft.com>
Co-authored-by: PankajMeshramCSA <41123792+PankajMeshramCSA@users.noreply.github.com>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>
Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>

* documentation updates

* FQDNs for Ansible modules

* merge

* FQDN updates

* FQDN Updates

* Support providing the database SID

* fixes

* web dispatcher

* Fixes

* debugging info

* HANA db pacemaker changes

* remove obsolete

* Improve Terraform driven initial deployer setup (#1188)

Update the sap_deployer module to generate a configure_deployer.sh
script under /tmp on the deployer node which is then run using a
remote-exec operation.

The new configure_deployer.sh script is derived from the previous
remote-exec inline scripting, with changes to leverage a Python
virtualenv to host Ansible and other Python tools and depenencies,
rather than pip installing them into the system Python environment
which risks both breaking the system package management, and being
broken by any subsequent Python related package installs.

The generated /etc/profile.d/deployer_setup.sh script should also
correctly add the new Terraform and Ansible bin directories to the
session PATH, rather than replacing the session PATH with a fixed
list of paths that pertained when the terraform remote-exec was
triggered. Note that this script is only included in interactive
sessions, such as a user login via SSH, but not from non-interactive
sessions such as using SSH to run a specific command on a system.

The deploy/ansible/*test_menu.sh scripts have been updated to set
their PATH and ANSIBLE_COLLECTIONS_PATHS environment variables
appropriately to ensure that they can access the required tools
even when run from a non-interactive session.

Similarly update the deploy/scripts shell scripts to ensure that
they also include the relevant paths in their PATH settings to
ensure that they can find the relevant tools when running under
non-interactive sessions. Note that this change may need to be
re-visited if it is expected that non-deployer environmemnts that
may run these scripts will have the relevant path entries setup
in an incompatible fashion.

* How to connect Azure DevOps

* Setup ADO

* Configure the agent

* Pacemaker tests

* add support for re-running dbload

* documentation updates

* Updates

* documentation updates

* cluster updates

* RHEL check online

* RedHat 8.2 and documentation fixes

* Workaround Azure CLI installer script prompt for input (#1237)

The Azure CLI installer script is prompting for input to confirm the
target install path; we are happy with the default path suggested in
the prompt message, and can ensure that the default is accepted by
redirecting the stdin for the shell action to /dev/null, effectively
making it a non-interactive session, causing the default to be used.

* deployer terraform updates

* Fixes for deployer setup script. (#1238)

Correctly generate the symlink for the terraform command under the
/opt/terraform/bin directory.

Use the appropriate AzureInstallCLI... script to install the package
based version of the Azure CLI rather than AzureInstallCLI which
just installs a venv tarball in the local user account.

* Added tags to the SAP roles

* copy the parameter files to the deployer

* comment out the access key for now

* ANYDB fixes

* Add --only_deployer option to prepare_region.sh (#1239)

When the --only_deployer option is used with the prepare_region.sh
script it causes to stop once the deployer has been successfully
created. At this point the user can now copy the relevant config
and state files to the deployer and run prepare_region.sh from there
to complete to region setup.

* tests

* Azure CLI updates

* CLI updates

* script updates

* updating the configuration script

* fixes

* updates

* CLI

* 2004 fixes

* cli

* CLI Tests

* apt-get upgrade -y

* Final version

* remove MSI endpoint

* add checks for controlling exeuction location

* reset

* Debugging

* debugging

* removed the SPN creation

* block the fencing spn

* TFvars fixes

* BOM update

* HANA BOM Updates

* SAP HANA AFL Rev 56.5 only for HANA 2.0 Rev 56

* Added the return code

* Create users (#1241)

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Revert to 055

* 057 Update

* Tests

* extraneous spaces

* Correct default sizing

* corrected the path

* directory permissions

* add flags

* Updates

* User creation fixes

* Kimforss create sap password (#1244)

* Create users

* Create SAP password

* add password for the created users

* update the password field for users

* updated groups for hana and scs based on documentation from SAP

* User creation

* hash the password

* Limit the length to 14

* merge

* increase vg_sap

* fixes

* password logic

* merge

* trace playbook execution

* added deployment flags

* Update playbook_04_00_01_hana_hsr.yaml

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>

* remove error redirect

* remove error redirect

* Don't track the python bytecode files (#1240)

* Kimforss deployer dependencies (#1245)

* Add explicit dependencies

* control dependencies

* remove the removal ot error.log

* more tests

* whitespace

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Kimforss store deployer kv in workload (#1246)

* Store the Deployer Keyvault name in the state file

* store the keyvault id in the state file

* whitespace

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>

* Store the SAP Library Storage account details in deployer key vault (#1247)

* Save the sapbits details to deployer keyvault

* changed secret name

* formatdate

* Update 02-prepare-environment.md

Add WEEU as a demo option

* Update 02-prepare-environment.md

* retrieve the created password

* Update providers.tf

fix the missing features issue when running prepare_region from alfa

* add both providers

* Update module.tf

commenting out the provider aliases. The rest of the codes does not seem to realize the new aliases

* shorter password

* GET SAP Library information from keyvault (#1248)

* SA detail updates

* Update module.tf

commenting out the dual provider configuration

* Create the correct SAS type

* flag directories

* anydb updates

* Merge alfa

* feng shui

* SAS token update

* Review updates

* Correct PATH fro RHEL

* typo

* Kimforss anf support (#1249)

* ANF Account and pool creation

* missing curly brace

* ANF for system

* ANF tests

* Updates

* hana ANF works

* lifecycle

* merge updates

* sapmnt updates

* AutoFS fixes

* further tests

* updates

* Updates

* merge alfa

* ANF updates

* BOM update

* SCS NFS updates

* anf updates

* always restart autofs

* ANF updates

* remove the ~

* ANF troubleshooting

* ANF updates

* ANF tests

* Create users

* Updates

* Create SAP password

* troubleshooting

* add password for the created users

* update the password field for users

* updated groups for hana and scs based on documentation from SAP

* User creation

* hash the password

* Limit the length to 14

* merge

* increase vg_sap

* fixes

* password logic

* merge

* trace playbook execution

* added deployment flags

* merge alfa

* local edits

* ANF Updates

* Debugging updates

* merge

* changes to mounts based on current discussion

* Final fixes

* Update main.yaml

Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>

* Fixes

* ANF documentation updates

* Instance number updates

* merge issues

* final tweaks

* Fixes

* Deployer configuration

* arm_client_id

* Update 03-workload-zone.md

Add more examples

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 02-prepare-environment.md

* Update 03-workload-zone.md

* Update 03-workload-zone.md

* Update 04-sdu.md

* Update 04-sdu.md

* Update 04-sdu.md

* Update 04-sdu.md

* Update 04-sdu.md

* Updates

* Shellfixes for running in CloudShell (#1233)

* add handling of environment variables export to deploy_utils script

* [Aug 17 14:24:26 IST 2021] -> updating variable definitions and some comments

* [Aug 17 18:44:46 IST 2021] -> updating variable definitions and some comments

* [Aug 17 18:55:46 IST 2021] -> add comments when unset ARM vars, echo to stdout

* [Aug 17 20:30:46 IST 2021]: updated the MGMT-WEEU-DEP00-INFRASTRUCTURE.tfvars sample file to use the location=azurelocation as that's what we use in the script

* [Aug 17 22:32:27 IST 2021]: updated remover.sh to call set_executing_user_environment_variables after az session is available

* install_library updates

* Update prepare_region.sh

prompt on error to login using spn credentials

* [19 August 2021 00:15:40 IST] : Updates for reading inputs a little better

* turn off kv results to stdout

* Update MGMT-WEEU-DEP00-INFRASTRUCTURE.tfvars

remove space

* Update cloud shell documentation

* fix the issue

* splitting the prepare_region

* removed the Azure AD lookup

* updated parameters file

* offload call to unset variables

* updates to shell logging

* 1st commit of logger module

* silly mistake

* additional helper functions

* merge changes from local to remote

* updates to deploy_utils

* added few checks

* shell fixes

* procedural updates

* whitespace

* Fixes

* fixes for SAS token and resource copying

* testing

* persist tfstate

* workload zone fixes

* Fixes

* Fix remove_region

* if statements broken

* dependency fixes

* Updates and whitespace

Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: Kimmo Forss <kimmo.forss@microsoft.com>

* Merge latest

* merges from alfa

* Merge

* merge changes from alfa

* Merge updates

* merge and ANF updates

* Only create fencing agent once

* restore original criteria

* Include resource-agents-sap-hana package

Co-authored-by: Kimmo Forss <kimmo.forss@microsoft.com>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>
Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>
Co-authored-by: Fergal Mc Carthy <rahn.tamalin@gmail.com>
Co-authored-by: Ondra Machacek <machacek.ondra@gmail.com>

* Merge

* SAP SCS ERS Install and Pacemaker

* Delete vm-webdisp.tf

* Delete 02-prepare-environment.md

* Delete vm-app.tf

* Delete nsg-app-subnet.tf

Co-authored-by: Kimmo Forss <kimmo.forss@microsoft.com>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>
Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>
Co-authored-by: Fergal Mc Carthy <rahn.tamalin@gmail.com>
Co-authored-by: Ondra Machacek <machacek.ondra@gmail.com>

* pacemaker fixes

* alignment

* fixes

* Misc fixes

* Misc updates

* Load Balancer fixes

* Misc findigs

* change lb port number for ERS

* Misc fixes

* misc fixes

* Misc Fixes

* HA fixes

* fixes

* Don't move the nodes

* Fixes

* NFS Server

* Successful deployment on SUSE

* fixes

* Lint results

* fix sles15 dependencies for python3-azure-mgmt-compute

* password tweaks

* Fixes

* RHEL 8.2 packages

* removing old playbooks

Co-authored-by: PankajMeshramCSA <pankaj.meshram@microsoft.com>
Co-authored-by: PankajMeshramCSA <41123792+PankajMeshramCSA@users.noreply.github.com>
Co-authored-by: Kimmo Forss <kimforss@microsoft.com>
Co-authored-by: hdamecharla <71097261+hdamecharla@users.noreply.github.com>
Co-authored-by: hdamecharla <hdamecharla@DESKTOP-4N53UER.localdomain>
Co-authored-by: Fergal Mc Carthy <rahn.tamalin@gmail.com>
Co-authored-by: Ondra Machacek <machacek.ondra@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants