Git Product home page Git Product logo

kitchen-azurerm's Introduction

Test Kitchen

Gem Version Build Status

Website https://kitchen.ci/
Source Code https://kitchen.ci/docs/getting-started/introduction/
Slack #test-kitchen channel on Chef Community Slack

Test Kitchen is an integration tool for developing and testing infrastructure code and software on isolated target platforms.

Getting Started Guide

To learn how to install and setup Test Kitchen for developing infrastructure code, check out the Getting Started Guide.

If you want to get going super fast, then try the Quick Start next...

Quick Start

Test Kitchen is a RubyGem and can be installed with:

gem install test-kitchen

If you use Bundler, you can add gem "test-kitchen" to your Gemfile and make sure to run bundle install.

Next add support to your library, Chef cookbook, or empty project with kitchen init:

kitchen init

A kitchen.yml file will be created in your project base directory. This file describes your testing configuration; what you want to test and on which target platforms. Each of these suite and platform combinations are called instances. By default your instances will be converged with Chef Solo and run in Vagrant virtual machines.

Get a listing of your instances with:

kitchen list

Run Chef Infra Client on an instance, in this case default-ubuntu-2004, with:

kitchen converge default-ubuntu-2004

Destroy all instances with:

kitchen destroy

You can clone a Chef Infra cookbook project that contains Test Kitchen support and run through all the instances in serial by running:

kitchen test

Usage

There is help included with the kitchen help subcommand which will list all subcommands and their usage:

kitchen help test

More verbose logging for test-kitchen can be specified when running test-kitchen from the command line using:

kitchen test -l debug

For the provisioner (e.g. chef-solo or chef-infra) add a log_level item to the provisioner section of the .kitchen.yml For more information on setting log_level see the configuration documentation.

Documentation

Documentation is being added on the Test Kitchen website. Please read and contribute to improve them!

Versioning

Test Kitchen aims to adhere to Semantic Versioning 2.0.0.

Community and Ecosystem

If you would like to see a few of the plugins or ecosystem helpers, please look at ECOSYSTEM.md.

Development

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Authors

Created by Fletcher Nichol ([email protected]).

Maintained by Chef Software and a growing community of contributors.

License

Apache License, Version 2.0 (see LICENSE)

kitchen-azurerm's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kitchen-azurerm's Issues

Using template for the VM you're testing?

I'm brand new to Chef in general, so there's every chance this me just being oblivious:

Is it possible to use your own template for the VM that is being tested? Alternately (for my immediate problem) how would I add data disks?

The Predeployment template works fine for me, but it also seems to try to always create another VM to use as the one being tested. I don't see how you change the template for that VM. Looking at source, it seems we're locked into using one of the two templates provided.

I've put the predeployment template under platforms like so:

platforms:
  - name: ubuntu-16.04.0
    driver_config:
      pre_deployment_template: mytemplate.json
      pre_deployment_parameters: 
          # snip...

I also tried putting it under a root level driver_config at the top of the .kitchen.yml. The template fires in both locations just fine.

The element I need to add is data disks so I can test array creation, but in general I think it is a good idea to support your own template as we don't know what ARM features MS will add tomorrow. Keeping it all DSL is great, but it also slows down how quickly we can bring new features into test.

When creating a win2k8-r2 VM from the .kitchen.yml shown in the README, the vm never converges

