Skip to content

Instantly share code, notes, and snippets.

@inokappa
Last active Dec 29, 2015
Embed
What would you like to do?

Check Environment

  • docker 0.6.7(running localhost) and docker 0.7(running localhost)
  • kitchen-docker 0.10.0
  • test-kitchen-1.0.0.beta.4

.kitchen.yml

---
driver_plugin: docker
driver_config:
  require_chef_omnibus: true

platforms:
- name: ubuntu-12.04
  driver_config:
    image: ubuntu:12.04

suites:
- name: default
  run_list: ["recipe[nginx]"]
  attributes: {}

kitchen create -l debug

-----> Starting Kitchen (v1.0.0.beta.4)
-----> Creating <default-ubuntu-1204>
       [kitchen::driver::docker command] BEGIN (sudo -E docker build -)
       Step 1 : FROM ubuntu:12.04
        ---> 8dbd9e392a96
       Step 2 : ENV DEBIAN_FRONTEND noninteractive
        ---> Using cache
        ---> 1119df3139de
       Step 3 : RUN dpkg-divert --local --rename --add /sbin/initctl
        ---> Using cache
        ---> bf76fa85e325
       Step 4 : RUN ln -sf /bin/true /sbin/initctl
        ---> Using cache
        ---> 4cb434996c58
       Step 5 : RUN apt-get update
        ---> Using cache
        ---> 412caae3f89e
       Step 6 : RUN apt-get install -y sudo openssh-server curl lsb-release
        ---> Using cache
        ---> f2680c2a6422
       Step 7 : RUN mkdir -p /var/run/sshd
        ---> Using cache
        ---> 229063b92ac0
       Step 8 : RUN useradd -d /home/kitchen -m -s /bin/bash kitchen
        ---> Using cache
        ---> ea92bcd3cf2d
       Step 9 : RUN echo kitchen:kitchen | chpasswd
        ---> Using cache
        ---> 3c36d361e872
       Step 10 : RUN echo 'kitchen ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
        ---> Using cache
        ---> 2837e490602a
       Successfully built 2837e490602a
       [kitchen::driver::docker command] END (0m0.66s)
       [kitchen::driver::docker command] BEGIN (sudo -E docker run -d -p 22 2837e490602a /usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no)
       e3045fdb32154038285ba77ab691be1b1ab834b65b348925c22aa4b930954ffe
       [kitchen::driver::docker command] END (0m0.37s)
       [kitchen::driver::docker command] BEGIN (sudo -E docker inspect e3045fdb32154038285ba77ab691be1b1ab834b65b348925c22aa4b930954ffe)
[       {
           "ID": "e3045fdb32154038285ba77ab691be1b1ab834b65b348925c22aa4b930954ffe",
           "Created": "2013-11-27T21:42:30.226811274Z",
           "Path": "/usr/sbin/sshd",
           "Args": [
        "-D",
        "-o",
        "UseDNS=no",
        "-o",
        "UsePAM=no"
           ],
           "Config": {
        "Hostname": "e3045fdb3215",
        "Domainname": "",
        "User": "",
        "Memory": 0,
        "MemorySwap": 0,
        "CpuShares": 0,
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "PortSpecs": null,
        "ExposedPorts": {
            "22/tcp": {}
        },
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": [
            "HOME=/",
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "DEBIAN_FRONTEND=noninteractive"
        ],
        "Cmd": [
            "/usr/sbin/sshd",
            "-D",
            "-o",
            "UseDNS=no",
            "-o",
            "UsePAM=no"
        ],
        "Dns": null,
        "Image": "2837e490602a",
        "Volumes": null,
        "VolumesFrom": "",
        "WorkingDir": "",
        "Entrypoint": null,
        "NetworkDisabled": false
           },
           "State": {
        "Running": true,
        "Pid": 31127,
        "ExitCode": 0,
        "StartedAt": "2013-11-27T21:42:30.288362102Z",
        "FinishedAt": "0001-01-01T00:00:00Z",
        "Ghost": false
           },
           "Image": "2837e490602a604b6ff53e6a90b43cfa6ead316bc08abd0f4e0345355ba9e0b9",
           "NetworkSettings": {
        "IPAddress": "172.17.0.10",
        "IPPrefixLen": 16,
        "Gateway": "172.17.42.1",
        "Bridge": "docker0",
        "PortMapping": null,
        "Ports": {
            "22/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "49153"
                }
            ]
        }
           },
           "SysInitPath": "/usr/bin/docker",
           "ResolvConfPath": "/var/lib/docker/containers/e3045fdb32154038285ba77ab691be1b1ab834b65b348925c22aa4b930954ffe/resolv.conf",
           "HostnamePath": "/var/lib/docker/containers/e3045fdb32154038285ba77ab691be1b1ab834b65b348925c22aa4b930954ffe/hostname",
           "HostsPath": "/var/lib/docker/containers/e3045fdb32154038285ba77ab691be1b1ab834b65b348925c22aa4b930954ffe/hosts",
           "Name": "/jolly_feynmann",
           "Driver": "aufs",
           "Volumes": {},
           "VolumesRW": {}
       }]
       [kitchen::driver::docker command] END (0m0.05s)
       Waiting for localhost:22...
       Waiting for localhost:22...
       Waiting for localhost:22...
^C>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [exit]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details

D      ------Exception-------
D      Class: Kitchen::ActionFailed
D      Message: Failed to complete #create action: [exit]
D      ---Nested Exception---
D      Class: SystemExit
D      Message: exit
D      ------Backtrace-------
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/bin/kitchen:6:in `exit'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/bin/kitchen:6:in `block in <top (required)>'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/ssh.rb:172:in `call'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/ssh.rb:172:in `sleep'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/ssh.rb:172:in `rescue in test_ssh'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/ssh.rb:178:in `test_ssh'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/ssh.rb:89:in `wait'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/driver/ssh_base.rb:132:in `wait_for_sshd'
D      /var/lib/gems/1.9.1/gems/kitchen-docker-0.10.0/lib/kitchen/driver/docker.rb:65:in `create'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:262:in `public_send'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:262:in `block in perform_action'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:297:in `call'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:297:in `synchronize_or_call'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:272:in `block in action'
D      /usr/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:271:in `action'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:262:in `perform_action'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:241:in `create_action'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:235:in `block in transition_to'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:234:in `each'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:234:in `transition_to'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/instance.rb:90:in `create'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/cli.rb:281:in `public_send'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/cli.rb:281:in `block in run_serial'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/cli.rb:281:in `map'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/cli.rb:281:in `run_serial'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/cli.rb:275:in `block in exec_action'
D      /usr/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/cli.rb:272:in `exec_action'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/cli.rb:75:in `block (2 levels) in <class:CLI>'
D      /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
D      /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/cli.rb:255:in `invoke_task'
D      /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
D      /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/bin/kitchen:13:in `block in <top (required)>'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/lib/kitchen/errors.rb:81:in `with_friendly_errors'
D      /var/lib/gems/1.9.1/gems/test-kitchen-1.0.0.beta.4/bin/kitchen:13:in `<top (required)>'
D      /usr/local/bin/kitchen:23:in `load'
D      /usr/local/bin/kitchen:23:in `<main>'
D      ----------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment