update comment in the template
[heat-templates.git] / prod / dotnetnuke-dns.template
blob6f74c1f0e1e1908ec914ea594ba6aa182d8d594f
1 heat_template_version: 2013-05-23
3 description: |
4   HEAT template for installing DotNetNuke app on Windows Server
6 parameters:
8   name:
9     type: string
10     default: HeatWinResource
11     description: Windows Server Name
12     constraints:
13     - length:
14         min: 1
15         max: 64
16     - allowed_pattern: "[a-zA-Z][a-zA-Z0-9]*"
17       description: must begin with a letter and contain only alphanumeric characters.
18     
19   image:
20     type: string
21     default: Windows Server 2012
22     description: Windows Server Image
23   
24   flavor:
25     type: string
26     description: Rackspace Cloud Server flavor
27     default: 4GB Standard Instance
28     constraints:
29     - allowed_values:
30       - 4GB Standard Instance
31       - 8GB Standard Instance
32       - 15GB Standard Instance
33       - 30GB Standard Instance
34       description: must be a valid Rackspace Cloud Server flavor.
35   
36   
37   sql_password:
38     type: string
39     default: verybadpass_123
40     description: SQLExpress DB password
42   domain_name:    
43     description: valid domain name
44     type: string
45     default: example.com
46     
47   email_address:
48     description: domain owner email addresses
49     type: string
50     default: admin@example.com
51   
52   domain_record_type:
53     description: domain record type
54     type: string
55     default: A
56     constraints:
57     - allowed_values:
58       - A
59       - AAAA
60       - NS
61       - MX
62       - CNAME
63       - TXT
64       - SRV
66 resources:
68   rs_windows_server:
69     type: "Rackspace::Cloud::WinServer"
70     properties:
71       name: { get_param: name }
72       flavor: { get_param: flavor }
73       image: { get_param: image }
74       user_data:
75         str_replace:
76           template: |
77             $source = "http://download.microsoft.com/download/7/0/4/704CEB4C-9F42-4962-A2B0-5C84B0682C7A/WebPlatformInstaller_amd64_en-US.msi"
78             $destination = "webpi.msi"
79             $wc = New-Object System.Net.WebClient
80             $wc.DownloadFile($source, $destination)
81             Start-Process msiexec -ArgumentList "/i webpi.msi /qn"  -NoNewWindow -Wait
82             echo "AppPath[@]Default Web Site/dotnetnuke" > dnn.app
83             echo "sqldbpassword[@]${sqlpassword}" >> dnn.app
84             $tmpprofile = $env:userprofile
85             $env:userprofile = "c:\users\administrator"
86             $wpicmd = "C:\Program Files\Microsoft\Web Platform Installer\WebPICMD.exe"
87             Start-Process $wpicmd -ArgumentList "/Install /Application:dotnetnuke@dnn.app /SQLPassword:%sqlpassword% /AcceptEULA /Log:.\wpi.log"  -NoNewWindow -Wait
88             Start-Process 'dism' -ArgumentList "/online /enable-feature /featurename:IIS-ASPNET45 /all" -NoNewWindow -Wait
89             $env:userprofile = $tmpprofile
90           params:
91             "%sqlpassword%": { get_param: sql_password }
93   dns:
94     type: Rackspace::Cloud::DNS
95     properties:
96       name: { get_param: domain_name }
97       emailAddress: { get_param: email_address }
98       records:
99       - name: { get_param: domain_name }
100         type: { get_param: domain_record_type }
101         data: { get_attr: [rs_windows_server, accessIPv4] }
102       - name: { get_param: domain_name }
103         type: NS
104         data: dns1.stabletransit.com
105       - name: { get_param: domain_name }
106         type: NS
107         data: dns2.stabletransit.com
109 outputs:
111   public_ip:
112     value: { get_attr: [ rs_windows_server, accessIPv4 ] }
113     description: public IP of the windows server
114   
115   website_url:
116     value:
117       str_replace:
118         template: http://%ip%/dotnetnuke/default.aspx
119         params:
120           "%ip%": { get_attr: [ rs_windows_server, accessIPv4 ] }
121     description: URL for DNN site
123   website_url:
124     value:
125       str_replace:
126         template: http://%domain%/dotnetnuke/default.aspx
127         params:
128           "%domain%": { get_attr: [ get_param, domain_name ] }
129     description: URL for DNN site with domain name