Applies To:

Show Versions Show Versions

Manual Chapter: Template Management
Manual Chapter
Table of Contents   |   << Previous Chapter

About templates

A template is as a model of a configuration on which you base a new configuration for another target device. Template variables are unique values, or settings, that are specific to a managed device such as virtual server names, node addresses, port information, and so forth. Some network objects (for example, nodes or pools) automatically generate variable information when you add them to a template. Other network objects (such as system settings) require that you manually add variable information, like the variable name and default value.

System-provided templates

The system ships with several templates that you can use for common configuration tasks.

System-provided template Use to
ltm_create_simple_http_vip_and_pool Create a basic HTTP virtual server and pool.
ltm_pool_member_disable Disable a local traffic pool member (allows established sessions).
ltm_pool_member_enable Enable a local traffic pool member.
ltm_pool_member_down Set a local traffic pool member's status to down (allowing no new connections).
ltm_node_enable Enable a local traffic server address (all pools).
ltm_node_disable Disable a local traffic server address (for all pools, only allowing established connections).
ltm_node_down Set a local traffic server address to down (for all pools, allowing no new connections).

About managing templates

There are three different options for creating a new template: using an existing device as a model, using an existing template as a model, or creating the template by adding pre-set object class paths to populate the template text field. You can also import (as well as export) templates on DevCentral™.

After you create a template, you can review and modify the template variable text as required. When you want to make the template available for others to use, you can publish it.

Creating a template based on an existing device's configuration

Before you use templates, be sure that you understand how to honor the network object's dependencies on the target system.
You can use an existing device configuration as a model for a new template.
  1. On the Main tab, click Enterprise Management > Tasks > Task List > New Task.
  2. For the Configurations setting, select Create Template, and click the Next button.
  3. In the Name and Description fields, type a name and description for this template.
  4. From the Source list, select Device.
  5. From the Device and Partitions lists, select the device and partition from which you want to copy available network object elements.
  6. Click the Next button. The Object Type Selection screen opens.
  7. For the Object Type List setting, click the name of an object in the Available list and click the Move (<<) button to move it to the Selected list. Repeat this step to add additional objects.
  8. Click the button. The Template Variable Properties screen opens.
  9. To specify the default value for a variable, in the Default Value field, type a value.
  10. If you want users to be able to edit the variable, select the Editable check box.
  11. If you want users to be able to see the variable, but not edit it, select only the Visible check box.
  12. Click the Finished button. The template you created displays in the template list.
  13. Click the Next button. The Template Summary screen opens.
  14. From the Dependency Handling list, select an option.
    Option Description
    Include resource objects When you select this option, the system automatically includes dependent objects for the selected object classes.
    Skip resource objects When you select this option, you must manually type the dependent objects for the selected object classes on the target device, when you deploy the changeset based on this template.
  15. To view object details, click the name of a User Selected Object. Details about the selected object display below the list in several fields, some of which you can edit.
  16. To view any associated resource object details, click the name of a Resource Object. Details about the selected object display below the list in several fields, some of which you can edit.
  17. When you are finished viewing or modifying objects, click Next. The Template Properties screen opens where you can review and modify template properties.
  18. If you want the system to verify the staged changeset based on this template prior to deployment, select the check box next to Require verification of staged changesets. The system uses the bigpipe verify command to verify configuration changes prior to deployment.
  19. If you want to retain the changeset based on this template for future deployment, select the check box next to Allow staged changesets to persist. This changeset remains in the staged changeset list until you delete it.
  20. To add an additional object type, select a type from the Select Object Type list and click the Add Type button.
  21. To search for an object type and replace it with another, type the current and replacement object in the Search for and Replace with fields, and click the Search and Replace button.
  22. When you are finished reviewing and modifying the template, click Next. The Template Variable Properties screen opens.
  23. To specify the default value for a variable, in the Default Value field for a variable, type a value.
  24. To specify a description for the variable, in the Description field for a variable, type a description. This description appears when you stage a changeset based on this template, and provides an essential description of the variable for the user who stages the changeset.
  25. To allow others to modify values for this variable, select the Editable check box.
  26. To allow others to view this variable, select the Visible check box.
  27. To modify the allowed values for this variable, click the Edit Allowed Values button. The Allowed Values screen opens where you can modify allowed values.
  28. Click the Finished button when you are done making changes. The Template List screen opens, displaying the new template you created.

