Skip to content

Commit 1522176

Browse files
committed
Changed parameters as optional and improved readme parameters documentation + usage example. Corrected variable error in siteconfig.pp. Added pmtignore and gitignore to for clean puppet module build
1 parent 6f25acf commit 1522176

5 files changed

Lines changed: 37 additions & 30 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pkg/

.pmtignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pkg/
2+
tests/
3+
assets/
4+
_config.yml
5+
.fixtures.yml

README.markdown

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,34 @@ The module can be installed on a Standard, Datacenter version of Windows 2012R2
3232
Migrated puppet example code in README.md to future parser syntax (4.x). Impact on parameters refering to remote locations (file shares) which have to be prefixed with \\\\ instead of the classical \\. This is because of Puppet >= 4.x parsing \\ as a single \ in single-quoted strings. Use parser = future in puppet 3.x /etc/puppet/puppet.conf to use this new configuration in your Puppet 3.x and prepare Puppet 4.x migration.
3333

3434
## Usage ##
35+
**Mandatory parameters :**
3536
* **`[String]` setup_svc_username** _(Required)_: Privileged account used by Puppet for installing the software and the Xendesktop Site (cred_ssp server and client, SQL server write access, local administrator privilèges needed)
3637
- **`[String]` setup_svc_password** _(Required)_: Password of the privileged account. Should be encrypted with hiera-eyaml.
38+
- **`[String]` sourcepath** _(Required)_: Path of a folder containing the Xendesktop 7.x installer (unarchive the ISO image in this folder). Has to be prefixed with \\\\ instead of the classical \\ if using UNC Path and Puppet >= 4.x or Puppet 3.x future parser.
3739
- **`[String]` sitename** _(Required)_: Name of the Xendesktop site
3840
- **`[String]` role** _(Required `[primary|secondary]`)_: Needs to be 'primary' for the first Citrix Delivery Controller of a site to initialize the databases and the Xendesktop site. Configure as 'secondary' for all other delivery Controllers of the site as they will join an existing Xendesktop site.
39-
- **`[String]` site_primarycontroller** _(Optional if role='primary')_: Primary controller of the existing Xendesktop site to which the newly configured Delivery Controller has to be joined.
40-
- **`[String]` databaseserver** _(Required)_: FQDN of the SQL server used for citrix database hosting. If using a AlwaysOn SQL cluster, use the Listener FQDN.
41-
- **`[String]` licenceserver** _(Required)_: FQDN of the Citrix Licence server.
42-
- **`[String]` sitedatabasename** _(Required)_: Name of the citrix site database to be created
43-
- **`[String]` loggingdatabasename** _(Required)_: Name of the citrix logging database to be created
44-
- **`[String]` monitordatabasename** _(Required)_: Name of the citrix monitor database to be created
45-
- **`[String]` sourcepath** _(Required)_: Path of a folder containing the Xendesktop 7.x installer (unarchive the ISO image in this folder). Has to be prefixed with \\\\ instead of the classical \\ if using UNC Path and Puppet >= 4.x or Puppet 3.x future parser.
46-
- **`[String]` xd7administrator** _(Required)_: ActiveDirectory user or group which will be granted Citrix Administrator rights.
41+
42+
**Required parameters if role='primary' :**
43+
- **`[String]` databaseserver** _(Required if role='primary')_: FQDN of the SQL server used for citrix database hosting. If using a AlwaysOn SQL cluster, use the Listener FQDN.
44+
- **`[String]` licenceserver** _(Required if role='primary')_: FQDN of the Citrix Licence server.
45+
- **`[String]` xd7administrator** _(Required if role='primary')_: ActiveDirectory user or group which will be granted Citrix Administrator rights.
46+
47+
**Required parameters if role='secondary' :**
48+
- **`[String]` site_primarycontroller** _(Required if role='secondary')_: Primary controller of the existing Xendesktop site to which the newly configured Delivery Controller has to be joined.
49+
50+
**Optional parameters :**
51+
- **`[String]` sitedatabasename** _(Optional, default is CitrixSiteDB)_: Name of the citrix site database to be created
52+
- **`[String]` loggingdatabasename** _(Optional, default is CitrixLogDB)_: Name of the citrix logging database to be created
53+
- **`[String]` monitordatabasename** _(Optional, default is CitrixMonitorDB)_: Name of the citrix monitor database to be created
4754
- **`[Boolean]` sqlalwayson** _(Optional, default is false)_: Activate database AlwaysOn availability group membership ? Default is false. Needs to be true for a production grade environment
48-
- **`[String]` sqlavailabilitygroup** _(Optional if sqlalwayson = false)_: Name of the SQL AlwaysOn availability group.
49-
- **`[String]` sqldbbackuppath** _(Optional if sqlalwayson = false)_: UNC path of a writable network folder to backup/restore databases during AlwaysOn availability group membership configuration. needs to be writable from the sql server nodes. Has to be prefixed with \\\\ instead of the classical \\ if using Puppet >= 4.x or Puppet 3.x future parser.
55+
- **`[String]` sqlavailabilitygroup** _(Required if sqlalwayson = true)_: Name of the SQL AlwaysOn availability group.
56+
- **`[String]` sqldbbackuppath** _(Required if sqlalwayson = true)_: UNC path of a writable network folder to backup/restore databases during AlwaysOn availability group membership configuration. needs to be writable from the sql server nodes. Has to be prefixed with \\\\ instead of the classical \\ if using Puppet >= 4.x or Puppet 3.x future parser.
5057
* **`[String]` sqlservermodulesource** _(Optional, `[internet|offline]`)_: Source of SQLServer Powershell module v21.0.17199 (see requirements at the beginning of this readme). Valid values are **internet** or **offline**. Default is 'internet'.
51-
* **`[String]` sqlservermodulesourcepath** _(Optional if sqlservermodulesource = 'internet' )_: Path of the SQLServer Powershell module v21.0.17199 ZIP file. Can be a local or an UNC path.
58+
* **`[String]` sqlservermodulesourcepath** _(Required if sqlservermodulesource = 'offline' )_: Path of the SQLServer Powershell module v21.0.17199 ZIP file. Can be a local or an UNC path.
5259
- **`[Boolean]` https** _(Optional, default is false)_: Deploy SSL certificate and activate SSL access to Citrix XML service ? Default : false
53-
- **`[String]` sslCertificateSourcePath** _(Optional if https = false)_: Location of the SSL certificate (p12 / PFX format with private key). Can be local folder, UNC path, HTTP URL). Has to be prefixed with \\\\ instead of the classical \\ if using UNC Path and Puppet >= 4.x or Puppet 3.x future parser.
54-
- **`[String]` sslCertificatePassword** _(Optional if https = false)_: Password protecting the p12/pfx SSL certificate file.
55-
- **`[String]` sslCertificateThumbprint** _(Optional if https = false)_: Thumbprint of the SSL certificate (available in the SSL certificate).
60+
- **`[String]` sslCertificateSourcePath** _(Required if https = true)_: Location of the SSL certificate (p12 / PFX format with private key). Can be local folder, UNC path, HTTP URL). Has to be prefixed with \\\\ instead of the classical \\ if using UNC Path and Puppet >= 4.x or Puppet 3.x future parser.
61+
- **`[String]` sslCertificatePassword** _(Required if https = true)_: Password protecting the p12/pfx SSL certificate file.
62+
- **`[String]` sslCertificateThumbprint** _(Required if https = true)_: Thumbprint of the SSL certificate (available in the SSL certificate).
5663

