Skip to content

Commit

Permalink
Merge pull request #130 from hw-cookbooks/develop
Browse files Browse the repository at this point in the history
Release 1.7.0
  • Loading branch information
chrisroberts committed Jun 18, 2015
2 parents 1eb0d57 + b95fe3d commit 34fae9e
Show file tree
Hide file tree
Showing 49 changed files with 1,471 additions and 1,915 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
metadata.json
.vagrant
Berksfile.lock
Cheffile.lock
*~
*#
.#*
Expand Down
114 changes: 68 additions & 46 deletions .kitchen.cloud.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,103 @@
#<% require 'kitchen-sync' %>
---
driver_plugin: vagrant
driver_plugin: digitalocean
driver_config:
digitalocean_client_id: <%= ENV['DIGITAL_OCEAN_CLIENT_ID'] %>
digitalocean_api_key: <%= ENV['DIGITAL_OCEAN_API_KEY'] %>
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
digitalocean_api_token: <%= ENV['DIGITALOCEAN_API_TOKEN'] %>
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %>
ssh_key: <%= ENV['AWS_PRIVATE_KEY_PATH'] %>
rackspace_username: <%= ENV['RACKSPACE_USERNAME'] %>
rackspace_api_key: <%= ENV['RACKSPACE_API_KEY'] %>
flavor_id: <%= ENV['EC2_FLAVOR_ID'] %>
availability_zone: <%= ENV['AWS_AVAILABILITY_ZONE'] %>

provisioner:
name: chef_zero
require_chef_omnibus: latest

platforms:
- name: centos-5.8
driver_plugin: digitalocean
driver_plugin: digital_ocean
driver_config:
image_id: 1601
flavor_id: 63
region_id: 1
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
size: 2gb
image: centos-5-8-x64
region: <%= ENV['DIGITALOCEAN_REGION'] %>
ssh_key_ids: <%= ENV['DIGITALOCEAN_SSH_KEYS'] %>
ssh_key: <%= ENV['DIGITALOCEAN_SSH_KEY_PATH'] %>
run_list:
- recipe[yum-epel]

- name: centos-6.4
driver_plugin: digitalocean
- name: centos-6.5
driver_plugin: digital_ocean
driver_config:
image_id: 562354
flavor_id: 63
region_id: 1
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
size: 2gb
image: centos-6-5-x64
region: <%= ENV['DIGITALOCEAN_REGION'] %>
ssh_key_ids: <%= ENV['DIGITALOCEAN_SSH_KEYS'] %>
ssh_key: <%= ENV['DIGITALOCEAN_SSH_KEY_PATH'] %>

- name: amazon-2013.09
- name: centos-7.0
driver_plugin: digital_ocean
driver_config:
size: 2gb
image: centos-7-0-x64
region: <%= ENV['DIGITALOCEAN_REGION'] %>
ssh_key_ids: <%= ENV['DIGITALOCEAN_SSH_KEYS'] %>
ssh_key: <%= ENV['DIGITALOCEAN_SSH_KEY_PATH'] %>

- name: amazon-2014.09
driver_plugin: ec2
driver_config:
image_id: ami-3be4bc52
image_id: ami-9a6ed3f2
username: ec2-user
ssh_key: <%= ENV['EC2_SSH_KEY_PATH'] %>

# - name: fedora-19
# driver_plugin: digitalocean
# driver_config:
# image_id: 696598
# flavor_id: 63
# region_id: 1
# ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
- name: fedora-21
driver_plugin: digital_ocean
driver_config:
size: 2gb
image: fedora-21-x64
region: <%= ENV['DIGITALOCEAN_REGION'] %>
ssh_key_ids: <%= ENV['DIGITALOCEAN_SSH_KEYS'] %>
ssh_key: <%= ENV['DIGITALOCEAN_SSH_KEY_PATH'] %>

- name: debian-7.0
driver_plugin: digital_ocean
driver_config:
size: 2gb
image: debian-7-0-x64
region: <%= ENV['DIGITALOCEAN_REGION'] %>
ssh_key_ids: <%= ENV['DIGITALOCEAN_SSH_KEYS'] %>
ssh_key: <%= ENV['DIGITALOCEAN_SSH_KEY_PATH'] %>
run_list:
- recipe[apt]

- name: ubuntu-1004
driver_plugin: digitalocean
- name: ubuntu-12.04
driver_plugin: digital_ocean
driver_config:
image_id: 14097
flavor_id: 63
region_id: 1
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
size: 2gb
image: ubuntu-12-04-x64
region: <%= ENV['DIGITALOCEAN_REGION'] %>
ssh_key_ids: <%= ENV['DIGITALOCEAN_SSH_KEYS'] %>
ssh_key: <%= ENV['DIGITALOCEAN_SSH_KEY_PATH'] %>
run_list:
- recipe[apt]

- name: ubuntu-1204
driver_plugin: digitalocean
- name: ubuntu-14.04
driver_plugin: digital_ocean
driver_config:
image_id: 1505447
flavor_id: 63
region_id: 1
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
size: 2gb
image: ubuntu-14-04-x64
region: <%= ENV['DIGITALOCEAN_REGION'] %>
ssh_key_ids: <%= ENV['DIGITALOCEAN_SSH_KEYS'] %>
ssh_key: <%= ENV['DIGITALOCEAN_SSH_KEY_PATH'] %>
run_list:
- recipe[apt]

