chef-provisioning-azurerm 0.2.12 → 0.2.13

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: 1ca902d522c0c57a8fab136e174bbfddf1fb24bb
4
- data.tar.gz: e62e95ed8543c0450b243a63617ac025a97a6d0e
3
+ metadata.gz: 3bc8954f652b4e9e0c187af25e826b9697a481b9
4
+ data.tar.gz: 7d31389186510e55772e288295a3c49dd7db0c72
5
5
  SHA512:
6
- metadata.gz: 3159f450ccb244279150ee91b8477da7b531a6ad3ea579f2420184e7927abec91fe18aeb5d1cd948e35dcf6e4d99d32aba860255f5f1d710c276bb483c701581
7
- data.tar.gz: d88c5a153ef330da7a2f7a7100366166fa23630e4d847a3deaaa92a7810b1761e1e314cda78f7a32f9e5a523197c6499dfb1190d54d26611a42b8c98f3aa7064
6
+ metadata.gz: 7d75d0088713568db277278775e8266ac292361e283ec6f7c58cfa739615246819b31ac9f7a31c25c8511a2ad6a927a036fcb24913a37bf299dcd0f8c3a44db7
7
+ data.tar.gz: 2d620e0b6f9e95024ab99bb7b4902cfbbd0a349b9c5e16157f0f8e494808894244cf641304fb3f09898d29c84ce803d006dc8ad3a79ba4764caacbeb171618b4
data/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Change Log
2
+ ## [0.2.13] 2015-08-20
3
+ ### Changed
4
+ - chef_extension parameters are now required if the Chef VM Extension is to be added to compute resources.
5
+ - Updated README to include explanation of valid chef_extension parameters
6
+
7
+ ## [0.2.12] - 2015-08-13
8
+ ### Added
9
+ - Updated examples and README
10
+ - Rubocop compliance
11
+
12
+ ## [0.2.11] - 2015-08
data/README.md CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  ```chef-provisioning-azurerm``` is a driver for [chef-provisioning](https://github.com/chef/chef-provisioning) that allows Microsoft Azure resources to be provisioned by Chef. This driver uses the new Microsoft Azure Resource Management REST API.
4
4
 
5
+ **current status: prototype/experimental - use at own risk!**
6
+
5
7
  At the moment, the primary use case is to provide a way to deploy Azure Resource Manager templates using Chef as well as provide an automatic means to install and register the Chef client on these machine via the use of the Chef VM Extensions for Azure.
6
8
 
7
- ![build status](https://travis-ci.org/pendrica/chef-provisioning-azurerm.svg?branch=master)
9
+ [![Build status](https://travis-ci.org/pendrica/chef-provisioning-azurerm.svg?branch=master)](https://travis-ci.org/pendrica/chef-provisioning-azurerm) [![Gem Version](https://badge.fury.io/rb/chef-provisioning-azurerm.svg)](http://badge.fury.io/rb/chef-provisioning-azurerm)
8
10
 
9
11
  **Note:** If you are looking for a driver that works with the existing Microsoft Azure Service Management API please visit [chef-provisioning-azure](https://github.com/chef/chef-provisioning-azure)
10
12
 
@@ -94,15 +96,26 @@ end
94
96
 
95
97
  azure_resource_template 'my-deployment' do
96
98
  resource_group 'pendrica-demo-resources'
97
- template_source 'cookbooks/provision/templates/default/recipes/azure_deploy.json'
99
+ template_source 'cookbooks/provision/files/default/azure_deploy.json'
98
100
  parameters newStorageAccountName: 'penstorage01',
99
101
  adminUsername: 'ubuntu',
100
102
  adminPassword: 'P2ssw0rd',
101
103
  dnsNameForPublicIP: 'pendricatest01',
102
104
  ubuntuOSVersion: '14.04.2-LTS'
105
+ chef_extension client_type: 'ChefClient',
106
+ version: '1207.12',
107
+ runlist: 'recipe[dscdemo::default]'
103
108
  end
104
109
  ```
105
110
 
111
+ **Note: If no chef_extension configuration is specified, the ARM template will imported without enabling the Azure Chef VM Extension**.
112
+
113
+ The Chef Server URL, Validation Client name and Validation Key content are not currently exposed parameters but can be overridden via setting the following Chef::Config parameters (via modifying ```c:\chef\client.rb``` or specifying ```-c path\to\client.rb``` on the ```chef-client``` command line).
114
+
115
+ - ```Chef::Config[:chef_server_url]```
116
+ - ```Chef::Config[:validation_client_name]```
117
+ - ```Chef::Config[:validation_key]```
118
+
106
119
  ## Example Recipe 2 - deployment of locally replicated Storage Account
107
120
  ### example2.rb
108
121
 
@@ -18,12 +18,13 @@ class Chef
18
18
  fail "Cannot find file: #{template_src_file}" unless ::File.file?(template_src_file)
19
19
  template_src = ::IO.read(template_src_file)
20
20
  template = JSON.parse(template_src)
21
-
22
- machines = template['resources'].select { |h| h['type'] == 'Microsoft.Compute/virtualMachines' }
23
- machines.each do |machine|
24
- Chef::Log.info("[Azure] Found a compute resource with name value: #{machine['name']} and location #{machine['location']}, adding a Chef VM Extension to it.")
25
- extension = chef_vm_extension(machine['name'], machine['location'])
26
- template['resources'] << JSON.parse(extension)
21
+ if new_resource.chef_extension
22
+ machines = template['resources'].select { |h| h['type'] == 'Microsoft.Compute/virtualMachines' }
23
+ machines.each do |machine|
24
+ Chef::Log.info("[Azure] Found a compute resource with name value: #{machine['name']} and location #{machine['location']}, adding a Chef VM Extension to it.")
25
+ extension = chef_vm_extension(machine['name'], machine['location'])
26
+ template['resources'] << JSON.parse(extension)
27
+ end
27
28
  end
28
29
  Chef::Log.debug("[Azure] Generated template for deployment: #{template}")
29
30
  doc = generate_wrapper_document(template)
@@ -73,7 +74,7 @@ class Chef
73
74
  "runlist": "#{new_resource.chef_extension[:runlist]}"
74
75
  },
75
76
  "protectedSettings": {
76
- "validation_key": "#{validation_key_content.gsub("\n", "\\n")}"
77
+ "validation_key": "#{validation_key_content.gsub("\n", '\\n')}"
77
78
  }
78
79
  }
79
80
  }
@@ -1,7 +1,7 @@
1
1
  class Chef
2
2
  module Provisioning
3
3
  module AzureRM
4
- VERSION = '0.2.12'
4
+ VERSION = '0.2.13'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-provisioning-azurerm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
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-08-13 00:00:00.000000000 Z
11
+ date: 2015-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '12.0'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: '12.3'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '12.0'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '12.3'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: chef-provisioning
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -107,6 +113,7 @@ executables: []
107
113
  extensions: []
108
114
  extra_rdoc_files: []
109
115
  files:
116
+ - CHANGELOG.md
110
117
  - LICENSE.txt
111
118
  - README.md
112
119
  - lib/chef/provider/azure_resource_group.rb