Skip to content
This repository has been archived by the owner on Nov 30, 2017. It is now read-only.

Commit

Permalink
Finish getting balancer working and do some general cleanup
Browse files Browse the repository at this point in the history
Sam Kottler committed May 25, 2014
1 parent 4053b89 commit e8ef6ed
Showing 6 changed files with 89 additions and 97 deletions.
6 changes: 3 additions & 3 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ cookbook "denyhosts", "0.1.0", git: "https://github.com/phlipper/chef-denyhosts"
cookbook "elasticsearch", git: "https://github.com/elasticsearch/cookbook-elasticsearch"
cookbook "git"
cookbook "grc"
cookbook "hostname", "~> 0.1.0"
cookbook "hostname"
cookbook "htop"
cookbook "iftop"
cookbook "imagemagick"
@@ -29,8 +29,8 @@ cookbook "munin"
cookbook "newrelic-sysmond", "~> 1.3.0"
cookbook "nginx", "0.4.3", git: "https://github.com/phlipper/chef-nginx", ref: "161a4eeabae2e2d18b6789a9723cf6ffb29ce79c"
cookbook "nodejs", git: "https://github.com/phlipper/chef-nodejs"
cookbook "ntp", "1.3.2"
cookbook "openssh", "1.1.4"
cookbook "ntp"
cookbook "openssh"
cookbook "papertrail-rsyslog"
cookbook "perl", "1.1.0"
cookbook "postfix", "2.1.4"
38 changes: 19 additions & 19 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@
"locked_version": "0.1.0"
},
"build-essential": {
"locked_version": "1.4.2"
"locked_version": "2.0.0"
},
"curl": {
"locked_version": "1.1.0"
"locked_version": "2.0.0"
},
"datadog": {
"locked_version": "1.1.1"
@@ -30,18 +30,18 @@
"ref": "cead32d2dc8cad24a261b6abf42ffb30a797704c"
},
"elasticsearch": {
"locked_version": "0.3.8",
"locked_version": "0.3.9",
"git": "https://github.com/elasticsearch/cookbook-elasticsearch",
"ref": "15c51a61abd659943d4879822f773bd8e5e672cf"
"ref": "ca2bcf65fa0deec01935210f74dc32c00dce5b75"
},
"git": {
"locked_version": "2.9.0"
"locked_version": "4.0.2"
},
"grc": {
"locked_version": "1.0.0"
},
"hostname": {
"locked_version": "0.1.0"
"locked_version": "0.2.0"
},
"htop": {
"locked_version": "1.2.0"
@@ -58,7 +58,7 @@
"ref": "72d5e7f919cce4df43ea90173c381e70e74f3aeb"
},
"java": {
"locked_version": "1.19.2"
"locked_version": "1.22.0"
},
"jenkins": {
"locked_version": "1.2.2"
@@ -102,10 +102,10 @@
"ref": "0f8cfce359c8b900eba2c7926f608d9477cc19aa"
},
"ntp": {
"locked_version": "1.3.2"
"locked_version": "1.6.2"
},
"openssh": {
"locked_version": "1.1.4"
"locked_version": "1.3.4"
},
"papertrail-rsyslog": {
"locked_version": "1.1.1"
@@ -117,9 +117,9 @@
"locked_version": "2.1.4"
},
"postgresql": {
"locked_version": "0.13.1",
"locked_version": "0.14.0",
"git": "https://github.com/phlipper/chef-postgresql",
"ref": "89670ad805393f6b4bb495c32a03115a66f6fe61"
"ref": "d4d5394f4f6ab3e512742cde07d875e6042d3ab6"
},
"rbenv": {
"locked_version": "0.7.3",
@@ -158,13 +158,13 @@
"user": {
"locked_version": "0.3.1",
"git": "https://github.com/fnichol/chef-user",
"ref": "d703d0ab4463afabea92e2f1a4d697fbe04931eb"
"ref": "62e3e2b6848445f80ba1ff22bd82c57c63fa72e5"
},
"xfs": {
"locked_version": "1.1.0"
},
"xml": {
"locked_version": "1.2.0"
"locked_version": "1.2.4"
},
"xslt": {
"locked_version": "0.0.1"
@@ -176,7 +176,7 @@
"locked_version": "1.3.0"
},
"apache2": {
"locked_version": "1.9.6"
"locked_version": "1.10.4"
},
"pacman": {
"locked_version": "1.1.1"
@@ -188,22 +188,22 @@
"locked_version": "0.16.2"
},
"chef_handler": {
"locked_version": "1.1.5"
"locked_version": "1.1.6"
},
"yum": {
"locked_version": "3.1.2"
"locked_version": "3.2.0"
},
"ark": {
"locked_version": "0.7.0"
"locked_version": "0.8.2"
},
"dmg": {
"locked_version": "2.2.0"
},
"windows": {
"locked_version": "1.30.0"
"locked_version": "1.30.2"
},
"yum-epel": {
"locked_version": "0.3.4"
"locked_version": "0.3.6"
},
"hostsfile": {
"locked_version": "2.4.4"
129 changes: 64 additions & 65 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (3.2.16)
activesupport (3.2.18)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
addressable (2.3.5)
akami (1.2.0)
addressable (2.3.6)
akami (1.2.2)
gyoku (>= 0.4.0)
nokogiri (>= 1.4.0)
nokogiri
app_conf (0.4.2)
arr-pm (0.0.8)
arr-pm (0.0.9)
cabin (> 0)
ast (1.1.0)
backports (3.3.5)
berkshelf (2.0.12)
ast (2.0.0)
backports (3.6.0)
berkshelf (2.0.16)
activesupport (~> 3.2.0)
addressable (~> 2.3.4)
buff-shell_out (~> 0.1)
chozo (>= 0.6.1)
faraday (~> 0.8.0)
faraday (~> 0.8.5)
hashie (>= 2.0.2)
minitar (~> 0.5.4)
rbzip2 (~> 0.2.0)
retryable (~> 1.3.3)
ridley (~> 1.5.0)
solve (>= 0.5.0)
ridley (~> 1.7.0)
solve (~> 0.8.2)
thor (~> 0.18.0)
buff-config (0.4.0)
buff-extensions (~> 0.3)
@@ -37,21 +38,22 @@ GEM
builder (3.2.2)
bunny (0.7.9)
cabin (0.6.1)
celluloid (0.14.1)
timers (>= 1.0.0)
celluloid-io (0.14.1)
celluloid (>= 0.14.1)
nio4r (>= 0.4.5)
chef (10.28.2)
celluloid (0.15.2)
timers (~> 1.1.0)
celluloid-io (0.15.0)
celluloid (>= 0.15.0)
nio4r (>= 0.5.0)
chef (10.32.2)
bunny (>= 0.6.0, < 0.8.0)
erubis
highline (~> 1.6, >= 1.6.9)
json (>= 1.4.4, <= 1.7.7)
json (>= 1.4.4, <= 1.8.1)
mime-types (~> 1.16)
mixlib-authentication (~> 1.3)
mixlib-cli (~> 1.1)
mixlib-config (~> 1.1, >= 1.1.2)
mixlib-log (~> 1.3)
mixlib-shellout (~> 1.1)
mixlib-shellout (~> 1.3)
moneta (< 0.7.0)
net-ssh (~> 2.6)
net-ssh-multi (~> 1.1.0)
@@ -60,42 +62,41 @@ GEM
treetop (~> 1.4.9)
uuidtools
yajl-ruby (~> 1.1)
childprocess (0.3.9)
childprocess (0.5.3)
ffi (~> 1.0, >= 1.0.11)
chozo (0.6.1)
activesupport (>= 3.2.0)
hashie (>= 2.0.2)
multi_json (>= 1.3.0)
clamp (0.6.1)
clamp (0.6.3)
em-winrm (0.5.5)
eventmachine (~> 1.0.0)
mixlib-log (>= 1.3.0)
uuidtools (~> 2.1.1)
winrm (~> 1.1.2)
erubis (2.7.0)
eventmachine (1.0.3)
excon (0.25.3)
excon (0.31.0)
faraday (0.8.9)
multipart-post (~> 1.2.0)
ffi (1.9.3)
fog (1.15.0)
fog (1.20.0)
builder
excon (~> 0.25.0)
excon (~> 0.31.0)
formatador (~> 0.2.0)
mime-types
multi_json (~> 1.0)
net-scp (~> 1.1)
net-ssh (>= 2.1.3)
nokogiri (~> 1.5)
ruby-hmac
nokogiri (>= 1.5.11)
foodcritic (3.0.3)
erubis
gherkin (~> 2.11.7)
nokogiri (~> 1.5.4)
rake
treetop (~> 1.4.10)
yajl-ruby (~> 1.1.0)
formatador (0.2.4)
formatador (0.2.5)
fpm (0.4.42)
arr-pm (~> 0.0.8)
backports (>= 2.6.2)
@@ -104,7 +105,7 @@ GEM
clamp (~> 0.6)
ftw (~> 0.0.30)
json (>= 1.7.7)
ftw (0.0.36)
ftw (0.0.39)
addressable
backports (>= 2.6.2)
cabin (> 0)
@@ -116,100 +117,99 @@ GEM
ffi (>= 1.0.1)
gyoku (1.1.1)
builder (>= 2.1.2)
hashie (2.0.5)
highline (1.6.20)
hitimes (1.2.1)
hashie (2.1.1)
highline (1.6.21)
http_parser.rb (0.5.3)
httpclient (2.3.4.1)
httpi (0.9.7)
rack
i18n (0.6.9)
ipaddress (0.8.0)
json (1.7.7)
json (1.8.1)
knife-cookbook-cleanup (0.1.1)
chef (> 0.10.10)
knife-ec2 (0.6.6)
chef (>= 0.10.10)
fog (~> 1.15.0)
knife-ec2 (0.8.0)
fog (~> 1.20.0)
knife-windows (>= 0.5.12)
knife-spork (1.2.2)
app_conf (>= 0.4.0)
chef (>= 0.10.4)
git (>= 1.2.5)
knife-windows (0.5.15)
knife-windows (0.6.0)
em-winrm (~> 0.5, >= 0.5.4)
little-plugger (1.1.3)
logging (1.8.1)
logging (1.8.2)
little-plugger (>= 1.1.3)
multi_json (>= 1.3.6)
mime-types (2.0)
multi_json (>= 1.8.4)
mime-types (1.25.1)
minitar (0.5.4)
mixlib-authentication (1.3.0)
mixlib-log
mixlib-cli (1.3.0)
mixlib-cli (1.5.0)
mixlib-config (1.1.2)
mixlib-log (1.6.0)
mixlib-shellout (1.2.0)
mixlib-shellout (1.4.0)
moneta (0.6.0)
multi_json (1.8.2)
multi_json (1.10.1)
multipart-post (1.2.0)
net-http-persistent (2.9)
net-scp (1.1.2)
net-http-persistent (2.9.4)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.7.0)
net-ssh (2.9.1)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-multi (1.1)
net-ssh (>= 2.1.4)
net-ssh-gateway (>= 0.99.0)
nio4r (0.5.0)
nokogiri (1.5.10)
nio4r (1.0.0)
nokogiri (1.5.11)
nori (1.1.5)
ohai (6.20.0)
ohai (6.22.0)
ipaddress
mixlib-cli
mixlib-config
mixlib-log
mixlib-shellout
systemu (~> 2.5.2)
yajl-ruby
parser (2.0.0)
ast (~> 1.1)
parser (2.1.9)
ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5)
polyglot (0.3.3)
polyglot (0.3.4)
powerpack (0.0.9)
rack (1.5.2)
rainbow (1.1.4)
rake (10.1.0)
rainbow (2.0.0)
rake (10.3.2)
rbzip2 (0.2.0)
rest-client (1.6.7)
mime-types (>= 1.16)
retryable (1.3.4)
ridley (1.5.3)
retryable (1.3.5)
ridley (1.7.1)
addressable
buff-config (~> 0.2)
buff-extensions (~> 0.3)
buff-ignore (~> 1.1)
buff-shell_out (~> 0.1)
celluloid (~> 0.14.0)
celluloid-io (~> 0.14.0)
celluloid (~> 0.15)
celluloid-io (~> 0.15)
erubis
faraday (>= 0.8.4)
hashie (>= 2.0.2)
json (>= 1.7.7)
mixlib-authentication (>= 1.3.0)
net-http-persistent (>= 2.8)
net-ssh
nio4r (>= 0.5.0)
retryable
solve (>= 0.4.4)
varia_model (~> 0.1)
winrm (~> 1.1.0)
rubocop (0.14.1)
parser (~> 2.0)
rubocop (0.22.0)
json (>= 1.7.7, < 2)
parser (~> 2.1.9)
powerpack (~> 0.0.6)
rainbow (>= 1.1.4)
ruby-hmac (0.4.0)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-progressbar (1.5.1)
rubyntlm (0.1.1)
savon (0.9.5)
akami (~> 1.0)
@@ -219,17 +219,16 @@ GEM
nokogiri (>= 1.4.0)
nori (~> 1.0)
wasabi (~> 1.0)
slop (3.4.6)
slop (3.5.0)
solve (0.8.2)
systemu (2.5.2)
thor (0.18.1)
timers (2.0.0)
hitimes
timers (1.1.0)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
uuidtools (2.1.4)
varia_model (0.3.0)
varia_model (0.3.2)
buff-extensions (~> 0.2)
hashie (>= 2.0.2)
wasabi (1.0.0)
5 changes: 0 additions & 5 deletions chef/roles/base.rb
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
description "The base role with required system-level recipes for all nodes"
run_list(
"recipe[rubygems::users]",
"recipe[motd-tail]",
"recipe[apt]",
"recipe[build-essential]",
"recipe[rubygems::cloudinit]",
@@ -20,18 +19,14 @@
"recipe[rubygems::papertrail]",
"recipe[bash-completion]",
"recipe[grc]",
"recipe[screen]",
"recipe[openssh]",
"recipe[sudo]",
"recipe[denyhosts]",
"recipe[iptables]",
"recipe[rubygems::ip_security]",
"recipe[rubygems::iptables]",
"recipe[htop]",
"recipe[iftop]",
"recipe[monit]",
"recipe[newrelic-sysmond]",
"recipe[munin]",
"recipe[rubygems::datadog]",
"recipe[postfix]",
"recipe[postfix::aliases]"
2 changes: 1 addition & 1 deletion chef/site-cookbooks/rubygems/metadata.rb
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
license 'MIT'
description 'RubyGems.org specific recipes'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.2'
version '0.1.3'

recipe 'rubygems', 'Default recipes for all nodes'
recipe 'rubygems::balancer', 'Nginx load balancer config'
6 changes: 2 additions & 4 deletions chef/site-cookbooks/rubygems/recipes/balancer.rb
Original file line number Diff line number Diff line change
@@ -14,17 +14,15 @@
end

# ssl certificate key
cookbook_file "#{node["nginx"]["dir"]}/certs/#{node["application"]["ssl_key"]}" do
source node["application"]["ssl_key"]
file "#{node["nginx"]["dir"]}/certs/#{node["application"]["ssl_key"]}" do
owner "root"
group "root"
mode "0644"
notifies :reload, "service[nginx]", :immediately
end

# ssl certificate
cookbook_file "#{node["nginx"]["dir"]}/certs/#{node["application"]["ssl_cert"]}" do
source node["application"]["ssl_cert"]
file "#{node["nginx"]["dir"]}/certs/#{node["application"]["ssl_cert"]}" do
owner "root"
group "root"
mode "0644"

0 comments on commit e8ef6ed

Please sign in to comment.