suites:
- name: default
run_list:
- recipe[minitest-handler]
- recipe[runit]
- recipe[runit_test]
- recipe[runit-other_test]
attributes: {}

- name: service
run_list:
- recipe[minitest-handler]
- recipe[runit]
- recipe[runit_test::service]
- recipe[runit-other_test]
attributes: {}
22 changes: 15 additions & 7 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,33 @@ provisioner:

platforms:
- name: centos-5.11
run_list:
- recipe[yum-epel]
- name: centos-6.6
run_list:
- recipe[yum-epel]
- name: centos-7.0
- name: fedora-21
- name: ubuntu-10.04
run_list:
- recipe[apt]
- name: ubuntu-12.04
run_list:
- recipe[apt]
- name: ubuntu-14.04
run_list:
- recipe[apt]
- name: debian-7.8
run_list:
- recipe[apt]

suites:
- name: default
run_list:
- recipe[minitest-handler]
- recipe[runit]
run_list:
- recipe[runit_test]
- recipe[runit-other_test]
attributes: {}

- name: service
run_list:
- recipe[minitest-handler]
- recipe[runit]
- recipe[runit_test::service]
- recipe[runit-other_test]
attributes: {}
39 changes: 36 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,41 @@
AlignParameters:
Enabled: false

Encoding:
Enabled: false

ClassLength:
Enabled: false

MethodLength:
Enabled: false

LineLength:
Max: 200
Enabled: false

# HashSyntax:
# EnforcedStyle: hash_rockets

Documentation:
Enabled: false

HashSyntax:
EnforcedStyle: hash_rockets
PerceivedComplexity:
Enabled: false

CyclomaticComplexity:
Enabled: false

Style/FileName:
Enabled: false

Metrics/AbcSize:
Enabled: false

AllCops:
Exclude:
- 'Guardfile'
- 'tmp/**/*'
- 'cookbooks/**/*'

Style/GuardClause:
Enabled: false
11 changes: 11 additions & 0 deletions Berksfile.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
source 'https://supermarket.chef.io'

metadata

group :integration do
cookbook 'apt'
cookbook 'yum-epel'
end

cookbook 'runit_test', path: 'test/cookbooks/runit_test'
cookbook 'runit_other_test', path: 'test/cookbooks/runit_other_test'
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ runit Cookbook CHANGELOG
========================
This file is used to list changes made in each version of the runit cookbook.

v1.7.0 (2015-06-18)
----------
* Modernize runit_service provider by rewriting pure Ruby as LWRP (#107)
* Modernize integration tests by rewriting Minitest suites as ServerSpec (#107)
* Fix regression in support for alternate sv binary on debian platforms (#92, #123)
* Fix regression in default logger's config location (#117)
* Tighten permissions on environment variable config files from 0644 to 0640 (#125)
* Add `start_down` and `delete_downfile` attributes to support configuring services with default state of 'down' (#105)

v1.6.0 (2015-04-06)
--------------------
* Fedora 21 support
Expand Down
27 changes: 18 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,30 @@ wiki page.

## Functional and Unit Tests

This cookbook is set up to run tests under
[Chef's test-kitchen](https://github.com/chef/test-kitchen). It
uses minitest-chef to run integration tests after the node has been
converged to verify that the state of the node.
This cookbook is set up to run unit tests under [ChefSpec](http://sethvargo.github.io/chefspec/)
and integration tests under [Test Kitchen](https://github.com/chef/test-kitchen). After Test Kitchen
has converged a node, it runs [ServerSpec](http://serverspec.org) tests
to verify the node's state.

You can execute the unit tests by running
```
bundle exec rake spec
```

You can execute the integration tests by running
```
bundle exec kitchen test
```

Test kitchen should run completely without exception using the default
[baseboxes provided by Chef](https://github.com/chef/bento).
Because Test Kitchen creates VirtualBox machines and runs through
every configuration in the Kitchenfile, it may take some time for
every configuration in the `.kitchen.yml` config file, it may take some time for
these tests to complete.

If your changes are only for a specific recipe, run only its
configuration with Test Kitchen. If you are adding a new recipe, or
other functionality such as a LWRP or definition, please add
appropriate tests and ensure they run with Test Kitchen.
If you are adding a new recipe, or other functionality such as a
LWRP or definition, please add appropriate tests and ensure they
run with Test Kitchen.

If any don't pass, investigate them before submitting your patch.

Expand Down
7 changes: 5 additions & 2 deletions Cheffile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

site 'https://supermarket.chef.io/api/v1'

# loosely coupled prerequisites for test-kitchen
cookbook 'apt'
cookbook 'yum-epel'

cookbook 'runit', path: '.'
cookbook 'runit_test', path: './test/cookbooks/runit_test'
cookbook 'runit-other_test', path: './test/cookbooks/runit-other_test'
cookbook 'minitest-handler'
cookbook 'runit_other_test', path: './test/cookbooks/runit_other_test'
30 changes: 0 additions & 30 deletions Cheffile.lock

This file was deleted.

4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

gem 'berkshelf', '~> 2.0'
gem 'chefspec', '~> 3.0'
gem 'berkshelf', '~> 3.0'
gem 'chefspec', '~> 4.0'
gem 'foodcritic', '~> 3.0'
gem 'rubocop'

Expand Down
Loading

0 comments on commit 34fae9e

Please sign in to comment.