Environment provisioning templates
Required Roles | While no role is required for a user to work with provisioning templates, a user must play the role of Manager on any infrastructure item to which the template is associated to launch the provisioning engine. |
Required Rights (by category) |
Provisioning Instances Provisioning Templates |
Perspective | Configuration Management |
Access | DROPS Server → Templates → Provisioning Templates |
Build a provisioning template to prepare infrastructure items to receive an application’s installation or update if they are not already set up to do so. These templates allow you to create scripts to provision empty infrastructure items on-the-fly with all the elements required for the artifacts that will later be deployed to it. Provisioning an environment requires DROPS to install a middleware layer (servers, services, etc.).
Provisioning templates can be associated with existing or new infrastructure items. Once associated with an item, the provisioning process can be launched manually or will be automatically launched when an application is deployed to the item. When the deployment activity associated with the item is executed, the provisioning process will be started if the item is associated with a provisioning template and it is not marked as "already provisioned".
If the provisioning execution is launched during a deployment and fails, the entire deployment process execution will fail.
The Provisioning Templates search view is accessed from the Templates node in the Configuration Explorer.
Follow the subsequent steps to create a provisioning template.
Step 1 Click the create icon in the Provisioning Templates search view or right-click anywhere in the view and select Create a new provisioning template to access the Create a new provisioning template wizard. Enter a Code and Name for the new template, then select the Provisioning Type of template to create.
The template type cannot be changed once the template is created.
Click Finish.
Step 2 Open the provisioning template editor to define the rest of the properties. Either right-click on it then select Edit, select it then click the edit icon or double-click on it.
Refer to Editing provisioning templates
Result The provisioning templates are ready to be used when executing the deployment process.
A provisioning template's identification and connection details can be edited as well as the ANT project content of a template's script, if it has one. Command line-type provisioning templates do not require ANT project scripts.
To edit provisioning template identification details, either right-click on it then select Edit, select the item then click the edit icon or double-click it. The Provisioning Template editor is opened where all of the entity's details are managed.
For more information about extended properties, which are not described in this chapter, refer to:
- Code
-
A unique string that identifies the template. This label is used throughout DROPS to select the entity.
- Name
- A string used to give additional information about the template. This label is used throughout DROPS to select the entity.
- Provisioning Type
- The template type is selected when creating the template and cannot be changed.
- Attachments to publish
-
Click the add button to add an external file as an attachment to this template.
TipUse Substitution variables in the path name.
- Force provisioning
- If both a provisioning template and an instantiation template are referenced in an infrastructure item, ticking this option will force the provisioning process even if there are errors in the instantiation process.
- Working directory
- Enter a working directory to use as a variable.
- Provision Agent
-
Infrastructure items can call remote agents to manage installation procedures. If this box is checked, the remote agent defined in the Installation Properties defined in the associated infrastructure item will be called.
NoteThe agent provisioning process is the same as the one executed by the installer module.
- Failed if Provisioning Agent failed
- Tick this box to mark the provisioning process as failed if the remote agent defined in the item's Installation Properties fails.
- User/Password
- Both of these values can be used as variables in properties.
- SSH Key
-
A reference to an SSH key defined using the SSH Key Module, if needed.
The absolute path to the public key (the id_rsa.pub file) related to the selected key can be used as a variable -${this.sshkeypath}
.Reference
Field | Description |
---|---|
Target | The name of the target to execute. This target has to exist in the script file that represents the ANT Project. |
ANT Base directory | The base directory passed to the ANT Executor. |
Additional ANT libraries | Enter a semi-colon separated list and the JAR files that declare specific ANT Tasks. |
Set up the ANT libraries | Tick this box to set up the libraries. |
Field | Description |
---|---|
Executable path | The path to the external command to execute. |
Working directory | The working directory from where the execution will be done. |
Command template | The parameters that will be passed to the executable. These values can be used as variables - ${this.workingdir} |
Field | Description |
---|---|
Working directory | The path to the working directory from where the execution will be done. |
Additional parameters | Enter any additional parameters to use to execute the playbook tasks. |
Field | Description |
---|---|
Subscription ID. | Enter the Azure Subscription ID to access the Azure cloud platform. |
Tenant ID. | Enter the Azure Tenant ID associated with the Azure Subscription. |
Resource Group | Select the Resource Group you wish to use. |
Use an URL | Tick to use URLs for the management of templates files. |
Template URL | Provide the URL to the ARM template file. |
Parameter URL | Provide the URL to the ARM template's parameter file. Leave blank is the parameters are defined in the ARM template file. For more information, refer to the Azure ARM templates practices. |
Save the changes (, Ctrl+S
or File > Save).
Select a template from the list and click the edit content icon or right-click on it and select Edit Content.
The Script content editor is opened where you can write or edit the content of the template's script. Editing the content of a script can be done directly in DROPS. Eclipse's Ant Editor offers shortcuts (Ctrl+space
) to provide easy access to all of the Ant project templates, tasks, parameters and variables available.
When creating or modifying scripts, the content must be a valid Ant project.
There are no templates for provisioning template scripts. You are responsible for the content of your provisioning scripts.
You can use variables to define provisioning templates that will be replaced by the actual value when the process is launched. A variable can be declared using the following syntax: ${<variable.name}
All of the infrastructure item's properties can be used as variables as well as 2 others, specific to this process:
- the main attributes -
${infra.<attribute.name>}
- the properties -
${infra.props.< property.name>}
- the extended properties -
${infra.config.<extended.property.name>}
- the installation properties -
${infra.install.<install.property.name>}
- the user/password -
${this.user}
and${this.password}
. - the absolute path of the related script -
${provisioning.script}
- the value of the Working Directory defined in the provisioning template -
${provisioning.root}
Save the changes (, Ctrl+S
or File > Save).
To associate a provisioning template with an infrastructure item so that it is automatically launched when the item is used in a deployment process, open the item's editor and select the template in the Provisioning Template field.
For more information about editing infrastructure items, refer to Editing infrastructure items.
Deleted provisioning templates cannot be accessed or recovered and cannot be used during the deployment process. If a template is deleted, it will be removed from any infrastructure item that referred to it.
To delete a provisioning template, either right-click on it in the Provisioning Templates search view and select Delete, or select it and click the delete icon. Click OK to confirm or click Cancel to keep the template.