5764
## Installing a Citrix Delivery Controller ##
5865

@@ -61,15 +68,15 @@ node 'CXDC01' {
6168
class{'xd7deliverycontroller':
6269
setup_svc_username => 'TESTLAB\svc-puppet',
6370
setup_svc_password => 'P@ssw0rd',
71+
sourcepath => '\\\\fileserver\xendesktop715',
6472
sitename => 'XD7TestSite',
6573
role => 'primary'
6674
databaseserver => 'CLSDB01LI.TESTLAB.COM',
6775
licenceserver => 'LICENCE.TESTLAB.COM',
76+
xd7administrator => 'TESTLAB\Domain Admins',
6877
sitedatabasename => 'SITE_DB',
6978
loggingdatabasename => 'LOG_DB',
7079
monitordatabasename => 'MONITOR_DB',
71-
sourcepath => '\\\\fileserver\xendesktop715',
72-
xd7administrator => 'TESTLAB\Domain Admins',
7380
sqlalwayson => true,
7481
sqlavailabilitygroup => 'CLSDB01',
7582
sqldbbackuppath => '\\\\fileserver\backup\sql',
@@ -84,16 +91,10 @@ node 'CXDC02' {
8491
class{'xd7deliverycontroller':
8592
setup_svc_username => 'TESTLAB\svc-puppet',
8693
setup_svc_password => 'P@ssw0rd',
94+
sourcepath => '\\\\fileserver\xendesktop715',
8795
sitename => 'XD7TestSite',
8896
role => 'secondary',
8997
site_primarycontroller => 'CXDC01',
90-
databaseserver => 'CLSDB01LI.TESTLAB.COM',
91-
licenceserver => 'LICENCE.TESTLAB.COM',
92-
sitedatabasename => 'SITE_DB',
93-
loggingdatabasename => 'LOG_DB',
94-
monitordatabasename => 'MONITOR_DB',
95-
sourcepath => '\\\\fileserver\xendesktop715',
96-
xd7administrator => 'TESTLAB\Domain Admins',
9798
https => true,
9899
sslCertificateSourcePath => '\\\\fileserver\ssl\cxdc.pfx',
99100
sslCertificatePassword => 'P@ssw0rd',

manifests/init.pp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
class xd7deliverycontroller (
1414
String $setup_svc_username,
1515
String $setup_svc_password,
16+
String $sourcepath,
1617
String $sitename,
1718
Enum['primary', 'secondary'] $role,
18-
String $databaseserver,
19-
String $licenceserver,
20-
String $sourcepath,
21-
String $xd7administrator,
19+
Optional[String] $databaseserver = '',
20+
Optional[String] $licenceserver = '',
21+
Optional[String] $xd7administrator = '',
2222
Optional[String] $site_primarycontroller = '',
2323
Optional[String] $sitedatabasename = 'CitrixSiteDB',
2424
Optional[String] $loggingdatabasename = 'CitrixLogDB',
2525
Optional[String] $monitordatabasename = 'CitrixMonitorDB',
26-
Boolean $sqlalwayson = false,
26+
Optional[Boolean] $sqlalwayson = false,
2727
Optional[String] $sqlavailabilitygroup = '',
2828
Optional[String] $sqldbbackuppath = '',
2929
Enum['internet', 'offline'] $sqlservermodulesource = 'internet',
3030
Optional[String] $sqlservermodulesourcepath = '',
31-
Boolean $https = false,
31+
Optional[Boolean] $https = false,
3232
Optional[String] $sslcertificatesourcepath = '',
3333
Optional[String] $sslcertificatepassword = '',
3434
Optional[String] $sslcertificatethumbprint = ''

manifests/siteconfig.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
else {
124124
dsc_xd7waitforsite{ 'WaitForXD7Site':
125125
dsc_sitename => $xd7deliverycontroller::sitename,
126-
dsc_existingcontrollername => $xd7deliverycontroller::site_mastercontroller,
126+
dsc_existingcontrollername => $xd7deliverycontroller::site_primarycontroller,
127127
dsc_credential => {
128128
'user' => $xd7deliverycontroller::setup_svc_username,
129129
'password' => $xd7deliverycontroller::setup_svc_password

0 commit comments

Comments
 (0)