Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline hotfixes #654

Merged
merged 77 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
2f4764c
Refactor echo statements in deploy control plane pipeline
Oct 24, 2024
71044a7
Refactor echo statements in deploy control plane pipeline
Oct 24, 2024
01f0f40
Refactor install_workloadzone.sh script to reset return_value variable
Oct 24, 2024
aebe335
Refactor install_workloadzone.sh script to improve error handling
Oct 24, 2024
c4c48c4
feng shui
Oct 24, 2024
e4b4ab4
Refactor echo statements in deploy control plane pipeline
Oct 24, 2024
fefb749
Refactor echo statements in deploy control plane pipeline
Oct 24, 2024
3ad3b41
Refactor variables_local.tf to improve readability and error handling
Oct 24, 2024
7aac062
Refactor variables_local.tf to improve readability and error handling
Oct 24, 2024
2bfc51f
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 24, 2024
9d65fe2
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 24, 2024
521fd66
Refactor echo statement in deploy control plane pipeline
Oct 24, 2024
ca4137b
Refactor remover script in deploy control plane pipeline
Oct 24, 2024
37c1afa
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 24, 2024
488f965
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 24, 2024
bc04b58
aa
Oct 24, 2024
76b20d2
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 24, 2024
b3b6b7d
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 24, 2024
e417cb3
Refactor deploy control plane pipeline to remove unnecessary use_msi …
Oct 24, 2024
35e4b76
Refactor deploy control plane pipeline to update default value for sp…
Oct 24, 2024
a76d9a7
Refactor deploy control plane pipeline to update default value for sp…
Oct 24, 2024
57f63c4
Refactor deploy control plane pipeline to update default value for sp…
Oct 24, 2024
f5f6130
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 24, 2024
36bb4fa
Refactor deploy control plane pipeline to trim deployer_tfstate_key i…
Oct 24, 2024
7524974
Refactor deploy control plane pipeline to trim deployer_tfstate_key i…
Oct 24, 2024
df9e762
Refactor deploy control plane pipeline to trim deployer_tfstate_key i…
Oct 24, 2024
9a5f226
Refactor deploy control plane pipeline to include provider for azurer…
Oct 24, 2024
290dc22
Refactor deploy control plane pipeline to include provider for azurer…
Oct 24, 2024
6287e18
Refactor deploy control plane pipeline to update storage account auth…
Oct 24, 2024
a1dc88d
Refactor deploy control plane pipeline to update deployer and landsca…
Oct 24, 2024
f4e4e43
Refactor deploy control plane pipeline to remove unnecessary code in …
Oct 24, 2024
fdb1ae5
Refactor deploy control plane pipeline to remove unnecessary code in …
Oct 24, 2024
c16e0b7
Refactor echo statements in deploy control plane pipeline
Oct 23, 2024
1556455
Refactor install_workloadzone.sh script to improve error handling
Oct 23, 2024
9a53266
feng shui
Oct 23, 2024
5dca7a7
Refactor echo statements in deploy control plane pipeline
Oct 23, 2024
f84d1b9
Refactor variables_local.tf to improve readability and error handling
Oct 23, 2024
f81638e
Refactor variables_local.tf to improve readability and error handling
Oct 23, 2024
87aaf78
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 23, 2024
3809dfb
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 23, 2024
03e5b15
Refactor echo statement in deploy control plane pipeline
Oct 23, 2024
410b567
Refactor remover script in deploy control plane pipeline
Oct 23, 2024
b8b0235
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 23, 2024
8df2e16
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 23, 2024
f0f84da
aa
Oct 23, 2024
a95ab7d
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 23, 2024
062e825
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 23, 2024
bf5b457
Refactor deploy control plane pipeline to update default value for sp…
Oct 23, 2024
d664d62
Refactor deploy control plane pipeline to update default value for sp…
Oct 23, 2024
3d3bdc9
Refactor deploy control plane pipeline to update default value for sp…
Oct 23, 2024
c2cafe7
Refactor deploy control plane pipeline to include deployer_tfstate_ke…
Oct 23, 2024
01dd88f
Refactor deploy control plane pipeline to trim deployer_tfstate_key i…
Oct 23, 2024
84a839a
Refactor deploy control plane pipeline to trim deployer_tfstate_key i…
Oct 23, 2024
54f8064
Refactor deploy control plane pipeline to trim deployer_tfstate_key i…
Oct 23, 2024
a7ae17f
Refactor deploy control plane pipeline to include provider for azurer…
Oct 23, 2024
6b95044
Refactor deploy control plane pipeline to include provider for azurer…
Oct 23, 2024
5decc2c
Refactor deploy control plane pipeline to update storage account auth…
Oct 24, 2024
edd80be
Refactor deploy control plane pipeline to update deployer and landsca…
Oct 24, 2024
9003e5c
Refactor deploy control plane pipeline to remove unnecessary code in …
Oct 24, 2024
2213c39
Refactor deploy control plane pipeline to remove unnecessary code in …
Oct 24, 2024
87891d8
Refactor install_workloadzone.sh to export SPN key vault ID if keyvau…
Oct 24, 2024
66a443c
Refactor tfvar_variables.tf to set default value of short_named_endpo…
Oct 24, 2024
d3b44ad
Refactor remover.sh to consolidate terraform destroy command
Oct 24, 2024
9744163
Refactor echo statements in remover.sh and remove-control-plane.yaml
Oct 24, 2024
5e8b97b
Refactor echo statements in deploy/pipelines/01-deploy-control-plane.…
Oct 24, 2024
5c0c8ba
Refactor providers.tf to conditionally set use_msi based on var.use_spn
Oct 24, 2024
282afe2
Refactor echo statements in deploy/pipelines/01-deploy-control-plane.…
Oct 24, 2024
208ba66
Refactor echo statements in deploy/pipelines/01-deploy-control-plane.…
Oct 24, 2024
5531336
Refactor echo statements in deploy/pipelines/01-deploy-control-plane.…
Oct 24, 2024
b4734d9
Refactor install_workloadzone.sh to improve argument parsing and read…
Oct 24, 2024
ea0fb68
Refactor code for improved argument parsing and readability in instal…
Oct 24, 2024
4d036ae
Refactor echo statements in deploy/pipelines/01-deploy-control-plane.…
Oct 24, 2024
2963f76
Refactor LandscapeModel.cs, LandscapeDetails.json, and LandscapeTempl…
Oct 24, 2024
77d70d6
Refactor package dependencies in os-packages.yaml
Oct 24, 2024
f03920c
Refactor ansible role to remove unused variable and update passlib de…
Oct 24, 2024
8c09e40
Refactor ansible role to remove unused variable and update passlib de…
Oct 24, 2024
4422529
Refactor echo statement in install_workloadzone.sh for improved clarity
Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Webapp/SDAF/Models/LandscapeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ public bool IsValid()

