Skip to content

Commit 069cd42

Browse files
committed
All parameters lower case + compliance with puppet language style guide and puppet forge standards.
1 parent bffc5cd commit 069cd42

8 files changed

Lines changed: 343 additions & 261 deletions

File tree

README.markdown

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1-
# xd7mastercontroller #
1+
# Citrix Xendesktop 7 delivery controller Puppet Module #
22

33
This modules install an enterprise production grade Citrix 7.x Delivery Controller, including Citrix site creation and administrator rights setup.
44

55
The following options are available for a production-grade installation :
66
- Fault tolerance : AlwaysOn database membership activation for Citrix databases created by the package
77
- Sécurity : SSL configuration to secure communications with the Citrix XML Broker Service
88

9-
## Integration informations
9+
## Requirements ##
10+
11+
The minimum Windows Management Framework (PowerShell) version required is 5.0 or higher, which ships with Windows 10 or Windows Server 2016, but can also be installed on Windows 7 SP1, Windows 8.1, Windows Server 2008 R2 SP1, Windows Server 2012 and Windows Server 2012 R2.
12+
13+
This module requires SQLServer powershell module v21.0.17199. The module will install this dependancy :
14+
- From Powershell Gallery if **sqlservermodulesource** parameter is set to **internet**
15+
- From an enterprise location if **sqlservermodulesource** parameter is set to **offline**. In this case, the ZIP file containing the SQLServer v21.0.17199 (_sqlserver_powershell_21.0.17199.zip_) has to be manually downloaded from Powershell Gallery using the `Save-Module -Name SqlServer -Path <path> -RequiredVersion 21.0.17199` powershell command.
16+
17+
This module requires a custom version of the puppetlabs-dsc module compiled with ...
18+
19+
## Change log ##
20+
21+
A full list of changes in each version can be found in the [change log](CHANGELOG.md).
22+
23+
## Integration informations ##
1024
The Citrix databases will be installed in the default MSSQLSERVER SQL Server instance. This module does not provide the capability to install the databases in another SQL intance.
1125

1226
The database failover mecanism integrated in this module is SQL Server AlwaysOn.
@@ -17,9 +31,9 @@ The module can be installed on a Standard, Datacenter version of Windows 2012R2
1731

1832
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.
1933

