Skip to content

Commit aae33f1

Browse files
authored
Merge pull request #1 from virtualdesktopdevops/dev
IIS removal + netsh ssl cert binding to Broker Service
2 parents 1953410 + ebbb8e6 commit aae33f1

4 files changed

Lines changed: 96 additions & 87 deletions

File tree

README.markdown

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

3-
This modules install a fully working Citrix 7.x Delivery Controller, including Citrix site creation and administrator rights setup.
3+
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
7-
- Sécurity : SSL configuration to secure communications with the Citrix XML service
7+
- Sécurity : SSL configuration to secure communications with the Citrix XML Broker Service
88

99
## Integration informations
1010
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.

manifests/install.pp

Lines changed: 47 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,57 @@
11
class xd7mastercontroller::install inherits xd7mastercontroller {
22

3-
reboot { 'after_run':
4-
apply => immediately,
5-
when => refreshed
6-
}
7-
8-
dsc_xcredssp{ 'Server':
9-
dsc_ensure => 'Present',
10-
dsc_role => 'Server',
11-
notify => Reboot['after_run']
12-
}
13-
14-
dsc_xcredssp{ 'Client':
15-
dsc_ensure => 'Present',
16-
dsc_role => 'Client',
17-
dsc_delegatecomputers => '*'
18-
}
19-
20-
dsc_windowsfeature{'iis':
21-
dsc_ensure => 'Present',
22-
dsc_name => 'Web-Server',
3+
reboot { 'after_run':
4+
apply => immediately,
5+
when => refreshed
6+
}
7+
8+
dsc_xcredssp{ 'Server':
9+
dsc_ensure => 'Present',
10+
dsc_role => 'Server',
11+
notify => Reboot['after_run']
2312
}
24-
25-
dsc_windowsfeature{'Web-Scripting-Tools':
26-
dsc_ensure => 'Present',
27-
dsc_name => 'Web-Scripting-Tools',
13+
14+
dsc_xcredssp{ 'Client':
15+
dsc_ensure => 'Present',
16+
dsc_role => 'Client',
17+
dsc_delegatecomputers => '*'
2818
}
2919

30-
dsc_windowsfeature{'Web-Mgmt-Console':
31-
dsc_ensure => 'Present',
32-
dsc_name => 'Web-Mgmt-Console',
33-
}
20+
#Ensure IIS is not installed on the system to avoid conflicts with Broker Service
21+
dsc_windowsfeature{'iis':
22+
dsc_ensure => 'Absent',
23+
dsc_name => 'Web-Server',
24+
}
3425

35-
dsc_xd7features { 'XD7DeliveryController':
36-
dsc_issingleinstance => 'Yes',
37-
dsc_role => [Studio, Controller],
38-
dsc_sourcepath => $sourcepath,
39-
dsc_ensure => 'present',
40-
require => Dsc_windowsfeature['iis'],
41-
notify => Reboot['after_run']
42-
}
26+
#Install Delivery Controller
27+
dsc_xd7features { 'XD7DeliveryController':
28+
dsc_issingleinstance => 'Yes',
29+
dsc_role => [Studio, Controller],
30+
dsc_sourcepath => $sourcepath,
31+
dsc_ensure => 'present',
32+
require => Dsc_windowsfeature['iis'],
33+
notify => Reboot['after_run']
34+
}
4335

44-
#SQLSERVER powershell module deployment.
45-
#Required for database high awailability setup (always on citrix databases membership)
46-
file{ "C:\\Program Files\\WindowsPowerShell\\Modules\\sqlserver_powershell_21.0.17199.zip":
47-
source => 'puppet:///modules/xd7mastercontroller/sqlserver_powershell_21.0.17199.zip',
48-
source_permissions => ignore,
49-
}
36+
#Download and install SQLSERVER powershell module. Required for database high availability setup (always on citrix databases membership)
37+
file{ "C:\\Program Files\\WindowsPowerShell\\Modules\\sqlserver_powershell_21.0.17199.zip":
38+
source => 'puppet:///modules/xd7mastercontroller/sqlserver_powershell_21.0.17199.zip',
39+
source_permissions => ignore,
40+
}
5041

51-
#Function provided by the reidmv-unzip
52-
unzip{'UnzipSqlserverModule':
53-
source => 'C:\\Program Files\WindowsPowerShell\Modules\sqlserver_powershell_21.0.17199.zip',
54-
destination => 'C:\\Program Files\WindowsPowerShell\Modules',
55-
creates => 'C:\\Program Files\WindowsPowerShell\Modules\SqlServer',
56-
require => File["C:\\Program Files\\WindowsPowerShell\\Modules\\sqlserver_powershell_21.0.17199.zip"]
57-
}
42+
#dsc_xarchive{'UnzipSqlserverModule':
43+
# dsc_path => 'C:\Program Files\WindowsPowerShell\Modules\sqlserver_powershell_21.0.17199.zip',
44+
# dsc_destination => 'C:\Program Files\WindowsPowerShell\Modules',
45+
# dsc_force => true,
46+
# require => File["C:\\Program Files\\WindowsPowerShell\\Modules\\sqlserver_powershell_21.0.17199.zip"]
47+
#}
48+
49+
#Unzip function provided by the reidmv-unzip
50+
unzip{'UnzipSqlserverModule':
51+
source => 'C:\\Program Files\WindowsPowerShell\Modules\sqlserver_powershell_21.0.17199.zip',
52+
destination => 'C:\\Program Files\WindowsPowerShell\Modules',
53+
creates => 'C:\\Program Files\WindowsPowerShell\Modules\SqlServer',
54+
require => File["C:\\Program Files\\WindowsPowerShell\\Modules\\sqlserver_powershell_21.0.17199.zip"]
55+
}
5856

5957
}

manifests/sslconfig.pp

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,48 @@
11
class xd7mastercontroller::sslconfig inherits xd7mastercontroller {
22
if $https {
3-
dsc_file{ 'SSLCert':
4-
dsc_sourcepath => $sslCertificateSourcePath,
5-
dsc_destinationpath => 'c:\SSL\cert.pfx',
6-
dsc_type => 'File'
7-
}
8-
9-
dsc_xpfximport{ 'ImportSSLCert':
10-
dsc_thumbprint => $sslCertificateThumbprint,
11-
dsc_path => 'c:\SSL\cert.pfx',
12-
dsc_location => 'LocalMachine',
13-
dsc_store => 'WebHosting',
14-
dsc_credential => {'user' => 'cert', 'password' => $sslCertificatePassword },
15-
require => Dsc_file['SSLCert']
16-
}
3+
reboot { 'after_sslconfig':
4+
apply => finished,
5+
when => refreshed
6+
}
7+
8+
#Download SSL certificate
9+
dsc_file{ 'SSLCert':
10+
dsc_sourcepath => $sslCertificateSourcePath,
11+
dsc_destinationpath => 'c:\SSL\cert.pfx',
12+
dsc_type => 'File'
13+
}->
14+
15+
#Load SSL certificate in Local Computer personal certificate store
16+
dsc_xpfximport{ 'ImportSSLCert':
17+
dsc_thumbprint => $sslCertificateThumbprint,
18+
dsc_path => 'c:\SSL\cert.pfx',
19+
dsc_location => 'LocalMachine',
20+
dsc_store => 'My',
21+
dsc_credential => {'user' => 'cert', 'password' => $sslCertificatePassword },
22+
require => Dsc_file['SSLCert']
23+
}->
1724

18-
dsc_xwebsite{ 'DefaultWebSite':
19-
dsc_name => 'Default Web Site',
20-
dsc_physicalpath => 'C:\inetpub\wwwroot',
21-
dsc_bindinginfo => [
22-
{ protocol => 'HTTPS', port => '443', certificatethumbprint => $sslCertificateThumbprint, certificatestorename => 'WebHosting' },
23-
#{ protocol => 'HTTPS', certificatethumbprint => 'A4D8B8E3B1B6910CB54C3B6CDFD6478914327850' },
24-
#{ protocol => 'HTTPS', certificatestorename => 'My'; },
25-
#{ protocol => 'HTTP', port => '80'}
26-
],
27-
require => Dsc_xpfximport['ImportSSLCert']
25+
#Map SSL certificate to Citrix Broker Service using netsh method
26+
#netsh http add sslcert ipport=0.0.0.0:443 certhash=<Certificate Hash Number> appid={<Citrix Broker Service GUID>}
27+
dsc_script{ 'CitrixBrokerServiceSSL':
28+
dsc_getscript => 'Return @{ Result = [string]$(netsh http show sslcert) }',
29+
dsc_testscript => 'If ((netsh http show sslcert | Select-String "Application ID") -like "*Application*") {
30+
Return $true
31+
} Else {
32+
Return $false
33+
}',
34+
dsc_setscript => "\$brokerservice = get-wmiobject -class Win32_Product | Where-Object {\$_.name -Like \"*Broker Service*\"}
35+
\$guid = \$brokerservice.IdentifyingNumber
36+
netsh http add sslcert ipport=0.0.0.0:443 certhash=${$sslCertificateThumbprint} appid=\$guid",
37+
notify => Reboot['after_sslconfig']
2838
}
29-
30-
registry_value { 'HKLM\SOFTWARE\Citrix\DesktopServer\XmlServicesSslPort':
31-
ensure => present,
32-
type => 'dword',
33-
data => '443',
34-
require => Dsc_xd7features ['XD7DeliveryController']
35-
}
39+
40+
#Make sure Citrix XML Service SSL port is 443
41+
registry_value { 'HKLM\SOFTWARE\Citrix\DesktopServer\XmlServicesSslPort':
42+
ensure => present,
43+
type => 'dword',
44+
data => '443',
45+
require => Dsc_xd7features ['XD7DeliveryController']
46+
}
3647
}
3748
}

metadata.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"author": "citrixdeployment",
2+
"author": "virtualdesktopdevops",
33
"dependencies": [
44
{
55
"name": "reidmv/unzip",
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"license": "Apache-2.0",
18-
"name": "citrixdeployment-xd7mastercontroller",
18+
"name": "virtualdesktopdevops-xd7mastercontroller",
1919
"operatingsystem_support": [
2020
{
2121
"operatingsystem": "windows",
@@ -25,15 +25,15 @@
2525
]
2626
}
2727
],
28-
"project_page": "https://www.citrixdeployment.com",
28+
"project_page": "http://www.virtualdesktopdevops.com",
2929
"requirements": [
3030
{
3131
"name": "puppet",
3232
"version_requirement": ">= 3.8.0 < 6.0.0"
3333
}
3434
],
35-
"source": "https://www.citrixdeployment.com",
36-
"summary": "Xendesktop 7.x Delivery Controller & site creation",
35+
"source": "http://www.virtualdesktopdevops.com/",
36+
"summary": "Xendesktop 7.x Delivery Controller installation & site creation",
3737
"tags": [
3838
"powershell",
3939
"dsc",

0 commit comments

Comments
 (0)