public string resourcegroup_name { get; set; }

public bool? prevent_deletion_if_contains_resources { get; set; } = true;

/*---------------------------------------------------------------------------8
| |
| Azure NetApp Files information |
Expand Down
9 changes: 9 additions & 0 deletions Webapp/SDAF/ParameterDetails/LandscapeDetails.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@
"Options": [],
"Overrules": "",
"Display": 2
},
{
"Name": "prevent_deletion_if_contains_resources",
"Required": false,
"Description": "Prevent deletion of resource group if there are Resources left within the Resource Group during deletion",
"Type": "checkbox",
"Options": [],
"Overrules": "",
"Display": 2
}
]
},
Expand Down
3 changes: 2 additions & 1 deletion Webapp/SDAF/ParameterDetails/LandscapeTemplate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ $$resourcegroup_name$$
# The resourcegroup_name arm_id is optional, it can be used to provide an existing resource group for the deployment
$$resourcegroup_arm_id$$


# Prevent deletion of resource group if there are Resources left within the Resource Group during deletion
$$prevent_deletion_if_contains_resources$$

#########################################################################################
# #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
# | |
# +------------------------------------4--------------------------------------*/

- name: "1.17 Generic Pacemaker: - Ensure passlib is installed"
ansible.builtin.pip:
name: passlib
state: present
vars:
ansible_python_interpreter: "python3"
tags:
- always
# - name: "1.17 Generic Pacemaker: - Ensure passlib is installed"
# ansible.builtin.pip:
# name: passlib
# state: present
# tags:
# - always


