How to use templates in RapidDeploy

In RapidDeploy templates are re-usable definitions or units of automation for a specific task. This could be a template for some infrastructure, an environment definition, some configuration, an application definition, etc.

1. Orchestration Template

The most common type of template in RapidDeploy is a “Project Orchestration”. This is a template of tasks that can be created and modified to run on many target servers or environments. Right is an example Orchestration (or Template) to install IIS on a target windows machine.

Click on the image to enlarge.

2. Technology Templates

Technology templates are often created and distributed as part of a Plugin. So if you install the JBoss plugin, you will see the JBoss templates.

In the image to the right we look at some examples that can be selected when a project is created. The example WebSphere Template actually scrolls well beyond the screenshot shown - you can configured dozens of items to, in this example, create a WebSphere Cluster. The templates ultimately are written to the file system as files - which themselves can be edited and written to one of the supported Source Control Systems. 

Click on the image to enlarge.

3. Variable/Properties for Templates

In RapidDeploy almost all Variables and Properties used by Templates are stored as Data Dictionary items. When we create a Template it will have some required values. such as: 

ServerName = @@SERVER_NAME@@ 

ServerPort = @@SERVER_PORT@@ 

ServerName and ServerPort are used within the template to perform an action - and the @@SERVER_NAME@@ and @@SERVER_PORT@@ values are injected at deployment time to instantiate the template for a given environment.  

So target / environment needs a set of Data Dictionary values such as shown to be instantiated / provide the required value for the template. 

Click on the image to enlarge.

3. Versioning Templates and Properties

Everything in RapidDeploy is essentially versioned in the same way. A deployment archive is created - which contains the templates, configuration, orchestration, data dictionaries, etc. 

Everything we configure as part of the automation exists within the deployment archive - the left and right arrows under the actions column allow you to display and compare what has changed between the versions (including the Templates and Properties).

Click on the image to enlarge.