Add moduledir defaults to windows hosts
Merge pull request #220 from anodelman/make-gem

create beaker 1.10.0 gem
Add a docker hypervisor

This is a quite simple hypervisor, and only supports linux flavours
currently.  Many things around inter-node communications will
probably not work.

The basic approach is we spin up a new image based on an upstream
one, add a sshd to it, tag the image with the name of the host and
then create a container from it.  This container should then be
usable as a system under test.

The implementation is largely based on both the existing Beaker::Vagrant
hypervisor, and docker-kitchen.
https://github.com/portertech/kitchen-docker All bugs are mine.

Still a few things to do around finding existing nodes, but for now
it makes basic enough images that you can run no tests in 11 seconds.

    $ cat docker-test.yml
    HOSTS:
      ubuntu-12-10:
        platform: ubuntu-12.10-x64
        image: ubuntu:12.10
        hypervisor: docker
    CONFIG:
       type: foss

```
$ time ruby -Ilib ./bin/beaker --hosts docker-test.yml   --no-debug
{
    "log_level": "info",
    "trace_limit": 10,
    "hosts_file": "docker-test.yml",
    "options_file": null,
    "type": "foss",
    "provision": true,
    "preserve_hosts": "never",
    "root_keys": false,
    "quiet": false,
    "xml": false,
    "color": true,
    "dry_run": false,
    "timeout": 300,
    "fail_mode": "slow",
    "timesync": false,
    "repo_proxy": false,
    "add_el_extras": false,
    "consoleport": 443,
    "pe_dir": "/opt/enterprise/dists",
    "pe_version_file": "LATEST",
    "pe_version_file_win": "LATEST-win",
    "dot_fog": "/Users/richardc/.fog",
    "ec2_yaml": "config/image_templates/ec2.yaml",
    "help": false,
    "ssh": {
        "config": false,
        "paranoid": false,
        "timeout": 300,
        "auth_methods": [
            "publickey"
        ],
        "port": 22,
        "forward_agent": true,
        "keys": [
            "/Users/richardc/.ssh/id_rsa"
        ],
        "user_known_hosts_file": "/Users/richardc/.ssh/known_hosts"
    },
    "HOSTS": {
        "ubuntu-12-10": {
            "roles": [
                "master"
            ],
            "platform": "ubuntu-12.10-x64",
            "image": "ubuntu:12.10",
            "hypervisor": "docker",
            "extra_commands": [
                "touch /tmp/foo"
            ]
        }
    },
    "helper": [],
    "load_path": [],
    "tests": [],
    "pre_suite": [],
    "post_suite": [],
    "install": [],
    "modules": [],
    "logger": "#<Beaker::Logger:0x007fbd9f087910>"
}
Beaker::Hypervisor, found some docker boxes to create
Provisioning docker
provisioning ubuntu-12-10

Setup: Update /etc/hosts on master with master's ip
Add Master entry to /etc/hosts
No tests to run for suite 'pre_suite'
No tests to run for suite 'tests'
No tests to run for suite 'post_suite'
Cleanup: cleaning up after successful run
Cleaning up docker
systest completed successfully, thanks.

real    0m11.892s
user    0m0.825s
sys     0m0.115s
```
Add openSUSE and SLES support to docker hypervisor.

On SUSE variants the package installer is called zypper, so add the
RUN statements to install the sshd in terms of zypper.

Additionally we need to explictly configure the sshd to allow root
login via passwords, bypassing pam.
Add a `docker_cmd` option to the docker hypervisor

This opens up the ability to have the docker container run something
closer to an init rather than a simple sshd.  This allows the
container to behave more like a system under test with fully working
service supervision.
Increase read/write timeouts in the docker hypervisor

This change increases the read and write timeouts to the docker api.
By default this is 60 seconds

Additionally we use the version assertion from docker-api so we
don't try and talk to an incompatible api version.
Install ssh clients in the docker hypervisor

Some docker base images are seriously stripped down and will not
include the ssh client packages.  These are normally where the scp
and sftp binaries live which are needed in later provisioning steps.
Refactor the flow of platform specific actions

The previous flow (using the return value from the case statement) was
needlessly complex and caused some confusion.  Refactor to add more explicit
appends to the dockerfile variable in each when block.
Cleanup intermediate images during image.build

We always build images to throw them away, so specify { :rm => true } to the
build options so we discard the intermediate images too.
Handle errors at cleanup of docker resources

* catches images and container exceptions
* show proper error message from docker
Expose logging from docker-api

This commit exposes the logging from docker-api into the normal
beaker logging.
Make the mkdir always succeed

In some docker images the /var/run/sshd directory already exists, so mkdir will
exit non-zero and fail.  Change to mkdir -p instead.
Add RHEL variant platforms to docker hypervisor

When doing PE testing the platform name is used to determine which
PE tarball is required.  For RedHat Enterprise Linux derivatives
the platform identifier is /^el-/
don't allow docker on ruby 1.8

- don't add the gem 'docker' if using < ruby 1.9
- don't 'require docker' until we are sure that we are loading that
  class
- raise an error if attempting to use the docker hypervisor with ruby <
  1.9
Add spec testing to the docker hypervisor
rename extra_commands to docker_image_commands

Before all the docker handles were prefixed with docker_ *apart* from the one
for extra_commands.  For consistency rename it.
Merge pull request #171 from richardc/docker

Add a docker hypervisor
(QENG-600) Install lsb-release package if needed

For Debian and Ubuntu systems, check if lsb-release package is
installed. Install if needed. This package is needed to correctly
determine the release packages of puppet to install on the SUT.
This package is not present on a minimal Debian 7 installation.
(MAINT) yard doc errors/warnings

- cleaned up any existing yard doc errors and warnings
(MAINT) add travis coverage for yard docs

- will stop us from checking in yard doc warnings/errors