Kitchen::Bluebox: A Test Kitchen Driver for Blue Box Blocks
A Test Kitchen Driver for Blue Box Blocks.
This driver uses the [fog gem][fog_gem] to provision and destroy blocks instances. Use Blue Box's cloud for your infrastructure testing!
Requirements
There are no external system requirements for this driver. However you will need access to a Blue Box account.
Installation and Setup
Please read the Driver usage page for more details.
Configuration
bluebox_customer_id
Required The Blue Blue customer id to use.
The default is unset, or nil
.
bluebox_api_key
Required The Blue Blue api key to use.
The default is unset, or nil
.
flavor_id
The blocks product type (also known as size) to use.
The default is "94fd37a7-2606-47f7-84d5-9000deda52ae"
.
image_id
The blocks template id to use.
The default is "573b8e80-823f-4100-bc2c-51b7c60f633c"
.
location_id
The blocks location to use.
The default is "37c2bd9a-3e81-46c9-b6e2-db44a25cc675"
.
port
The SSH port number to be used when communicating with the instance.
The default is 22
.
require_chef_omnibus
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
.
ssh_key
Path to the private SSH key used to connect to the instance.
The default is unset, or nil
.
sudo
Whether or not to prefix remote system commands such as installing and
running Chef with sudo
.
The default is true
.
username
The SSH username that will be used to communicate with the instance.
The default is "kitchen"
.
Example
The following could be used in a .kitchen.yml
or in a .kitchen.local.yml
to override default configuration.
---
driver_plugin: bluebox
driver_config:
bluebox_customer_id: 123...
bluebox_api_key: abc...
location_id: def789...
ssh_public_key: /path/to/id_dsa.pub
ssh_key: /path/to/id_dsa
require_chef_omnibus: true
platforms:
- name: ubuntu-12.04
driver_config:
image_id: b137c423-bade-4b01-9d13-271eea552563
- name: scientific-6.3
driver_config:
image_id: caaaca6b-fbe0-4e27-af2b-d100e46767bd
suites:
# ...
Both .kitchen.yml
and .kitchen.local.yml
files are pre-processed through
ERB which can help to factor out secrets and credentials. For example:
---
driver_plugin: bluebox
driver_config:
bluebox_customer_id: <%= ENV['BLUEBOX_CUSTOMER_ID'] %>
bluebox_api_key: <%= ENV['BLUEBOX_API_KEY'] %>
ssh_public_key: <%= File.expand_path('~/.ssh/id_dsa.pub') %>
ssh_key: <%= File.expand_path('~/.ssh/id_dsa') %>
require_chef_omnibus: true
platforms:
- name: ubuntu-12.04
driver_config:
image_id: b137c423-bade-4b01-9d13-271eea552563
- name: scientific-6.3
driver_config:
image_id: caaaca6b-fbe0-4e27-af2b-d100e46767bd
suites:
# ...
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 Fletcher Nichol ([email protected])
License
Apache 2.0 (see LICENSE)