Finished creating <default-windows2008-r2> (8m22.76s).
-----> Converging <default-windows2008-r2>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 4.0.1...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
^@       [WinRM] connection failed, retrying in 1 seconds (#<HTTPClient::ConnectTimeoutError: execution expired>)
^@       [WinRM] connection failed, retrying in 1 seconds (#<HTTPClient::ConnectTimeoutError: execution expired>)
^@       [WinRM] connection failed, retrying in 1 seconds (#<HTTPClient::ConnectTimeoutError: execution expired>)
^@       [WinRM] connection failed, retrying in 1 seconds (#<HTTPClient::ConnectTimeoutError: execution expired>)
^@$$$$$$ [WinRM] connection failed, terminating (#<HTTPClient::ConnectTimeoutError: execution expired>)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: [execution expired]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

VM with data disks can't deploy to existing vnet/subnet

I am able to successfully create a test-kitchen VM that targets an existing vnet/subnet. I am also able to successfully create a test-kitchen VM that has data disks attached. If i try to combine the scenarios and create a VM with data disks in an existing vnet/subnet, test-kitchen fails with the below exception. It appears that in this combined scenario, the JSON for adding the data disks is being inserted into the "diagnosticsProfile" section. I've tried both 0.12.1 and 0.12.0. Any thoughts?

kitchen.yml:

platforms:
- name: windows2016
  driver_config:
    image_urn: MicrosoftWindowsServer:WindowsServer:2016-Datacenter:latest
    data_disks:
      - lun: 0
        disk_size_gb: 128
    vnet_id: /subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.Network/virtualNetworks/<VNET>
    subnet_id: <SUBNET>

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [409: unexpected token at '{
            "apiVersion": "2017-03-30",
            "type": "Microsoft.Compute/virtualMachines",
            "name": "[variables('vmName')]",
            "location": "[variables('location')]",
            "dependsOn": [
                "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
            ],
            "properties": {
                "hardwareProfile": {
                    "vmSize": "[variables('vmSize')]"
                },
                "osProfile": {
                    "computername": "[variables('vmName')]",
                    "adminUsername": "[parameters('adminUsername')]",
                    "adminPassword": "[parameters('adminPassword')]"
                },
                "storageProfile": {
                    "imageReference": {
                        "publisher": "[parameters('imagePublisher')]",
                        "offer": "[parameters('imageOffer')]",
                        "sku": "[parameters('imageSku')]",
                        "version": "[parameters('imageVersion')]"
                    },
                    "osDisk": {
                        "name": "osdisk",
                        "createOption": "FromImage"
                    }
                },
                "networkProfile": {
                    "networkInterfaces": [
                        {
                            "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
                        }
                    ]
                },
                "diagnosticsProfile": {
                      ,"dataDisks":
                          [{"name":"datadisk0","lun":0,"diskSizeGB":128,"createOption":"Empty"}]
                }
            },
            "tags": {
                "provider": "[variables('provider')]"

            }
        }
    ]
}
'] on default-windows2016-noformat
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

problem when installing via chef on ubuntu 14

When trying to install the gem in chef (using chef_gem) I get the following error:

---- Begin output of /opt/chef/embedded/bin/gem install kitchen-azurerm -q --no-rdoc --no-ri -v "0.5.0" ----
       STDOUT:
       STDERR: ERROR:  While executing gem ... (Gem::ImpossibleDependenciesError)
           ms_rest_azure-0.3.1 requires ms_rest (~> 0.3.0) but it conflicted:
         Activated ms_rest-0.3.1 instead of (= 0.1.2) via:
           kitchen-azurerm-0.5.0
       ---- End output of /opt/chef/embedded/bin/gem install kitchen-azurerm -q --no-rdoc --no-ri -v "0.5.0" ----

Seems like 0.5.0 still uses the old ms_rest (0.1.2), and this conflicts with newer requirements for ms_rest_azure.
gem version: 2.1.11

Add support for os disk size

Currently the provisioner does not support OS Disk Size specification. (e.g. resize the OS Disk). Resource Manager does support this.

Is Owner right required?

I went through the directions and am using azure for the first time, so the security setup was difficult for me. I'm thinking of sending a pull request that explains that part a bit better for new people. Before I do that, could you confirm that Owner rights are needed? I used contributor (because I didn't carefully read your documentation) and it seems to work well.

[undefined method `[]' for nil:NilClass] on `kitchen create`

I'm not sure why this is happening or how to troubleshoot it. Here is the DEBUG stack trace:

D ------Exception-------
D Class: Kitchen::ActionFailed
D Message: Failed to complete #create action: [undefined method []' for nil:NilClass] D ---Nested Exception--- D Class: NoMethodError D Message: undefined method[]' for nil:NilClass
D ------Backtrace-------
D /Users/seancarolan/.chefdk/gem/ruby/2.1.0/gems/kitchen-azurerm-0.2.3/lib/kitchen/driver/azurerm.rb:73:in rescue in create' D /Users/seancarolan/.chefdk/gem/ruby/2.1.0/gems/kitchen-azurerm-0.2.3/lib/kitchen/driver/azurerm.rb:69:increate'
D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:424:in public_send' D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:424:inblock in perform_action'
D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in call' D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:insynchronize_or_call'
D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:453:in block in action' D /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:inmeasure'
D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:452:in action' D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:424:inperform_action'
D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:352:in create_action' D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:341:inblock in transition_to'
D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in each' D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:intransition_to'
D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:127:in create' D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:inpublic_send'
D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in block (2 levels) in run_action' D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:incall'
D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'

Exception thrown when an Azure SubscriptionID cannot be found

The following exception gets thrown when a Azure SubscriptionID is not set as an environment variable in Windows when it is referenced in a kitchen.yml file. Really a warning or human readable error should be thrown instead of an unhandled exception.


Failed to complete #create action: [undefined method `[]' for nil:NilClass]

------Backtrace-------
E, [2017-03-16T12:41:28.721357 #15264] ERROR -- Kitchen: C:/Users/se6362/AppData/Local/chefdk/gem/ruby/2.3.0/gems/kitchen-azurerm-0.8.1/lib/kitchen/driver/credentials.rb:30:in azure_credentials_for_subscription' E, [2017-03-16T12:41:28.723169 #15264] ERROR -- Kitchen: C:/Users/se6362/AppData/Local/chefdk/gem/ruby/2.3.0/gems/kitchen-azurerm-0.8.1/lib/kitchen/driver/azurerm.rb:98:in create'


Access to pre_deployment_template outputs

I did not see this being mentioned in the docs, but is there a way to access output values from the pre_deployment template?

What i am trying to achieve is to create a storageaccount in the template and then make use of the storage key in the recipe. Would you have a recommendation on how to do that?

Driver should validate that transport can connect before successfully completing.

Several other drivers include

instance.transport.connection(@state).wait_until_ready

in their create method to validate that ktichen can, in fact, connect to those instances before returning successfully. I've hit a few failed converges due to the script extension not completing properly (but not erroring) and have failed to connect as kitchen transitioned into the converge phase.

SSL validation error on https://login.windows.net login attempt

Hi!
I'm new to Ruby and not sure if that related to your project, so sorry if that's a wrong place.
I'm getting following error when converging the kitchen:
Creating Resource Group: kitchen-default-windows2012-r2-20160119T162913

 ------Exception-------
 Class: Kitchen::ActionFailed
 Message: Failed to complete #destroy action: [SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed]

After some debugging, found that it happens on attempt to retrieve auth token from https://login.windows.net.
Found a workaround for it, but it seem to be dirty:
require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

Stacktrace:

E, [2016-01-20T08:30:55.039677 #15828] ERROR -- Kitchen: Message: Failed to complete #create action: [SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed]
E, [2016-01-20T08:30:55.039677 #15828] ERROR -- Kitchen: ---Nested Exception---
E, [2016-01-20T08:30:55.039677 #15828] ERROR -- Kitchen: Class: Faraday::SSLError
E, [2016-01-20T08:30:55.039677 #15828] ERROR -- Kitchen: Message: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
E, [2016-01-20T08:30:55.039677 #15828] ERROR -- Kitchen: ------Backtrace-------
E, [2016-01-20T08:30:55.039677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/2.1.0/net/http.rb:920:in `connect'
E, [2016-01-20T08:30:55.039677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/2.1.0/net/http.rb:920:in `block in connect'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/2.1.0/timeout.rb:76:in `timeout'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/2.1.0/net/http.rb:920:in `connect'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/2.1.0/net/http.rb:852:in `start'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/2.1.0/net/http.rb:1369:in `request'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:82:in `perform_request'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:40:in `block in call'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:32:in `call'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/connection.rb:140:in `get'
E, [2016-01-20T08:30:55.040677 #15828] ERROR -- Kitchen: C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/ms_rest_azure-0.1.2/lib/ms_rest_azure/credentials/application_token_provider.rb:103:in `acquire_token' 

Kitchen test throws error

Hi,

I am following, at least I believe I do, your how to to the letter.
However, when running kitchen test I get the following error:

➜  chef git:(master) ✗ kitchen test
-----> Starting Kitchen (v1.4.2)
-----> Cleaning up any prior instances of <default-windows2012-r2>
-----> Destroying <default-windows2012-r2>...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #destroy action: [Tenant id cannot be nil]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

The kitchen.log is this:

I, [2016-02-23T22:34:00.598755 #64853]  INFO -- Kitchen: -----> Starting Kitchen (v1.4.2)
I, [2016-02-23T22:34:01.419954 #64853]  INFO -- Kitchen: -----> Cleaning up any prior instances of <default-windows2012-r2>
I, [2016-02-23T22:34:01.421250 #64853]  INFO -- Kitchen: -----> Destroying <default-windows2012-r2>...
E, [2016-02-23T22:34:01.425477 #64853] ERROR -- Kitchen: ------Exception-------
E, [2016-02-23T22:34:01.425516 #64853] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2016-02-23T22:34:01.425536 #64853] ERROR -- Kitchen: Message: Failed to complete #destroy action: [Tenant id cannot be nil]
E, [2016-02-23T22:34:01.425552 #64853] ERROR -- Kitchen: ---Nested Exception---
E, [2016-02-23T22:34:01.425567 #64853] ERROR -- Kitchen: Class: ArgumentError
E, [2016-02-23T22:34:01.425621 #64853] ERROR -- Kitchen: Message: Tenant id cannot be nil
E, [2016-02-23T22:34:01.425675 #64853] ERROR -- Kitchen: ------Backtrace-------
E, [2016-02-23T22:34:01.425699 #64853] ERROR -- Kitchen: /Users/dobrien/.chefdk/gem/ruby/2.1.0/gems/ms_rest_azure-0.1.2/lib/ms_rest_azure/credentials/application_token_provider.rb:50:in `initialize'
E, [2016-02-23T22:34:01.425715 #64853] ERROR -- Kitchen: /Users/dobrien/.chefdk/gem/ruby/2.1.0/gems/kitchen-azurerm-0.2.6/lib/kitchen/driver/credentials.rb:33:in `new'
E, [2016-02-23T22:34:01.425728 #64853] ERROR -- Kitchen: /Users/dobrien/.chefdk/gem/ruby/2.1.0/gems/kitchen-azurerm-0.2.6/lib/kitchen/driver/credentials.rb:33:in `azure_credentials_for_subscription'
E, [2016-02-23T22:34:01.425740 #64853] ERROR -- Kitchen: /Users/dobrien/.chefdk/gem/ruby/2.1.0/gems/kitchen-azurerm-0.2.6/lib/kitchen/driver/azurerm.rb:208:in `destroy'
E, [2016-02-23T22:34:01.425752 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:424:in `public_send'
E, [2016-02-23T22:34:01.425763 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:424:in `block in perform_action'
E, [2016-02-23T22:34:01.425781 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in `call'
E, [2016-02-23T22:34:01.425793 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in `synchronize_or_call'
E, [2016-02-23T22:34:01.425805 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:453:in `block in action'
E, [2016-02-23T22:34:01.425817 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
E, [2016-02-23T22:34:01.425828 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:452:in `action'
E, [2016-02-23T22:34:01.425839 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:424:in `perform_action'
E, [2016-02-23T22:34:01.425851 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:411:in `destroy_action'
E, [2016-02-23T22:34:01.425862 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:341:in `block in transition_to'
E, [2016-02-23T22:34:01.425873 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in `each'
E, [2016-02-23T22:34:01.425888 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in `transition_to'
E, [2016-02-23T22:34:01.425899 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:171:in `destroy'
E, [2016-02-23T22:34:01.425911 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:187:in `block in test'
E, [2016-02-23T22:34:01.425922 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
E, [2016-02-23T22:34:01.425941 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:185:in `test'
E, [2016-02-23T22:34:01.425973 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in `public_send'
E, [2016-02-23T22:34:01.425985 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in `block (2 levels) in run_action'
E, [2016-02-23T22:34:01.425996 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
E, [2016-02-23T22:34:01.426007 #64853] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
E, [2016-02-23T22:34:01.426021 #64853] ERROR -- Kitchen: ----------------------

My .kitchen.yml file:


---
driver:
  name: azurerm

driver_config:
  subscription_id: 'SUBSCRIPTIONID'
  location: 'West Europe'
  machine_size: 'Standard_D1'

provisioner:
  name: chef_zero

platforms:
  - name: windows2012-r2
    driver_config:
      image_urn: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
    transport:
      name: winrm

suites:
  - name: default
    run_list:
      - recipe[kitchentesting::default]
    attributes:

Any idea?

Connect on private ip?

Is it possible to connect on the private ip instead of the public one? We have a ExpressRoute in place. This is on a BGP level which as an by effect blocks our traffic to the public ip addresses.

Could not load the 'azurerm' driver from the load path

After upgrading to the latest Chef-DK (0.9.0->0.10.0):

PS C:\chef-starter\chef-repo\path-to-my-cookbook> kitchen create
-----> Starting Kitchen (v1.4.2)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ClientError
>>>>>> Message: Could not load the 'azurerm' driver from the load path. Please ensure that your driver is installed as a
 gem or included in your Gemfile if using Bundler.
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

I've uninstalled and reinstalled the Chef-DK, including other versions. Seems broken now. Could this be a path issue? When using the vagrant driver I can kitchen create without issue.

chef gem install kitchen-azurerm appears to be working:

PS C:\chef-starter\chef-repo\cookbooks\path-to-cookbook> gem install kitchen-azurerm
Successfully installed concurrent-ruby-1.0.0
Successfully installed faraday-cookie_jar-0.0.6
Successfully installed timeliness-0.3.7
Successfully installed ms_rest-0.1.2
Successfully installed ms_rest_azure-0.1.2
Successfully installed azure_mgmt_network-0.1.1
Successfully installed azure_mgmt_resources-0.1.1
Successfully installed kitchen-azurerm-0.2.3
Parsing documentation for concurrent-ruby-1.0.0
Parsing documentation for faraday-cookie_jar-0.0.6
Parsing documentation for timeliness-0.3.7
Parsing documentation for ms_rest-0.1.2
Parsing documentation for ms_rest_azure-0.1.2
Parsing documentation for azure_mgmt_network-0.1.1
Parsing documentation for azure_mgmt_resources-0.1.1
Parsing documentation for kitchen-azurerm-0.2.3
Done installing documentation for concurrent-ruby, faraday-cookie_jar, timeliness, ms_rest, ms_rest_azure, azure_mgmt_ne
twork, azure_mgmt_resources, kitchen-azurerm after 7 seconds
8 gems installed

And to add, Bundle show kitchen-azurerm yields the following output:

C:/Users/gmate/.chefdk/gem/ruby/2.1.0/gems/kitchen-azurerm-0.2.1

Though I do see a discrepency between the version installed with chef gem install (0.2.3) and the bundle show (0.2.1). Any ideas on how to get my test-kitchen working in Azure again? Help greatly appreciated. I didn't think upgrading ChefDK would cause any harm as I had no issues upgrading in the past.

Azure Marketplace images for Debian 7/8 and CentOS 7.1 hang on lecture notice during converge

Test Kitchen 1.4.2
Net-ssh 3.0.2

.kitchen.yml


---
driver:
  name: azurerm

driver_config:
  subscription_id: 'b6e7eee9-YOUR-GUID-HERE-03ab624df016'
  location: 'West Europe'
  machine_size: 'Standard_DS3'
  storage_account_type: 'Premium_LRS'
  boot_diagnostics_enabled: 'false'

provisioner:
  name: chef_zero

platforms:
  - name: centos-7.1
    driver_config:
      image_urn: OpenLogic:CentOS:7.1:latest
  - name: ubuntu-15.10
    driver_config:
      image_urn: Canonical:UbuntuServer:15.10:latest
  - name: debian-7
    driver_config:
      image_urn: credativ:Debian:7:latest

verifier:
  name: inspec

suites:
  - name: cfgmgmtcamp
    run_list:
      - recipe[azure-linux::default]
    attributes:

Authenticate via certificate instead of password

It appears that the AzureRm will not allow using a certificate instead of a password for connecting to Azure to deploy machines.

~/.azure/credentials
[MySubscriptionId]
client_id = "ApplicationIdForMyAzureRunAsAccount"
client_secret = "ThumbprintForMyAzureRunAsAccount"
tenant_id = "TenantIdForMyAzureRunAsAccount"

Log snippet:
E, [2017-08-10T10:43:48.624712 #39524] ERROR -- Kitchen: ---Nested Exception---
E, [2017-08-10T10:43:48.624712 #39524] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2017-08-10T10:43:48.624712 #39524] ERROR -- Kitchen: Message: Failed to complete #create action: [{
"message": "Couldn't login to Azure, please verify your tenant id, client id and client secret",
"request": null,
"response": null
}]

Nil error on failure to authenticate

If credentials file is set up incorrectly, kitchen create fails with [undefined method[]' for nil:NilClass]`

The real error as can be seen from pry is failure to authenticate

$ ~/cookbooks/kitchen_azurerm $ kitchen create
-----> Starting Kitchen (v1.4.2)
-----> Creating <default-windows2012-r2>...

From: /Users/alexvinyar/.chefdk/gem/ruby/2.1.0/gems/kitchen-azurerm-0.2.1/lib/kitchen/driver/azurerm.rb @ line 61 Kitchen::Driver::Azurerm#create:

    56:         @resource_management_client.subscription_id = config[:subscription_id]
    57:
    58:         # Create Resource Group
    59:         resource_group = ::Azure::ARM::Resources::Models::ResourceGroup.new
    60:         resource_group.location = config[:location]
 => 61:         require 'pry';binding.pry
    62:         begin
    63:           info "Creating Resource Group: #{state[:azure_resource_group_name]}"
    64:           resource_management_client.resource_groups.create_or_update(state[:azure_resource_group_name], resource_group).value!
    65:         rescue ::MsRestAzure::AzureOperationError => operation_error
    66:           info operation_error.body['error']

Hitting the method manually <

2.1.6 (#<Kitchen::Driver::Azurerm:0x007fb11da5b470>):0 > 
resource_management_client.resource_groups.create_or_update(state[:azure_resource_group_name], resource_group).value!
MsRestAzure::AzureOperationError: Couldn't login to Azure, please verify your tenant id, client id and client secret
from /Users/alexvinyar/.chefdk/gem/ruby/2.1.0/gems/ms_rest_azure-0.1.1/lib/ms_rest_azure/credentials/application_token_provider.rb:108:in `acquire_token'
2.1.6 (#<Kitchen::Driver::Azurerm:0x007fb11da5b470>):0 > exit

The error kitchen presents (even in debug mode)

       Creating Resource Group: kitchen-default-windows2012-r2-20151027T052831
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [undefined method `[]' for nil:NilClass]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Security Group

Hi Guys,

thanks for the great work!

how about the security group? I use Test Kitchen to trigger ansible and test few things on the box, however without the correct ports opened its not possible.

How to you deal with this part?

Regards,

MG

cookbooks not uploading

driver:
name: azurerm
provisioner:
name: chef_zero
verifier:
name: inspec
platforms:

  • name: windows2012-r2
    driver_config:
    image_urn: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
    transport:
    name: winrm
    elevated: true
    suites:
  • name: default
    run_list:
    • recipe[sample::default]

directory structure

metadata.rb
README.md
chefignore
Berksfile
.kitchen.yml
recipes/default.rb

C:\Users\Administraotr\AppData\Local\Temp\kitchen
cookbooks folder is empty..

============================
Starting Kitchen (v1.17.0)
Converging ...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 6.3.1...
Removing non-cookbook files before transfer
Preparing validation.pem
Preparing client.rb
Chef Omnibus installation detected (install only if missing)
Transferring files to
Starting Chef Client, version 13.6.0
resolving cookbooks for run list: ["sample::default"]

================================================================================
Error Resolving Cookbooks for Run List:

Missing Cookbooks:

No such cookbook: sample

Expanded Run List:

  • sample::default

System Info:

chef_version=13.6.0
platform=windows
platform_version=6.3.9600
ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
program_name=C:/opscode/chef/bin/chef-client
executable=C:/opscode/chef/bin/chef-client

Running handlers:
[2017-11-06T16:42:33+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-11-06T16:42:33+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 03 seconds

MD5 checksum error on converge

While running a converge of a newly created 2012r2 image it fails with an MD% mismatch error:

-----> Installing Chef Omnibus (install only if missing)
       Downloading package from https://packages.chef.io/stable/windows/2012r2/chef-client-12.12.15-1-x64.msi
       Download complete.
$$$$$$ MD5 for C:\Users\azure\AppData\Local\Temp\chef-true.msi
$$$$$$ eddc81c07a6ce69d6cab37ba343ce892 does not match
$$$$$$ At line:46 char:10
$$$$$$ +   else { throw "MD5 for $dst $dmd5 does not match $md5" }
$$$$$$ +          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$$$$$$     + CategoryInfo          : OperationStopped: (MD5 for C:\User...does not ma
$$$$$$    tch :String) [], RuntimeException
$$$$$$     + FullyQualifiedErrorId : MD5 for C:\Users\azure\AppData\Local\Temp\chef-t
$$$$$$    rue.msi eddc81c07a6ce69d6cab37ba343ce892 does not match

Windows Server (2012-r2|2016): The value of parameter windowsConfiguration is invalid.

With the same .kitchen.yml as example 2 on README.

>>>>>> ------Exception-------                                                                                                                                                                     
>>>>>> Class: Kitchen::ActionFailed                                                                                                                                                               
>>>>>> Message: 1 actions failed.                                                                                                                                                                 
>>>>>>     Failed to complete #create action: [{"error"=>{"code"=>"InvalidParameter", "target"=>"windowsConfiguration", "message"=>"The value of parameter windowsConfiguration is invalid."}}] on
 default-windows2012-r2                                                                                                                                                                           
>>>>>> ----------------------                                                                                                                                                                     
>>>>>> Please see .kitchen/logs/kitchen.log for more details                                                                                                                                      
>>>>>> Also try running `kitchen diagnose --all` for configuration

It seems image_urn is been ignored from .kitchen.yml

kitchen diagnose --all shows me:

driver:                        
      azure_environment: Azure           
      azure_resource_group_name: kitchen-default-windows2012-r2
      boot_diagnostics_enabled: 'true'
      custom_data: ''                                                    
      existing_storage_account_blob_url: ''
      existing_storage_account_container: vhds
      image_id: ''         
      image_url: ''                                                      
      image_urn: Canonical:UbuntuServer:14.04.3-LTS:latest

My .kitchen.yml

---
driver:
  name: azurerm

driver_config:
  subscription_id: ''
  location: 'South Central US'
  machine_size: 'Standard_D1'

provisioner:
  name: chef_zero

platforms:
  - name: windows2012-r2
    drive_config:
      image_urn: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
      vm_tags: 
        ostype: windows
    transport:
      name: winrm

verifier:
  name: pester

suites:
  - name: default

Failed to complete #create action

PS C:\Users\Phillip\RubyMineProjects\atlassian\atlassian\cookbooks\atlassian> kitchen test
-----> Starting Kitchen (v1.4.2)
-----> Cleaning up any prior instances of
-----> Destroying ...
Finished destroying (0m0.00s).
-----> Testing
-----> Creating ...

------Exception-------
Class: Kitchen::ActionFailed

Message: Failed to complete #create action: [undefined method `[]' for nil:NilClass]

Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration

Kitchen create: Failed to complete #create action: [undefined method `[]' for nil:NilClass]

I am working with a certified Chef consultant in attempts to get our infrastructure connected to Azure. I have connected my information to Azure successfully but fail out when attempting to Kitchen Create. Workstation is Windows 7, any assistance is appreciated. The main error is:

Failed to complete #create action: [undefined method `[]' for nil:NilClass]

And the kitchen.log files point to azurerm.rb. I've copied the information here for you to review.

PS C:\chef-starter\chef-repo\cookbooks\na-iis> kitchen create
-----> Starting Kitchen (v1.4.2)
-----> Creating <default-windows2012-r2>...
       Creating Resource Group: kitchen-default-windows2012-r2-20151006T194753
 ------Exception-------
Class: Kitchen::ActionFailed
Message: Failed to complete #create action: [undefined method `[]' for nil:NilClass]
----------------------
Please see .kitchen/logs/kitchen.log for more details
Also try running `kitchen diagnose --all` for configuration

Kitchen.log file:

I, [2015-10-06T15:47:48.681628 #5996]  INFO -- Kitchen: -----> Starting Kitchen (v1.4.2)
I, [2015-10-06T15:47:53.481107 #5996]  INFO -- Kitchen: -----> Creating <default-windows2012-r2>...
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: ------Exception-------
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: Message: Failed to complete #create action: [undefined method `[]' for nil:NilClass]
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: ---Nested Exception---
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: Class: NoMethodError
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: Message: undefined method `[]' for nil:NilClass
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: ------Backtrace-------
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/kitchen-azurerm-0.2.1/lib/kitchen/driver/azurerm.rb:65:in `rescue in create'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/kitchen-azurerm-0.2.1/lib/kitchen/driver/azurerm.rb:61:in `create'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:424:in `public_send'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:424:in `block in perform_action'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in `call'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:488:in `synchronize_or_call'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:453:in `block in action'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/opscode/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:452:in `action'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:424:in `perform_action'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:352:in `create_action'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:341:in `block in transition_to'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in `each'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:340:in `transition_to'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/instance.rb:127:in `create'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in `public_send'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/Users/gmate/AppData/Local/chefdk/gem/ruby/2.1.0/gems/test-kitchen-1.4.2/lib/kitchen/command.rb:176:in `block (2 levels) in run_action'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
E, [2015-10-06T15:47:53.995894 #5996] ERROR -- Kitchen: ----------------------

Contents of my kitchen YML for the cookbook:


---
driver:
  name: azurerm

driver_config:
  subscription_id: "xyz"
  location: "East US"
  machine_size: "Standard_A3"

provisioner:
  name: chef_zero

platforms:
  - name: windows2012-r2
    driver_config:
      image_urn: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
    transport:
      name: winrm

suites:
  - name: default
    run_list:
      - recipe[recipe::default]
    attributes:

Gems:

PS C:\chef-starter\chef-repo\cookbooks\cookbook> gem list | grep kitchen
kitchen-azure (0.1.0)
kitchen-azurerm (0.2.1)
kitchen-nodes (0.4.1)
kitchen-vagrant (0.19.0)
test-kitchen (1.4.2)

Output of Chef -v:

Chef Development Kit Version: 0.8.1
chef-client version: 12.4.4
berks version: 3.3.0
kitchen version: 1.4.2

EDIT: I just rebuilt my system in a VM and got the same error on a server 2012 R2 machine. Others going through this task have an earlier version of Chef DK and were able to complete without issue it seems.

Resourcegroup could not be found - issue creating resourcegroup because of default name?

Hi there,

Sorry, but am i doing something wrong here or is there a problem. My .kitchen.yml file is this;

---
driver:
  name: azurerm

driver_config:
  subscription_id: '3d5b86a9-f2e5-47ec-86bf-6bea5dea8f06'
  location: 'West Europe'
  machine_size: 'Standard_D1'

provisioner:
  name: chef_zero

platforms:
  - name: windows2012-r2
    driver_config:
      image_urn: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
    transport:
      name: winrm
suites:
  - name: default
    run_list:
      - recipe[kitchentesting::default]
    attributes:

But on running kitchen test i get this error. Below. Interestingly I try and create the resourcegroup name "kitchen-default-windows2012-r2-20170624T080014" manually in my subscription and it will not allow it as it has a trademarked or copyrighted name in it (im guessing windows).

The resource name 'kitchen-default-windows2012-r2-20170624T080014' or a part of the name is a trademarked or reserved word.

Sorry if doing something daft, but this seems as simple as it can get, what am I doing wrong? Using an MSDN account which provides around £40 free credit a month if that helps.

I, [2017-06-24T09:41:39.979542 #7436]  INFO -- default-windows2012-r2: -----> Cleaning up any prior instances of <default-windows2012-r2>
I, [2017-06-24T09:41:39.982045 #7436]  INFO -- default-windows2012-r2: -----> Destroying <default-windows2012-r2>...
I, [2017-06-24T09:41:39.985046 #7436]  INFO -- default-windows2012-r2: Azure environment: Azure
I, [2017-06-24T09:41:40.042584 #7436]  INFO -- default-windows2012-r2: Destroying Resource Group: kitchen-default-windows2012-r2-20170624T080014
E, [2017-06-24T09:41:40.863132 #7436] ERROR -- default-windows2012-r2: {"error"=>{"code"=>"ResourceGroupNotFound", "message"=>"Resource group 'kitchen-default-windows2012-r2-20170624T080014' could not be found."}}
E, [2017-06-24T09:41:40.866633 #7436] ERROR -- default-windows2012-r2: Destroy failed on instance <default-windows2012-r2>.
E, [2017-06-24T09:41:40.867635 #7436] ERROR -- default-windows2012-r2: ------Exception-------
E, [2017-06-24T09:41:40.867635 #7436] ERROR -- default-windows2012-r2: Class: MsRestAzure::AzureOperationError
E, [2017-06-24T09:41:40.868135 #7436] ERROR -- default-windows2012-r2: Message: {
  "message": "MsRestAzure::AzureOperationError: ResourceGroupNotFound: Resource group 'kitchen-default-windows2012-r2-20170624T080014' could not be found.",

Kitchen conv(erge) gives AzureOperationError

Hi,

I tried to follow all the setup instuctions, but I get this (in TK log file):

# cat .kitchen/logs/kitchen.log
I, [2016-03-18T23:16:00.544922 #82662]  INFO -- Kitchen: -----> Starting Kitchen (v1.6.0)
I, [2016-03-18T23:16:01.245511 #82662]  INFO -- Kitchen: -----> Creating <policy-web-apache2-ubuntu-1404>...
E, [2016-03-18T23:16:02.858463 #82662] ERROR -- Kitchen: ------Exception-------
E, [2016-03-18T23:16:02.858659 #82662] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2016-03-18T23:16:02.858815 #82662] ERROR -- Kitchen: Message: Failed to complete #create action: [MsRestAzure::AzureOperationError]
E, [2016-03-18T23:16:02.858883 #82662] ERROR -- Kitchen: ---Nested Exception---
E, [2016-03-18T23:16:02.858915 #82662] ERROR -- Kitchen: Class: MsRestAzure::AzureOperationError
E, [2016-03-18T23:16:02.858956 #82662] ERROR -- Kitchen: Message: MsRestAzure::AzureOperationError
E, [2016-03-18T23:16:02.858982 #82662] ERROR -- Kitchen: ------Backtrace-------
E, [2016-03-18T23:16:02.859005 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/azure_mgmt_resources-0.1.1/lib/azure_mgmt_resources/resource_groups.rb:305:in `block in begin_create_or_update'
E, [2016-03-18T23:16:02.859031 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/promise.rb:496:in `call'
E, [2016-03-18T23:16:02.859054 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/promise.rb:496:in `block in on_fulfill'
E, [2016-03-18T23:16:02.859078 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/executor/safe_task_executor.rb:24:in `call'
E, [2016-03-18T23:16:02.859103 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
E, [2016-03-18T23:16:02.859127 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `block in synchronize'
E, [2016-03-18T23:16:02.859169 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `synchronize'
E, [2016-03-18T23:16:02.859204 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `synchronize'
E, [2016-03-18T23:16:02.859228 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/executor/safe_task_executor.rb:19:in `execute'
E, [2016-03-18T23:16:02.859252 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/promise.rb:526:in `block in realize'
E, [2016-03-18T23:16:02.859276 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `call'
E, [2016-03-18T23:16:02.859299 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `run_task'
E, [2016-03-18T23:16:02.859323 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in `block (3 levels) in create_worker'
E, [2016-03-18T23:16:02.859443 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `loop'
E, [2016-03-18T23:16:02.859514 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (2 levels) in create_worker'
E, [2016-03-18T23:16:02.859548 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `catch'
E, [2016-03-18T23:16:02.859574 #82662] ERROR -- Kitchen: /Users/iiro/.chefdk/gem/ruby/2.1.0/gems/concurrent-ruby-1.0.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `block in create_worker'
E, [2016-03-18T23:16:02.859599 #82662] ERROR -- Kitchen: ----------------------

Any ideas? Credential-file should be ok also.

I'm new to Azure to this can be easily an user error.

Various actions fail: [Failed to open TCP connection to login.microsoftonline.com:443 (getaddrinfo: nodename nor servname provided, or not known)]

Hi!

Might just be me doing something silly given the hour, but keep running into this on kitchen converge:

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [Failed to open TCP connection to management.azure.com:443 (getaddrinfo: nodename nor servname provided, or not known)] on default-windows-2012r2
>>>>>> ----------------------

Everything appears to have been created.

Interestingly, I get the same error when destroying, and at least in the three times I've run this, it succeeds after a second run:

[wframe@mbp ~/sc/kitchen-shell-example (master *)]$ bundle exec kitchen destroy
-----> Starting Kitchen (v1.14.0)
-----> Destroying <default-windows-2012r2>...
       Destroying Resource Group: kitchen-default-windows-2012r2-20161204T043202
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #destroy action: [Failed to open TCP connection to login.microsoftonline.com:443 (getaddrinfo: nodename nor servname provided, or not known)] on default-windows-2012r2
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

[wframe@mbp ~/sc/kitchen-shell-example (master *)]$ bundle exec kitchen destroy
-----> Starting Kitchen (v1.14.0)
-----> Destroying <default-windows-2012r2>...
       Destroying Resource Group: kitchen-default-windows-2012r2-20161204T043202
       Destroy operation accepted and will continue in the background.
       Finished destroying <default-windows-2012r2> (0m2.06s).
-----> Kitchen is finished. (0m2.59s)

Any tips? Will dive into the source tomorrow, but I'm a bit perplexed!

Cheers!

subscription_id should not be mandatory for .kitchen.yml

Bug: All of the settings for azure are pulled in from the ~/.azure/credentials file.

Subscription ID is one of the settings. The default behavior of the azure-cli is to use the top Subscription if there are multiple subscriptions and default one is not specified.

Current expectation


---
driver:
  name: azurerm

driver_config:
  subscription_id: '43e53945-f02b-4269-8854-ad7dd14ac6f2'
  location: 'West Europe'
  machine_size: 'Standard_D1'

Expected behavior: subscription id is pulled from credentials file.


---
driver:
  name: azurerm

driver_config:
  location: 'West Europe'
  machine_size: 'Standard_D1'

WinRM timeout in test-kitchen on Windows

I'm currently using a homegrown cookbook to install Nodejs for windows. I can then use a community LWRP to install npm packages on Windows. To cover my bases, I've linked my issue on the community cookbook as well here: sous-chefs/nodejs#148

Using test-kitchen kitchen converge -l debug, when using resource nodejs_npm 'gulp' I find the debug output:

       [2016-12-09T07:24:40+00:00] DEBUG: Providers for generic execute resource enabled on node include: [Chef::Provider::Execute]
       [2016-12-09T07:24:40+00:00] DEBUG: Provider for action run on resource execute[install NPM package gulp] is Chef::Provider::Execute

             [execute] npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
                npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
                npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls gr
aceful-fs' to find it in the tree.
                C:\Users\azure\AppData\Roaming\npm\gulp -> C:\Users\azure\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js
                C:\Users\azure\AppData\Roaming\npm
                `-- [email protected]

D      [WinRM] retrying receive request after timeout

If I let it wait, I'll just get the last line [WinRM] error forever.

When logging in locally and running the same command npm install -g gulp I get the below output:

PS C:\Users\azure> npm install -g gulp
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update t
o graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
C:\Users\azure\AppData\Roaming\npm\gulp -> C:\Users\azure\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js
C:\Users\azure\AppData\Roaming\npm
`-- [email protected]

PS C:\Users\azure>

Outputs are the same (and the command runs 100% successfully), it just seems that WinRM doesn't release the shell back to test-kitchen after npm is done installing. Seen this issue before? It may be nodejs specific, but I'm curious if this is an issue with WinRM not letting test-kitchen know that the resource is done.

For good merit, here's my .kitchen.yml file:

---
driver:
  name: azurerm

driver_config:
  subscription_id: "123-guid-goes-here-456"
  location: "East US"
  machine_size: "Standard_DS1"

provisioner:
  name: chef_zero

platforms:
  - name: windows2012-r2
    driver_config:
      image_urn: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
    transport:
      name: winrm
      elevated: true

suites:
  - name: default
    run_list:
      - recipe[nap-nodejs::default]
    attributes:

Add support for custom-data

Hello,
currently the provisioner does not support custom data. This may be helpful to run provisioning scripts on the machines.
Regards,
Robert

"Couldn't login to Azure, please verify your tenant id, client id and client secret"

Hi Stuart!

I followed your directions to set up a credentials file with the subscription id, client id, client secret, and tenant id, however I keep getting this error when I try to run kitchen create like it can't find my credentials:

"Couldn't login to Azure, please verify your tenant id, client id and client secret"

Could it be an issue that I'm on a Mac?

Thanks!

How to get client id and client secret

I was able to follow along the instructions from
https://azure.microsoft.com/en-us/documentation/articles/resource-group-authenticate-service-principal/#authenticate-service-principal-with-password---azure-cli
but no sure what client id and client secret is.
I tried using the application id and the password as the client id and client secret but when i try a kitchen create i get error:
{"error"=>{"code"=>"AuthorizationFailed", "message"=>"The client '38a99999-9999-9999-9999-b99999e3da5' with object id '38a99999-9999-9999-9999-b99999e3da5' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/write' over scope '/subscriptions/a9999999-9999-9999-9999-999999999999/resourcegroups/kitchen-default-windows2012-r2-20151129T184927'."}}

Should not require ~/.azure/credentials

The driver should not require the file ~/.azure/credentials. I am using environment variables in for CI, so the credential file is not needed.


sh -c kitchen test -c 1 --destroy=always
-----> Starting Kitchen (v1.16.0)
WARN: Unresolved specs during Gem::Specification.reset:
octokit (~> 4.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
-----> Cleaning up any prior instances of
-----> Destroying ...
Finished destroying (0m0.00s).
-----> Testing
-----> Creating ...
/root/.azure/credentials was not found or not accessible.

PowerShell Environment issue with ~

Hi!

Some code I'm using calls ~. I get the following error on initial converge:

Home location for this provider is not set. To set the home location, call "(get-psprovider 'FileSystem').Home = 'path'".
At line:14 char:29
$$$$$$ +     $NugetPath = Join-Path (Resolve-Path -Path ~).Path nuget.exe

This only happens on initial run. If I run converge a second time, it resolves correctly.

I'd prefer to use ~ given that it should work across platforms, but, will change to $ENV:UserProfile for now (that variable does exist)

Cheers!

optional pre/postfix creating the resource group

it would be nice to be able to pre/postfix the resource group name so it can comply with naming standards within an organisation. could be extended to support further naming conventions on other resources.

thought for solution:
could be via a config file in the .azure folder

Add support for custom Image

Hello,
we want to QA against a custom image that we have created (a IMAGE.vhd file). Can support for custom IMAGE.vhd be added ?

Regards,
Robert

kitchen create fails with permission error

I'm using the latest kitchen-azurerm.

Here's my .kitchen.yml

---
driver:
  name: azurerm

driver_config:
  subscription_id: '950ca109-6d5b-4699-81f1-98eef6cd2faf'
  location: 'West Europe'
  machine_size: 'Standard_D1'

transport:
  ssh_key: ~/.ssh/id_kitchen-azurerm

provisioner:
  name: chef_zero

verifier:
  name: inspec

platforms:
  - name: ubuntu-14.04
    driver_config:
      image_urn: Canonical:UbuntuServer:14.04.4-LTS:latest
      vm_name: trusty-vm

suites:
  - name: default
    run_list:
      - recipe[azure_linux_test::default]
    verifier:
      inspec_tests:
        - test/recipes
    attributes:

My ~/.azure/credentials file looks like this (password redacted):

[950ca109-6d5b-4699-81f1-98eef6cd2faf]
client_id = "ed09fd66-23c9-4a9f-925d-54a0dc83430a"
client_secret = "*******"
tenant_id = "205db08b-5970-49b4-aa7d-3eb537878eee"

I have given the service principal "Owner" rights on the subscription (I had tried with Contributor before, but it didn't work):

 ~/src/bluth_repo/cookbooks/azure_linux_test/ [master] azure role assignment list
info:    Executing command role assignment list
+ Searching for role assignments
data:    RoleAssignmentId     : /subscriptions/950ca109-6d5b-4699-81f1-98eef6cd2faf/providers/Microsoft.Authorization/roleAssignments/bc54877b-f09b-471d-aa9c-ca5b379354c0
data:    RoleDefinitionName   : Owner
data:    RoleDefinitionId     : 8e3af657-a8ff-443c-a75c-2fe8c4bcb635
data:    Scope                : /subscriptions/950ca109-6d5b-4699-81f1-98eef6cd2faf
data:    Display Name         : testkitchen
data:    SignInName           : undefined
data:    ObjectId             : 5c735b55-dd39-46e9-b8ef-065faaf3d374
data:    ObjectType           : ServicePrincipal
data:
info:    role assignment list command OK

And I get a security error on kitchen converge

 ~/src/bluth_repo/cookbooks/azure_linux_test/ [master] kitchen create
Ignoring unf_ext-0.0.7.2 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.2
-----> Starting Kitchen (v1.13.2)
-----> Creating <default-ubuntu-1404>...
       Creating Resource Group: kitchen-default-ubuntu-1404-20161110T140900
       Creating deployment: deploy-9224c627a7421859
       Adding public key from /Users/mattstratton/.ssh/id_kitchen-azurerm.pub to the deployment.
       Resource Template deployment reached end state of 'Failed'.
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [{"error"=>{"code"=>"AuthorizationFailed", "message"=>"The client '5c735b55-dd39-46e9-b8ef-065faaf3d374' with object id '5c735b55-dd39-46e9-b8ef-065faaf3d374' does not have authorization to perform action 'Microsoft.Network/virtualNetworks/write' over scope '/subscriptions/950ca109-6d5b-4699-81f1-98eef6cd2faf/resourcegroups/kitchen-default-ubuntu-1404-20161110T140900/providers/Microsoft.Network/virtualNetworks/vnet'."}}] on default-ubuntu-1404
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

I am able to manually create items inside the portal, so I know my subscription is fine (it also shows as Active).

What am I missing?

undefined method `local_variable_set' when running "kitchen test"

Platform: macOS 10.12.3
Gem version: kitchen-azurerm (0.8.0)

When I try and run kitchen test this is the output I get;

>> kitchen test
-----> Starting Kitchen (v1.15.0)
-----> Cleaning up any prior instances of <default-windows2008-r2>
-----> Destroying <default-windows2008-r2>...
       Finished destroying <default-windows2008-r2> (0m0.00s).
-----> Testing <default-windows2008-r2>
-----> Creating <default-windows2008-r2>...
       Creating Resource Group: kitchen-default-windows2008-r2-20170225T095836
       Creating deployment: deploy-7119de2f97df50ae
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [undefined method `local_variable_set' for #<Binding:0x007fb86c91d5d0>] on default-windows2008-r2
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

My .kitchen.yml file

---
driver:
  name: azurerm

provisioner:
  name: chef_zero

driver_config:
  subscription_id: 'xxxxxxxxxxxxxxxxxxxx'
  location: 'West Europe'
  machine_size: 'Standard_D1'

platforms:
  - name: windows2008-r2
    driver_config:
      image_urn: MicrosoftWindowsServer:WindowsServer:2008-R2-SP1:latest
      winrm_powershell_script: |-
        winrm quickconfig -q
        winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="512"}'
        winrm set winrm/config '@{MaxTimeoutms="1800000"}'
        winrm set winrm/config/service '@{AllowUnencrypted="true"}'
        winrm set winrm/config/service/auth '@{Basic="true"}'
      transport:
        name: winrm

suites:
  - name: default
    run_list:
    attributes:

Results of bundle list

  * artifactory (2.7.0)
  * azure_mgmt_network (0.9.0)
  * azure_mgmt_resources (0.9.0)
  * builder (3.2.3)
  * bundler (1.10.6)
  * concurrent-ruby (1.0.4)
  * domain_name (0.5.20170223)
  * dsc_lcm_configuration (0.2.0)
  * erubis (2.7.0)
  * faraday (0.11.0)
  * faraday-cookie_jar (0.0.6)
  * ffi (1.9.17)
  * gssapi (1.2.0)
  * gyoku (1.3.1)
  * http-cookie (1.0.3)
  * httpclient (2.8.3)
  * inifile (3.0.0)
  * kitchen-azurerm (0.8.0)
  * kitchen-dsc (0.10.0)
  * kitchen-vagrant (1.0.2)
  * little-plugger (1.1.4)
  * logging (2.1.0)
  * mixlib-install (2.1.12)
  * mixlib-shellout (2.2.7)
  * mixlib-versioning (1.1.0)
  * ms_rest (0.6.3)
  * ms_rest_azure (0.7.0)
  * multi_json (1.12.1)
  * multipart-post (2.0.0)
  * net-scp (1.2.1)
  * net-ssh (4.1.0)
  * net-ssh-gateway (1.3.0)
  * nori (2.6.0)
  * rubyntlm (0.6.1)
  * rubyzip (1.2.1)
  * safe_yaml (1.0.4)
  * sshkey (1.9.0)
  * test-kitchen (1.15.0)
  * thor (0.19.4)
  * timeliness (0.3.8)
  * unf (0.1.4)
  * unf_ext (0.0.7.2)
  * winrm (2.1.2)
  * winrm-fs (1.0.1)

Contents of .kitchen/logs/kitchen.log

I, [2017-02-25T10:04:24.985778 #20493]  INFO -- Kitchen: -----> Starting Kitchen (v1.15.0)
I, [2017-02-25T10:04:25.982724 #20493]  INFO -- Kitchen: -----> Cleaning up any prior instances of <default-windows2008-r2>
I, [2017-02-25T10:04:25.983011 #20493]  INFO -- Kitchen: -----> Destroying <default-windows2008-r2>...
I, [2017-02-25T10:04:25.988717 #20493]  INFO -- Kitchen: -----> Testing <default-windows2008-r2>
I, [2017-02-25T10:04:25.988937 #20493]  INFO -- Kitchen: -----> Creating <default-windows2008-r2>...
E, [2017-02-25T10:04:27.225307 #20493] ERROR -- Kitchen: ------Exception-------
E, [2017-02-25T10:04:27.225388 #20493] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2017-02-25T10:04:27.225430 #20493] ERROR -- Kitchen: Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [undefined method `local_variable_set' for #<Binding:0x007fd01086be28>] on default-windows2008-r2
E, [2017-02-25T10:04:27.225479 #20493] ERROR -- Kitchen: ----------------------
E, [2017-02-25T10:04:27.225513 #20493] ERROR -- Kitchen: ------Backtrace-------
E, [2017-02-25T10:04:27.225542 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/command.rb:183:in `report_errors'
E, [2017-02-25T10:04:27.225572 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/command.rb:174:in `run_action'
E, [2017-02-25T10:04:27.225602 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/command/test.rb:42:in `block in call'
E, [2017-02-25T10:04:27.225631 #20493] ERROR -- Kitchen: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:281:in `measure'
E, [2017-02-25T10:04:27.225660 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/command/test.rb:38:in `call'
E, [2017-02-25T10:04:27.225690 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/cli.rb:53:in `perform'
E, [2017-02-25T10:04:27.225719 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/cli.rb:234:in `test'
E, [2017-02-25T10:04:27.225749 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
E, [2017-02-25T10:04:27.225778 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
E, [2017-02-25T10:04:27.225807 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/cli.rb:334:in `invoke_task'
E, [2017-02-25T10:04:27.225837 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
E, [2017-02-25T10:04:27.225866 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
E, [2017-02-25T10:04:27.225895 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/bin/kitchen:13:in `block in <top (required)>'
E, [2017-02-25T10:04:27.225925 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/errors.rb:171:in `with_friendly_errors'
E, [2017-02-25T10:04:27.225954 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/bin/kitchen:13:in `<top (required)>'
E, [2017-02-25T10:04:27.226007 #20493] ERROR -- Kitchen: /usr/local/bin/kitchen:23:in `load'
E, [2017-02-25T10:04:27.226042 #20493] ERROR -- Kitchen: /usr/local/bin/kitchen:23:in `<main>'
E, [2017-02-25T10:04:27.226075 #20493] ERROR -- Kitchen: /usr/local/bin/ruby_executable_hooks:15:in `eval'
E, [2017-02-25T10:04:27.226102 #20493] ERROR -- Kitchen: /usr/local/bin/ruby_executable_hooks:15:in `<main>'
E, [2017-02-25T10:04:27.226128 #20493] ERROR -- Kitchen: ----End Backtrace-----
E, [2017-02-25T10:04:27.226154 #20493] ERROR -- Kitchen: -Composite Exception--
E, [2017-02-25T10:04:27.226179 #20493] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2017-02-25T10:04:27.226206 #20493] ERROR -- Kitchen: Message: Failed to complete #create action: [undefined method `local_variable_set' for #<Binding:0x007fd01086be28>] on default-windows2008-r2
E, [2017-02-25T10:04:27.226241 #20493] ERROR -- Kitchen: ----------------------
E, [2017-02-25T10:04:27.226269 #20493] ERROR -- Kitchen: ------Backtrace-------
E, [2017-02-25T10:04:27.226295 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:386:in `block in virtual_machine_deployment_template_file'
E, [2017-02-25T10:04:27.226323 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:386:in `each'
E, [2017-02-25T10:04:27.226350 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:386:in `virtual_machine_deployment_template_file'
E, [2017-02-25T10:04:27.226378 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:376:in `virtual_machine_deployment_template'
E, [2017-02-25T10:04:27.226405 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:178:in `template_for_transport_name'
E, [2017-02-25T10:04:27.226433 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:235:in `deployment'
E, [2017-02-25T10:04:27.226468 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:123:in `create'
E, [2017-02-25T10:04:27.226497 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:460:in `public_send'
E, [2017-02-25T10:04:27.226525 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:460:in `block in perform_action'
E, [2017-02-25T10:04:27.226552 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:527:in `synchronize_or_call'
E, [2017-02-25T10:04:27.226579 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:489:in `block in action'
E, [2017-02-25T10:04:27.226606 #20493] ERROR -- Kitchen: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:281:in `measure'
E, [2017-02-25T10:04:27.226633 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:488:in `action'
E, [2017-02-25T10:04:27.226660 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:460:in `perform_action'
E, [2017-02-25T10:04:27.226698 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:370:in `create_action'
E, [2017-02-25T10:04:27.226736 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:359:in `block in transition_to'
E, [2017-02-25T10:04:27.226765 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:358:in `each'
E, [2017-02-25T10:04:27.226791 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:358:in `transition_to'
E, [2017-02-25T10:04:27.226819 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:157:in `verify'
E, [2017-02-25T10:04:27.226852 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:186:in `block in test'
E, [2017-02-25T10:04:27.226881 #20493] ERROR -- Kitchen: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:281:in `measure'
E, [2017-02-25T10:04:27.226921 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:182:in `test'
E, [2017-02-25T10:04:27.226957 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/command.rb:197:in `public_send'
E, [2017-02-25T10:04:27.227001 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/command.rb:197:in `run_action_in_thread'
E, [2017-02-25T10:04:27.227042 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/command.rb:169:in `block (2 levels) in run_action'
E, [2017-02-25T10:04:27.227074 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `call'
E, [2017-02-25T10:04:27.227103 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `block in create_with_logging_context'
E, [2017-02-25T10:04:27.227132 #20493] ERROR -- Kitchen: ----End Backtrace-----
E, [2017-02-25T10:04:27.227160 #20493] ERROR -- Kitchen: ---Nested Exception---
E, [2017-02-25T10:04:27.227187 #20493] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2017-02-25T10:04:27.227218 #20493] ERROR -- Kitchen: Message: Failed to complete #create action: [undefined method `local_variable_set' for #<Binding:0x007fd01086be28>]
E, [2017-02-25T10:04:27.227246 #20493] ERROR -- Kitchen: ----------------------
E, [2017-02-25T10:04:27.227272 #20493] ERROR -- Kitchen: ------Backtrace-------
E, [2017-02-25T10:04:27.227297 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:386:in `block in virtual_machine_deployment_template_file'
E, [2017-02-25T10:04:27.227331 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:386:in `each'
E, [2017-02-25T10:04:27.227358 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:386:in `virtual_machine_deployment_template_file'
E, [2017-02-25T10:04:27.227396 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:376:in `virtual_machine_deployment_template'
E, [2017-02-25T10:04:27.227427 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:178:in `template_for_transport_name'
E, [2017-02-25T10:04:27.227454 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:235:in `deployment'
E, [2017-02-25T10:04:27.227481 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/kitchen-azurerm-0.8.0/lib/kitchen/driver/azurerm.rb:123:in `create'
E, [2017-02-25T10:04:27.227518 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:460:in `public_send'
E, [2017-02-25T10:04:27.227554 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:460:in `block in perform_action'
E, [2017-02-25T10:04:27.227581 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:527:in `synchronize_or_call'
E, [2017-02-25T10:04:27.227608 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:489:in `block in action'
E, [2017-02-25T10:04:27.227636 #20493] ERROR -- Kitchen: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:281:in `measure'
E, [2017-02-25T10:04:27.227662 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:488:in `action'
E, [2017-02-25T10:04:27.227689 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:460:in `perform_action'
E, [2017-02-25T10:04:27.227715 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:370:in `create_action'
E, [2017-02-25T10:04:27.227740 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:359:in `block in transition_to'
E, [2017-02-25T10:04:27.227771 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:358:in `each'
E, [2017-02-25T10:04:27.227800 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:358:in `transition_to'
E, [2017-02-25T10:04:27.227828 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:157:in `verify'
E, [2017-02-25T10:04:27.227855 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:186:in `block in test'
E, [2017-02-25T10:04:27.227882 #20493] ERROR -- Kitchen: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:281:in `measure'
E, [2017-02-25T10:04:27.227908 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/instance.rb:182:in `test'
E, [2017-02-25T10:04:27.227946 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/command.rb:197:in `public_send'
E, [2017-02-25T10:04:27.227977 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/command.rb:197:in `run_action_in_thread'
E, [2017-02-25T10:04:27.228005 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/test-kitchen-1.15.0/lib/kitchen/command.rb:169:in `block (2 levels) in run_action'
E, [2017-02-25T10:04:27.228039 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `call'
E, [2017-02-25T10:04:27.228068 #20493] ERROR -- Kitchen: /Users/edmundd/Development/poc-powershell-dsc-testing-in-azure/vendor/bundle/ruby/2.0.0/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `block in create_with_logging_context'
E, [2017-02-25T10:04:27.228095 #20493] ERROR -- Kitchen: ----End Backtrace-----

Can't run Kitchen Converge Windows 2012

I'm not able to run Kitchen Converge - any suggestions?. I get Exception:

------Exception-------
Class: Kitchen::ActionFailed

Message: Failed to complete #converge action: [A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2) for "xx.xxx.xxx.xxx" port 5985

Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration

There's no NSGs in place in Azure - I seem to be able to RDP to the box but don't know where to look for the username and password so can't investigate further.

I've tried recreating this in Kitchen and got the same error both times.

.kitchen.yml:


driver:
name: azurerm

driver_config:
subscription_id: 'MY-GUID'
location: 'North Europe'
machine_size: 'Standard_D1'

provisioner:
name: chef_zero_scheduled_task

platforms:

  • name: windows2012-r2
    driver_config:
    image_urn: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
    winrm_powershell_script: |-
    winrm quickconfig -q
    winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="512"}'
    winrm set winrm/config '@{MaxTimeoutms="1800000"}'
    winrm set winrm/config/service '@{AllowUnencrypted="true"}'
    winrm set winrm/config/service/auth '@{Basic="true"}'
    transport:
    name: winrm

suites:

  • name: default
    run_list:
    recipe[kitchentesting::default]

Environmental variables have no effect on drive configs

Hi,

I was trying to set up an example with env variables, but it's not possible since ~/.azure/credentials is a hardcoded requirement

driver:
  name: azurerm

driver_config:
  subscription_id: <%= ENV['VAR_subscription_id'] %>
  tenant_id: <%= ENV['VAR_tenant_id'] %>
  client_id: <%= ENV['VAR_client_id'] %>
  client_secret: <%= ENV['VAR_client_secret'] %>
  location: 'West Europe'
  machine_size: 'Standard_D1'

Would it make sense for standard env work as in any kitchen config?

Thanks!

Using `kitchen destroy` does not delete the resource group in Azure

I have created an Azure specific kitchen configuration file to perform integration tests. The file is called .kitchen.azure.yml. The machine was created properly when the following was run:

$> KITCHEN_YAML=".kitchen.azure.yml" kitchen test

However there was a mistake in the tests so the machine is still running. I wanted to remove the machine and the resource group that had been created. I thought that running the following command would do the trick:

$> KITCHEN_YAML=".kitchen.azure.yml" kitchen destroy

However it just removed it from the local list of things and not from Azure itself.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.