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

Bring in Experimental fixes #643

Merged
merged 73 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
a1c2847
Refactor hana_shared_afs_path output to conditionally include values …
Oct 1, 2024
ab1e886
Add the ability to control access key based access to storage accounts
Oct 1, 2024
c99c2ab
Web App SAS updates
Oct 1, 2024
4e4f8d2
Refactor CustomValidators.cs to handle null values in IsValid method
Oct 1, 2024
1173471
check string length
Oct 1, 2024
6c82715
Refactor CustomValidators.cs to handle null values in IsValid method
Oct 1, 2024
46d3005
Refactor playbook_04_00_00_db_install.yaml to handle null values in s…
Oct 1, 2024
065ca26
Refactor Azure DevOps project configuration
Oct 1, 2024
f2b7081
Refactor site.js to handle additional storage and network options
Oct 1, 2024
12dc949
Refactor storage_accounts.tf to conditionally count private endpoint …
Oct 1, 2024
cee821d
Refactor sap_namegenerator/output.tf to handle null values in ANYDB_C…
Oct 1, 2024
546f683
Cluster validation logic
Oct 2, 2024
d730b54
Refactor 5.6 SCS/ERS validation playbook to improve efficiency and re…
Oct 2, 2024
4e1f4c0
Refactor 5.6 SCS/ERS validation playbook to set sapcontrol path and i…
Oct 2, 2024
33f3634
remove the unar package
Oct 2, 2024
b2ee851
Refactor 5.6 SCS/ERS validation playbook to set sapcontrol path and i…
Oct 2, 2024
76838f7
Refactor repository vars to remove epel repo for all Red Hat versions
Oct 2, 2024
258b23e
Refactor 1.1-swap playbook to use dnf module for updating WALinuxAgen…
Oct 2, 2024
fd541d0
allow_world_readable_tmpfiles for find
Oct 2, 2024
2cb03c5
Refactor become_user in DBLoad, PAS Install, and APP Install playbook…
Oct 2, 2024
9f5427c
add Environment variable to allow for silent installations
Oct 2, 2024
8128ca5
Add the ability to set the shared access key access for the sap syste…
Oct 2, 2024
fd10dd0
Add 'resource-agents-cloud' package for db2
Oct 2, 2024
dacf7b2
Refactor OS image configuration in sap_system/transform.tf
Oct 2, 2024
1057a91
Refactor HANA_2_00_install.rsp template to fix use_master_password fo…
Oct 2, 2024
d657074
Refactor HANA_2_00_install.rsp template to fix password_copy formatting
Oct 2, 2024
d240dd4
Refactor cluster stabilization check for RHEL 8.x and 9.x
Oct 3, 2024
9972b4f
Refactor HANA_2_00_install.rsp template to omit password_copy when ha…
Oct 3, 2024
190f9b7
Refactor HANA_2_00_install.rsp template to remove password_copy and f…
Oct 3, 2024
68388bc
Refactor cluster stabilization check for RHEL 8.x and 9.x
Oct 3, 2024
9db125a
Refactor HANA_2_00_install.rsp template to fix password_copy formatting
Oct 3, 2024
10c7f4d
Refactor DB2 cluster tasks for RHEL 8.x and 9.x
Oct 3, 2024
f78fa53
Refactor cluster stabilization check for RHEL 8.x and 9.x
Oct 3, 2024
4e4a739
Refactor cluster stabilization check for RHEL 8.x and 9.x
Oct 3, 2024
a646523
Refactor cluster stabilization check for RHEL 8.x and 9.x
Oct 3, 2024
af13391
Refactor allow_world_readable_tmpfiles formatting in HANA installatio…
Oct 3, 2024
b15795e
Update azuread provider version to >=3.0 in sap_deployer, sap_library…
Oct 3, 2024
ec22f69
Fix the spacing in the ansible role for the SAP 5.2 PAS install
Oct 3, 2024
dc25a46
Refactor spacing in HANA installation role and cluster stabilization …
Oct 3, 2024
f5cca6b
Refactor password_copy logic in HANA installation role
Oct 3, 2024
9af6f7d
Refactor password_copy logic in HANA installation role
Oct 3, 2024
28ab8c0
Refactor password_copy logic in HANA installation role
Oct 3, 2024
5258b87
Refactor password_copy logic in HANA installation role
Oct 3, 2024
566404d
Refactor password handling in HANA installation role
hdamecharla Oct 3, 2024
73d840e
Refactor password handling in HANA installation role
hdamecharla Oct 3, 2024
39231f0
Refactor password handling and hdbuserstore path in HANA installation…
Oct 3, 2024
693419f
Refactor password handling and hdbuserstore path in HANA installation…
Oct 3, 2024
0c28b0d
Refactor password handling in HANA installation role
Oct 3, 2024
4a9b376
Refactor ownership in PAS installation role
Oct 3, 2024
8435dd0
Refactor PAS installation role to remove unnecessary debug message
Oct 3, 2024
bd6857b
Refactor become_user in PAS installation role to use lowercase SID ad…
Oct 3, 2024
597acf8
Refactor become_user in PAS installation role to use root user
Oct 4, 2024
c56f50e
Refactor HANA installation role to include required packages
Oct 4, 2024
69fc8ad
Refactor tfvar_variables.tf to include shared access key enabled vari…
Oct 4, 2024
d7f65e5
Web App updates for shared access keys
Oct 4, 2024
3060ca7
Add tier info for packages task
Oct 4, 2024
1c3cdeb
Enable world-readable temporary files in ansible.cfg
Oct 4, 2024
56e98d6
add the missing quotes
Oct 4, 2024
c348a0a
Refactor SAP OS configuration playbook to include directory permissio…
Oct 4, 2024
f80cb9c
Refactor SAP OS configuration playbook to include directory permissio…
Oct 4, 2024
6a44bdb
Add 'resource-agents-sap-hana' to os-packages.yaml
hdamecharla Oct 4, 2024
5c27aaf
Refactor SAP OS configuration playbook to include directory permissio…
Oct 4, 2024
0396063
Refactor playbook to use 'import_tasks' instead of 'include_tasks' fo…
Oct 4, 2024
c45fc7e
chore: update ansible.cfg log path to /var/tmp/ansible.log
hdamecharla Oct 4, 2024
1efc77e
Refactor clustering tasks in HANADB Pacemaker playbook
Oct 4, 2024
4971743
Refactor clustering tasks in HANADB Pacemaker playbook
Oct 4, 2024
c258bee
Refactor clustering tasks in HANADB Pacemaker playbook to use 'import…
Oct 4, 2024
4b381b0
Refactor clustering tasks in HANADB Pacemaker playbook to use 'import…
Oct 4, 2024
92f729b
Refactor clustering tasks in HANADB Pacemaker playbook to use 'import…
Oct 5, 2024
6ac5caa
Refactor clustering tasks in HANADB Pacemaker playbook to use 'import…
Oct 5, 2024
80342fc
Remove the include tasks
Oct 5, 2024
ee18aef
Linting
Oct 5, 2024
d0fd30e
Merge branch 'Azure:experimental' into experimental
KimForss Oct 7, 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
58 changes: 47 additions & 11 deletions Webapp/SDAF/Models/CustomValidators.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ public override bool IsValid(object value)
if (addresses.Contains(","))
{
bool returnValue = true;
foreach(string address in addresses.Split(','))
foreach (string address in addresses.Split(','))
{
if (!RegexValidation(address, pattern))
{
if(!RegexValidation(address, pattern))
{
returnValue = false;
}
returnValue = false;
}
}
return returnValue;

}
else
{

return RegexValidation(value, pattern);
}

}
}
public class IpAddressValidator : ValidationAttribute
Expand Down Expand Up @@ -133,20 +133,56 @@ public override bool IsValid(object value)
return RegexValidation(value, pattern);
}
}

