kitchen-azurerm 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 995ca89c612cad9ae93bce1d11d45cbc274af624
4
- data.tar.gz: 34e2d245c90a46f9dad073958514c616be972244
3
+ metadata.gz: 9d78ed11406793b3ea11b44853e2370d478d62ff
4
+ data.tar.gz: 6eed7294ffecec13efbd75709958321b3082cbeb
5
5
  SHA512:
6
- metadata.gz: 81a2221a1fcd71bcb2ece838c3ef09fb163e8169ffc0c5e13a5142628b02d87e10cff6731b1cb09ada8e6518c2e41ca33a92084483e53cbdf9cd41e82103c6dc
7
- data.tar.gz: a88e44fd81647004a8fa2b5eadfb40ab6a86c23904ab1e195fa42c6ef11f3da30fb32aa5f06d3296dfe6a7fa9877aead434dca008b4c8068354f596fae38619b
6
+ metadata.gz: e56bb62340088ffaa778bc7e6d6dbf7a202e5e2d8b6a3ba972f664c2ea038d993852baeee6f29b770fcb14cfebda4749c8b79186813d3f882d84e44971db962b
7
+ data.tar.gz: a7a202d8bc076fb2ffcef4a5222d47d6a97c19d603c565ec4da20b2b8858ab16c4c91dca9046eed9273670e7d2898c15ef78ffef48666a37263bc10c4b039ede
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
1
  # knife-azurerm Changelog
2
+
3
+ ## [0.2.0] - 2015-09-29
4
+ - Logs should be sent to info, not stdout (@stuartpreston)
5
+ - Added WinRM support, enables WinRM and WinRM/s and configures server for Basic/Negotiate authentication (@stuartpreston)
6
+ - Store server_id earlier so it can be retrieved if resources fail to create in Azure (@stuartpreston)
7
+
2
8
  ## [0.1.3] - 2015-09-23
3
9
  - Support *nix by changing the driver name to lowercase 'azurerm', remove Chef references (@gadgetmg)
4
10
 
