ADC

Entity template for load balancing virtual server

Warning

The entity template functionality is deprecated from Citrix ADC 13.0 build 82.x onwards and as an alternative Citrix recommends you to use the Style Books. For more information, seeStyle Bookstopic.

An entity template is a collection of information for creating a load balancing virtual server template on a Citrix ADC appliance. It provides a specification and a set of defaults to be configured for a load balancing virtual server. By using a template that defines a set of defaults, you can quickly configure multiple virtual servers that require a similar configuration while eliminating several configuration steps.

You can create an entity template by exporting the load balancing virtual server details to a template file. This can done only through the Citrix ADC GUI. You use the Citrix ADC GUI to export, import, and manage entity templates. You can share entity templates with other administrators and manage templates saved locally on your appliance or machine. You can also import entity templates from the appliance or your local computer.

Before creating a template, you should be familiar with the configuration of the load balancing virtual server.

Load balancing virtual server template

Load balancing entity templates are created in the same way that Citrix ADC application templates are created. When you export a load balancing virtual server to a template file, the following two files are automatically created:

  • Load balancing virtual server template file. Contains XML elements that store the values of the parameters that are configured for the load balancing virtual server. The file also contains XML elements for storing information about bound policies.
  • Deployment file. Contains XML elements that store deployment-specific information such as services, service groups, and configured variables. In the template and deployment files, each unit of configuration information is encapsulated in a specific XML element that is meant for that unit type. For example, the load balancing method parameter, lbMethod, is encapsulated within theandtags.

Note:

After you export a load balancing virtual server, you can add elements, remove elements, and modify existing elements before importing the configuration information to a Citrix ADC appliance.

How a load balancing virtual server template works

When you create a template for a load balancing virtual server, you specify default values for the server. You specify what values must be read-only, what values must not be displayed, and what values users can configure. You also configure the pages that compose the template import wizard. All the information and settings you provide are stored in the template file. When a user imports the template to a Citrix ADC appliance, the GUI guides the user through the various pages that you configured for the template. The GUI displays the read-only parameter values and prompts the user to specify values for the configurable parameters. After the user follows the instructions, the appliance creates the entity with the configured values. You can create or modify an entity template for a load balancing virtual server from the Traffic Management node. To export virtual server details to a template, you must specify the following options and settings for the template:

  • The default value of a parameter.
  • Whether the default values are visible to users.
  • Whether the default values can be changed by users.
  • The number of pages in the entity import wizard, including the page names, text, and available parameters.
  • The entities that must be bound to the entity for which the template is being created.

例如,当你创建一个负载balancing virtual server template, you can specify the policies that you want to bind to the virtual server that you create from the template. However, only binding information is included in the template. The bound entities are not included. If the entity template is imported to another Citrix ADC appliance, the bound entities must exist on the appliance at import time for the binding to succeed. If none of the bound entities exist on the target appliance, the entity (for which the template was configured) is created without any bindings. If only a subset of the bound entities exist on the target appliance, they are bound to the entity that is created from the template. When you export a template for the load balancing virtual server, the configuration settings of the entity appear in the template. All bound entities are selected by default, but you can modify bindings as necessary. As in the case of a template that is not based on an existing entity, only binding information is included and not the entities. You can either save the template with the existing configuration settings or use the settings as a basis for creating a new configuration for a template.

Configure variables in load balancing virtual server template

Load balancing virtual server templates support the declaration of variables in the configured load balancing parameters and in bound policies and actions. The ability to declare variables enables you to replace preconfigured values with values that suit the environment into which you are importing the template.

As an example, consider the following expression configured for a policy that is bound to a load balancing virtual server for which you are creating a template. The expression evaluates the value of the accept-language header in an HTTP request.HTTP.REQ.HEADER("Accept-Language").CONTAINS("en-us")

If you want the value of the header to be configurable at import time, you can specify the string en-us as a variable.

After you create a variable, you can do the following:

  • Assign more strings to an existing variable. After you create a variable for a string, you can select and assign other parts of the same or different expression to the variable. The strings you assign to a variable need not be the same. At import time, all the strings that are assigned to the variable are replaced with the value that you provide.
  • View the string or strings that are assigned to the variable.
  • View a list of all the entities and parameters that use the variable

To configure variables in a load balancing virtual server template

Complete the following procedure to configure variables for a load balancing virtual server template by using the Citrix ADC GUI

  1. Navigate toTraffic Management>Load Balancing>Virtual Servers
  2. In the details pane, right-click the virtual server that you want to export to a template file, and then clickAdd.
  3. In theCreate Load balancing Virtual Serverpage, set the virtual server parameters. For more information on configuring a load balancing virtual server, seeHow load balancing works
  4. Once you have the set the parameters for the load balancing virtual server, clickDone.

    出口作为负载均衡虚拟服务器模板

  5. ClickExport as Templatelink at the top to export the server details as a template file.
  6. In theCreate Load Balancing Templatepage, enter the template settings.
  7. ClickDone.

    Confirmation screen

Modify a load balancing virtual server template

You can modify only the parameters, bindings, and pages configured for a template. The name and location of the template specified when the template was created cannot be changed. The Citrix ADC appliance does not provide you with the option of modifying a load balancing virtual server template.

To modify a load balancing virtual server by using Citrix ADC GUI

  1. Navigate toTraffic Management>Load balancing>Virtual Servers.
  2. In theLoad Balancing Virtual Serverpage, modify the entity parameters.
  3. Click Done.
  4. ClickExport as a Templatelink.
  5. The modified changes are now available in the load balancing virtual server template file.
  6. In theExported Load Balancing Templatepage, clickDone.

Manage load balancing virtual server templates

You can organize load balancing virtual server template files and deployment files by using the Citrix ADC GUI.

  1. Navigate toTraffic Management>Load Balancing>Virtual Servers.
  2. In theVirtual Serverspage, selectManage Template action.
  3. In theLoad Balancing Templatespage, clickTemplate Filetab.
  4. In the模板文件tab page, you can upload or download a template from and to the appliance template folder.

    Manage template

  5. ClickClose.

To upload load balancing virtual server entity template by using Citrix ADC GUI

  1. Navigate toTraffic Management>Load Balancing>Virtual Servers.
  2. In theVirtual Serverspage, clickSelect Actionand then selectManage Template.
  3. In the Load Balancing Templates page, click模板文件tab.
  4. In the模板文件tab page, clickUploadto upload a template.
  5. ClickClose.

    Upload template

To download load balancing virtual server entity template by using Citrix ADC GUI

  1. Navigate toTraffic Management>Load Balancing>Virtual Servers.
  2. In theVirtual Serverspage, clickSelect Actionand then selectManage Template.
  3. In theLoad Balancing Templatespage, click模板文件tab.
  4. In the Template Files tab page, select a template file and click Download.
  5. Click Close.

    Download template

Example of load balancing virtual server template and deployment template

Following is an example of a template file that was created from a load balancing virtual server called “Lbvip”:

COPY   

Example of a deployment file

Following is the deployment file associated with the virtual server in the preceding example: COPY

   Lbvip 10 0 40.406    1.2.3.4 80 HTTP     svcgrp HTTP   1.2.3.90 80   1.2.8.0 80   1.2.8.1 80   1.2.9.0 80      
Entity template for load balancing virtual server