Entity template for load balancing virtual server
Load balancing virtual server template
-
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 the
<lbmethod>and</lbmethod>tags.
How a load balancing virtual server template works
-
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.
Configure variables in load balancing virtual server template
HTTP.REQ.HEADER("Accept-Language").CONTAINS("en-us")
-
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
-
Navigate to Traffic Management > Load Balancing > Virtual Servers
-
In the details pane, right-click the virtual server that you want to export to a template file, and then click Add.
-
In the Create Load balancing Virtual Server page, set the virtual server parameters. For more information on configuring a load balancing virtual server, see How load balancing works
-
Once you have the set the parameters for the load balancing virtual server, click Done.Export as load balancing virtual server template
-
Click Export as Template link at the top to export the server details as a template file.
-
In the Create Load Balancing Template page, enter the template settings.
-
Click Done.Confirmation screen
Modify a load balancing virtual server template
-
Navigate to Traffic Management > Load balancing > Virtual Servers.
-
In the Load Balancing Virtual Server page, modify the entity parameters.
-
Click Done.
-
Click Export as a Template link.
-
The modified changes are now available in the load balancing virtual server template file.
-
In the Exported Load Balancing Template page, click Done.
Manage load balancing virtual server templates
-
Navigate to Traffic Management > Load Balancing > Virtual Servers.
-
In the Virtual Servers page, select Manage Template action.
-
In the Load Balancing Templates page, click Template File tab.
-
In the Template Files tab page, you can upload or download a template from and to the appliance template folder.Manage template
-
Click Close.
To upload load balancing virtual server entity template by using NetScaler GUI
-
Navigate to Traffic Management > Load Balancing > Virtual Servers.
-
In the Virtual Servers page, click Select Action and then select Manage Template.
-
In the Load Balancing Templates page, click Template Files tab.
-
In the Template Files tab page, click Upload to upload a template.
-
Click Close.Upload template
To download load balancing virtual server entity template by using NetScaler GUI
-
Navigate to Traffic Management > Load Balancing > Virtual Servers.
-
In the Virtual Servers page, click Select Action and then select Manage Template.
-
In the Load Balancing Templates page, click Template Files tab.
-
In the Template Files tab page, select a template file and click Download.
-
Click Close.Download template
Example of load balancing virtual server template and deployment template
COPY
<?xml version="1.0" encoding="UTF-8" ?>
<template>
<template_info>
<entity_name>Lbvip</entity_name>
<version_major>10</version_major>
<version_minor>0</version_minor>
<build_number>40.406</build_number>
</template_info>
<entitytemplate>
<lbvserver_list>
<lbvserver>
<name>Lbvip</name>
<servicetype>HTTP</servicetype>
<ipv46>0.0.0.0</ipv46>
<ipmask>*</ipmask>
<port>0</port>
<range>1</range>
<persistencetype>NONE</persistencetype>
<timeout>2</timeout>
<persistencebackup>NONE</persistencebackup>
<backuppersistencetimeout>2</backuppersistencetimeout>
<lbmethod>LEASTCONNECTION</lbmethod>
<persistmask>255.255.255.255</persistmask>
<v6persistmasklen>128</v6persistmasklen>
<pq>OFF</pq>
<sc>OFF</sc>
<m>IP</m>
<datalength>0</datalength>
<dataoffset>0</dataoffset>
<sessionless>DISABLED</sessionless>
<state>ENABLED</state>
<connfailover>DISABLED</connfailover>
<clttimeout>180</clttimeout>
<somethod>NONE</somethod>
<sopersistence>DISABLED</sopersistence>
<sopersistencetimeout>2</sopersistencetimeout>
<redirectportrewrite>DISABLED</redirectportrewrite>
<downstateflush>DISABLED</downstateflush>
<gt2gb>DISABLED</gt2gb>
<ipmapping>0.0.0.0</ipmapping>
<disableprimaryondown>DISABLED</disableprimaryondown>
<insertvserveripport>OFF</insertvserveripport>
<authentication>OFF</authentication>
<authn401>OFF</authn401>
<push>DISABLED</push>
<pushlabel>none</pushlabel>
<l2conn>OFF</l2conn>
<appflowlog>DISABLED</appflowlog>
<icmpvsrresponse>PASSIVE</icmpvsrresponse>
<lbvserver_cmppolicy_binding_list>
<lbvserver_cmppolicy_binding>
<name>Lbvip</name>
<policyname>NOPOLICY-COMPRESSION</policyname>
<priority>100</priority>
<gotopriorityexpression>END</gotopriorityexpression>
<bindpoint>REQUEST</bindpoint>
</lbvserver_cmppolicy_binding>
</lbvserver_cmppolicy_binding_list>
</lbvserver>
</lbvserver_list>
</entitytemplate>
</template>
Example of a deployment file
<?xml version="1.0" encoding="UTF-8" ?>
<template_deployment>
<template_info>
<entity_name>Lbvip</entity_name>
<version_major>10</version_major>
<version_minor>0</version_minor>
<build_number>40.406</build_number>
</template_info>
<service_list>
<service>
<ip>1.2.3.4</ip>
<port>80</port>
<servicetype>HTTP</servicetype>
</service>
</service_list>
<servicegroup_list>
<servicegroup>
<name>svcgrp</name>
<servicetype>HTTP</servicetype>
<servicegroup_servicegroupmember_binding_list>
<servicegroup_servicegroupmember_binding>
<ip>1.2.3.90</ip>
<port>80</port>
</servicegroup_servicegroupmember_binding>
<servicegroup_servicegroupmember_binding>
<ip>1.2.8.0</ip>
<port>80</port>
</servicegroup_servicegroupmember_binding>
<servicegroup_servicegroupmember_binding>
<ip>1.2.8.1</ip>
<port>80</port>
</servicegroup_servicegroupmember_binding>
<servicegroup_servicegroupmember_binding>
<ip>1.2.9.0</ip>
<port>80</port>
</servicegroup_servicegroupmember_binding>
</servicegroup_servicegroupmember_binding_list>
</servicegroup>
</servicegroup_list>
</template_deployment>