I was trying to launch windows-2012 instance using kitchen-ec2 for my cookbook and when i try to run kitchen create
using the following .kitchen.yml
, I am encountering into
undefined method " `username' for nil:NilClass".
I am stuck here at this moment and cannot figure out how to move forward. Any suggestions or advice would be of great help to move forward to launch instance.Thanks for your time.
.kitchen.yml
---
driver:
name: ec2
associate_public_ip: false
aws_ssh_key_id: test-key
instance_type: t2.medium
region: us-east-1
availability_zone: us-east-1c
subnet_id: subnet-a
security_group_ids:
- "sg-a""
transport:
ssh_key: test.pem
associate_public_ip: false
connection_timeout: 60
connection_retries: 10
provisioner:
name: chef_zero
http_proxy: http://proxy.abc.com: 8081
https_proxy: http://proxy.abc.com: 8081
no_proxy: "169.254.169.254,amazonaws.com,abc.com"
environments_path: environments
roles_path: roles
require_chef_omnibus: true
client_rb:
ssl_verify_mode: :verify_none
verify_api_cert: false
platforms:
- name: windows-2012
driver:
image_id: ami-741c161e
interface: private
block_device_mappings:
- device_name: /dev/sda1
ebs:
volume_size: 50
delete_on_termination: true
volume_type: gp2
snapshot_id: snap-120uf
tags:
OwnerContact: test
Name: windows-2012
transport.username: Administrator
suites:
- name: default
run_list:
- recipe[testing-kitchen]
kitchen:
attributes:
verifier:
http_proxy: http://proxy.abc.com:8081
https_proxy: http://proxy.abc.com:8081
no_proxy: "169.254.169.254,amazonaws.com,abc.com"
Error
>>>>>----> Creating <default-windows-2012>...
>>>>>D Image for default-windows-2012: WIN12R2-x64-HVM-Enc-1603. Architecture: x86_64, Virtualization: hvm, Storage: ebs gp2, Created: 2016-04-01T03:19:29.000Z
D No platform detected for WIN12R2-x64-HVM-Enc-1603.
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [undefined method `username' for nil:NilClass]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration