kitchen-azurerm 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/README.md +80 -10
  4. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9f153a4b352fb5ef9eb8edd2dfc00dab39c347b
4
- data.tar.gz: dc46267e446c5b303dc774e78f30c1ceab4c109d
3
+ metadata.gz: d376f93f6c1326b5bfeeb9db4e1b2555a0c5546b
4
+ data.tar.gz: 5d210183f6eb3d2e2d144273dca1f563b8affe32
5
5
  SHA512:
6
- metadata.gz: af13581cd2ff6742c723f8f6e6dabb63aa11571b9b0b773bc4b89fd5cbdfe92f0978c65662d84b840cdcfbfe1594efb1d23ebf471b1bb27f44f7ed82b69f4644
7
- data.tar.gz: 1eba0d2e9c41544480ffdd03f4366610d6ada09409e92d3712f6bcb26e9dea6ba9acf81d094df5c3096ce36c61fa1800a066d1737e9d906c36866719400e97c5
6
+ metadata.gz: 7b173321456444b901db656894016df02b745af81891a69c355809699a630a9726095d6266b9684c1b21b287e2330bd865a05689cc711b41b65a14bdfe8c428f
7
+ data.tar.gz: 752c0245584209c860860b0b4bd5270790b8752f6cddece95f273705c7b806bfc6080eb7fc76a137d3de8e3912c9aa9507c1108a2f960132cd1f8451da6b50d0
@@ -1,5 +1,8 @@
1
1
  # kitchen-azurerm Changelog
2
2
 
3
+ ## [0.4.0] - 2016-06-26
4
+ - Adding capability to execute ARM template prior to VM deployment, ```pre_deployment_template``` and ```pre_deployment_parameters``` added (@stuartpreston)
5
+
3
6
  ## [0.3.6] - 2016-05-10
4
7
  - Remove version pin on inifile gem dependency, compatible with newer ChefDK (@stuartpreston)
5
8
 
data/README.md CHANGED
@@ -48,9 +48,9 @@ Note that the environment variables, if set, take preference over the values in
48
48
 
49
49
  ### .kitchen.yml example 1 - Linux/Ubuntu
50
50
 
51
- Here's an example ```.kitchen.yml``` file that provisions 3 different types of Ubuntu Server, using Chef Zero as the provisioner and SSH as the transport. Note that if the key does not exist at the specified location, it will be created.
51
+ Here's an example ```.kitchen.yml``` file that provisions an Ubuntu Server, using Chef Zero as the provisioner and SSH as the transport. Note that if the key does not exist at the specified location, it will be created.
52
52
 
53
- ```yml
53
+ ```yaml
54
54
  ---
55
55
  driver:
56
56
  name: azurerm
@@ -67,16 +67,10 @@ provisioner:
67
67
  name: chef_zero
68
68
 
69
69
  platforms:
70
- - name: ubuntu-12.04
71
- driver_config:
72
- image_urn: Canonical:UbuntuServer:12.04.5-LTS:latest
73
70
  - name: ubuntu-14.04
74
71
  driver_config:
75
- image_urn: Canonical:UbuntuServer:14.04.3-LTS:latest
72
+ image_urn: Canonical:UbuntuServer:14.04.4-LTS:latest
76
73
  vm_name: trusty-vm
77
- - name: ubuntu-15.04
78
- driver_config:
79
- image_urn: Canonical:UbuntuServer:15.04:latest
80
74
 
81
75
  suites:
82
76
  - name: default
@@ -98,7 +92,7 @@ Here's a further example ```.kitchen.yml``` file that will provision a Windows S
98
92
 
99
93
  **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.**
100
94
 
101
- ```yml
95
+ ```yaml
102
96
  ---
103
97
  driver:
104
98
  name: azurerm
@@ -135,6 +129,82 @@ suites:
135
129
  attributes:
136
130
  ```
137
131
 
132
+ ### .kitchen.yml example 3 - "pre-deployment" ARM template
133
+
134
+ The following example introduces the ```pre_deployment_template``` and ```pre_deployment_parameters``` properties in the configuration file.
135
+ You can use this capability to execute an ARM template containing Azure resources to provision before the system under test is created.
136
+
137
+ In the example the ARM template in the file ```predeploy.json``` would be executed with the parameters that are specified under ```pre_deployment_parameters```.
138
+ These resources will be created in the same Azure Resource Group as the VM under test, and therefore will be destroyed when you type ```kitchen destroy```.
139
+
140
+ ```yaml
141
+ ---
142
+ driver:
143
+ name: azurerm
144
+
145
+ driver_config:
146
+ subscription_id: '4801fa9d-YOUR-GUID-HERE-b265ff49ce21'
147
+ location: 'West Europe'
148
+ machine_size: 'Standard_D1'
149
+ pre_deployment_template: predeploy.json
150
+ pre_deployment_parameters:
151
+ test_parameter: 'This is a test.'
152
+
153
+ transport:
154
+ ssh_key: ~/.ssh/id_kitchen-azurerm
155
+
156
+ provisioner:
157
+ name: chef_zero
158
+
159
+ platforms:
160
+ - name: ubuntu-1404
161
+ driver_config:
162
+ image_urn: Canonical:UbuntuServer:14.04.4-LTS:latest
163
+
164
+ suites:
165
+ - name: default
166
+ run_list:
167
+ - recipe[kitchen-azurerm-demo::default]
168
+ attributes:
169
+ ```
170
+
171
+ Example predeploy.json:
172
+
173
+ ```json
174
+ {
175
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
176
+ "contentVersion": "1.0.0.0",
177
+ "parameters": {
178
+ "test_parameter": {
179
+ "type": "string",
180
+ "defaultValue": ""
181
+ }
182
+ },
183
+ "variables": {
184
+
185
+ },
186
+ "resources": [
187
+ {
188
+ "name": "uniqueinstancenamehere01",
189
+ "type": "Microsoft.Sql/servers",
190
+ "location": "[resourceGroup().location]",
191
+ "apiVersion": "2014-04-01-preview",
192
+ "properties": {
193
+ "version": "12.0",
194
+ "administratorLogin": "azure",
195
+ "administratorLoginPassword": "P2ssw0rd"
196
+ }
197
+ }
198
+ ],
199
+ "outputs": {
200
+ "parameter testing": {
201
+ "type": "string",
202
+ "value": "[parameters('test_parameter')]"
203
+ }
204
+ }
205
+ }
206
+ ```
207
+
138
208
  ### How to retrieve the image_urn
139
209
  You can use the azure (azure-cli) command line tools to interrogate for the Urn. All 4 parts of the Urn must be specified, though the last part can be changed to "latest" to indicate you always wish to provision the latest operating system and patches.
140
210
 
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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Preston
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-25 00:00:00.000000000 Z
11
+ date: 2016-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inifile
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1'
97
+ - !ruby/object:Gem::Dependency
98
+ name: concurrent-ruby
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: bundler
99
113
  requirement: !ruby/object:Gem::Requirement