public class PrivateEndpointIdValidator : ValidationAttribute
{
public override bool IsValid(object value)
{
if (value == null) return true;
string pattern = @"^\/subscriptions\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/resourceGroups\/[a-zA-Z0-9-_]+\/providers\/Microsoft.Network\/privateEndpoints\/[a-zA-Z0-9-_]+$";
return RegexValidation(value, pattern);
if (value.GetType().IsArray)
{
string[] values = (string[])value;
foreach (string v in values)
{
if (!RegexValidation(v, pattern)) return false;
}
return true;
}
else if (value.GetType() == typeof(string))
{
return RegexValidation(value, pattern);
}
else
{
return false;
}
}
}
public class StorageAccountIdValidator : ValidationAttribute
{

public override bool IsValid(object value)
{
if (value == null) return true;
string pattern = @"^\/subscriptions\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/resourceGroups\/[a-zA-Z0-9-_]+\/providers\/Microsoft.Storage\/storageAccounts\/[a-zA-Z0-9-_]+$";
return RegexValidation(value, pattern);
if (value.GetType().IsArray)
{
string[] values = (string[])value;
foreach (string v in values)
{
if (!RegexValidation(v, pattern)) return false;
}
return true;
}
else if (value.GetType() == typeof(string))
{
return RegexValidation(value, pattern);
}
else
{
return false;
}
}
}
public class GuidValidator : ValidationAttribute
Expand Down Expand Up @@ -224,7 +260,7 @@ public override bool IsValid(object value)
}
}
}

