Skip to content

Commit

Permalink
Bump version to 0.5.1, added intial tests, add sysctl and nofile setting
Browse files Browse the repository at this point in the history
  • Loading branch information
nukemberg committed Oct 6, 2014
1 parent 36bfe90 commit e138534
Show file tree
Hide file tree
Showing 22 changed files with 557 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
metadata.json
.kitchen/
.kitchen.local.yml
30 changes: 30 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
busser:
root_path: /var/tmp/kitchen

driver:
name: vagrant

provisioner:
name: chef_solo
kitchen_root: /var/tmp/kitchen

platforms:
- name: ubuntu-12.04
- name: centos-6.4

suites:
- name: package
run_list:
- recipe[redis2::default_instance]
attributes:
redis2:
install_from: package
excludes:
- centos-6.4
- name: source
run_list:
- recipe[redis2::default_instance]
attributes:
redis2:
install_from: source
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--format documentation
2 changes: 1 addition & 1 deletion Berksfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
site :opscode
source "https://api.berkshelf.com"

metadata
30 changes: 30 additions & 0 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
DEPENDENCIES
redis2
path: .
metadata: true

GRAPH
7-zip (1.0.2)
windows (>= 1.2.2)
ark (0.9.0)
7-zip (>= 0.0.0)
windows (>= 0.0.0)
build-essential (2.0.6)
chef_handler (1.1.6)
ohai (2.0.1)
redis2 (0.5.1)
ark (>= 0.0.0)
build-essential (>= 0.0.0)
runit (>= 1.0.0)
sysctl (>= 0.0.0)
runit (1.5.10)
build-essential (>= 0.0.0)
yum (~> 3.0)
yum-epel (>= 0.0.0)
sysctl (0.6.0)
ohai (>= 0.0.0)
windows (1.34.6)
chef_handler (>= 0.0.0)
yum (3.3.2)
yum-epel (0.5.1)
yum (~> 3.0)
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'

gem 'berkshelf'
gem 'test-kitchen'
gem 'busser-serverspec'
gem 'kitchen-vagrant'
gem 'chefspec'
193 changes: 193 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.6)
berkshelf (3.1.3)
addressable (~> 2.3.4)
berkshelf-api-client (~> 1.2)
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-shell_out (~> 0.1)
celluloid (~> 0.16.0.pre)
celluloid-io (~> 0.16.0.pre)
faraday (~> 0.9.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)
buff-config (1.0.1)
buff-extensions (~> 1.0)
varia_model (~> 0.4)
buff-extensions (1.0.0)
buff-ignore (1.1.1)
buff-ruby_engine (0.1.0)
buff-shell_out (0.1.1)
buff-ruby_engine (~> 0.1.0)
busser (0.6.0)
thor
busser-serverspec (0.2.6)
busser
celluloid (0.16.0.pre3)
timers (~> 4.0.0)
celluloid-io (0.16.0.pre2)
celluloid (>= 0.16.0.pre)
nio4r (>= 1.0.0)
chef (11.16.2)
chef-zero (~> 2.1, >= 2.1.4)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
ffi-yajl (~> 1.0)
highline (~> 1.6, >= 1.6.9)
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.4)
plist (~> 3.1.0)
pry (~> 0.9)
rest-client (>= 1.0.4, <= 1.6.7)
chef-zero (2.2)
hashie (~> 2.0)
json
mixlib-log (~> 1.3)
rack
chefspec (4.0.2)
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)
diff-lcs (1.2.5)
erubis (2.7.0)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
fauxhai (2.2.0)
net-ssh
ohai
ffi (1.9.3)
ffi-yajl (1.1.0)
ffi (~> 1.5)
libyajl2 (~> 1.0)
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)
libyajl2 (1.0.1)
method_source (0.8.2)
mime-types (1.25.1)
minitar (0.5.4)
mixlib-authentication (1.3.0)
mixlib-log
mixlib-cli (1.5.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (1.4.0)
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-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.4.0)
ffi (~> 1.9)
ffi-yajl (~> 1.0)
ipaddress
mime-types (~> 1.16)
mixlib-cli
mixlib-config (~> 2.0)
mixlib-log
mixlib-shellout (~> 1.2)
systemu (~> 2.6.4)
wmi-lite (~> 1.0)
plist (3.1.0)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.5.2)
rest-client (1.6.7)
mime-types (>= 1.16)
retryable (1.3.5)
ridley (4.0.0)
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)
erubis
faraday (~> 0.9.0)
hashie (>= 2.0.2, < 3.0.0)
json (>= 1.7.7)
mixlib-authentication (>= 1.3.0)
net-http-persistent (>= 2.8)
retryable
semverse (~> 1.1)
varia_model (~> 0.4)
rspec (3.1.0)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-core (3.1.5)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-mocks (3.1.2)
rspec-support (~> 3.1.0)
rspec-support (3.1.1)
safe_yaml (1.0.3)
sawyer (0.5.4)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
semverse (1.2.1)
slop (3.6.0)
solve (1.2.0)
dep_selector (~> 1.0)
semverse (~> 1.1)
systemu (2.6.4)
test-kitchen (1.2.1)
mixlib-shellout (~> 1.2)
net-scp (~> 1.1)
net-ssh (~> 2.7)
safe_yaml (~> 1.0)
thor (~> 0.18)
thor (0.19.1)
timers (4.0.0)
hitimes
varia_model (0.4.0)
buff-extensions (~> 1.0)
hashie (>= 2.0.2, < 3.0.0)
wmi-lite (1.0.0)

PLATFORMS
ruby

DEPENDENCIES
berkshelf
busser-serverspec
chefspec
kitchen-vagrant
test-kitchen
3 changes: 2 additions & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ redis_instance "datastore" do
port 8866
data_dir "/mnt/redis/datastore"
master master_node
nofile 16384
end
</tt>

_port_, <em>data_dir</em> and _master_ are the only attributes directly configurable using the definition syntax. Other attributes can be configured using the normal attribute interface under the <tt>node["redis2"]["instances"][instance_name]</tt> scope. Missing attributes will be merged from <tt>node["redis2"]["instances"]["default"]</tt>
_nofile_, _port_, <em>data_dir</em> and _master_ are the only attributes directly configurable using the definition syntax. Other attributes can be configured using the normal attribute interface under the <tt>node["redis2"]["instances"][instance_name]</tt> scope. Missing attributes will be merged from <tt>node["redis2"]["instances"]["default"]</tt>

The _master_ attribute will set up redis as a slave of a the same redis instance on another server. It will not set <tt>node["redis2"]["instances"][instance_name]["replication"]["role"]</tt> (which can be _slave_ or _master_), because redis can be both at the same time (e.g. chained masters).

Expand Down
24 changes: 24 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require 'rake'
require 'rspec/core/rake_task'

task :spec => 'spec:all'
task :default => :spec

namespace :spec do
targets = []
Dir.glob('./spec/*').each do |dir|
next unless File.directory?(dir)
targets << File.basename(dir)
end

task :all => targets
task :default => :all

targets.each do |target|
desc "Run serverspec tests to #{target}"
RSpec::Core::RakeTask.new(target.to_sym) do |t|
ENV['TARGET_HOST'] = target
t.pattern = "spec/#{target}/*_spec.rb"
end
end
end
12 changes: 12 additions & 0 deletions Thorfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# encoding: utf-8

require 'bundler'
require 'bundler/setup'
require 'berkshelf/thor'

begin
require 'kitchen/thor_tasks'
Kitchen::ThorTasks.new
rescue LoadError
puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI']
end
Loading

0 comments on commit e138534

Please sign in to comment.