# /*---------------------------------------------------------------------------8
Expand Down
14 changes: 8 additions & 6 deletions deploy/ansible/roles-os/1.4-packages/vars/os-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,33 +339,35 @@ packages:
- { tier: 'ha', package: 'socat', node_tier: 'all', state: 'present' }
- { tier: 'ha', package: 'corosync', node_tier: 'all', state: 'present' }
- { tier: 'ha', package: 'resource-agents>=4.3', node_tier: 'all', state: 'present' }
- { tier: 'ha', package: 'fence-agents>=4.4.0', node_tier: 'all', state: 'present' }
- { tier: 'ha', package: 'cloud-netconfig-azure>=1.3', node_tier: 'all', state: 'present' }
# Assumption: Public_Cloud_Module_x86_64 already available
- { tier: 'ha', package: 'python-azure-mgmt-compute', node_tier: 'all', state: 'present' }
- { tier: 'ha', package: 'python-azure-identity', node_tier: 'all', state: 'present' } # Added as part of documentation update
- { tier: 'ha', package: 'sap-suse-cluster-connector', node_tier: 'hana', state: 'present' }
- { tier: 'ha', package: 'sap-suse-cluster-connector', node_tier: 'hana', state: 'present' }
- { tier: 'ha', package: 'sap-suse-cluster-connector', node_tier: 'scs', state: 'present' }
- { tier: 'ha', package: 'sap-suse-cluster-connector', node_tier: 'ers', state: 'present' }
# -------------------------- End - packages required for Clustering ------------------------------------8
sles_sap12.4:
# --------------------------- Begin - Packages required for SYBASE -----------------------------------------8
# 2371942 - Error Executing isql or dscp on SAP ASE or SAP HANA Accelerator for SAP ASE
- { tier: 'os', package: 'glibc-32bit', node_tier: 'sybase', state: 'present' }
- { tier: 'os', package: 'glibc-32bit', node_tier: 'sybase', state: 'present' }
- { tier: 'ha', package: 'fence-agents>=4.4.0', node_tier: 'all', state: 'present' }
# --------------------------- End - Packages required for SYBASE -------------------------------------------8
sles_sap12.5:
# --------------------------- Begin - Packages required for SYBASE -----------------------------------------8
# 2371942 - Error Executing isql or dscp on SAP ASE or SAP HANA Accelerator for SAP ASE
- { tier: 'os', package: 'glibc-32bit', node_tier: 'sybase', state: 'present' }
# --------------------------- End - Packages required for SYBASE -------------------------------------------8
- { tier: 'os', package: 'glibc-32bit', node_tier: 'sybase', state: 'present' }
- { tier: 'ha', package: 'fence-agents-azure-arm', node_tier: 'scs', state: 'present' }
- { tier: 'ha', package: 'fence-agents-azure-arm', node_tier: 'ers', state: 'present' }
- { tier: 'ha', package: 'fence-agents-azure-arm', node_tier: 'hana', state: 'present' } # --------------------------- End - Packages required for SYBASE -------------------------------------------8
sles_sap15:
- { tier: 'os', package: 'chrony', node_tier: 'all', state: 'present' }
# - { tier: 'os', package: 'libyui-qt-pkg11', node_tier: 'all', state: 'present' }
- { tier: 'os', package: 'glibc', node_tier: 'all', state: 'present' }
- { tier: 'os', package: 'systemd', node_tier: 'all', state: 'present' }
- { tier: 'os', package: 'tuned', node_tier: 'all', state: 'present' }
- { tier: 'os', package: 'numad', node_tier: 'all', state: 'present' }
- { tier: 'os', package: 'ntp', node_tier: 'all', state: 'absent' }
- { tier: 'os', package: 'ntp', node_tier: 'all', state: 'absent' }
- { tier: 'os', package: 'unrar', node_tier: 'scs', state: 'present' }
# --------------------------- Begin - Packages required for DB2 -----------------------------------------8
# https://www.ibm.com/docs/en/db2/11.5?topic=servers-linux
Expand Down
29 changes: 15 additions & 14 deletions deploy/pipelines/01-deploy-control-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ stages:

printf -v tempval '%s id:' $(variable_group)
printf -v val '%-20s' "${tempval}"
echo "$val $VARIABLE_GROUP_ID"
echo "$val $VARIABLE_GROUP_ID"

if [ "${{ parameters.force_reset }}" = "True" ]; then
echo "##vso[task.logissue type=warning]Forcing a re-install"
Expand Down Expand Up @@ -161,7 +161,8 @@ stages:
step=0
else
if [ -f ${deployer_environment_file_name} ]; then
step=$(cat ${deployer_environment_file_name} | grep step= | awk -F'=' '{print $2}' | xargs) ; echo 'Step' ${step}
step=$(cat ${deployer_environment_file_name} | grep step= | awk -F'=' '{print $2}' | xargs)
echo "Step: $(this_agent)"
if [ "0" != ${step} ]; then
exit 0
fi
Expand Down Expand Up @@ -220,10 +221,10 @@ stages:
deployer_environment_file_name=$CONFIG_REPO_PATH/.sap_deployment_automation/${ENVIRONMENT}$LOCATION
echo -e "$green--- Deploy the Control Plane ---$reset"
if [ -n "$(PAT)" ]; then
echo "Deployer Agent PAT: IsDefined"
echo "Deployer Agent PAT: IsDefined"
fi
if [ -n "$(POOL)" ]; then
echo " Deployer Agent Pool: $(POOL)"
echo " Deployer Agent Pool: $(POOL)"

fi
if [ -f ${CONFIG_REPO_PATH}/DEPLOYER/$(deployerfolder)/state.zip ]; then
Expand All @@ -245,7 +246,7 @@ stages:
if [ "$USE_MSI" = "true" ]; then
export ARM_CLIENT_SECRET=$servicePrincipalKey
export ARM_SUBSCRIPTION_ID=$ARM_SUBSCRIPTION_ID
echo "Deployment credentials: Managed Identity"
echo "Deployment credentials: Managed Identity"