data/README.md CHANGED
@@ -4,15 +4,14 @@
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/kitchen-azurerm.svg)](http://badge.fury.io/rb/kitchen-azurerm)
6
6
 
7
- This version has been tested on Windows only, and may not work on OSX/Linux.
7
+ This version has been tested on Windows and OS/X only, and may not work on Linux.
8
8
 
9
9
  ## Known issues
10
- - WinRM support is not complete, Windows machines will not converge. They will provision (and destroy) correctly, however.
11
- - Azure SDK for Ruby has blocking issues on OSX/Linux environments, this is being tracked here: (https://github.com/Azure/azure-sdk-for-ruby/pull/282)
10
+ - Azure SDK for Ruby has blocking issues on Linux environments, this is being tracked here: (https://github.com/Azure/azure-sdk-for-ruby/pull/282)
12
11
 
13
12
  ## Quick-start
14
13
  ### Installation
15
- This plugin is distributed as a Ruby Gem. To install it, run:
14
+ This plugin is distributed as a [Ruby Gem](https://rubygems.org/gems/kitchen-azurerm). To install it, run:
16
15
 
17
16
  ```$ gem install kitchen-azurerm```
18
17
 
@@ -79,13 +78,15 @@ suites:
79
78
  ```
80
79
 
81
80
  ### Parallel execution
82
- Parallel execution of create/converge/destroy is supported via the --parallel parameter.
81
+ Parallel execution of create/converge/destroy is supported via the --parallel parameter. Each machine is created in it's own Azure Resource Group so has no shared lifecycle with the other machines in the test run. To take advantage of parallel execution use the following command:
82
+
83
+ ```kitchen test --parallel```
83
84
 
84
85
  ### .kitchen.yml example 2 - Windows
85
86
 
86
- ```kitchen test --parallel```
87
+ Here's a further example ```.kitchen.yml``` file that will provision a Windows Server 2012 R2 instance, using WinRM as the transport. The resource created in Azure will enable itself for remote access at deployment time:
87
88
 
88
- Here's a further example ```.kitchen.yml``` file that will provision a Windows Server 2012 R2 instance, using WinRM as the transport:
89
+ **Note: Test Kitchen currently uses WinRM over HTTP rather than HTTPS. This means the temporary machine credentials traverse the internet in the clear. This will be changed once Test Kitchen fully supports WinRM over a secure channel.**
89
90
 
90
91
  ```yml
91
92
  ---
@@ -120,143 +121,31 @@ You can use the azure (azure-cli) command line tools to interrogate for the Urn.
120
121
  ```$ azure vm image list "West Europe" Canonical UbuntuServer```
121
122
 
122
123
  This will return a list like the following, from which you can derive the Urn.
124
+ *this list has been shortened for readability*
123
125
 
124
126
  ```
125
- data: Publisher Offer Sku OS Version Location Urn
126
- data: --------- ------------ ----------------- --------- --------------- ---------- --------------------------------------------------------
127
- data: Canonical UbuntuServer 12.04.2-LTS undefined 12.04.201302250 westeurope Canonical:UbuntuServer:12.04.2-LTS:12.04.201302250
128
- data: Canonical UbuntuServer 12.04.2-LTS undefined 12.04.201303250 westeurope Canonical:UbuntuServer:12.04.2-LTS:12.04.201303250
129
- data: Canonical UbuntuServer 12.04.2-LTS undefined 12.04.201304150 westeurope Canonical:UbuntuServer:12.04.2-LTS:12.04.201304150
130
- data: Canonical UbuntuServer 12.04.2-LTS undefined 12.04.201305160 westeurope Canonical:UbuntuServer:12.04.2-LTS:12.04.201305160
131
- data: Canonical UbuntuServer 12.04.2-LTS undefined 12.04.201305270 westeurope Canonical:UbuntuServer:12.04.2-LTS:12.04.201305270
132
- data: Canonical UbuntuServer 12.04.2-LTS undefined 12.04.201306030 westeurope Canonical:UbuntuServer:12.04.2-LTS:12.04.201306030
133
- data: Canonical UbuntuServer 12.04.2-LTS undefined 12.04.201306240 westeurope Canonical:UbuntuServer:12.04.2-LTS:12.04.201306240
134
- data: Canonical UbuntuServer 12.04.3-LTS undefined 12.04.201308270 westeurope Canonical:UbuntuServer:12.04.3-LTS:12.04.201308270
135
- data: Canonical UbuntuServer 12.04.3-LTS undefined 12.04.201309090 westeurope Canonical:UbuntuServer:12.04.3-LTS:12.04.201309090
136
- data: Canonical UbuntuServer 12.04.3-LTS undefined 12.04.201309161 westeurope Canonical:UbuntuServer:12.04.3-LTS:12.04.201309161
137
- data: Canonical UbuntuServer 12.04.3-LTS undefined 12.04.201310030 westeurope Canonical:UbuntuServer:12.04.3-LTS:12.04.201310030
138
- data: Canonical UbuntuServer 12.04.3-LTS undefined 12.04.201310240 westeurope Canonical:UbuntuServer:12.04.3-LTS:12.04.201310240
139
- data: Canonical UbuntuServer 12.04.3-LTS undefined 12.04.201311110 westeurope Canonical:UbuntuServer:12.04.3-LTS:12.04.201311110
140
- data: Canonical UbuntuServer 12.04.3-LTS undefined 12.04.201311140 westeurope Canonical:UbuntuServer:12.04.3-LTS:12.04.201311140
141
- data: Canonical UbuntuServer 12.04.3-LTS undefined 12.04.201312050 westeurope Canonical:UbuntuServer:12.04.3-LTS:12.04.201312050
142
- data: Canonical UbuntuServer 12.04.3-LTS undefined 12.04.201401270 westeurope Canonical:UbuntuServer:12.04.3-LTS:12.04.201401270
143
- data: Canonical UbuntuServer 12.04.3-LTS undefined 12.04.201401300 westeurope Canonical:UbuntuServer:12.04.3-LTS:12.04.201401300
144
- data: Canonical UbuntuServer 12.04.4-LTS undefined 12.04.201402270 westeurope Canonical:UbuntuServer:12.04.4-LTS:12.04.201402270
145
- data: Canonical UbuntuServer 12.04.4-LTS undefined 12.04.201404080 westeurope Canonical:UbuntuServer:12.04.4-LTS:12.04.201404080
146
- data: Canonical UbuntuServer 12.04.4-LTS undefined 12.04.201404280 westeurope Canonical:UbuntuServer:12.04.4-LTS:12.04.201404280
147
- data: Canonical UbuntuServer 12.04.4-LTS undefined 12.04.201405140 westeurope Canonical:UbuntuServer:12.04.4-LTS:12.04.201405140
148
- data: Canonical UbuntuServer 12.04.4-LTS undefined 12.04.201406060 westeurope Canonical:UbuntuServer:12.04.4-LTS:12.04.201406060
149
- data: Canonical UbuntuServer 12.04.4-LTS undefined 12.04.201406190 westeurope Canonical:UbuntuServer:12.04.4-LTS:12.04.201406190
150
- data: Canonical UbuntuServer 12.04.4-LTS undefined 12.04.201407020 westeurope Canonical:UbuntuServer:12.04.4-LTS:12.04.201407020
151
- data: Canonical UbuntuServer 12.04.4-LTS undefined 12.04.201407170 westeurope Canonical:UbuntuServer:12.04.4-LTS:12.04.201407170
152
- data: Canonical UbuntuServer 12.04.5-DAILY-LTS undefined 12.04.201508180 westeurope Canonical:UbuntuServer:12.04.5-DAILY-LTS:12.04.201508180
153
- data: Canonical UbuntuServer 12.04.5-DAILY-LTS undefined 12.04.201508190 westeurope Canonical:UbuntuServer:12.04.5-DAILY-LTS:12.04.201508190
154
- data: Canonical UbuntuServer 12.04.5-DAILY-LTS undefined 12.04.201508313 westeurope Canonical:UbuntuServer:12.04.5-DAILY-LTS:12.04.201508313
155
- data: Canonical UbuntuServer 12.04.5-DAILY-LTS undefined 12.04.201509020 westeurope Canonical:UbuntuServer:12.04.5-DAILY-LTS:12.04.201509020
156
- data: Canonical UbuntuServer 12.04.5-DAILY-LTS undefined 12.04.201509040 westeurope Canonical:UbuntuServer:12.04.5-DAILY-LTS:12.04.201509040
157
- data: Canonical UbuntuServer 12.04.5-DAILY-LTS undefined 12.04.201509050 westeurope Canonical:UbuntuServer:12.04.5-DAILY-LTS:12.04.201509050
158
- data: Canonical UbuntuServer 12.04.5-DAILY-LTS undefined 12.04.201509060 westeurope Canonical:UbuntuServer:12.04.5-DAILY-LTS:12.04.201509060
159
- data: Canonical UbuntuServer 12.04.5-DAILY-LTS undefined 12.04.201509090 westeurope Canonical:UbuntuServer:12.04.5-DAILY-LTS:12.04.201509090
160
- data: Canonical UbuntuServer 12.04.5-DAILY-LTS undefined 12.04.201509100 westeurope Canonical:UbuntuServer:12.04.5-DAILY-LTS:12.04.201509100
161
- data: Canonical UbuntuServer 12.04.5-DAILY-LTS undefined 12.04.201509170 westeurope Canonical:UbuntuServer:12.04.5-DAILY-LTS:12.04.201509170
162
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201408060 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201408060
163
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201408292 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201408292
164
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201409092 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201409092
165
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201409231 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201409231
166
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201409244 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201409244
167
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201409251 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201409251
168
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201409252 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201409252
169
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201409270 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201409270
170
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201501190 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201501190
171
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201501270 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201501270
172
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201502040 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201502040
173
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201503090 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201503090
174
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201504010 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201504010
175
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201504130 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201504130
176
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201505120 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201505120
177
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201505221 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201505221
178
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201506100 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201506100
179
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201506150 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201506150
180
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201506160 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201506160
181
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201507070 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201507070
182
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201507280 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201507280
183
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201507301 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201507301
184
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201507311 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201507311
185
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201508190 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201508190
186
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201509060 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201509060
187
- data: Canonical UbuntuServer 12.04.5-LTS undefined 12.04.201509090 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201509090
188
- data: Canonical UbuntuServer 12.10 undefined 12.10.201212180 westeurope Canonical:UbuntuServer:12.10:12.10.201212180
189
- data: Canonical UbuntuServer 14.04.0-LTS undefined 14.04.201404140 westeurope Canonical:UbuntuServer:14.04.0-LTS:14.04.201404140
190
- data: Canonical UbuntuServer 14.04.0-LTS undefined 14.04.201404142 westeurope Canonical:UbuntuServer:14.04.0-LTS:14.04.201404142
191
- data: Canonical UbuntuServer 14.04.0-LTS undefined 14.04.201404161 westeurope Canonical:UbuntuServer:14.04.0-LTS:14.04.201404161
192
- data: Canonical UbuntuServer 14.04.0-LTS undefined 14.04.201405280 westeurope Canonical:UbuntuServer:14.04.0-LTS:14.04.201405280
193
- data: Canonical UbuntuServer 14.04.0-LTS undefined 14.04.201406061 westeurope Canonical:UbuntuServer:14.04.0-LTS:14.04.201406061
194
- data: Canonical UbuntuServer 14.04.0-LTS undefined 14.04.201406181 westeurope Canonical:UbuntuServer:14.04.0-LTS:14.04.201406181
195
- data: Canonical UbuntuServer 14.04.0-LTS undefined 14.04.201407240 westeurope Canonical:UbuntuServer:14.04.0-LTS:14.04.201407240
196
- data: Canonical UbuntuServer 14.04.1-LTS undefined 14.04.201409090 westeurope Canonical:UbuntuServer:14.04.1-LTS:14.04.201409090
197
- data: Canonical UbuntuServer 14.04.1-LTS undefined 14.04.201409240 westeurope Canonical:UbuntuServer:14.04.1-LTS:14.04.201409240
198
- data: Canonical UbuntuServer 14.04.1-LTS undefined 14.04.201409260 westeurope Canonical:UbuntuServer:14.04.1-LTS:14.04.201409260
199
- data: Canonical UbuntuServer 14.04.1-LTS undefined 14.04.201409270 westeurope Canonical:UbuntuServer:14.04.1-LTS:14.04.201409270
200
- data: Canonical UbuntuServer 14.04.1-LTS undefined 14.04.201411250 westeurope Canonical:UbuntuServer:14.04.1-LTS:14.04.201411250
201
- data: Canonical UbuntuServer 14.04.1-LTS undefined 14.04.201501230 westeurope Canonical:UbuntuServer:14.04.1-LTS:14.04.201501230
202
- data: Canonical UbuntuServer 14.04.2-LTS undefined 14.04.201503090 westeurope Canonical:UbuntuServer:14.04.2-LTS:14.04.201503090
203
- data: Canonical UbuntuServer 14.04.2-LTS undefined 14.04.201505060 westeurope Canonical:UbuntuServer:14.04.2-LTS:14.04.201505060
204
- data: Canonical UbuntuServer 14.04.2-LTS undefined 14.04.201506100 westeurope Canonical:UbuntuServer:14.04.2-LTS:14.04.201506100
205
- data: Canonical UbuntuServer 14.04.2-LTS undefined 14.04.201507060 westeurope Canonical:UbuntuServer:14.04.2-LTS:14.04.201507060
206
- data: Canonical UbuntuServer 14.04.3-DAILY-LTS undefined 14.04.201509020 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509020
207
- data: Canonical UbuntuServer 14.04.3-DAILY-LTS undefined 14.04.201509030 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509030
208
- data: Canonical UbuntuServer 14.04.3-DAILY-LTS undefined 14.04.201509040 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509040
209
- data: Canonical UbuntuServer 14.04.3-DAILY-LTS undefined 14.04.201509050 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509050
210
- data: Canonical UbuntuServer 14.04.3-DAILY-LTS undefined 14.04.201509070 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509070
211
- data: Canonical UbuntuServer 14.04.3-DAILY-LTS undefined 14.04.201509080 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509080
212
- data: Canonical UbuntuServer 14.04.3-DAILY-LTS undefined 14.04.201509091 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509091
213
- data: Canonical UbuntuServer 14.04.3-DAILY-LTS undefined 14.04.201509110 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509110
214
- data: Canonical UbuntuServer 14.04.3-DAILY-LTS undefined 14.04.201509160 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509160
215
- data: Canonical UbuntuServer 14.04.3-DAILY-LTS undefined 14.04.201509220 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509220
216
- data: Canonical UbuntuServer 14.04.3-LTS undefined 14.04.201508050 westeurope Canonical:UbuntuServer:14.04.3-LTS:14.04.201508050
217
- data: Canonical UbuntuServer 14.04.3-LTS undefined 14.04.201509080 westeurope Canonical:UbuntuServer:14.04.3-LTS:14.04.201509080
218
- data: Canonical UbuntuServer 15.04 undefined 15.04.201504171 westeurope Canonical:UbuntuServer:15.04:15.04.201504171
219
- data: Canonical UbuntuServer 15.04 undefined 15.04.201504201 westeurope Canonical:UbuntuServer:15.04:15.04.201504201
220
- data: Canonical UbuntuServer 15.04 undefined 15.04.201504210 westeurope Canonical:UbuntuServer:15.04:15.04.201504210
221
- data: Canonical UbuntuServer 15.04 undefined 15.04.201504211 westeurope Canonical:UbuntuServer:15.04:15.04.201504211
222
- data: Canonical UbuntuServer 15.04 undefined 15.04.201504220 westeurope Canonical:UbuntuServer:15.04:15.04.201504220
223
- data: Canonical UbuntuServer 15.04 undefined 15.04.201505130 westeurope Canonical:UbuntuServer:15.04:15.04.201505130
224
- data: Canonical UbuntuServer 15.04 undefined 15.04.201505131 westeurope Canonical:UbuntuServer:15.04:15.04.201505131
225
- data: Canonical UbuntuServer 15.04 undefined 15.04.201505281 westeurope Canonical:UbuntuServer:15.04:15.04.201505281
226
- data: Canonical UbuntuServer 15.04 undefined 15.04.201506110 westeurope Canonical:UbuntuServer:15.04:15.04.201506110
227
- data: Canonical UbuntuServer 15.04 undefined 15.04.201506161 westeurope Canonical:UbuntuServer:15.04:15.04.201506161
228
- data: Canonical UbuntuServer 15.04 undefined 15.04.201507070 westeurope Canonical:UbuntuServer:15.04:15.04.201507070
229
- data: Canonical UbuntuServer 15.04 undefined 15.04.201507220 westeurope Canonical:UbuntuServer:15.04:15.04.201507220
230
- data: Canonical UbuntuServer 15.04 undefined 15.04.201507280 westeurope Canonical:UbuntuServer:15.04:15.04.201507280
231
- data: Canonical UbuntuServer 15.04 undefined 15.04.201507290 westeurope Canonical:UbuntuServer:15.04:15.04.201507290
232
- data: Canonical UbuntuServer 15.04 undefined 15.04.201508180 westeurope Canonical:UbuntuServer:15.04:15.04.201508180
233
- data: Canonical UbuntuServer 15.04 undefined 15.04.201509090 westeurope Canonical:UbuntuServer:15.04:15.04.201509090
234
- data: Canonical UbuntuServer 15.04 undefined 15.04.201509100 westeurope Canonical:UbuntuServer:15.04:15.04.201509100
235
- data: Canonical UbuntuServer 15.04-beta undefined 15.04.201502245 westeurope Canonical:UbuntuServer:15.04-beta:15.04.201502245
236
- data: Canonical UbuntuServer 15.04-beta undefined 15.04.201503250 westeurope Canonical:UbuntuServer:15.04-beta:15.04.201503250
237
- data: Canonical UbuntuServer 15.04-DAILY undefined 15.04.201508210 westeurope Canonical:UbuntuServer:15.04-DAILY:15.04.201508210
238
- data: Canonical UbuntuServer 15.04-DAILY undefined 15.04.201508283 westeurope Canonical:UbuntuServer:15.04-DAILY:15.04.201508283
239
- data: Canonical UbuntuServer 15.04-DAILY undefined 15.04.201509010 westeurope Canonical:UbuntuServer:15.04-DAILY:15.04.201509010
240
- data: Canonical UbuntuServer 15.04-DAILY undefined 15.04.201509020 westeurope Canonical:UbuntuServer:15.04-DAILY:15.04.201509020
241
- data: Canonical UbuntuServer 15.04-DAILY undefined 15.04.201509030 westeurope Canonical:UbuntuServer:15.04-DAILY:15.04.201509030
242
- data: Canonical UbuntuServer 15.04-DAILY undefined 15.04.201509090 westeurope Canonical:UbuntuServer:15.04-DAILY:15.04.201509090
243
- data: Canonical UbuntuServer 15.04-DAILY undefined 15.04.201509100 westeurope Canonical:UbuntuServer:15.04-DAILY:15.04.201509100
244
- data: Canonical UbuntuServer 15.04-DAILY undefined 15.04.201509110 westeurope Canonical:UbuntuServer:15.04-DAILY:15.04.201509110
245
- data: Canonical UbuntuServer 15.04-DAILY undefined 15.04.201509111 westeurope Canonical:UbuntuServer:15.04-DAILY:15.04.201509111
246
- data: Canonical UbuntuServer 15.04-DAILY undefined 15.04.201509170 westeurope Canonical:UbuntuServer:15.04-DAILY:15.04.201509170
247
- data: Canonical UbuntuServer 15.10-alpha undefined 15.10.201506240 westeurope Canonical:UbuntuServer:15.10-alpha:15.10.201506240
248
- data: Canonical UbuntuServer 15.10-alpha undefined 15.10.201507281 westeurope Canonical:UbuntuServer:15.10-alpha:15.10.201507281
249
- data: Canonical UbuntuServer 15.10-beta undefined 15.10.201508250 westeurope Canonical:UbuntuServer:15.10-beta:15.10.201508250
250
- data: Canonical UbuntuServer 15.10-DAILY undefined 15.10.201509120 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509120
251
- data: Canonical UbuntuServer 15.10-DAILY undefined 15.10.201509130 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509130
252
- data: Canonical UbuntuServer 15.10-DAILY undefined 15.10.201509140 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509140
253
- data: Canonical UbuntuServer 15.10-DAILY undefined 15.10.201509150 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509150
254
- data: Canonical UbuntuServer 15.10-DAILY undefined 15.10.201509160 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509160
255
- data: Canonical UbuntuServer 15.10-DAILY undefined 15.10.201509170 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509170
256
- data: Canonical UbuntuServer 15.10-DAILY undefined 15.10.201509180 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509180
257
- data: Canonical UbuntuServer 15.10-DAILY undefined 15.10.201509190 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509190
258
- data: Canonical UbuntuServer 15.10-DAILY undefined 15.10.201509210 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509210
259
- data: Canonical UbuntuServer 15.10-DAILY undefined 15.10.201509220 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509220
127
+ data: Publisher Offer Sku Version Location Urn
128
+ data: --------- ------------ ----------------- --------------- ---------- --------------------------------------------------------
129
+ data: Canonical UbuntuServer 12.04.5-LTS 12.04.201507301 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201507301
130
+ data: Canonical UbuntuServer 12.04.5-LTS 12.04.201507311 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201507311
131
+ data: Canonical UbuntuServer 12.04.5-LTS 12.04.201508190 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201508190
132
+ data: Canonical UbuntuServer 12.04.5-LTS 12.04.201509060 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201509060
133
+ data: Canonical UbuntuServer 12.04.5-LTS 12.04.201509090 westeurope Canonical:UbuntuServer:12.04.5-LTS:12.04.201509090
134
+ data: Canonical UbuntuServer 12.10 12.10.201212180 westeurope Canonical:UbuntuServer:12.10:12.10.201212180
135
+ data: Canonical UbuntuServer 14.04.3-DAILY-LTS 14.04.201509110 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509110
136
+ data: Canonical UbuntuServer 14.04.3-DAILY-LTS 14.04.201509160 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509160
137
+ data: Canonical UbuntuServer 14.04.3-DAILY-LTS 14.04.201509220 westeurope Canonical:UbuntuServer:14.04.3-DAILY-LTS:14.04.201509220
138
+ data: Canonical UbuntuServer 14.04.3-LTS 14.04.201508050 westeurope Canonical:UbuntuServer:14.04.3-LTS:14.04.201508050
139
+ data: Canonical UbuntuServer 14.04.3-LTS 14.04.201509080 westeurope Canonical:UbuntuServer:14.04.3-LTS:14.04.201509080
140
+ data: Canonical UbuntuServer 15.04 15.04.201506161 westeurope Canonical:UbuntuServer:15.04:15.04.201506161
141
+ data: Canonical UbuntuServer 15.04 15.04.201507070 westeurope Canonical:UbuntuServer:15.04:15.04.201507070
142
+ data: Canonical UbuntuServer 15.04 15.04.201507220 westeurope Canonical:UbuntuServer:15.04:15.04.201507220
143
+ data: Canonical UbuntuServer 15.04 15.04.201507280 westeurope Canonical:UbuntuServer:15.04:15.04.201507280
144
+ data: Canonical UbuntuServer 15.10-DAILY 15.10.201509170 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509170
145
+ data: Canonical UbuntuServer 15.10-DAILY 15.10.201509180 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509180
146
+ data: Canonical UbuntuServer 15.10-DAILY 15.10.201509190 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509190
147
+ data: Canonical UbuntuServer 15.10-DAILY 15.10.201509210 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509210
148
+ data: Canonical UbuntuServer 15.10-DAILY 15.10.201509220 westeurope Canonical:UbuntuServer:15.10-DAILY:15.10.201509220
260
149
  info: vm image list command OK
261
150
  ```
262
151
 
@@ -3,6 +3,7 @@ require 'kitchen/driver/credentials'
3
3
  require 'securerandom'
4
4
  require 'azure_mgmt_resources'
5
5
  require 'azure_mgmt_network'
6
+ require 'base64'
6
7
 
7
8
  module Kitchen
8
9
  module Driver
@@ -29,12 +30,13 @@ module Kitchen
29
30
  end
30
31
 
31
32
  def create(state)
32
- puts 'in kitchen create'
33
33
  state[:uuid] = "#{SecureRandom.hex(8)}"
34
- state[:azure_resource_group_name] = "#{config[:azure_resource_group_name]}-#{state[:uuid]}"
34
+ formatted_time = Time.now.utc.strftime '%Y%m%dT%H%M%S'
35
+ state[:azure_resource_group_name] = "#{config[:azure_resource_group_name]}-#{formatted_time}"
35
36
  state[:subscription_id] = config[:subscription_id]
36
37
  state[:username] = config[:username]
37
38
  state[:password] = config[:password]
39
+ state[:server_id] = "vm#{state[:uuid]}"
38
40
  image_publisher, image_offer, image_sku, image_version = config[:image_urn].split(':', 4)
39
41
  deployment_parameters = {
40
42
  location: config[:location],
@@ -57,20 +59,20 @@ module Kitchen
57
59
  resource_group = ::Azure::ARM::Resources::Models::ResourceGroup.new
58
60
  resource_group.location = config[:location]
59
61
  begin
60
- puts "Creating Resource Group: #{state[:azure_resource_group_name]}"
62
+ info "Creating Resource Group: #{state[:azure_resource_group_name]}"
61
63
  resource_management_client.resource_groups.create_or_update(state[:azure_resource_group_name], resource_group).value!
62
64
  rescue ::MsRestAzure::AzureOperationError => operation_error
63
- puts operation_error.body['error']
65
+ info operation_error.body['error']
64
66
  raise operation_error
65
67
  end
66
68
 
67
69
  # Execute deployment steps
68
70
  begin
69
71
  deployment_name = "deploy-#{state[:uuid]}"
70
- puts "Creating Deployment: #{deployment_name}"
71
- resource_management_client.deployments.create_or_update(state[:azure_resource_group_name], deployment_name, deployment(virtual_machine_deployment_template, deployment_parameters)).value!
72
+ info "Creating Deployment: #{deployment_name}"
73
+ resource_management_client.deployments.create_or_update(state[:azure_resource_group_name], deployment_name, deployment(template_for_transport_name, deployment_parameters)).value!
72
74
  rescue ::MsRestAzure::AzureOperationError => operation_error
73
- puts operation_error.body['error']
75
+ info operation_error.body['error']
74
76
  raise operation_error
75
77
  end
76
78
 
@@ -81,11 +83,21 @@ module Kitchen
81
83
  network_management_client = ::Azure::ARM::Network::NetworkResourceProviderClient.new(credentials)
82
84
  network_management_client.subscription_id = config[:subscription_id]
83
85
  result = network_management_client.public_ip_addresses.get(state[:azure_resource_group_name], 'publicip').value!
84
- puts "IP Address is: #{result.body.properties.ip_address} [#{result.body.properties.dns_settings.fqdn}]"
85
- state[:server_id] = "vm#{state[:uuid]}"
86
+ info "IP Address is: #{result.body.properties.ip_address} [#{result.body.properties.dns_settings.fqdn}]"
86
87
  state[:hostname] = result.body.properties.ip_address
87
88
  end
88
89
 
90
+ def template_for_transport_name
91
+ template = JSON.parse(virtual_machine_deployment_template)
92
+ if instance.transport.name.downcase == 'winrm'
93
+ template['resources'].select { |h| h['type'] == 'Microsoft.Compute/virtualMachines' }.each do |resource|
94
+ resource['properties']['osProfile']['customData'] = Base64.strict_encode64(enable_winrm_powershell_script)
95
+ end
96
+ template['resources'] << JSON.parse(custom_script_extension_template)
97
+ end
98
+ template.to_json
99
+ end
100
+
89
101
  def deployment(template, parameters)
90
102
  deployment = ::Azure::ARM::Resources::Models::Deployment.new
91
103
  deployment.properties = ::Azure::ARM::Resources::Models::DeploymentProperties.new
@@ -111,7 +123,7 @@ module Kitchen
111
123
  deployment_provisioning_state = deployment_state(resource_group, deployment_name)
112
124
  end_provisioning_state_reached = end_provisioning_states.split(',').include?(deployment_provisioning_state)
113
125
  end
114
- puts "Resource Template deployment reached end state of '#{deployment_provisioning_state}'."
126
+ info "Resource Template deployment reached end state of '#{deployment_provisioning_state}'."
115
127
  end
116
128
 
117
129
  def list_outstanding_deployment_operations(resource_group, deployment_name)
@@ -123,7 +135,7 @@ module Kitchen
123
135
  resource_type = val.properties.target_resource.resource_type
124
136
  end_operation_state_reached = end_operation_states.split(',').include?(resource_provisioning_state)
125
137
  unless end_operation_state_reached
126
- puts "Resource #{resource_type} '#{resource_name}' provisioning status is #{resource_provisioning_state}"
138
+ info "Resource #{resource_type} '#{resource_name}' provisioning status is #{resource_provisioning_state}"
127
139
  end
128
140
  end
129
141
  end
@@ -139,11 +151,11 @@ module Kitchen
139
151
  resource_management_client = ::Azure::ARM::Resources::ResourceManagementClient.new(credentials)
140
152
  resource_management_client.subscription_id = state[:subscription_id]
141
153
  begin
142
- puts "Destroying Resource Group: #{state[:azure_resource_group_name]}"
154
+ info "Destroying Resource Group: #{state[:azure_resource_group_name]}"
143
155
  resource_management_client.resource_groups.begin_delete(state[:azure_resource_group_name]).value!
144
- puts 'Destroy operation accepted and will continue in the background.'
156
+ info 'Destroy operation accepted and will continue in the background.'
145
157
  rescue ::MsRestAzure::AzureOperationError => operation_error
146
- puts operation_error.body['error']
158
+ info operation_error.body['error']
147
159
  raise operation_error
148
160
  end
149
161
  state.delete(:server_id)
@@ -152,213 +164,248 @@ module Kitchen
152
164
  state.delete(:password)
153
165
  end
154
166
 
167
+ def enable_winrm_powershell_script
168
+ <<-PS1
169
+ New-SelfSignedCertificate -DnsName $env:COMPUTERNAME -CertStoreLocation Cert:\\LocalMachine\\My
170
+ $cert = New-SelfSignedCertificate -DnsName $env:COMPUTERNAME -CertStoreLocation Cert:\\LocalMachine\\My
171
+ $config = '@{CertificateThumbprint="' + $cert.Thumbprint + '"}'
172
+ winrm create winrm/config/listener?Address=*+Transport=HTTPS $config
173
+ winrm set winrm/config/service/auth '@{Basic="true";Kerberos="false";Negotiate="true";Certificate="false";CredSSP="true"}'
174
+ New-NetFirewallRule -DisplayName "Windows Remote Management (HTTPS-In)" -Name "Windows Remote Management (HTTPS-In)" -Profile Any -LocalPort 5986 -Protocol TCP
175
+ winrm set winrm/config/service '@{AllowUnencrypted="true"}'
176
+ New-NetFirewallRule -DisplayName "Windows Remote Management (HTTP-In)" -Name "Windows Remote Management (HTTP-In)" -Profile Any -LocalPort 5985 -Protocol TCP
177
+ PS1
178
+ end
179
+
180
+ def custom_script_extension_template
181
+ <<-EOH
182
+ {
183
+ "type": "Microsoft.Compute/virtualMachines/extensions",
184
+ "name": "[concat(variables('vmName'),'/','enableWinRM')]",
185
+ "apiVersion": "2015-05-01-preview",
186
+ "location": "[variables('location')]",
187
+ "dependsOn": [
188
+ "[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]"
189
+ ],
190
+ "properties": {
191
+ "publisher": "Microsoft.Compute",
192
+ "type": "CustomScriptExtension",
193
+ "typeHandlerVersion": "1.4",
194
+ "settings": {
195
+ "commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -Command \\"gc c:\\\\azuredata\\\\customdata.bin | iex\\""
196
+ }
197
+ }
198
+ }
199
+ EOH
200
+ end
201
+
155
202
  def virtual_machine_deployment_template
156
203
  <<-EOH
157
204
  {
158
- "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
159
- "contentVersion": "1.0.0.0",
160
- "parameters": {
161
- "location": {
162
- "type": "string",
163
- "metadata": {
164
- "description": "The location where the resources will be created."
165
- }
166
- },
167
- "vmSize": {
168
- "type": "string",
169
- "metadata": {
170
- "description": "The size of the VM to be created"
171
- }
172
- },
173
- "newStorageAccountName": {
174
- "type": "string",
175
- "metadata": {
176
- "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed."
177
- }
178
- },
179
- "adminUsername": {
180
- "type": "string",
181
- "metadata": {
182
- "description": "User name for the Virtual Machine."
183
- }
184
- },
185
- "adminPassword": {
186
- "type": "securestring",
187
- "metadata": {
188
- "description": "Password for the Virtual Machine."
189
- }
190
- },
191
- "dnsNameForPublicIP": {
192
- "type": "string",
193
- "metadata": {
194
- "description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
195
- }
196
- },
197
- "imagePublisher": {
198
- "type": "string",
199
- "defaultValue": "Canonical",
200
- "metadata": {
201
- "description": "Publisher for the VM, e.g. Canonical, MicrosoftWindowsServer"
202
- }
203
- },
204
- "imageOffer": {
205
- "type": "string",
206
- "defaultValue": "UbuntuServer",
207
- "metadata": {
208
- "description": "Offer for the VM, e.g. UbuntuServer, WindowsServer."
209
- }
210
- },
211
- "imageSku": {
212
- "type": "string",
213
- "defaultValue": "14.04.3-LTS",
214
- "metadata": {
215
- "description": "Sku for the VM, e.g. 14.04.3-LTS"
216
- }
217
- },
218
- "imageVersion": {
219
- "type": "string",
220
- "defaultValue": "latest",
221
- "metadata": {
222
- "description": "Either a date or latest."
223
- }
224
- }
225
- },
226
- "variables": {
227
- "location": "[parameters('location')]",
228
- "OSDiskName": "osdisk",
229
- "nicName": "nic",
230
- "addressPrefix": "10.0.0.0/16",
231
- "subnetName": "Subnet",
232
- "subnetPrefix": "10.0.0.0/24",
233
- "storageAccountType": "Standard_LRS",
234
- "publicIPAddressName": "publicip",
235
- "publicIPAddressType": "Dynamic",
236
- "vmStorageAccountContainerName": "vhds",
237
- "vmName": "vm",
238
- "vmSize": "[parameters('vmSize')]",
239
- "virtualNetworkName": "vnet",
240
- "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
241
- "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
242
- },
243
- "resources": [
244
- {
245
- "type": "Microsoft.Storage/storageAccounts",
246
- "name": "[parameters('newStorageAccountName')]",
247
- "apiVersion": "2015-05-01-preview",
248
- "location": "[variables('location')]",
249
- "properties": {
250
- "accountType": "[variables('storageAccountType')]"
251
- }
252
- },
253
- {
254
- "apiVersion": "2015-05-01-preview",
255
- "type": "Microsoft.Network/publicIPAddresses",
256
- "name": "[variables('publicIPAddressName')]",
257
- "location": "[variables('location')]",
258
- "properties": {
259
- "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
260
- "dnsSettings": {
261
- "domainNameLabel": "[parameters('dnsNameForPublicIP')]"
262
- }
263
- }
264
- },
265
- {
266
- "apiVersion": "2015-05-01-preview",
267
- "type": "Microsoft.Network/virtualNetworks",
268
- "name": "[variables('virtualNetworkName')]",
269
- "location": "[variables('location')]",
270
- "properties": {
271
- "addressSpace": {
272
- "addressPrefixes": [
273
- "[variables('addressPrefix')]"
274
- ]
205
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
206
+ "contentVersion": "1.0.0.0",
207
+ "parameters": {
208
+ "location": {
209
+ "type": "string",
210
+ "metadata": {
211
+ "description": "The location where the resources will be created."
212
+ }
275
213
  },
276
- "subnets": [
277
- {
278
- "name": "[variables('subnetName')]",
279
- "properties": {
280
- "addressPrefix": "[variables('subnetPrefix')]"
214
+ "vmSize": {
215
+ "type": "string",
216
+ "metadata": {
217
+ "description": "The size of the VM to be created"
218
+ }
219
+ },
220
+ "newStorageAccountName": {
221
+ "type": "string",
222
+ "metadata": {
223
+ "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed."
224
+ }
225
+ },
226
+ "adminUsername": {
227
+ "type": "string",
228
+ "metadata": {
229
+ "description": "User name for the Virtual Machine."
230
+ }
231
+ },
232
+ "adminPassword": {
233
+ "type": "securestring",
234
+ "metadata": {
235
+ "description": "Password for the Virtual Machine."
281
236
  }
282
- }
283
- ]
284
- }
237
+ },
238
+ "dnsNameForPublicIP": {
239
+ "type": "string",
240
+ "metadata": {
241
+ "description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
242
+ }
243
+ },
244
+ "imagePublisher": {
245
+ "type": "string",
246
+ "defaultValue": "Canonical",
247
+ "metadata": {
248
+ "description": "Publisher for the VM, e.g. Canonical, MicrosoftWindowsServer"
249
+ }
250
+ },
251
+ "imageOffer": {
252
+ "type": "string",
253
+ "defaultValue": "UbuntuServer",
254
+ "metadata": {
255
+ "description": "Offer for the VM, e.g. UbuntuServer, WindowsServer."
256
+ }
257
+ },
258
+ "imageSku": {
259
+ "type": "string",
260
+ "defaultValue": "14.04.3-LTS",
261
+ "metadata": {
262
+ "description": "Sku for the VM, e.g. 14.04.3-LTS"
263
+ }
264
+ },
265
+ "imageVersion": {
266
+ "type": "string",
267
+ "defaultValue": "latest",
268
+ "metadata": {
269
+ "description": "Either a date or latest."
270
+ }
271
+ }
285
272
  },
286
- {
287
- "apiVersion": "2015-05-01-preview",
288
- "type": "Microsoft.Network/networkInterfaces",
289
- "name": "[variables('nicName')]",
290
- "location": "[variables('location')]",
291
- "dependsOn": [
292
- "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
293
- "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
294
- ],
295
- "properties": {
296
- "ipConfigurations": [
297
- {
298
- "name": "ipconfig1",
273
+ "variables": {
274
+ "location": "[parameters('location')]",
275
+ "OSDiskName": "osdisk",
276
+ "nicName": "nic",
277
+ "addressPrefix": "10.0.0.0/16",
278
+ "subnetName": "Subnet",
279
+ "subnetPrefix": "10.0.0.0/24",
280
+ "storageAccountType": "Standard_LRS",
281
+ "publicIPAddressName": "publicip",
282
+ "publicIPAddressType": "Dynamic",
283
+ "vmStorageAccountContainerName": "vhds",
284
+ "vmName": "vm",
285
+ "vmSize": "[parameters('vmSize')]",
286
+ "virtualNetworkName": "vnet",
287
+ "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
288
+ "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
289
+ },
290
+ "resources": [
291
+ {
292
+ "type": "Microsoft.Storage/storageAccounts",
293
+ "name": "[parameters('newStorageAccountName')]",
294
+ "apiVersion": "2015-05-01-preview",
295
+ "location": "[variables('location')]",
299
296
  "properties": {
300
- "privateIPAllocationMethod": "Dynamic",
301
- "publicIPAddress": {
302
- "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
303
- },
304
- "subnet": {
305
- "id": "[variables('subnetRef')]"
306
- }
297
+ "accountType": "[variables('storageAccountType')]"
307
298
  }
308
- }
309
- ]
310
- }
311
- },
312
- {
313
- "apiVersion": "2015-06-15",
314
- "type": "Microsoft.Compute/virtualMachines",
315
- "name": "[variables('vmName')]",
316
- "location": "[variables('location')]",
317
- "dependsOn": [
318
- "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]",
319
- "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
320
- ],
321
- "properties": {
322
- "hardwareProfile": {
323
- "vmSize": "[variables('vmSize')]"
324
299
  },
325
- "osProfile": {
326
- "computername": "[variables('vmName')]",
327
- "adminUsername": "[parameters('adminUsername')]",
328
- "adminPassword": "[parameters('adminPassword')]"
300
+ {
301
+ "apiVersion": "2015-05-01-preview",
302
+ "type": "Microsoft.Network/publicIPAddresses",
303
+ "name": "[variables('publicIPAddressName')]",
304
+ "location": "[variables('location')]",
305
+ "properties": {
306
+ "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
307
+ "dnsSettings": {
308
+ "domainNameLabel": "[parameters('dnsNameForPublicIP')]"
309
+ }
310
+ }
329
311
  },
330
- "storageProfile": {
331
- "imageReference": {
332
- "publisher": "[parameters('imagePublisher')]",
333
- "offer": "[parameters('imageOffer')]",
334
- "sku": "[parameters('imageSku')]",
335
- "version": "[parameters('imageVersion')]"
336
- },
337
- "osDisk": {
338
- "name": "osdisk",
339
- "vhd": {
340
- "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
341
- },
342
- "caching": "ReadWrite",
343
- "createOption": "FromImage"
344
- }
312
+ {
313
+ "apiVersion": "2015-05-01-preview",
314
+ "type": "Microsoft.Network/virtualNetworks",
315
+ "name": "[variables('virtualNetworkName')]",
316
+ "location": "[variables('location')]",
317
+ "properties": {
318
+ "addressSpace": {
319
+ "addressPrefixes": [
320
+ "[variables('addressPrefix')]"
321
+ ]
322
+ },
323
+ "subnets": [
324
+ {
325
+ "name": "[variables('subnetName')]",
326
+ "properties": {
327
+ "addressPrefix": "[variables('subnetPrefix')]"
328
+ }
329
+ }
330
+ ]
331
+ }
345
332
  },
346
- "networkProfile": {
347
- "networkInterfaces": [
348
- {
349
- "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
333
+ {
334
+ "apiVersion": "2015-05-01-preview",
335
+ "type": "Microsoft.Network/networkInterfaces",
336
+ "name": "[variables('nicName')]",
337
+ "location": "[variables('location')]",
338
+ "dependsOn": [
339
+ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
340
+ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
341
+ ],
342
+ "properties": {
343
+ "ipConfigurations": [
344
+ {
345
+ "name": "ipconfig1",
346
+ "properties": {
347
+ "privateIPAllocationMethod": "Dynamic",
348
+ "publicIPAddress": {
349
+ "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
350
+ },
351
+ "subnet": {
352
+ "id": "[variables('subnetRef')]"
353
+ }
354
+ }
355
+ }
356
+ ]
350
357
  }
351
- ]
352
358
  },
353
- "diagnosticsProfile": {
354
- "bootDiagnostics": {
355
- "enabled": "false",
356
- "storageUri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net')]"
357
- }
359
+ {
360
+ "apiVersion": "2015-06-15",
361
+ "type": "Microsoft.Compute/virtualMachines",
362
+ "name": "[variables('vmName')]",
363
+ "location": "[variables('location')]",
364
+ "dependsOn": [
365
+ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]",
366
+ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
367
+ ],
368
+ "properties": {
369
+ "hardwareProfile": {
370
+ "vmSize": "[variables('vmSize')]"
371
+ },
372
+ "osProfile": {
373
+ "computername": "[variables('vmName')]",
374
+ "adminUsername": "[parameters('adminUsername')]",
375
+ "adminPassword": "[parameters('adminPassword')]"
376
+ },
377
+ "storageProfile": {
378
+ "imageReference": {
379
+ "publisher": "[parameters('imagePublisher')]",
380
+ "offer": "[parameters('imageOffer')]",
381
+ "sku": "[parameters('imageSku')]",
382
+ "version": "[parameters('imageVersion')]"
383
+ },
384
+ "osDisk": {
385
+ "name": "osdisk",
386
+ "vhd": {
387
+ "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
388
+ },
389
+ "caching": "ReadWrite",
390
+ "createOption": "FromImage"
391
+ }
392
+ },
393
+ "networkProfile": {
394
+ "networkInterfaces": [
395
+ {
396
+ "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
397
+ }
398
+ ]
399
+ },
400
+ "diagnosticsProfile": {
401
+ "bootDiagnostics": {
402
+ "enabled": "false",
403
+ "storageUri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net')]"
404
+ }
405
+ }
406
+ }
358
407
  }
359
- }
360
- }
361
- ]
408
+ ]
362
409
  }
363
410
  EOH
364
411
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-azurerm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Preston
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-24 00:00:00.000000000 Z
11
+ date: 2015-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inifile
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 2.4.4
115
+ rubygems_version: 2.4.8
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: Test Kitchen driver for Azure Resource Manager.