Product Documentation

NetScaler Configuration Details

Mar 19, 2012

The following table describes the AutoScale configuration commands that are used by Citrix CloudPlatform to configure a NetScaler appliance.

Table 1. NetScaler Configuration for AutoScale
AutoScale configuration command(s) Description
add lb vserver Cloud-VirtualServer-192.0.2.116-22 TCP 192.0.2.116 22 -persistenceType NONE -lbMethod ROUNDROBIN -cltTimeout 9000 -minAutoscaleMembers 2 -maxAutoscaleMembers 5

Creates a load balancing virtual server to evenly distribute the load on the application instances (ROUND-ROBIN method). The virtual server also specifies the limits for the number of instances to which the application can scale up or down (maxAutoscaleMembers and minAutoscaleMembers, respectively).

add serviceGroup Clouda35a6b6b76614006b97476e841b80f79 TCP -maxClient 0 -maxReq 0 -cip DISABLED -usip NO -useproxyport YES -cltTimeout 9000 -svrTimeout 9000 -CKA NO -TCPB NO -CMP NO -autoScale POLICY -memberPort 22

bind lb vserver Cloud-VirtualServer-192.0.2.116-22 Clouda35a6b6b76614006b97476e841b80f79

Creates an AutoScale service group for the application instances, with the service group's autoScale parameter set to POLICY. Also specifies the port on which the service group members must receive traffic.

The second command binds the service group to the load balancing virtual server.

add server autoscale-internal_server_Clouda35a6b6b76614006b97476e841b80f79 autoscale-internal_server_Clouda35a6b6b76614006b97476e841b80f79

bind serviceGroup Clouda35a6b6b76614006b97476e841b80f79 autoscale-internal_server_Clouda35a6b6b76614006b97476e841b80f79 22

Creates a server entry to represent the application instances.

Binds the server entry to the service group.

add lb metricTable Cloud-MTbl-192.0.2.116-22

bind lb metricTable Cloud-MTbl-192.0.2.116-22 Linux_User_CPU_-_percentage 1.3.6.1.4.1.2021.11.9.0

add lb monitor Cloud-Mon-192.0.2.116-22 LOAD -interval 24 -destPort 161 -snmpCommunity public -metricTable Cloud-MTbl-192.0.2.116-22

bind lb monitor Cloud-Mon-192.0.2.116-22 -metric Linux_User_CPU_-_percentage -metricThreshold 2147483647

bind serviceGroup Clouda35a6b6b76614006b97476e841b80f79 -monitorName Cloud-Mon-192.0.2.116-22 -passive

Configures a new SNMP monitor to retrieve the specified metrics.

add autoscale profile Cloud-AutoScale-Profile-192.0.2.116-22 -type CLOUDSTACK -url "http://10.102.31.107:8080/client/api" -apiKey t0fEWPtk_ncQYbofjAm1jjlgGTR7UNZrkZ3sdEpLREBNzBPLSNpNz8qNSbc439xNtYnEYdWn_MsUC_CUazaIKg -sharedSecret -PrE5h3DP7swHAN12TGBlX-xSTRLHzob91l6O0VO1FMxvE1UOl7uoD6_Z0bkkLaVtK5Y10oBkTzgbTwp3u5lCQ

Creates an AutoScale profile to specify the details required by NetScaler for making API requests to CloudPlatform (URL, API key, and shared secret).

add autoscale action Cloud-AutoScale-ScaleUpAction-192.0.2.116-22 -type SCALE_UP -profileName Cloud-AutoScale-Profile-192.0.2.116-22 -parameters "command=deployVirtualMachine&zoneid=2ab23590-78cb-4106-8d85-4412a2f2435f&serviceofferingid=b9503e47-0d8f-4c89-a88d-04d8b17fe8e9&templateid=1a4a5084-208c-47a8-9c16-d582550cf759&displayname=AutoScale-LB-lb&networkids=a3c97129-b729-4c72-994f-7b918f20ce4d&lbruleid=f96b7f3b-19ec-4123-891c-604f05b032b3" -quietTime 90 -vServer Cloud-VirtualServer-192.0.2.116-22

Creates a scale-up action, which enables the NetScaler appliance to add virtual machines (instances) to the application fleet.

