A Test Kitchen Driver for Lxd.
Lxd version of 2.3 (the one where "lxc network" commands were introduced) or higher is required for this driver which means that a native package must be installed on the system running Test Kitchen. You must also prepare a container to be used by Test Kitchen. For that make sure there is ssh daemon installed and starting on boot. ( On Ubuntu it can be done by simply installing 'openssh-server' package. ) You can also install Chef Client there, if you do not want Test Kitchen to install it every time the container is started.
Install using command line:
gem install kitchen-lxd
Available options:
- image
- container
- require_chef_omnibus
Define from which lxd image the container will be created.
---
driver:
image: ubuntu/xenial/amd64
The default is value of platform name
.
---
platforms:
- name: kitchen-xenial64
In this case: 'kitchen-xenial64', expecting to have an lxd image with this name locally.
Created container name.
---
driver:
container_name: my_name
The default is value of kitchen instance name
.
---
platforms:
- name: kitchen-xenial64
suites:
- name: webserver
In this case: 'webserver-kitchen-xenial64'.
Determines whether or not a Chef Omnibus package will be installed. There are several different behaviors available:
true
- the latest release will be installed. Subsequent converges will skip re-installing if chef is present.latest
- the latest release will be installed. Subsequent converges will always re-install even if chef is present.<VERSION_STRING>
(ex:10.24.0
) - the desired version string will be passed the the install.sh script. Subsequent converges will skip if the installed version and the desired version match.false
ornil
- no chef is installed.
The default value is unset, or nil
.
- Source hosted at GitHub
- Report issues/questions/feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:
- Fork the repo
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Created and maintained by ZeroTurnaround.
Apache 2.0 (see LICENSE)