Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Add support for Systemd and Ubuntu 16.04. Migrate tests to Inspec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Stump committed Jan 4, 2017
1 parent f74a71d commit a66b7ac
Show file tree
Hide file tree
Showing 13 changed files with 296 additions and 172 deletions.
8 changes: 8 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ driver:
provisioner:
name: chef_solo

verifier:
name: inspec

platforms:
- name: ubuntu-16.04
- name: ubuntu-12.04
- name: centos-6.5

suites:
- name: default
run_list:
- recipe[nodejs::npm]
- recipe[statsd::default]
attributes:
nodejs:
repo: https://deb.nodesource.com/node_6.x
key: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.3.1
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', '~> 3.0'
gem 'chef'
gem 'berkshelf'
gem 'chefspec'
gem 'test-kitchen'
gem 'kitchen-vagrant'
gem 'kitchen-inspec'
285 changes: 156 additions & 129 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,185 +1,212 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.6)
berkshelf (3.1.4)
addressable (2.3.8)
artifactory (2.5.1)
berkshelf (4.2.0)
addressable (~> 2.3.4)
berkshelf-api-client (~> 1.2)
berkshelf-api-client (~> 2.0)
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-shell_out (~> 0.1)
celluloid (~> 0.16.0.pre)
celluloid-io (~> 0.16.0.pre)
celluloid (= 0.16.0)
celluloid-io (~> 0.16.1)
cleanroom (~> 1.0)
faraday (~> 0.9.0)
httpclient (~> 2.6.0)
minitar (~> 0.5.4)
octokit (~> 3.0)
retryable (~> 1.3.3)
ridley (~> 4.0)
solve (~> 1.1)
thor (~> 0.18)
berkshelf-api-client (1.2.0)
faraday (~> 0.9.0)
octokit (~> 4.0)
retryable (~> 2.0)
ridley (~> 4.3)
solve (~> 2.0)
thor (~> 0.19)
berkshelf-api-client (2.0.0)
faraday (~> 0.9.1)
httpclient (~> 2.6.0)
buff-config (1.0.1)
buff-extensions (~> 1.0)
varia_model (~> 0.4)
buff-extensions (1.0.0)
buff-ignore (1.1.1)
buff-ignore (1.2.0)
buff-ruby_engine (0.1.0)
buff-shell_out (0.1.1)
buff-shell_out (0.2.0)
buff-ruby_engine (~> 0.1.0)
celluloid (0.16.0.pre3)
builder (3.2.2)
celluloid (0.16.0)
timers (~> 4.0.0)
celluloid-io (0.16.0.pre2)
celluloid (>= 0.16.0.pre)
nio4r (>= 1.0.0)
chef (11.12.8)
chef-zero (>= 2.0.2, < 2.1)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
highline (~> 1.6, >= 1.6.9)
json (>= 1.4.4, <= 1.8.1)
mime-types (~> 1.16)
mixlib-authentication (~> 1.3)
mixlib-cli (~> 1.4)
mixlib-config (~> 2.0)
mixlib-log (~> 1.3)
mixlib-shellout (~> 1.4)
net-ssh (~> 2.6)
net-ssh-multi (~> 1.1)
ohai (~> 7.0.4)
pry (~> 0.9)
rest-client (>= 1.0.4, < 1.7.0)
yajl-ruby (~> 1.1)
chef-zero (2.0.2)
hashie (~> 2.0)
json
mixlib-log (~> 1.3)
rack
chefspec (4.0.1)
chef (~> 11.12)
fauxhai (~> 2.0)
rspec (~> 3.0)
coderay (1.1.0)
dep-selector-libgecode (1.0.2)
dep_selector (1.0.3)
dep-selector-libgecode (~> 1.0)
ffi (~> 1.9)
celluloid-io (0.16.2)
celluloid (>= 0.16.0)
nio4r (>= 1.1.0)
chefspec (0.0.1)
cleanroom (1.0.0)
coderay (1.1.1)
diff-lcs (1.2.5)
docker-api (1.33.1)
excon (>= 0.38.0)
json
erubis (2.7.0)
faraday (0.9.0)
excon (0.54.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
fauxhai (2.2.0)
net-ssh
ohai
ffi (1.9.3)
hashie (2.1.2)
highline (1.6.21)
hitimes (1.2.2)
ipaddress (0.8.0)
json (1.8.1)
kitchen-vagrant (0.15.0)
test-kitchen (~> 1.0)
ffi (1.9.14)
gssapi (1.2.0)
ffi (>= 1.0.1)
gyoku (1.3.1)
builder (>= 2.1.2)
hashie (3.4.6)
hitimes (1.2.4)
httpclient (2.6.0.1)
inspec (1.8.0)
hashie (~> 3.4)
json (>= 1.8, < 3.0)
method_source (~> 0.8)
mixlib-log
parallel (~> 1.9)
pry (~> 0)
rainbow (~> 2)
rspec (~> 3)
rspec-its (~> 1.2)
rspec_junit_formatter (~> 0.2.3)
rubyzip (~> 1.1)
sslshake (~> 1)
thor (~> 0.19)
train (>= 0.22.0, < 1.0)
json (2.0.2)
kitchen-inspec (0.17.0)
hashie (~> 3.4)
inspec (>= 0.34.0, < 2.0.0)
test-kitchen (~> 1.6)
kitchen-vagrant (0.21.1)
test-kitchen (~> 1.4)
little-plugger (1.1.4)
logging (2.1.0)
little-plugger (~> 1.1)
multi_json (~> 1.10)
method_source (0.8.2)
mime-types (1.25.1)
minitar (0.5.4)
mixlib-authentication (1.3.0)
mixlib-authentication (1.4.1)
mixlib-log
mixlib-cli (1.5.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (1.4.0)
mixlib-install (2.1.9)
artifactory
mixlib-shellout
mixlib-versioning
thor
mixlib-log (1.7.1)
mixlib-shellout (2.2.7)
mixlib-versioning (1.1.0)
molinillo (0.4.5)
multi_json (1.12.1)
multipart-post (2.0.0)
net-http-persistent (2.9.4)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
net-ssh (3.2.0)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-multi (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-gateway (>= 1.2.0)
nio4r (1.0.0)
octokit (3.2.0)
sawyer (~> 0.5.3)
ohai (7.0.4)
ipaddress
mime-types (~> 1.16)
mixlib-cli
mixlib-config (~> 2.0)
mixlib-log
mixlib-shellout (~> 1.2)
systemu (~> 2.5.2)
yajl-ruby
pry (0.10.0)
nio4r (2.0.0)
nori (2.6.0)
octokit (4.6.2)
sawyer (~> 0.8.0, >= 0.5.3)
parallel (1.10.0)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.5.2)
rdoc (4.1.1)
json (~> 1.4)
rest-client (1.6.8)
mime-types (~> 1.16)
rdoc (>= 2.4.2)
retryable (1.3.5)
ridley (4.0.0)
rainbow (2.1.0)
retryable (2.0.4)
ridley (4.4.1)
addressable
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-ignore (~> 1.1)
buff-shell_out (~> 0.1)
celluloid (~> 0.16.0.pre)
celluloid-io (~> 0.16.0.pre)
celluloid (~> 0.16.0)
celluloid-io (~> 0.16.1)
erubis
faraday (~> 0.9.0)
hashie (>= 2.0.2, < 3.0.0)
hashie (>= 2.0.2, < 4.0.0)
httpclient (~> 2.6)
json (>= 1.7.7)
mixlib-authentication (>= 1.3.0)
net-http-persistent (>= 2.8)
retryable
retryable (~> 2.0)
semverse (~> 1.1)
varia_model (~> 0.4)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-core (3.0.3)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.3)
varia_model (~> 0.4.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.3)
rspec-support (~> 3.0.0)
rspec-support (3.0.3)
safe_yaml (1.0.3)
sawyer (0.5.4)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
semverse (1.1.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rspec_junit_formatter (0.2.3)
builder (< 4)
rspec-core (>= 2, < 4, != 2.12.0)
rubyntlm (0.6.1)
rubyzip (1.2.0)
safe_yaml (1.0.4)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
semverse (1.2.1)
slop (3.6.0)
solve (1.2.1)
dep_selector (~> 1.0)
solve (2.0.3)
molinillo (~> 0.4.2)
semverse (~> 1.1)
systemu (2.5.2)
test-kitchen (1.2.1)
mixlib-shellout (~> 1.2)
sslshake (1.0.13)
test-kitchen (1.14.2)
mixlib-install (>= 1.2, < 3.0)
mixlib-shellout (>= 1.2, < 3.0)
net-scp (~> 1.1)
net-ssh (~> 2.7)
net-ssh (>= 2.9, < 4.0)
net-ssh-gateway (~> 1.2.0)
safe_yaml (~> 1.0)
thor (~> 0.18)
thor (0.19.1)
timers (4.0.0)
thor (0.19.4)
timers (4.0.4)
hitimes
varia_model (0.4.0)
train (0.22.0)
docker-api (~> 1.26)
json (>= 1.8, < 3.0)
mixlib-shellout (~> 2.0)
net-scp (~> 1.2)
net-ssh (>= 2.9, < 4.0)
winrm (~> 2.0)
winrm-fs (~> 1.0)
varia_model (0.4.1)
buff-extensions (~> 1.0)
hashie (>= 2.0.2, < 3.0.0)
yajl-ruby (1.2.1)
hashie (>= 2.0.2, < 4.0.0)
winrm (2.1.0)
builder (>= 2.1.2)
erubis (~> 2.7)
gssapi (~> 1.2)
gyoku (~> 1.0)
httpclient (~> 2.2, >= 2.2.0.2)
logging (>= 1.6.1, < 3.0)
nori (~> 2.0)
rubyntlm (~> 0.6.0, >= 0.6.1)
winrm-fs (1.0.1)
erubis (~> 2.7)
logging (>= 1.6.1, < 3.0)
rubyzip (~> 1.1)
winrm (~> 2.0)

PLATFORMS
ruby

DEPENDENCIES
berkshelf (~> 3.0)
chef
berkshelf
chefspec
kitchen-inspec
kitchen-vagrant
test-kitchen

BUNDLED WITH
1.13.6
9 changes: 9 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
default['statsd']['pid_file'] = '/var/run/statsd/statsd.pid'
default['statsd']['path'] = '/usr/share/statsd'

# Default path for the nodejs cookbook.
default['statsd']['node_bin'] = '/usr/bin/nodejs'

default['statsd']['user'] = 'statsd'
default['statsd']['group'] = 'statsd'

Expand All @@ -48,6 +51,12 @@
start: true
}

if node.has_key?('init_package') && node['init_package'] == 'systemd'
default['statsd']['init_style'] = 'systemd'
else
default['statsd']['init_style'] = 'upstart'
end

#
# Add all NPM module backends here. Each backend should be a
# hash of the backend's name to the NPM module's version. If we
Expand Down
Loading

0 comments on commit a66b7ac

Please sign in to comment.