World fastest way ever to deploy Citrix ADC appliances 12.x and 13.x

You want to learn the world fastest way ever to deploy Citrix ADC appliances? How long do you need to deploy a Citrix ADC appliance in your environment? In a local datacenter, e.g., on vmware vsphere, it usually takes about 30 minutes until the machine is accessible via the web interface. In Microsoft Azure, this process usually takes between 10 and 30 minutes, depending on the region in which it takes place. But what if you could deploy the appliance within 5 seconds? You don’t think so? Then you’ve come to the right place. You will be amazed what is possible 😉

To Deploy Citrix ADC appliances there will be a multiple Steps.

To deploy a Citrix ADC on VMware vSphere, you typically need to take several steps. You also must change the GUI /CLI or interface several times.

The following steps must be done:

  1. deploy the VMware OVF in vmware vSphere
  2. define settings (name, network, datastore etc.)
  3. deploy the OVF
  4. start VPX appliance
  5. launch VPX Appliance in VMware and start the console
  6. store IP address
  7. store subnet mask
  8. store gateway
  9. save settings and restart appliance

I think you will have more than once the time to pick a coffee before you can start with the proper configuration work. Youmust wait for the OFV deployment… you have to wait for the reboot after IP configuration…

The fast(est) way to deploy Citrix ADC appliances

Before some of you think I’m trying to pull a fast one on you, I don’t want to keep you in suspense any longer. 😀
In one of my previous articles, I already explained how to install Ansible. Either on Microsoft Windows Subsystem for Linux (here) or on Ubuntu Server (here).
Also, in this case I use the incredible versatility of Ansible. I’m just a fan and I admit it openly. I don’t know of any tool that is more versatile for IT professionals than this one. Except for Powershell, but the two are not really comparable and can be used for different things.

What do you need to prepare to launch the rocket?

Well, first you download the desired Citrix ADC VPX template from the Citrix website. Follow this Link: https://www.citrix.com/downloads/citrix-adc/
Unzip this and place it either on your computer or on a share that you can reach.

First of all, install Ansible as described in this guide. Instructions for the installation
You have allready done that? GREAT!

Now install the required Ansible Collection: https://galaxy.ansible.com/community/vmware

You can do it with the following command.

ansible-galaxy collection install community.vmware

Now create a new playbook and edit the content as you need it. I have annotated the most important parts directly in the playbook. Please edit all lines with ## TEXT ##

You can also create a host_group with the variables and an inventory file for ansible. I have all steps in the playbook to make the steps easier to understand. create a new playbook on your Ansible host.

---
- hosts: localhost
  gather_facts: no
  tasks:
  - name: Import VM from OVF
    vmware_deploy_ovf:
      validate_certs: no
      hostname: vcenter.lab.local ##vcenter fqdn or IP ##
      username: administrator@vsphere.local ## YOUR VCENTER ACCOUNT ##
      password: ## YOUR PASSWORD ##
      datacenter: "DatacenterGER" ## YOUR DATACENTER ##
      cluster: CL2_THPR ## CLUSTERNAME ##
      datastore: ds_nuc ## DATASTORE ##
      name: NSVPX4 ## VM NAME ##
      networks: "{'VM Network':u'NUC'}" ## VM NETWORK ##
      power_on: no
      disk_provisioning: thin
      ovf: "/mnt/d/Downloads_LAB/Citrix Netscaler 12.1/NSVPX-ESX-12.1-60.19_nc_64/NSVPX-ESX-12.1-60.19_nc_64.ovf" ## OVF File ##
    register: vm_facts
    delegate_to: localhost



  - name: get vm_facts
    set_fact:
      vm_uuid: "{{ vm_facts.hw_name }}"
  - debug:
      msg: "instance: {{ vm_facts.hw_name }}"

  - name: Add Attribtes
    community.vmware.vmware_guest:
      hostname: vcenter.lab.local ##vcenter fqdn or IP ##
      username: administrator@vsphere.local ## YOUR VCENTER ACCOUNT ##
      password: ## YOUR PASSWORD ##
      validate_certs: no
      name: "{{ vm_facts.hw_name }}"
      state: present
      customvalues:
        - "key" : "machine.id"
          "value" : "ip=192.168.1.20&netmask=255.255.255.0&gateway=192.168.1.1" ## IP Settings of the ADC VPX Appliance ##
    delegate_to: localhost
    register: attributes

  - name: Add Attribtes
    community.vmware.vmware_guest:
      hostname: vcenter.lab.local ##vcenter fqdn or IP ##
      username: administrator@vsphere.local ## YOUR VCENTER ACCOUNT ##
      password: ## YOUR PASSWORD ##
      validate_certs: no
      name: "{{ vm_facts.hw_name }}"
      state: powered-on


    delegate_to: localhost
    register: attributes

Now finaly we want to deploy Citrix ADC appliances to VMware. To start it, you can do this by using the following command. In my case I added -vvv to run the playbook in debug and get more feedback in the CLI.

ansible-playbook -i homelab /mnt/c/Code/DeployYourDemo/_DEV/netscaler_dev.yml -vvv

Here you can see the Task running in VMware vCenter. You can see the registration of the VM in vCenter takes longer than deploying the OVFA and configure it.

deploy Citrix ADC Appliance in 10 seconds

I hope you enjoyed the post. Next time I will show how to automate the configuration of Content Switches, Loadbalancers and so on…

Have a good time and feel free to share the post if you like it. Also follow me on twitter @thomaspreischl

1 thought on “World fastest way ever to deploy Citrix ADC appliances 12.x and 13.x”

Leave a Comment

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