20-
## Usage
21-
- **svc_username** : (string) 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)
22-
- **svc_password** : (string) Password of the privileged account. Should be encrypted with hiera-eyaml.
34+
## Usage ##
35+
* **`[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)
36+
- **setup_svc_password** : (string) Password of the privileged account. Should be encrypted with hiera-eyaml.
2337
- **sitename** : (string) Name of the Xendesktop site
2438
- **databaseserver** : (string) FQDN of the SQL server used for citrix database hosting. If using a AlwaysOn SQL cluster, use the Listener FQDN.
2539
- **licenceserver** : (string) FQDN of the Citrix Licence server.
@@ -31,6 +45,8 @@ Migrated puppet example code in README.md to future parser syntax (4.x). Impact
3145
- **sqlalwayson** : (boolean) : true or false. Activate database AlwaysOn availability group membership ? Default is false. Needs to be true for a production grade environment
3246
- **sqlavailabilitygroup** : (string) (optionnal if sqlalwayson = false) : Name of the SQL AlwaysOn availability group.
3347
- **sqldbbackuppath** : (string) (optionnal 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.
48+
* **`[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'.
49+
* **`[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.
3450
- **https** : (boolean) : true or false. Deploy SSL certificate and activate SSL access to Citrix XML service ? Default : false
3551
- **sslCertificateSourcePath** : (string) 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.
3652
- **sslCertificatePassword** : (string) Password protecting the p12/pfx SSL certificate file.
@@ -41,8 +57,8 @@ Migrated puppet example code in README.md to future parser syntax (4.x). Impact
4157
~~~puppet
4258
node 'CXDC' {
4359
class{'xd7mastercontroller':
44-
svc_username => 'TESTLAB\svc-puppet',
45-
svc_password => 'P@ssw0rd',
60+
setup_svc_username => 'TESTLAB\svc-puppet',
61+
setup_svc_password => 'P@ssw0rd',
4662
sitename => 'XD7TestSite',
4763
databaseserver => 'CLSDB01LI.TESTLAB.COM',
4864
licenceserver => 'LICENCE.TESTLAB.COM',

changelog.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Changelog - xd7mastercontroller #
22

3-
## Unreleased
3+
## Version 2.0.0 ##
44
- **BREAKING CHANGE** : Require puppetlabs/dsc compiled with SQLServerDSC = 10.0.0.0
55
- **BREAKING CHANGE** : Removed unneeded $domainNetbiosName parameter.
66
- **BREAKING CHANGE** : 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.
7+
- **BREAKING CHANGE** : Changed all module parameters to lowercase to comply with puppet guidelines.
8+
- Compliance with puppet language style guide and puppet forge standards.
79

8-
## Version 1.1.0
10+
## Version 1.1.0 ##
911
- Initial release
1012
- Module compatible with xSQLServer <= 9.0.0.0
Lines changed: 74 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,82 @@
1+
#Class configuring SQL Server AlwaysOn High-Availability feature for Citrix databases
12
class xd7mastercontroller::databasehighavailability inherits xd7mastercontroller {
23

3-
if $sqlalwayson {
4-
#Recovery mode configuration
5-
dsc_sqldatabaserecoverymodel{'SiteDatabaseRecoveryModel':
6-
dsc_name => $sitedatabasename,
7-
dsc_recoverymodel => 'Full',
8-
dsc_servername => $databaseserver,
9-
dsc_instancename => 'MSSQLSERVER',
10-
dsc_psdscrunascredential => {'user' => $svc_username, 'password' => $svc_password},
11-
require => Dsc_xd7site['XD7Site']
12-
}
4+
if $xd7mastercontroller::sqlalwayson {
5+
#Recovery mode configuration
6+
dsc_sqldatabaserecoverymodel{'SiteDatabaseRecoveryModel':
7+
dsc_name => $xd7mastercontroller::sitedatabasename,
8+
dsc_recoverymodel => 'Full',
9+
dsc_servername => $xd7mastercontroller::databaseserver,
10+
dsc_instancename => 'MSSQLSERVER',
11+
dsc_psdscrunascredential => {
12+
'user' => $xd7mastercontroller::setup_svc_username,
13+
'password' => $xd7mastercontroller::setup_svc_password
14+
},
15+
require => Dsc_xd7site['XD7Site']
16+
}
1317

14-
dsc_sqldatabaserecoverymodel{'LoggingDatabaseRecoveryModel':
15-
dsc_name => $loggingdatabasename,
16-
dsc_recoverymodel => 'Full',
17-
dsc_servername => $databaseserver,
18-
dsc_instancename => 'MSSQLSERVER',
19-
dsc_psdscrunascredential => {'user' => $svc_username, 'password' => $svc_password},
20-
require => Dsc_xd7site['XD7Site']
21-
}
18+
dsc_sqldatabaserecoverymodel{'LoggingDatabaseRecoveryModel':
19+
dsc_name => $xd7mastercontroller::loggingdatabasename,
20+
dsc_recoverymodel => 'Full',
21+
dsc_servername => $xd7mastercontroller::databaseserver,
22+
dsc_instancename => 'MSSQLSERVER',
23+
dsc_psdscrunascredential => {
24+
'user' => $xd7mastercontroller::setup_svc_username,
25+
'password' => $xd7mastercontroller::setup_svc_password
26+
},
27+
require => Dsc_xd7site['XD7Site']
28+
}
2229

23-
dsc_sqldatabaserecoverymodel{'MonitorDatabaseRecoveryModel':
24-
dsc_name => $monitordatabasename,
25-
dsc_recoverymodel => 'Full',
26-
dsc_servername => $databaseserver,
27-
dsc_instancename => 'MSSQLSERVER',
28-
dsc_psdscrunascredential => {'user' => $svc_username, 'password' => $svc_password},
29-
require => Dsc_xd7site['XD7Site']
30-
}
30+
dsc_sqldatabaserecoverymodel{'MonitorDatabaseRecoveryModel':
31+
dsc_name => $xd7mastercontroller::monitordatabasename,
32+
dsc_recoverymodel => 'Full',
33+
dsc_servername => $xd7mastercontroller::databaseserver,
34+
dsc_instancename => 'MSSQLSERVER',
35+
dsc_psdscrunascredential => {
36+
'user' => $xd7mastercontroller::setup_svc_username,
37+
'password' => $xd7mastercontroller::setup_svc_password
38+
},
39+
require => Dsc_xd7site['XD7Site']
40+
}
3141

32-
#AlwaysOn cluster databases membership activation
33-
dsc_sqlagdatabase{'SiteDatabaseAlwaysOn':
34-
dsc_databasename => $sitedatabasename,
35-
dsc_availabilitygroupname => $sqlavailabilitygroup,
36-
dsc_servername => $databaseserver,
37-
dsc_instancename => 'MSSQLSERVER',
38-
dsc_backuppath => $sqldbbackuppath,
39-
dsc_psdscrunascredential => {'user' => $svc_username, 'password' => $svc_password},
40-
#require => Dsc_sqldatabaserecoverymodel['SiteDatabaseRecoveryModel']
41-
}
42+
#AlwaysOn cluster databases membership activation
43+
dsc_sqlagdatabase{'SiteDatabaseAlwaysOn':
44+
dsc_databasename => $xd7mastercontroller::sitedatabasename,
45+
dsc_availabilitygroupname => $xd7mastercontroller::sqlavailabilitygroup,
46+
dsc_servername => $xd7mastercontroller::databaseserver,
47+
dsc_instancename => 'MSSQLSERVER',
48+
dsc_backuppath => $xd7mastercontroller::sqldbbackuppath,
49+
dsc_psdscrunascredential => {
50+
'user' => $xd7mastercontroller::setup_svc_username,
51+
'password' => $xd7mastercontroller::setup_svc_password
52+
},
53+
#require => Dsc_sqldatabaserecoverymodel['SiteDatabaseRecoveryModel']
54+
}
4255

43-
dsc_sqlagdatabase{'LoggingDatabaseAlwaysOn':
44-
dsc_databasename => $loggingdatabasename,
45-
dsc_availabilitygroupname => $sqlavailabilitygroup,
46-
dsc_servername => $databaseserver,
47-
dsc_instancename => 'MSSQLSERVER',
48-
dsc_backuppath => $sqldbbackuppath,
49-
dsc_psdscrunascredential => {'user' => $svc_username, 'password' => $svc_password},
50-
#require => Dsc_sqldatabaserecoverymodel['LoggingDatabaseRecoveryModel']
51-
}
52-
53-
dsc_sqlagdatabase{'MonitorDatabaseAlwaysOn':
54-
dsc_databasename => $monitordatabasename,
55-
dsc_availabilitygroupname => $sqlavailabilitygroup,
56-
dsc_servername => $databaseserver,
57-
dsc_instancename => 'MSSQLSERVER',
58-
dsc_backuppath => $sqldbbackuppath,
59-
dsc_psdscrunascredential => {'user' => $svc_username, 'password' => $svc_password},
60-
#require => Dsc_sqldatabaserecoverymodel['MonitorDatabaseRecoveryModel']
61-
}
62-
63-
}
56+
dsc_sqlagdatabase{'LoggingDatabaseAlwaysOn':
57+
dsc_databasename => $xd7mastercontroller::loggingdatabasename,
58+
dsc_availabilitygroupname => $xd7mastercontroller::sqlavailabilitygroup,
59+
dsc_servername => $xd7mastercontroller::databaseserver,
60+
dsc_instancename => 'MSSQLSERVER',
61+
dsc_backuppath => $xd7mastercontroller::sqldbbackuppath,
62+
dsc_psdscrunascredential => {
63+
'user' => $xd7mastercontroller::setup_svc_username,
64+
'password' => $xd7mastercontroller::setup_svc_password
65+
},
66+
#require => Dsc_sqldatabaserecoverymodel['LoggingDatabaseRecoveryModel']
67+
}
6468

69+
dsc_sqlagdatabase{'MonitorDatabaseAlwaysOn':
70+
dsc_databasename => $xd7mastercontroller::monitordatabasename,
71+
dsc_availabilitygroupname => $xd7mastercontroller::sqlavailabilitygroup,
72+
dsc_servername => $xd7mastercontroller::databaseserver,
73+
dsc_instancename => 'MSSQLSERVER',
74+
dsc_backuppath => $xd7mastercontroller::sqldbbackuppath,
75+
dsc_psdscrunascredential => {
76+
'user' => $xd7mastercontroller::setup_svc_username,
77+
'password' => $xd7mastercontroller::setup_svc_password
78+
},
79+
#require => Dsc_sqldatabaserecoverymodel['MonitorDatabaseRecoveryModel']
80+
}
81+
}
6582
}

manifests/init.pp

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,38 @@
1111
# Sample Usage:
1212
#
1313
class xd7mastercontroller (
14-
$svc_username,
15-
$svc_password,
16-
$sitename,
17-
$databaseserver,
18-
$licenceserver,
19-
$sitedatabasename='CitrixSiteDB',
20-
$loggingdatabasename='CitrixLogDB',
21-
$monitordatabasename='CitrixMonitorDB',
22-
$sourcepath,
23-
$xd7administrator,
24-
$sqlalwayson = false,
25-
$sqlavailabilitygroup = '', #Name of the SQL Server Availability group
26-
$sqldbbackuppath = '',
27-
$https = false,
28-
$sslCertificateSourcePath = '',
29-
$sslCertificatePassword = '',
30-
$sslCertificateThumbprint = ''
14+
$setup_svc_username,
15+
$setup_svc_password,
16+
$sitename,
17+
$databaseserver,
18+
$licenceserver,
19+
$sourcepath,
20+
$xd7administrator,
21+
$sitedatabasename='CitrixSiteDB',
22+
$loggingdatabasename='CitrixLogDB',
23+
$monitordatabasename='CitrixMonitorDB',
24+
$sqlalwayson = false,
25+
$sqlavailabilitygroup = '', #Name of the SQL Server Availability group
26+
$sqldbbackuppath = '',
27+
$sqlservermodulesource = 'internet',
28+
$sqlservermodulesourcepath = '',
29+
$https = false,
30+
$sslcertificatesourcepath = '',
31+
$sslcertificatepassword = '',
32+
$sslcertificatethumbprint = ''
3133
)
3234

3335
{
34-
contain xd7mastercontroller::install
35-
contain xd7mastercontroller::siteconfig
36-
contain xd7mastercontroller::databasehighavailability
37-
contain xd7mastercontroller::sslconfig
38-
Class['::xd7mastercontroller::install'] ->
39-
Class['::xd7mastercontroller::siteconfig'] ->
40-
#Class['::xd7mastercontroller::databasehighavailability'] ->
41-
Class['::xd7mastercontroller::sslconfig']
36+
contain xd7mastercontroller::install
37+
contain xd7mastercontroller::siteconfig
38+
contain xd7mastercontroller::databasehighavailability
39+
contain xd7mastercontroller::sslconfig
40+
Class['::xd7mastercontroller::install']
41+
->Class['::xd7mastercontroller::siteconfig']
42+
#->Class['::xd7mastercontroller::databasehighavailability']
43+
->Class['::xd7mastercontroller::sslconfig']
4244

43-
reboot { 'dsc_reboot':
44-
when => pending
45-
}
45+
reboot { 'dsc_reboot':
46+
when => pending
47+
}
4648
}

0 commit comments

Comments
 (0)