Creating a template from an existing template

Before you use templates, be sure that you understand how to honor the network object's dependencies on the target system.
You can use an existing template as a model for a new template.
  1. On the Main tab, click Enterprise Management > Tasks > Task List > New Task.
  2. For the Configurations setting, select Create Template, and click the Next button.
  3. In the Name and Description fields, type a name and description for this template.
  4. From the Source list, select Existing Template. The screen refreshes, displaying existing templates.
  5. Select the existing template on which you want to base this new template, and click the Next button. The Template Properties screen opens.
  6. If you want the system to verify the staged changeset based on this template prior to deployment, select the check box next to Require verification of staged changesets. The system uses the bigpipe verify command to verify configuration changes prior to deployment.
  7. If you want to retain the changeset based on this template for future deployment, select the check box next to Allow staged changesets to persist. This changeset remains in the staged changeset list until you delete it.
  8. To add an additional object type, select a type from the Select Object Type list and click the Add Type button.
  9. To search for an object type and replace it with another, type the current and replacement object in the Search for and Replace with fields, and click the Search and Replace button.
  10. When you are finished reviewing and modifying the template, click Next. The Template Variable Properties screen opens.
  11. To specify the default value for a variable, in the Default Value field for a variable, type a value.
  12. To specify a description for the variable, in the Description field for a variable, type a description. This description appears when you stage a changeset based on this template, and provides an essential description of the variable for the user who stages the changeset.
  13. To allow others to modify values for this variable, select the Editable check box.
  14. To allow others to view this variable, select the Visible check box.
  15. To modify the allowed values for this variable, click the Edit Allowed Values button. The Allowed Values screen opens where you can modify allowed values.
  16. Click the Finished button when you are done making changes. The Template List screen opens, displaying the new template you created.

Creating a template using text

Before you use templates, be sure that you understand how to honor the network object's dependencies on the target system.
You have the option to create a template by adding pre-set object class path text directly into the text field.
  1. On the Main tab, click Enterprise Management > Tasks > Task List > New Task.
  2. For the Configurations setting, select Create Template, and click the Next button.
  3. In the Name and Description fields, type a name and description for this template.
  4. From the Source list, select Text and click Next. The Template Properties screen opens.
  5. If you want the system to verify the staged changeset based on this template prior to deployment, select the check box next to Require verification of staged changesets. The system uses the bigpipe verify command to verify configuration changes prior to deployment.
  6. If you want to retain the changeset based on this template for future deployment, select the check box next to Allow staged changesets to persist. This changeset remains in the staged changeset list until you delete it.
  7. To add an additional object type, select a type from the Select Object Type list and click the Add Type button.
  8. To search for an object type and replace it with another, type the current and replacement object in the Search for and Replace with fields, and click the Search and Replace button.
  9. When you are finished reviewing and modifying the template, click Next. The Template Variable Properties screen opens.
  10. To specify the default value for a variable, in the Default Value field for a variable, type a value.
  11. To specify a description for the variable, in the Description field for a variable, type a description. This description appears when you stage a changeset based on this template, and provides an essential description of the variable for the user who stages the changeset.
  12. To allow others to modify values for this variable, select the Editable check box.
  13. To allow others to view this variable, select the Visible check box.
  14. To modify the allowed values for this variable, click the Edit Allowed Values button. The Allowed Values screen opens where you can modify allowed values.
  15. Click the Finished button when you are done making changes. The Template List screen opens, displaying the new template you created.

Importing a template from DevCentral

