0

I am writing a cookbook for installing a lamp stack with docker as driver for the test kitchen. when i use kitchen create command, it is getting stuck on SSH loop.

---
driver:
  name: docker
  privileged: true
  use_sudo: false

provisioner:
  name: chef_zero
  # You may wish to disable always updating cookbooks in CI or other testing environments.
  # For example:
  #   always_update_cookbooks: <%= !ENV['CI'] %>
  always_update_cookbooks: true

verifier:
  name: inspec

platforms:
  - name: centos-7.3
    driver_config:
      run_command: /usr/lib/systemd/systemd 
suites:
  - name: default
    run_list:
      - recipe[lamp::default]
    verifier:
      inspec_tests:
        - test/smoke/default
    attributes:

The loopback msg is show below.

   ---> b052138ee79a
       Successfully built b052138ee79a
       97a2030283b85c3c915fd7bd318cdd12541cc4cfa9517a293821854b35d6cd2e
       0.0.0.0:32770
       Waiting for SSH service on localhost:32770, retrying in 3 seconds
       Waiting for SSH service on localhost:32770, retrying in 3 seconds

The ssh loop is continuing until i force close it.

Can anybody help?

1 Answers1

0

Most likely sshd isn't actually starting correctly. I don't recommend the systemd hack you have in there, it's hard to get right.

coderanger
  • 52,400
  • 4
  • 52
  • 75