Citrix NetScaler is a commercial load balancer that competes with open source load balancers, such as HAProxy and Nginx. NetScaler is available as a container as well, in a product version known as NetScaler CPX. Even better, there is a free version available, called CPX Express. For the rest of the blog post, I’m using my Mac laptop running OS X Sierra, and Docker for Mac (version 17.05.0-ce, build 89658be) .

CPX Express can be installed from the Docker Store:
$ docker pull store/citrix/netscalercpx:11.1-53.11

You should now have the CPX image available:
$ docker images store/citrix/netscalercpx
REPOSITORY                  TAG                 IMAGE ID                        
store/citrix/netscalercpx   11.1-53.11          267dfad3a03e               

Create a container from this image:
$ docker run -e EULA=yes -dt -p 22 -p 80 --name cpx  --cap-add=NET_ADMIN store/citrix/netscalercpx:11.1-53.11

Determine the SSH port of this running container:
$ docker port cpx 22

Login to the NetScaler CPX using the id/password combination of ‘root/linux’:
$ ssh -p 32849 root@ 
The authenticity of host '[]:32849 ([]:32849)' can't be established.
ECDSA key fingerprint is SHA256:N3dlhNYbvYjOPkbt9ogrg2fwwUDWPVs8JwvLuE64/RQ.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[]:32849' (ECDSA) to the list of known hosts.
root@'s password: 
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.19.0-39-generic x86_64)

Once logged in, you can execute almost any regular NetScaler CLI command by passing the command to the script. For example:
root@275626b96389:~# <span class="skimlinks-unlinked"></span> 'show ip'   
exec: show ip
    Ipaddress        Traffic Domain  Type             Mode     Arp      Icmp     Vserver  State
    ---------        --------------  ----             ----     ---      ----     -------  ------
1)       0               NetScaler IP     Active   Enabled  Enabled  NA       Enabled
2)        0               SNIP             Active   Enabled  Enabled  NA       Enabled

In our next blog post, we’ll see how to exercise the CPX’s primary function: load balancing. Stay tuned!

networking banner synergy 2