public class UserAssignedIdentityIdValidator : ValidationAttribute
{
public override bool IsValid(object value)
Expand Down Expand Up @@ -268,7 +304,7 @@ public override bool IsValid(object value)
return RegexValidation(value, pattern);
}
}


public class SubnetRequired : ValidationAttribute
{
Expand Down
2 changes: 2 additions & 0 deletions Webapp/SDAF/Models/LandscapeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ public bool IsValid()
[PrivateEndpointIdValidator]
public string install_private_endpoint_id { get; set; }

public bool? shared_access_key_enabled { get; set; } = false;

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

/*---------------------------------------------------------------------------8
| |
Expand Down
15 changes: 10 additions & 5 deletions Webapp/SDAF/Models/SystemModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,17 @@ public bool IsValid()

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

public bool? shared_access_key_enabled { get; set; } = false;

/*---------------------------------------------------------------------------8
| |
| Cluster information |
| |
+------------------------------------4--------------------------------------*/
public bool? shared_access_key_enabled_nfs { get; set; } = true;



/*---------------------------------------------------------------------------8
| |
| Cluster information |
| |
+------------------------------------4--------------------------------------*/

public string fencing_role_name { get; set; }

Expand Down
19 changes: 19 additions & 0 deletions Webapp/SDAF/ParameterDetails/LandscapeDetails.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,25 @@
"Options": [],
"Overrules": "",
"Display": 2
},
{
"Name": "shared_access_key_enabled",
"Required": false,
"Description": "Storage account authorization using Shared Access Key.",
"Type": "checkbox",
"Options": [],
"Overrules": "",
"Display": 2
},

{
"Name": "shared_access_key_enabled_nfs",
"Required": false,
"Description": "Storage account authorization using Shared Access Key (NFS shares).",
"Type": "checkbox",
"Options": [],
"Overrules": "",
"Display": 2
}
]
},
Expand Down
6 changes: 6 additions & 0 deletions Webapp/SDAF/ParameterDetails/LandscapeTemplate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,12 @@ $$witness_storage_account_arm_id$$
# storage_account_replication_type defines the replication type for Azure Files for NFS storage accounts
$$storage_account_replication_type$$

# shared_access_key_enabled defines Storage account authorization using Shared Access Key.
$$shared_access_key_enabled$$

# shared_access_key_enabled_nfs defines Storage account used for NFS shares authorization using Shared Access Key.
$$shared_access_key_enabled_nfs$$


#########################################################################################
# #
Expand Down
19 changes: 19 additions & 0 deletions Webapp/SDAF/ParameterDetails/SystemDetails.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,25 @@
"Options": [],
"Overrules": "",
"Display": 2
},
{
"Name": "shared_access_key_enabled",
"Required": false,
"Description": "Storage account authorization using Shared Access Key.",
"Type": "checkbox",
"Options": [],
"Overrules": "",
"Display": 2
},