add autoscale action Cloud-AutoScale-ScaleDownAction-192.0.2.116-22 -type SCALE_DOWN -profileName Cloud-AutoScale-Profile-192.0.2.116-22 -parameters "command=destroyVirtualMachine&lbruleid=f96b7f3b-19ec-4123-891c-604f05b032b3" -vmDestroyGracePeriod 30 -quietTime 90 -vServer Cloud-VirtualServer-192.0.2.116-22

Creates a scale-down action, which enables the NetScaler appliance to remove virtual machines (instances) from the application fleet.

add autoscale policy Cloud-AutoScale-Policy-Min-192.0.2.116-22 -rule "SYS.VSERVER(\"Cloud-VirtualServer-192.0.2.116-22\").ACTIVESERVICES.LT(SYS.VSERVER(\"Cloud-VirtualServer-192.0.2.116-22\").MINAUTOSCALEMEMBERS)" -action Cloud-AutoScale-ScaleUpAction-192.0.2.116-22

Creates an AutoScale policy to initially create the specified minimum number of VMs and, later, to ensure that the number of VMs in the fleet does not fall below the required minimum.

add autoscale policy Cloud-AutoScale-Policy-Max-192.0.2.116-22 -rule "SYS.VSERVER(\"Cloud-VirtualServer-192.0.2.116-22\").ACTIVESERVICES.GT(SYS.VSERVER(\"Cloud-VirtualServer-192.0.2.116-22\").MAXAUTOSCALEMEMBERS)" -action Cloud-AutoScale-ScaleDownAction-192.0.2.116-22

Creates an AutoScale policy to prevent the number of VMs in the fleet from exceeding the specified maximum.

add autoscale policy Cloud-AutoScale-Policy-192.0.2.116-22-35 -rule "SYS.VSERVER(\"Cloud-VirtualServer-192.0.2.116-22\").ACTIVESERVICES.LT(SYS.VSERVER(\"Cloud-VirtualServer-192.0.2.116-22\").MAXAUTOSCALEMEMBERS) && (SYS.VSERVER(\"Cloud-VirtualServer-192.0.2.116-22\").SNMP_TABLE(0).AVERAGE_VALUE.GT(90))" -action Cloud-AutoScale-ScaleUpAction-192.0.2.116-22

Creates an AutoScale policy to evaluate the metrics that are collected and trigger a scale-up action when the metric value breaches the threshold specified for the scale-up policy.

add autoscale policy Cloud-AutoScale-Policy-192.0.2.116-22-36 -rule "SYS.VSERVER(\"Cloud-VirtualServer-192.0.2.116-22\").ACTIVESERVICES.GT(SYS.VSERVER(\"Cloud-VirtualServer-192.0.2.116-22\").MINAUTOSCALEMEMBERS) && (SYS.VSERVER(\"Cloud-VirtualServer-192.0.2.116-22\").SNMP_TABLE(0).AVERAGE_VALUE.LT(30))" -action Cloud-AutoScale-ScaleDownAction-192.0.2.116-22

Creates an AutoScale policy to evaluate the collected metrics and trigger a scale-down action when the metric value breaches the threshold specified by the scale-down policy.

add ns timer Cloud-AutoScale-Timer-192.0.2.116-22 -interval 30

bind ns timer Cloud-AutoScale-Timer-192.0.2.116-22 -policyName Cloud-AutoScale-Policy-Min-192.0.2.116-22 -priority 1 -gotoPriorityExpression END -sampleSize 1 -threshold 1

bind ns timer Cloud-AutoScale-Timer-192.0.2.116-22 -policyName Cloud-AutoScale-Policy-Max-192.0.2.116-22 -priority 2 -gotoPriorityExpression END -sampleSize 1 -threshold 1

bind ns timer Cloud-AutoScale-Timer-192.0.2.116-22 -policyName Cloud-AutoScale-Policy-192.0.2.116-22-35 -priority 3 -gotoPriorityExpression END -sampleSize 2 -threshold 2

bind ns timer Cloud-AutoScale-Timer-192.0.2.116-22 -policyName Cloud-AutoScale-Policy-192.0.2.116-22-36 -priority 4 -gotoPriorityExpression END -sampleSize 2 -threshold 2

Creates a timer that enables evaluation of the AutoScale policies at the configured sampling intervals.