Citrix NetScaler, Docker

Deploying NetScaler SDX onto a container instance using Docker

Whilst writing a new set of articles around Citrix ADC (NetScaler) I noticed that you could deploy it onto a Docker instance.  This sounded interesting as I had never really played around with Docker so its good to merge the two technologies and so this post was born.

So what is the NetScaler CPX? It is basically a container version of a NetScaler with the basic load balancing features. Running NetScaler in a container gives us much more deployment options and has a much lower footprint than a normal NetScaler.  It enables us to integrate NetScaler into microapp architectures that we can deploy via Kubernetes. That is just one example but the possibilities are endless.

So let’s get cracking. The requirements listed in https://docs.citrix.com/en-us/citrix-adc-cpx/12/deploy-using-docker-image-file.html are:

  • Docker Host system is running Linux Ubuntu 14.04 (I chose 18.04)
  • Docker version 1.12 is installed on the Host System
  • Docker Host System has at least 1 CPU and 2GB RAM
  • Docker Host has internet connectivity

After installing Docker open a terminal window and execute the command

“Sudo docker pull store/citrix/netscalercpx:12.0-56.20” This will pull down the latest version of NetScaler CPX from the Docker repository.

image

If we type sudo docker images this gives us a list of Docker images that we have pulled down. As we can see the NetScaler CPX image is present.

image

So now that we have the Docker image downloaded we need to run it. To do that execute the following:

“sudo docker run –e EULA=yes –dt –P –ulimit core=-1 –cap -add=NET_ADMIN store/citrix/netscalercpx:12.0-56.20

image

After this run’s it generates a long ID.  Not quite sure what this is?! Now if we run “sudo docker ps” we can see that the container is up and running

image

If we run sudo docker inspect and the container ID it gives us more information about the config and most importantly the IP address.

image

image

If we then connect to that IP it works successfully. I was expecting a NetScaler config GUI but it seems this version does not have that. So you have to configure everything from the command line

image

To connect to the command line execute the following command:

ssh root@172.17.0.2 (obviously that will change in your environment) . The default password is linux

image

Once logged in you can configure via the normal commands you would normally use

image

I hope this post has been interesting and helpful to you. I have certainly learnt from it.

I found the following resources very useful whilst writing this so if you get any issues then they are worth a look

https://linuxize.com/post/how-to-install-and-use-docker-on-ubuntu-18-04/
https://docs.citrix.com/en-us/citrix-adc-cpx/12/deploy-using-docker-image-file.html
https://hub.docker.com/_/netscaler-cpx-express-rel-120-experimental
https://www.citrix.com/blogs/2017/04/27/getting-to-know-citrix-netscaler-cpx/

Leave a Reply

Your email address will not be published. Required fields are marked *