{
"Name": "shared_access_key_enabled_nfs",
"Required": false,
"Description": "Storage account authorization using Shared Access Key (NFS shares).",
"Type": "checkbox",
"Options": [],
"Overrules": "",
"Display": 2
}

]
Expand Down
4 changes: 4 additions & 0 deletions Webapp/SDAF/ParameterDetails/SystemTemplate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -965,4 +965,8 @@ $$use_prefix$$
# use_zonal_markers defines if a zonal markers will be added to the virtual machine resource names
$$use_zonal_markers$$

# shared_access_key_enabled defines Storage account authorization using Shared Access Key.
$$shared_access_key_enabled$$

# shared_access_key_enabled_nfs defines Storage account used for NFS shares authorization using Shared Access Key.
$$shared_access_key_enabled_nfs$$
2 changes: 1 addition & 1 deletion Webapp/SDAF/SDAFWebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<PackageReference Include="Microsoft.VisualStudio.Services.InteractiveClient" Version="19.241.0-preview" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.4" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NuGet.Packaging" Version="6.11.0" />
<PackageReference Include="NuGet.Packaging" Version="6.11.1" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>
Expand Down
24 changes: 15 additions & 9 deletions Webapp/SDAF/wwwroot/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ $("#subscription").on("change", function () {
"witness_storage_account_arm_id",
"transport_storage_account_id",
"install_storage_account_id",
"azure_files_sapmnt_id"
"azure_files_sapmnt_id",
"hanashared_id"
],
controller: "/Armclient/GetStorageAccountOptions",
errorMessage: "Error retrieving storage accounts for specified subscription",
Expand All @@ -483,7 +484,8 @@ $("#subscription").on("change", function () {
{
ids: ["transport_private_endpoint_id",
"install_private_endpoint_id",
"sapmnt_private_endpoint_id"
"sapmnt_private_endpoint_id",
"hanashared_private_endpoint_id"
],
controller: "/Armclient/GetPrivateEndpointOptions",
errorMessage: "Error retrieving private endpoints for specified subscription",
Expand All @@ -503,7 +505,9 @@ $("#subscription").on("change", function () {
}
},
{
ids: ["proximityplacementgroup_arm_ids"],
ids: ["proximityplacementgroup_arm_ids",
"app_proximityplacementgroup_arm_ids"
],
controller: "/Armclient/GetPPGroupOptions",
errorMessage: "Error retrieving proximity placement groups for specified subscription",
input: {
Expand Down Expand Up @@ -552,11 +556,12 @@ $("#network_arm_id").on("change", function () {
controller: "/Armclient/GetSubnetOptions",
ids: [
"admin_subnet_arm_id",
"db_subnet_arm_id",
"anf_subnet_arm_id",
"app_subnet_arm_id",
"web_subnet_arm_id",
"db_subnet_arm_id",
"iscsi_subnet_arm_id",
"anf_subnet_arm_id"
"storage_subnet_arm_id",
"web_subnet_arm_id"
],
errorMessage: "Error retrieving subnets for specified vnet",
input: {
Expand All @@ -567,11 +572,12 @@ $("#network_arm_id").on("change", function () {
controller: "/Armclient/GetNsgOptions",
ids: [
"admin_subnet_nsg_arm_id",
"db_subnet_nsg_arm_id",
"anf_subnet_nsg_arm_id",
"app_subnet_nsg_arm_id",
"web_subnet_nsg_arm_id",
"db_subnet_nsg_arm_id",
"iscsi_subnet_nsg_arm_id",
"anf_subnet_nsg_arm_id"
"storage_subnet_nsg_arm_id",
"web_subnet_nsg_arm_id"
],
errorMessage: "Error retrieving network security groups for specified vnet's resource group",
input: {
Expand Down
4 changes: 3 additions & 1 deletion deploy/ansible/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ stdout_callback = yaml
bin_ansible_callbacks = True
host_key_checking = False
error_on_undefined_vars = True
log_path = /var/log/ansible.log
log_path = /var/tmp/ansible.log

allow_world_readable_tmpfiles = True

[connection]
# ServerAliveInternal - Coming from Achmea, keeps the connection alive and
Expand Down
12 changes: 6 additions & 6 deletions deploy/ansible/playbook_02_os_sap_specific_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,6 @@
vars:
tier: ha

- name: "SAP OS configuration playbook: - directory permissions"
ansible.builtin.include_role:
name: roles-sap-os/2.2-sapPermissions
tags:
- 2.2-sapPermissions

- name: "SAP OS configuration playbook: - Configurations according to SAP Notes"
ansible.builtin.include_role:
name: roles-sap-os/2.10-sap-notes
Expand All @@ -308,6 +302,12 @@
tags:
- 2.6-sap-mounts

- name: "SAP OS configuration playbook: - directory permissions"
ansible.builtin.include_role:
name: roles-sap-os/2.2-sapPermissions
tags:
- 2.2-sapPermissions

when:
- ansible_os_family != "Windows"

Expand Down
3 changes: 2 additions & 1 deletion deploy/ansible/playbook_04_00_00_db_install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@
become: true
when:
- node_tier == 'hana'
- database_scale_out
block:
- name: "Database Installation Playbook: - Setting the DB facts"
ansible.builtin.set_fact:
Expand All @@ -332,7 +333,7 @@
sapbits_location_base_path: "{{ hostvars.localhost.sapbits_location_base_path }}"
sapbits_sas_token: "{{ hostvars.localhost.sapbits_sas_token }}"
primary_instance_name: "{{ ansible_play_hosts_all[0] }}" # Setting up Primary Instance Name
secondary_instance_name: "{{ ansible_play_hosts_all[1] }}" # Setting up Secondary Instance Name
secondary_instance_name: "{{ ansible_play_hosts_all[1] | default('')}}" # Setting up Secondary Instance Name
# Only applicable for scale out with HSR
tags:
- always
Expand Down
8 changes: 6 additions & 2 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 @@ -71,8 +71,12 @@
_rsp_sid: "{{ db_sid | upper }}"
_rsp_number: "{{ db_instance_number }}"
_rsp_system_usage: "custom"
use_master_password: "{{ hana_use_master_password }}"
password_copy: "{%if hana_use_master_password == 'n' %}{{ main_password }}{% else %}{% endif %}"
pwd_hdb_system: "{{ hana_system_user_password | default(main_password) }}"
pwd_os_sidadm: "{{ hana_os_sidadm_password | default(main_password) }}"
pwd_os_sapadm: "{{ hana_os_sapadm_password | default(main_password) }}"

# use_master_password: "{{ hana_use_master_password }}"
# password_copy: "{{ main_password if hana_use_master_password == 'n' else '' }}"

- name: "SAP HANA: Progress"
ansible.builtin.debug:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ component_medium=
component_dirs=

# Use single master password for all users, created during installation ( Default: n )
use_master_password= {{ use_master_password }}
use_master_password=

# Directory root to search for components
component_root={{ _rsp_component_root }}
Expand Down Expand Up @@ -66,7 +66,7 @@ root_user=root
root_password=

# SAP Host Agent User (sapadm) Password
sapadm_password={{ password_copy }}
sapadm_password={{ pwd_os_sapadm }}

# Directory containing a storage configuration
storage_cfg=
Expand Down Expand Up @@ -123,7 +123,7 @@ certificates_hostmap=
master_password={{ main_password }}

# System Administrator Password
password={{ password_copy }}
password={{ pwd_os_sidadm }}

# System Administrator Home Directory ( Default: /usr/sap/${sid}/home )
home=/usr/sap/${sid}/home
Expand All @@ -138,7 +138,7 @@ userid={{ hdbadm_uid }}
groupid={{ sapsys_gid }}

# Database User (SYSTEM) Password
system_user_password={{ password_copy }}
system_user_password={{ pwd_hdb_system }}

# Restart system after machine reboot? ( Default: n )
autostart=n
Expand Down
Loading