Its been quite a while from test kitchen. I am trying to setup the test kitchen with vagrant and virtualbox. So, when i run kitchen create it fails at the point where it tries to ssh connect to the nodes.
UPDATED: my workstation: ubuntu 16.04
chef -v
Chef Development Kit Version: 0.18.30
chef-client version: 12.14.89
delivery version: master (d86679335580be3de22996ef294b20d525889d8d)
berks version: 5.1.0
kitchen version: 1.13.2
○ → vagrant --version
Vagrant 1.9.0
○ → vboxmanage --version
5.1.10r112026
the .kitchen.yml file
driver:
name: vagrant
provisioner:
name: chef_zero
verifier:
name: inspec
platforms:
- name: centos-7.2
suites:
- name: default
run_list:- recipe[xxxxxxxt]
attributes:
- recipe[xxxxxxxt]
The kitchen create, produce this entries:
kitchen create
-----> Starting Kitchen (v1.13.2)
-----> Creating …
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Checking if box ‘bento/centos-7.2’ is up to date…
==> default: Machine not provisioned because --no-provision
is specified.
Waiting for SSH service on 127.0.0.1:2222, retrying in 3 seconds
Waiting for SSH service on 127.0.0.1:2222, retrying in 3 seconds
Waiting for SSH service on 127.0.0.1:2222, retrying in 3 seconds
Waiting for SSH service on 127.0.0.1:2222, retrying in 3 seconds
Waiting for SSH service on 127.0.0.1:2222, retrying in 3 seconds
Waiting for SSH service on 127.0.0.1:2222, retrying in 3 seconds
…
I know, i have set these up in the past. but i just cant recall to set up this ssh handshake for vagrant box. Is there a way where i can set the authorized_keys in the box via the kitchen,yml? so that i can use my private key?
=================================
update:
after inputs from IRC chat and with many trials, vagrant seems to work. As the below commands works:
- sudo vagrant init bento/centos-7.2
- vagrant up
- vagrant ssh
But things fails with the ‘test kitchen’
So, the below commands ‘kitchen create’ or ‘chef exec kitchen create’ fails at the point where it tries to ssh into the box.