Preface

This document describes the functionality provided by the Citrix NetScaler Application Delivery Controller (netscaler) plugin.

Refer to Deployit Reference Manual for background information on Deployit and deployment concepts.

Overview

The NetScaler plugin is a Deployit plugin that adds capability for managing deployments done to application and web servers whose traffic is managed by a NetScaler loadbalancing device.

See the Features section below for details.

Features

  • Allows servers / services to be taken out of the load balancing pool before a deployment and put back after the deployment has been performed.

Requirements

  • Deployit requirements
    • Deployit: version 3.9+
    • NetScaler: 8.1, 9.x and 10.x
    • Other Deployit Plugins: loadbalancer-plugin (Distributed together), group-orchestrator-plugin, webserver-plugin

Functionality

The plugin works in conjunction with the "group-based" orchestrator to disable and enable containers which are part of a single deployment group in one go.

The group-based orchestrator will divvy up the deployment into multiple phases, based on the 'deploymentGroup' property of the containers that are being targeted. Each of these group will be disabled in the NetScaler just before they're deployed to, and will be re-enabled right after the deployment to that group. This will ensure that there is no downtime during the deployment.

The plugin will add the following 3 properties to every container to control how the server is known in the NetScaler ADC, and how long it should take to do a graceful disable of the server:

 
 
netscalerAddress : STRING
The IP address or name this server is registered under in the NetScaler load balancer
 
 
netscalerType : STRING
Whether this is a 'server' or a 'service' in the NetScaler load balancer (default: server)
 
 
netscalerShutdownDelay : INTEGER
The amount of seconds before the server is disabled in the NetScaler load balancer. A value of -1 triggers use of the defaultShutdownDelay of the NetScaler device. (default: -1)

The plugin will add three steps to the deployment of each deployment group.

  1. A disable server step, this will stop the traffic to the servers that are managed by the loadbalancer.
  2. A wait step, this will wait the maximum shutdown delay
  3. An enable server step, this will start the traffic to the servers that were previously disabled.

Setting up a loadbalancing configuration

In order to setup Deployit to use your NetScaler ADC device, you will need to take the following steps.

  1. Create a NetScaler (netscaler.NetScaler) configuration item in the 'Infrastructure' tree, and add it as a member to the udm.Environment.
  2. Add all the containers that the NetScaler device manages to the managedServers collection of the created NetScaler configuration item.
  3. Configure the netscalerAddress property of each of the containers so that the NetScaler configuration item knows how the container is known within the NetScaler ADC device.

Once that is done, during any deployment to the Environment, the netscaler-plugin will ensure that the loadbalancing logic is implemented.

Loadbalancing a mixed Application Server and Web Server environment

If you have an Apache httpd server which fronts a website backed by one or more application servers, it is possible to setup a more complex loadbalancing scenario, thus ensuring that the served website is not broken during the deployment. For this, the www.ApacheHttpdServer configuration item from the standard webserver-plugin is augmented with a property called applicationServers.

Whenever a deployment is done to one or more of the containers mentioned in the applicationServers residing in the same Environment as the web server, the following happens in addition to the standard behavior:

  1. Just before the first application server will be deployed to, the webserver will be removed from the loadbalancing configuration.
  2. After the last application server linked to the web server has been deployed to, the webserver is put back into the loadbalancing configuration

Customization

Disable/Enable server scripts

The disable and enable server scripts, by default called:

  • netscaler/disable-server.cli.ftl
  • netscaler/enable-server.cli.ftl

contain the NetScaler CLI commands to influence the loadbalancing. They are FreeMarker templates which have access to the following variables during resolution:

  • servers: A list of udm.Container configuration items that are to be enabled/disabled.
  • loadBalancer: The netscaler.NetScaler loadbalancer that manages the servers.

The loadBalancer variable has 2 helper methods for dealing with the items in the servers list:

  • loadBalancer.serverAddress(...): Retrieves either the netscalerAddress property from the server, or if that's not present, it checks whether it is a overthere.HostContainer and gets the hostname from the overthere.Host the server is defined on.
  • loadBalancer.waitForServer(...): Determines the shutdown delay that the NetScaler device should take into account when disabling the server.

CI Reference

Configuration Item Overview

Containers

CI Description
lb.LoadBalancer The Load Balancer super type
netscaler.NetScaler A Citrix NetScaler LoadBalancer

Other Configuration Items

CI Description
lb.LoadBalancer The Load Balancer super type
netscaler.NetScaler A Citrix NetScaler LoadBalancer

Configuration Item Details

lb.LoadBalancer

Virtual Type
Type Hierarchy udm.BaseContainer >> udm.BaseConfigurationItem
Interfaces udm.Taggable, udm.ConfigurationItem, udm.Container, overthere.HostContainer

The Load Balancer super type.

Public Properties
 
 
managedServers : SET_OF_CI<udm.Container>
The servers managed by this load balancer
Hidden Properties
 
 
netscalerType : STRING  = server
Whether this is a 'server' or a 'service' in the NetScaler load balancer
 
 
disableInLoadBalancer : BOOLEAN
Whether this server should be disabled in the load balancer when it is being deployed to
 
 
netscalerAddress : STRING
The IP address or name this server is registered under in the NetScaler load balancer
 
 
netscalerShutdownDelay : INTEGER
The amount of seconds before the server is disabled in the NetScaler load balancer (A value of -1 triggers use of the defaultShutdownDelay of the NetScaler device)
 
 
tags : SET_OF_STRING
If set, only deployables with the same tag will be automatically mapped to this container.

netscaler.NetScaler

Type Hierarchy lb.LoadBalancer >> udm.BaseContainer >> udm.BaseConfigurationItem
Interfaces udm.Taggable, udm.ConfigurationItem, udm.Container, overthere.HostContainer

A Citrix NetScaler LoadBalancer

Parent
 
 
host : CI<overthere.Host>
Host
Public Properties
 
 
defaultShutdownDelay : INTEGER  = 0
The amount of seconds to wait before the servers are disabled in the load balancer
 
 
managedServers : SET_OF_CI<udm.Container>
The servers managed by this load balancer
Hidden Properties
 
 
disableServersOrder : INTEGER  = 8
Disable Servers Order
 
 
disableServersScript : STRING  = netscaler/disable-server.cli.ftl
Disable Servers Script
 
 
enableServersOrder : INTEGER  = 94
Enable Servers Order
 
 
enableServersScript : STRING  = netscaler/enable-server.cli.ftl
Enable Servers Script
 
 
netscalerType : STRING  = server
Whether this is a 'server' or a 'service' in the NetScaler load balancer
 
 
disableInLoadBalancer : BOOLEAN
Whether this server should be disabled in the load balancer when it is being deployed to
 
 
netscalerAddress : STRING
The IP address or name this server is registered under in the NetScaler load balancer
 
 
netscalerShutdownDelay : INTEGER
The amount of seconds before the server is disabled in the NetScaler load balancer (A value of -1 triggers use of the defaultShutdownDelay of the NetScaler device)
 
 
tags : SET_OF_STRING
If set, only deployables with the same tag will be automatically mapped to this container.