0.0
No commit activity in last 3 years
No release in over 3 years
A Test Kitchen Driver for LxdApi
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0

Runtime

 Project Readme

Kitchen::Driver::LxdApi

Build Status

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

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:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors

Created and maintained by inokappa

License

Apache 2.0 (see LICENSE)