$SAP_AUTOMATION_REPO_PATH/deploy/scripts/deploy_controlplane.sh \
Expand All @@ -260,8 +261,8 @@ stages:
export ARM_USE_OIDC=false
export ARM_USE_AZUREAD=true

echo "Deployment credentials: Service Principal"
echo "Deployment credential ID (SPN): $WL_ARM_CLIENT_ID"
echo "Deployment credentials: Service Principal"
echo "Deployment credential ID (SPN): $CP_ARM_CLIENT_ID"

az login --service-principal -u $ARM_CLIENT_ID -p=$ARM_CLIENT_SECRET --tenant $ARM_TENANT_ID --output none

Expand Down Expand Up @@ -578,7 +579,7 @@ stages:
exit 2
fi
TF_VAR_app_registration_app_id=$(APP_REGISTRATION_APP_ID);
echo "App Registration ID: ${TF_VAR_app_registration_app_id}"
echo "App Registration ID: ${TF_VAR_app_registration_app_id}"
export TF_VAR_app_registration_app_id
TF_VAR_webapp_client_secret=$(WEB_APP_CLIENT_SECRET)
export TF_VAR_webapp_client_secret
Expand Down Expand Up @@ -676,9 +677,9 @@ stages:
. /etc/profile.d/deploy_server.sh ; /opt/bin/terraform/terraform --version

if [ $USE_MSI != "true" ]; then
echo "Deployment credentials: Service Principal"
echo "Deployment credential ID (SPN): $CP_ARM_CLIENT_ID"
echo "Deployer subscription: $CP_ARM_SUBSCRIPTION_ID"
echo "Deployment credentials: Service Principal"
echo "Deployment credential ID (SPN): $CP_ARM_CLIENT_ID"
echo "Deployer subscription: $CP_ARM_SUBSCRIPTION_ID"

export ARM_CLIENT_ID=$CP_ARM_CLIENT_ID
export ARM_CLIENT_SECRET=$CP_ARM_CLIENT_SECRET
Expand Down Expand Up @@ -765,9 +766,9 @@ stages:

sudo chmod +x $SAP_AUTOMATION_REPO_PATH/deploy/scripts/deploy_controlplane.sh
if [ $USE_MSI != "true" ]; then
echo "Deployment credentials: Service Principal"
echo "Deployment credential ID (SPN): $CP_ARM_CLIENT_ID"
echo "Deployer subscription: $CP_ARM_SUBSCRIPTION_ID"
echo "Deployment credentials: Service Principal"
echo "Deployment credential ID (SPN): $CP_ARM_CLIENT_ID"
echo "Deployer subscription: $CP_ARM_SUBSCRIPTION_ID"

export TF_VAR_use_spn=true

Expand Down
5 changes: 1 addition & 4 deletions deploy/pipelines/02-sap-workload-zone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ stages:
--region "${LOCATION}" --subscription $ARM_SUBSCRIPTION_ID --spn_id $ARM_CLIENT_ID --spn_secret "${ARM_CLIENT_SECRET}" \
--tenant_id $ARM_TENANT_ID --keyvault_subscription $STATE_SUBSCRIPTION
secrets_set=$? ;
echo "Set Secrets returned: $secrets_set"
echo "Set Secrets returned: $secrets_set"

else
echo "Deployment credentials: Managed Identity"
Expand All @@ -476,9 +476,6 @@ stages:
debug_variable=''

if [ $USE_MSI != "true" ]; then
echo "Deployment credentials: Service Principal"
echo "Service Principal: $WL_ARM_CLIENT_ID"
echo "Service Principal (OID) $WL_ARM_OBJECT_ID"

isUserAccessAdmin=$(az role assignment list --role "User Access Administrator" --subscription $STATE_SUBSCRIPTION --assignee $WL_ARM_OBJECT_ID --query "[].principalName | [0]" --output tsv)

Expand Down
4 changes: 2 additions & 2 deletions deploy/pipelines/03-sap-system-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ stages:

if [ $USE_MSI != "true" ]; then
echo "Deployment credentials: Service Principal"
echo "Deployment credential ID (SPN): $WL_ARM_CLIENT_ID"
echo "Deployment credential ID (SPN): $WL_ARM_CLIENT_ID"

export ARM_CLIENT_ID=$WL_ARM_CLIENT_ID
export ARM_CLIENT_SECRET=$WL_ARM_CLIENT_SECRET
Expand All @@ -276,7 +276,7 @@ stages:
exit $return_code
fi
else
echo "Deployment credentials: Managed Identity"
echo "Deployment credentials: Managed Identity"
export ARM_USE_MSI=true
export ARM_SUBSCRIPTION_ID=$WL_ARM_SUBSCRIPTION_ID
unset ARM_TENANT_ID
Expand Down
Loading