To access the DevCentral™ site, you must have a user name and password.
In addition to using templates from one of your devices, you can also use shared templates from the F5 developer community, DevCentral.
Note: DevCentral is an online community featuring tools, technology, and collaboration for F5 products. After registering for free, you can access resources such as discussion forums, documentation wikis, sample applications, and templates.
  1. Log on to the DevCentral site, http://devcentral.f5.com.
  2. Navigate to the Advanced Design & Config wiki.
  3. Locate the Enterprise Manager Application Deployment Templates section.
  4. Click the name of the template you want to view.
  5. Place the cursor in the right corner of the template text and select the view source icon. A pop-up screen opens displaying the formatted template text.
  6. Select and copy all of the template text, and navigate back to the Enterprise Manager™ system.
  7. On the Main tab, click Enterprise Management > Tasks > Task List > New Task.
  8. For the Configurations setting, select Create Template, and click the Next button.
  9. In the Name and Description fields, type a name and description for this template.
  10. From the Source list, select Text and click Next. The Template Properties screen opens.
  11. If you want the system to verify the staged changeset based on this template prior to deployment, select the check box next to Require verification of staged changesets. The system uses the bigpipe verify command to verify configuration changes prior to deployment.
  12. If you want to retain the changeset based on this template for future deployment, select the check box next to Allow staged changesets to persist. This changeset remains in the staged changeset list until you delete it.
  13. In the Text setting text box, paste the template text that you copied from the DevCentral site.
  14. Review and modify the template text as required.
  15. When you are finished reviewing and modifying the template, click Next. The Template Variable Properties screen opens.
  16. To allow others to modify values for this variable, select the Editable check box.
  17. To allow others to view this variable, select the Visible check box.
  18. Click the Finished button when you are done making changes. The Template List screen opens, displaying the new template you created.

Exporting an ASM security policy

You must import a security policy from a managed BIG-IP® Application Security Manager™ device to Enterprise Manager™, before you can export it.
You can export a security policy from one web application to use it as a baseline for a new web application. You can also export a security policy to archive it on a remote system before upgrading the system software, or to create a backup copy.
Note: This procedure is only for BIG-IP Application Security Manger devices running version 11.3.0 or later.
  1. On the Main tab, click Security > Application Security > Policies.
  2. Click the select button next to the security policy that you want to export, and click the Export button. A dialog box opens.
  3. Click the Save button.
  4. Browse to the location that you want to export the security policy to, and click the Save button.
The security policy is now available to import to another managed device.

Reviewing template variable text

When you create a template using the Template Wizard, you are prompted for information, and the system automatically generates the appropriate syntax. After you have created a template, you can review the template variable syntax and add additional variables, as required.
  1. On the Main tab, click Enterprise Management > Configurations > Template List.
  2. Click the name of the template that you want to view. The Properties screen for that template opens.
  3. View and modify the template as required.

About template variable syntax

When you create a template using the Template Wizard, you are prompted for information and the system automatically generates the appropriate syntax. After you have created a template, you can review the template variable syntax and add additional variables, as required.

The template variable syntax is @define <variable_name> where <variable_name> is the name of the variable in the network object. For example, the following entry in the Text field of the Template Variable Properties screen disables a node.

@define @node_ip @F5[Local Traffic / Node] #F5[$target_partition$] node @node_ip { session disable }
Note: Although the leading at (@) symbol is not required for variables names, the system uses it to distinguish a variable from static configuration information. This symbol can also help you easily identify variables when you read the configuration text.

The variables in this example template are defined as follows:

Variable Description
@define Flags the line as a variable and prompts the system to replace the variable for @node_ip that you specified for the template.
@F5[Local Traffic / Node] Indicates the target object class and instance.
@f5[$target_partition$] Indicates the partition on the target.
node @node_ip { Starts the command that disables the node indicated by the variable @node_ip.
Template variable descriptions

Template variables are defined here.

Template Variable Description
Variable Name Typically assigned by the system, this name appears in the template configuration text and staged changeset if you do not specify a variable description.
Default Value The system uses the default value for a variable when you deploy a changeset based on the template you create.
Description A variable description is an important tool for properly identifying an existing template.
Editable Used by the Administrator-level user to specify whether users can change a variable when they use this template to stage a changeset.
Visible Used by the Administrator-level user to hide the variable setting from restricted users when they use the template to stage a changeset.
sEdit Allowed Value Used by the Administrator-level user to specify which values a user can select from when staging a changeset with this template.

Publishing a template

Before you publish a template, you must first create it.
When you create a custom template, it is available only for you to deploy and use. To make the template available for others, you must publish it. This adds an additional layer of control to device configuration management.
  1. On the Main tab, click Enterprise Management > Configurations > Template List.
  2. Click the name of the template you want to publish. The general Properties screen for that template opens.
  3. Select the Published check box.
This template is now available for others to use as a source.
Table of Contents   |   << Previous Chapter

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)