Puppet – Deploying CVAD 1912 CU1 Delivery Controllers
Introduction
This article explains how to use Puppet to perform unattended installations of a Citrix Virtual Apps and Desktops 1912 CU1 Delivery Controller automatically.
Test Environment
For this article I’ll be using an already deployed Puppet Master server on CentOS which has a very basic manifest configured to Domain Join any Windows machines when the puppet agent contacts the server.
My manifest files is named lab-setup.pp and is stored under /etc/puppetlabs/code/environment/production/manifests.
Active Directory is also configured in the environment with DNS and a network share created to hold the CVAD 1912 CU1 installation files so that they can be called as part of the Puppet manifest directives.
The CVAD Delivery Controller Server itself is a flat install of Windows Server 2019 Standard Core Edition (Not supported by Citrix) which already has the puppet agent installed, configured, and running on it. The server has also been joined to the Domain via puppet (see my article Creating A Domain Join Declaration For All Windows Machines for details on how to do this) and the DOT Net 4.5 Core feature applied as part of my standard OVF build for deploying servers through Bolt.
Installing the Delivery Controller using Puppet
The following steps will allow a Citrix Delivery Controller to be installed automatically using Puppet. The installation selects only the Controller and Director components to be installed.
- Connect to the Puppet server over SSH
- Open the lab-setup.pp file (I use vi as I’m on CentOS)
- The First thing to do is declare the nodes this resource will apply to:
###################################### # LAB-DDC Servers Configuration ###################################### node /^(lab-ddc01|lab-ddc02).lab.lost-it.org$/ {
- The next piece is to add the package resource as follows:
package {"Citrix Virtual Apps and Desktops 7 1912 LTSR CU1": ensure => installed, source => "\\\\lab-shares\\software\\CVAD-1912-CU1\\x64\\XenDesktop Setup\\XenDesktopServerSetup.exe", install_options => ['/COMPONENTS', 'CONTROLLER,DESKTOPDIRECTOR', '/disableexperiencemetrics', '/nosql', '/quiet', '/configure_firewall'] }
- The final piece is to add in a reboot as follows:
reboot {'ddcserver_reboot': message => 'DDC Install has requested a reboot', when => pending, }
- Save and exit the manifest file
Puppet Code Explanation
Below is a breakdown of the CVAD DDC Server install code piece by piece to show what means what and why it’s being used:
- node /^(lab-ddc01|lab-ddc02).lab.lost-it.org$/ { – Node declaration using pattern matching to apply to two different DDC servers
- package {“Citrix Virtual Apps and Desktops 7 1912 LTSR CU1“: – The Display Name for the application as shown in Control Panel as this is what is used by the Puppet package resource to check if the software is installed.
- ensure => installed, – Used to check that the software is installed and if not execute the install
- subscribe => Class[‘domain_membership’], – Subscribes to a previous class resource to ensure that PVS Server is only installed once the server has joined the domain.
- source => “\\\\lab-shares\\software\\CVAD-1912-CU1\\x64\\XenDesktop Setup\\XenDesktopServerSetup.exe”, –
- install_options => [‘/COMPONENTS’, – Defines the install options to be passed to the installer. The square bracket is used to allow specifying sets of options on different lines. The important part for using this method is that puppet will put double quotes around each of the following lines and separates them with a space.
- ‘CONTROLLER,DESKTOPDIRECTOR’, – Selects only the Controller and Director components to be installed.
- ‘/disableexperiencemetrics’, – Disables CEIP, participation in the Customer Experience Improvement Program.
- ‘/nosql’, – Does not install SQL Express on the server.
- ‘/quiet’, – Defines that a silent installation is to be performed.
- ‘/configure_firewall’] – Automatically adds the Firewall Rules to the server.
- } – Closes the package function.
Final Thoughts
I’m still learning Puppet and finding my way around the different methods and code options so this is very much a first working attempt. There are community modules out there to do it but for me, I prefer to learn by doing !
Tested On
This piece of puppet code has been tested installing Citrix Virtual Apps and Desktops 1912 CU1 LTSR Delivery Controller on the following:
- Windows Server 2019 Core Edition – Not Supported by Citrix
- Windows Server 2019 Desktop (GUI) Edition