Skip to content

Commit a220960

Browse files
authored
Release v2.0.0 - PuppetForge - Merge pull request #6 from virtualdesktopdevops/dev
Release v2.0.0 - PuppetForge
2 parents 32a318e + f9557a5 commit a220960

13 files changed

Lines changed: 546 additions & 342 deletions

.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: 85 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1-
# xd7mastercontroller #
1+
# Citrix XenDesktop 7 delivery controller Puppet Module #
22

3-
This modules install an enterprise production grade Citrix 7.x Delivery Controller, including Citrix site creation and administrator rights setup.
3+
Puppet module installing a production grade Citrix XenDesktop 7.x Delivery Controller, including XenDesktop site creation, high availability configuration 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 [XenDesktop Powershell DSC Resource](https://github.com/VirtualEngine/XenDesktop7) as a dependency. Ready to use virtualdesktopdevops/dsc v1.5.0 puppet module provided on [Puppet Forge](https://forge.puppet.com/virtualdesktopdevops/dsc).
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.
@@ -15,51 +29,76 @@ The SSL certificate provided needs to be a password protected p12/pfx certificat
1529

1630
The module can be installed on a Standard, Datacenter version of Windows 2012R2 or Windows 2016. **Core version is not supported by Citrix for delivery Controller installation**.
1731

18-
## Usage
19-
- **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)
20-
- **svc_password** : (string) Password of the privileged account. Should be encrypted with hiera-eyaml.
21-
- **sitename** : (string) Name of the Xendesktop site
22-
- **databaseserver** : (string) FQDN of the SQL server used for citrix database hosting. If using a AlwaysOn SQL cluster, use the Listener FQDN.
23-
- **licenceserver** : (string) FQDN of the Citrix Licence server.
24-
- **sitedatabasename** : (string) Name of the citrix site database to be created
25-
- **loggingdatabasename** : (string) Name of the citrix logging database to be created
26-
- **monitordatabasename** : (string) Name of the citrix monitor database to be created
27-
- **sourcepath** : (string) Path of a folder containing the Xendesktop 7.x installer (unarchive the ISO image in this folder).
28-
- **xd7administrator** : (string) ActiveDirectory user or group which will be granted Citrix Administrator rights.
29-
- **domainNetbiosName** : (string) : Domain NETBIOS name.
30-
- **sqlalwayson** : (boolean) : true or false. Activate database AlwaysOn availability group membership ? Default is false. Needs to be true for a production grade environment
31-
- **sqlavailabilitygroup** : (string) (optionnal if sqlalwayson = false) : Name of the SQL AlwaysOn availability group.
32-
- **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.
33-
- **https** : (boolean) : true or false. Deploy SSL certificate and activate SSL access to Citrix XML service ? Default : false
34-
- **sslCertificateSourcePath** : (string) Location of the SSL certificate (p12 / PFX format with private key). Can be local folder, UNC path, HTTP URL)
35-
- **sslCertificatePassword** : (string) Password protecting the p12/pfx SSL certificate file.
36-
- **sslCertificateThumbprint** : (string) Thumbprint of the SSL certificate (available in the SSL certificate).
37-
38-
## Installing a Citrix Delivery Controller
32+
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.
33+
34+
## Usage ##
35+
**Mandatory parameters :**
36+
* **`[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)
37+
- **`[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.
39+
- **`[String]` sitename** _(Required)_: Name of the Xendesktop site
40+
- **`[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.
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
54+
- **`[Boolean]` sqlalwayson** _(Optional, default is false)_: Activate database AlwaysOn availability group membership ? Default is false. Needs to be true for a production grade environment
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.
57+
* **`[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'.
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.
59+
- **`[Boolean]` https** _(Optional, default is false)_: Deploy SSL certificate and activate SSL access to Citrix XML service ? Default : false
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).
63+
64+
## Installing a Citrix Delivery Controller ##
3965

4066
~~~puppet
41-
node 'CXDC' {
42-
class{'xd7mastercontroller':
43-
svc_username => 'TESTLAB\svc-puppet',
44-
svc_password => 'P@ssw0rd',
45-
sitename => 'XD7TestSite',
46-
databaseserver => 'CLSDB01LI.TESTLAB.COM',
47-
licenceserver => 'LICENCE.TESTLAB.COM',
48-
sitedatabasename => 'SITE_DB',
49-
loggingdatabasename => 'LOG_DB',
50-
monitordatabasename => 'MONITOR_DB',
51-
sourcepath => '\\fileserver\xendesktop715',
52-
xd7administrator => 'TESTLAB\Domain Admins',
53-
domainNetbiosName=> 'TESTLAB',
54-
sqlalwayson => true,
55-
sqlavailabilitygroup => 'CLSDB01',
56-
sqldbbackuppath => '\\fileserver\backup\sql',
57-
https => true,
58-
sslCertificateSourcePath => '\\fileserver\ssl\cxdc.pfx',
59-
sslCertificatePassword => 'P@ssw0rd',
60-
sslCertificateThumbprint => '44cce73845feef4da4d369a37386c862eb3bd4e1'
67+
node 'CXDC01' {
68+
class{'xd7deliverycontroller':
69+
setup_svc_username => 'TESTLAB\svc-puppet',
70+
setup_svc_password => 'P@ssw0rd',
71+
sourcepath => '\\\\fileserver\xendesktop715',
72+
sitename => 'XD7TestSite',
73+
role => 'primary'
74+
databaseserver => 'CLSDB01LI.TESTLAB.COM',
75+
licenceserver => 'LICENCE.TESTLAB.COM',
76+
xd7administrator => 'TESTLAB\Domain Admins',
77+
sitedatabasename => 'SITE_DB',
78+
loggingdatabasename => 'LOG_DB',
79+
monitordatabasename => 'MONITOR_DB',
80+
sqlalwayson => true,
81+
sqlavailabilitygroup => 'CLSDB01',
82+
sqldbbackuppath => '\\\\fileserver\backup\sql',
83+
https => true,
84+
sslCertificateSourcePath => '\\\\fileserver\ssl\cxdc.pfx',
85+
sslCertificatePassword => 'P@ssw0rd',
86+
sslCertificateThumbprint => '44cce73845feef4da4d369a37386c862eb3bd4e1'
6187
}
6288
}
63-
~~~
64-
6589
90+
node 'CXDC02' {
91+
class{'xd7deliverycontroller':
92+
setup_svc_username => 'TESTLAB\svc-puppet',
93+
setup_svc_password => 'P@ssw0rd',
94+
sourcepath => '\\\\fileserver\xendesktop715',
95+
sitename => 'XD7TestSite',
96+
role => 'secondary',
97+
site_primarycontroller => 'CXDC01',
98+
https => true,
99+
sslCertificateSourcePath => '\\\\fileserver\ssl\cxdc.pfx',
100+
sslCertificatePassword => 'P@ssw0rd',
101+
sslCertificateThumbprint => '44cce73845feef4da4d369a37386c862eb3bd4e1'
102+
}
103+
}
104+
~~~

changelog.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog - xd7deliverycontroller #
2+
3+
## Version 2.0.0 ##
4+
- **BREAKING CHANGE** : Merged **xd7mastercontroller** and **xd7slavecontroller** into **xd7deliverycontroller**. Added a **role** parameter to install a **primary** controller with XenDesktop site creation or a **secondary** controller joined to an existing XenDesktop site.
5+
- **BREAKING CHANGE** : Require virtualdesktopdevops/dsc >= 1.5.0 (puppetlabs/dsc fork compiled with XenDesktop7 DSC resource)
6+
- **BREAKING CHANGE** : Removed unneeded $domainNetbiosName parameter.
7+
- **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.
8+
- **BREAKING CHANGE** : Changed all module parameters to lowercase to comply with puppet guidelines.
9+
- **BREAKING CHANGE** : Removed SQLServer Powershell resource from the module. Added **sqlservermodulesource** and **sqlservermodulesourcepath** parameters to install is from the internet or from an enterprise file share.
10+
- Compliance with puppet language style guide and puppet forge standards.
11+
- Class parameters data types.
12+
13+
14+
15+
## Version 1.1.0 ##
16+
- Initial release
17+
- Module compatible with xSQLServer <= 9.0.0.0
-19.8 MB
Binary file not shown.

lib/facter/credsspclientgpo.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#https://puppet.com/blog/starting-out-writing-custom-facts-windows
2+
Facter.add('credsspclientgpo') do
3+
confine :osfamily => :windows
4+
setcode do
5+
begin
6+
result=false
7+
value = nil
8+
Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Policies\Microsoft\Windows\WinRM\Client') do |regkey|
9+
value = regkey['AllowCredSSP']
10+
result=true
11+
end
12+
result
13+
rescue
14+
false
15+
end
16+
end
17+
end

lib/facter/credsspservicegpo.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#https://puppet.com/blog/starting-out-writing-custom-facts-windows
2+
Facter.add('credsspservicegpo') do
3+
confine :osfamily => :windows
4+
setcode do
5+
begin
6+
result=false
7+
value = nil
8+
Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Policies\Microsoft\Windows\WinRM\Service') do |regkey|
9+
value = regkey['AllowCredSSP']
10+
result=true
11+
end
12+
result
13+
rescue
14+
false
15+
end
16+
end
17+
end

0 commit comments

Comments
 (0)