Kitchen::Driver::LxdApi
A Test Kitchen Driver for LXD REST API.
Attention
- Made for myself
- Testing and implementation a not enough
Reference
Requirements
Installation and Setup
Install kitchen driver
$ git clone https://github.com/inokappa/kitchen-lxd_api.git
$ cd kitchen-lxd_api
$ bundle install
Configuration
Create Container image
$ lxc remote add images images.linuxcontainers.org
$ lxc launch images:ubuntu/trusty/amd64 oreno-ubuntu
$ lxc exec oreno-ubuntu -- apt-get -y install openssh-server
$ lxc stop oreno-ubuntu
$ lxc publish oreno-ubuntu --alias=oreno-ubuntu-image
.kitchen.yml
---
driver:
name: lxd_api
provisioner:
name: ansible_playbook
roles_path: roles
# require_chef_for_busser: false
# require_ruby_for_busser: true
platforms:
- name: oreno-ubuntu-14.04
driver_plugin: lxd_api
driver_config:
container_image: oreno-ubuntu-image
container_name: kitchen-container
#
# Optional
#
# username: kitchen
# architecture: 2
# profiles: ["default"]
# ephemeral: false
# limits_cpu: "1"
# timeout: 30
# force: true
suites:
- name: default
provisioner:
playbook: default.yml
hosts: default
verifier:
name: shell
command: rspec -c -f d -I serverspec serverspec/common_spec.rb
Let's tasting...
$ kitchen create
$ kitchen converge
$ kitchen verify
$ kitchen destroy
Development
- 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
Authors
Created and maintained by inokappa
License
Apache 2.0 (see LICENSE)