Operations
buildARMTemplate
Anchor
Target Properties
Inputs
...
This flow will also create a manifest.json file. It will contain the main template & parameter file mapping in json format(required during deployment). e.g.
[{
"templateFile": "VMTemplate/vmCreationTemplate.json",
"paramFile": " VMTemplate/parameter.json"
}
or
{
"templateFile": "VMTemplate/vmCreationTemplate.json",
"paramFile": " NA"
}]
In case one may want to deploy multiple templates together, same can be achieved as well. All values should be passed as comma separated.
...
Template file Path
...
Path1,Path2,Path3
...
Template File Name
...
Template1.json,Template2.json,Template3.json
...
Parameter File Name
...
ParamFile1.json,NA,*storage.json
[
{
"templateFile":"Path1/Template1.json",
"paramFile":"Path1/ParamFile1.json"
},
{
"templateFile":"Path2/Template2.json",
"paramFile":"NA"
},
{
"templateFile":"Path3/Template3.json",
"paramFile":"Path3/Param_storage.json"
}
]
n.b. user should be careful while providing the data. Any missing value/incorrect sequence of file may lead to unexpected result/error.
...
Inputs
...
Code
...
Required
...
Description
...
Notes
...
Dynamic Parameter argument
...
FDAZ_INP_PARAM_ARGS
...
N
...
values which will be passed as parameters
Properties
...
Code
...
Required
...
Description
...
Notes
...
Azure Cloud Account
...
FDAZ_ACCOUNT_CODE
...
Y
...
Azure cloud account which will be used the deployment
Resource Group
...
FDAZ_RESOURCE_GROUP
...
N
...
Resource Group name for deployment(only for Group scope)
...
Deployment scope
...
FDAZ_DEPLOYMENT_SCOPE
...
N
...
Default value-Group
...
Iist ( Subscription/Group/Management Group/Tenant)
...
Location
...
FDAZ_DEPLOYMENT_LOCATION
...
N
...
Target location of deployment
...
Deployment Mode
...
FDAZ_DEPLOYMENT_MODE
...
N
...
Mode of deployment
...
Iist ( Complete/Incremental)
...
Missing parameter validation
...
FDAZ_ARM_PARAM_CHECK
...
N
...
Validation on Parameter file dynamic content
List (Fail/Remove)
As part of artifact relevant template & parameter files will exist.
The manifest file should also provide details on template & parameter file
This operation will read the template details from manifest.json and execute.
All the parameter arguments which are env-specific should be configured as Project/environment variables and should be configured in topology with proper values.
Parameter values can also be passed as input argument.
The input Parameter values can be passed as below highlighted format.
az group deployment create -g MyResourceGroup --template-file azuredeploy.json \
--parameters "{ \"location\": { \"value\": \"westus\" } }"
az group deployment create -g MyResourceGroup --template-file azuredeploy.json \
--parameters @params.json --parameters https://mysite/params.json --parameters DBMasterUserPassword=${DBMasterUserPassword}
...
In case both parameter file is passed and dynamic parameter values is provided both of them will be considered. The flow will use both input parameters & parameter file content(with input param takin precedence).
...
This will also replace all env specific values in parameter file(s).
...
Options Fail: All actual values corresponding to the arguments present in the parameter file must be provided. In case of any value not provided by user/env variables, the flow shall fail.
Option Remove(default): The plugin should remove the parameters for which values are not provided. The template would try to execute with the default values. But the execution would proceed. In case mandatory field missing deployment shall fail.
Output
...
Name
...
Code
...
Description
...
Notes
...
Execution Status
...
FDAZ_OUT_ARM_EXEC_STATUS
...
Will capture the status of ARM template execution.
...
Execution Output Message
...
FDAZ_OUT_ARM_EXEC_OUTPUT
...
Will capture the response of ARM template execution.
...
Execution Deployment Message
...
FDAZ_OUT_ARM_EXEC_DEPLOYMENT_OUTPUT
...
Will retrieve details from Azure based on deployment Id
Execution steps
Description
API/Cli Call(s)
Documentation
Pre-requisite:
Az cli should be pre-installed on execution host.
All the parameter arguments which are env-specific should be configured as Project environment variables and should be configured in topology with proper values.
Execution steps:
Replace the parameter values with the env variables inside parameter file before execution.
If Fail for any missing parameter value is checked -for any missing value throw error.
If Fail for any missing parameter value is unchecked checked -for any missing value remove the parameter from parameter file before execution.
Login with Azure service principal
Set the right Subscription. Since one account can be associated with multiple subscription.
Execute each ARM template and capture status(FDCX_OUT_ARM_EXEC_OUTPUT)
Capture the status of command execution(FDCX_OUT_ARM_EXEC_STATUS)
Capture the deployment details from Azure based on Deployment Id (FDCX_OUT_ARM_EXEC_DEPLOYMENT_OUTPUT)
Logout from azure
az login --service-principal -u ${client_id} -p ${client_secret} --tenant ${tenant_id}
az account set --subscription ${subscription_id}
az deployment group create --name ${Deployment_Id} --resource-group ${Azure_ResourceGrp} --no-prompt --template-file template.json --parameters '@parameter.json' --only-show-errors --mode ${ Deployment _Mode} --rollback-on-error
echo $?
az deployment group show --name ${Deployment_Id} --resource-group ${Azure_ResourceGrp} -o json
az logoutName | Code | Required | Description | Notes |
Template file Path | FDAZ_INP_ARM_TEMPLATE_PATH | Y | Template/Parameter file path |
|
Template File Name | FDAZ_INP_ARM_TEMPLATE_NAME | N | Name of template file |
|
Parameter File Name | FDAZ_INP_ARM_PARAM_FILE_NAME | N | Name of parameter file |
...
Template/parameter files can directly reside under Git repo or can be present under any subfolder. There could be one/multiple Template/parameter files present in same Git repo.
...
However related template json & parameter json must be under same folder.
...
Parameter files can contain dynamic placeholder(e.g. ${{Change_Runtime_Prop}}). They can be replaced during execution through project/environment properties.
...
In case of nested template file, all files should be kept under same folder(or sub folder), but the main template file name should be provided as input.
...
In case of multiple template files in the directory, provide the exact template file name. In case wild card value the result should return one template file only.
...
In case of multiple parameter file in the directory, provide the exact parameter file name In case wild card value the result should return one parameter file only.
...
In case single template/parameter file inside directory no file name info is needed. Plugin will filter the files automatically.
...
Template file should have the word “Template” in its naming convention. Naming convention required for auto-populate template file details(just above use-case). The naming convention is also required for some internal purpose.
...
Parameter file should have the word “Parameter” in its naming convention with same purpose as mentioned above.
...
Wild card file names can also be provided , e.g. VM_Param* or *storage*.json . However this must return individual file only.
...
In case multiple template/parameter file inside directory and no information provided, flow shall fail.
...
It will keep other template files in the artifact folder as well, in case there is nested template.
...
All relevant template/parameter file will be moved to Artifact folder.
...
|
Artifacts
This operation produces artifacts.
Endpoint Selection
This operation will select all available endpoints associated to the target.
Endpoint Execution
This operation will execute on any one of the selected endpoints and will be random in the determination of which one.