Instantiation templates
Required Roles | While no role is required for a user to work with instantiation templates, a user must play the role of Manager on any infrastructure item to which the template is associated to launch the instantiation engine. |
Required Rights (by category) |
Instantiation Instances Instantiation Templates |
Perspective | Configuration Management |
Access | DROPS Server → Templates → Instantiation Templates |
Build an instantiation template and use it to create new VMs for infrastructure items automatically. This creates the item and recovers the ID after it's created. Instantiating an environment requires DROPS to declare a VM.
Once associated with an item, the instantiation 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 instantiation process will be started if the item is associated with a instantiation template and it is not marked as "already instantiated".
If an infrastructure item is linked to both an instantiation and a provisioning template, the instantiation process will be run before the provisioning process in order to create the item first, then provision it.
If the instantiation execution is launched during a deployment and fails, the entire deployment process execution will fail.
The Instantiation Templates search view is accessed from the Templates node in the Configuration Explorer.
Follow the subsequent steps to create an instantiation template.
Step 1 Click the create icon in the Instantiation Templates search view or right-click anywhere in the view and select Create a new instantiation template to access the Create a new instantiation 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 instantiation 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 instantiation templates
Result The instantiation templates are ready to be paired with provisioning templates.
To edit instantiation template identification details, either right-click on it then select Edit, select the item then click the edit icon or double-click it. The Instantiation 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 Execution
-
Select this option to systematically re-provision an infrastructure item when deploying even if it has already been provisioned.
If both a provisioning template and an instantiation template are referenced in an infrastructure item, selecting 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.
- User/Password
-
Both of these values can be used as variables.
- 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 instantiation template scripts. You are responsible for the content of your instantiation 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 an instantiation 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 Instantiation Template field.
For more information about editing infrastructure items, refer to Editing infrastructure items.
Deleted instantiation 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 an instantiation template, either right-click on it in the Instantiation 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.