Library with common functions for Microsoft SDAF deployment automation that help with preparation of tfvars file.
prepare_tfvars_file(deployment_type=>$deployment_type);
Downloads tfvars template files from openQA data dir and places them into correct place within SDAF repo structure. Returns full path of the tfvars file.
$deployment_type: Type of the deployment (workload_zone, sap_system, library... etc)
components: ARRAYREF of components that should be installed. Check function validate_components for available options.
os_image: It support both Azure catalog image name (':' separated string) or image uri (as provided by PC get_image_id() and PUBLIC_CLOUD_IMAGE_LOCATION). it is only used and mandatory when deployment_type is sap_system.
replace_tfvars_variables('/path/to/file.tfvars');
Replaces placeholder pattern %OPENQA_VARIABLE% with corresponding OpenQA variable value. If OpenQA variable is not set, placeholder is replaced with empty value.
$tfvars_file: Full path to the tfvars file
set_workload_vnet_name([job_id=>'123456']);
Returns VNET name used for workload zone and sap systems resources. VNET name must be unique for each landscape, therefore it contains test ID as an identifier.
$job_id: Specify job id to be used. Default: current deployment job ID
set_image_parameters(image_id => 'aaa:bbb:ccc:ddd');
Sets OpenQA parameters required for replacing tfvars template variables for database VM image.
os_image: It support both Azure catalog image name (':' separated string) or image uri (as provided by PC get_image_id() and PUBLIC_CLOUD_IMAGE_LOCATION). it is only used and mandatory when deployment_type is sap_system.
set_hana_db_parameters(components=>['db_install', 'db_ha']);
Sets tfvars Database HA parameters according to scenario defined by $args{components}.
components: ARRAYREF of components that should be installed. Check function validate_components for available options.
set_netweaver_parameters(components=>['db_install', 'db_ha']);
Sets tfvars parameters related to SAP Netweaver according to scenario defined by $args{components}.
components: ARRAYREF of components that should be installed. Check function validate_components for available options.
validate_components(components=>['db_install', 'db_ha']);
Checks if components list is valid and supported by code. Croaks if not. Currently supported components are:
components: ARRAYREF of components that should be installed. Supported values: db_install : Basic DB installation db_ha : Database HA setup nw_pas : Installs primary application server (PAS) nw_aas : Installs additional application server (AAS) nw_ensa : Installs enqueue replication server (ERS)