This repository has been archived by the owner on Nov 30, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
da1332f
commit a149058
Showing
21 changed files
with
352 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
{ | ||
"id" : "deploy", | ||
"username": "deploy", | ||
"comment": "Application Deployment", | ||
"password": "$1$OghAZXA4$agFSQnk5/bJVs8rA8SaSh1", | ||
"ssh_keys": [ | ||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBXB0EwpWiZWrshvzFmTKs/L6FjMuJ9WnSfoeBDoCuZjgOnEeq2E8948s2q1BE2VU9VwlCVOPrpv4Nf3qzXG52k6LUHkgq1DIpKjXJenmz95HxfqHAlNIWXSX90ywPiJZr42CM+SFxtmITj81rpn9o8YxUCnxqD4Zww/2tkDI3vCzIad8EDZ6FKV4J8psV1rCVHcGCzm5T5xdNXSCcg7tc2XvDvdj7aJ+cCulCbBkMGTNoytF8nIfzI5xfVLjm3TIPfGDlF+NXC8oEiENJq5WdRuPEPaNF2ks2MJlhDE2oY33dN0YU6e2Saeo9L2fRpZUrpR9zLejEFw6O+ePC8Ont temp@rubygems.phlippers.net", | ||
"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuZUm6qBJDRKWzrZGx3hiWlVUtmyWvlQGbmI/GyMGqTzzABIb3n8RjpCEBwiBu01wu6ECfyPJ2qGW87G+DVpb1Z5orxQWRPruEg3aw5lXxiHA6dAmd6qWVZKBbQYhXheeepD7QrNwWc/MpVzjqeNitLD0TEI56AJTjL5dIFZHYh5ZHYPYoSVIvH53aub3+vGbzaD/eQamYxuBvecb5A2uHwld//KVA77mKFK68gX92ESd77fpcjwY6cEKQpoobBD4mHpXYfxn8+1OoOkuNo0awkhec9hXQJHRpcIHko+BOGac0d1ZECZIPhAwu7U9KpOCutmJ+YhY1He+++OMXydjxQ== sam.kottler@mbp" | ||
] | ||
} | ||
{ | ||
"id" : "deploy", | ||
"username": "deploy", | ||
"comment": "Application Deployment", | ||
"password": "$1$OghAZXA4$agFSQnk5/bJVs8rA8SaSh1", | ||
"ssh_keys": [ | ||
"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuZUm6qBJDRKWzrZGx3hiWlVUtmyWvlQGbmI/GyMGqTzzABIb3n8RjpCEBwiBu01wu6ECfyPJ2qGW87G+DVpb1Z5orxQWRPruEg3aw5lXxiHA6dAmd6qWVZKBbQYhXheeepD7QrNwWc/MpVzjqeNitLD0TEI56AJTjL5dIFZHYh5ZHYPYoSVIvH53aub3+vGbzaD/eQamYxuBvecb5A2uHwld//KVA77mKFK68gX92ESd77fpcjwY6cEKQpoobBD4mHpXYfxn8+1OoOkuNo0awkhec9hXQJHRpcIHko+BOGac0d1ZECZIPhAwu7U9KpOCutmJ+YhY1He+++OMXydjxQ== samkottler", | ||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTMHSrFTZyMCs67A92dLIYdFcU6EvMRadH0yk9k1lcEPwqf6NMaYS0Fjqqo7gNWga+8gIO5mTS14lgcJwrfVJ07RjvqMa2bRHwD6x6+xqL9gSxaXulbvvVCm0r64KQ+8bl4/WR7CKi3O+C1c9BlZ1u2WGM7zvV42fmRcCmFBHV9VVWcHR/z7ZczSAhqUdJr9CcUB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ngNsG/AkZ2oqLiH6dJKHD7PFx2oSPalogwsUV7iSMIZIYaPa03A9763iFsN0qJjaed+gAAAIBxz3Prxdzt/os4XGXSMNoWcS03AFC/05NOkoDMrXxQnTTpp1wrOgyRqEnKz15qC5dWk1ynzK+LJXHDZGA8lXPfCjHpJO3zrlZ/ivvLhgPdDpt13MAhIJFH06hTal0woxbk/fIdY71P3kbgXC0Ppx/0S7BC+VxqRCA4/wcM+BoDbA== sferik", | ||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwhPtPlbFKhQo3wGdz8cxIQfxveLppS8lV+YywtpEyNrudsiPQAhvd3KRejlW8gsvWlxm0RCUhKSbnDMnHgca1ITW8Fx/EJoAq8W4l55xl8sfBi6L6foQbdv+MIKO+oMG7+nJjOxtE7Tw+N+uEsDYxVSI4tuAOCDdLDVO+vAr/lM0jZs6a1gIsFJArh5dGhkDXF+U/9yGAEQ6FP5hJryKoQadnBA7tqi6muVhg5UcCfpilRgOEet1prwmPiwAeek6sm0O79TuDPfYSY/lWpcNiGoGDDMcNVYIJtajkNbbLfvd9SnEK20D8TslbQMeySMLGltwsPQZT6u3XZDJuo0rz qrush", | ||
"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAngMjxyGbVnOxL0pZDPPrqpAS0SZYEgn4KHtNs1ZC4jf52TMrvrZmDAHmLJ67sk698Bpsg5jXNQuuMtBJeOeEbZIEKOjVVDb3OtD9ipoSWFFOM7ZvsSVIYdlCVaDuZwvdy4CzLR/i0qt5ilVoFp0llIxtNr19AbKDVm+Njr7UYsga7PXWp9HDauVfZU9RHIyypYOFGSYcO4WY8ZnsX5iTqAMBXjcBsog0Rkg9ngRnqR/+tH/CzOgUjwCA59SeYIpkt43hFjL1n+/ZRRpQJLnmtUTcJbcVhoUwhxibGGlw9mxG5iafQ9Knf1428Q4Et6gKYvO0FgzWnp5WybHogVLIaw== vertis" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
// run list | ||
"run_list": ["role[app]"], | ||
|
||
// rubygems Rails application attributes | ||
"application": { | ||
"name": "rubygems", | ||
"rails_env": "production", | ||
"rails_postgresql_host": "10.224.39.18" | ||
}, | ||
|
||
"environment_variables": { | ||
// Rails application settings | ||
"RAILS_ENV": "production", | ||
"RACK_ENV": "production", | ||
"REDIS_URL": "redis://10.249.31.114:6379/0", | ||
"REDISTOGO_URL": "redis://10.249.31.114:6379/0", | ||
|
||
// OpenSSH server timeout | ||
"TMOUT": "600" | ||
|
||
// Ruby GC tuning | ||
// "RUBY_HEAP_MIN_SLOTS": 1000000, | ||
// "RUBY_HEAP_SLOTS_INCREMENT": 1000000, | ||
// "RUBY_HEAP_SLOTS_GROWTH_FACTOR": 1, | ||
// "RUBY_GC_MALLOC_LIMIT": 1000000000, | ||
// "RUBY_HEAP_FREE_MIN": 500000, | ||
// "RUBY_FREE_MIN": 500000 | ||
}, | ||
|
||
// Hostname | ||
"set_fqdn": "app02-aws.rubygems.org", | ||
|
||
// postgresql | ||
"postgresql": { | ||
"version": "9.2", | ||
"ssl": false, | ||
"pg_hba": [ | ||
"host rubygems_production rubygems 127.0.0.1/32 password" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,26 @@ | ||
name "app" | ||
description "Just enough sauce to run the app server." | ||
run_list( | ||
"role[base]", | ||
"recipe[memcached]", | ||
"recipe[redis::server]", | ||
"recipe[rubygems::stat-update]", | ||
"recipe[git]", | ||
"recipe[nginx::server]", | ||
"recipe[nodejs]", | ||
"recipe[postgresql::libpq]", | ||
"recipe[rubygems::environment_variables]", | ||
"recipe[rubygems::monit]", | ||
"recipe[rubygems::rails]", | ||
"recipe[rubygems::rails_nginx]" | ||
) | ||
|
||
default_attributes( | ||
"memcached" => { | ||
"memory" => 128, | ||
"user" => "memcache", | ||
"port" => 11211, | ||
"listen" => "127.0.0.1" | ||
}, | ||
"monit" => { | ||
"monitors" => ["redis", "nginx", "memcached"] | ||
}, | ||
"redis" => { | ||
"maxmemory" => "8gb", | ||
"dir" => "/var/lib/redis_data" | ||
} | ||
) | ||
name "app" | ||
description "Just enough sauce to run the app server." | ||
run_list( | ||
"role[base]", | ||
"recipe[memcached]", | ||
"recipe[rubygems::stat-update]", | ||
"recipe[git]", | ||
"recipe[nodejs]", | ||
"recipe[postgresql::libpq]", | ||
"recipe[rubygems::environment_variables]", | ||
"recipe[rubygems::monit]", | ||
"recipe[rubygems::rails]", | ||
"recipe[rubygems::rails_nginx]" | ||
) | ||
|
||
default_attributes( | ||
"memcached" => { | ||
"memory" => 128, | ||
"user" => "memcache", | ||
"port" => 11211, | ||
"listen" => "127.0.0.1" | ||
}, | ||
"monit" => { | ||
"monitors" => ["nginx", "memcached"] | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name "redis" | ||
|
||
run_list( | ||
"role[base]", | ||
# "recipe[redis::server]" | ||
) | ||
|
||
default_attributes( | ||
"monit" => { | ||
"monitors" => ["redis"] | ||
}, | ||
"redis" => { | ||
"bind" => "", | ||
"maxmemory" => "8gb", | ||
"dir" => "/var/lib/redis_data" | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,22 @@ | ||
# | ||
# Cookbook Name:: nginx | ||
# Recipe:: nginx_source.rb | ||
# Recipe:: nginx_source | ||
# | ||
|
||
node.set['nginx']['version'] = '1.5.8' | ||
node.set['nginx']['iteration'] = '1' | ||
|
||
include_recipe 'nginx::ohai_plugin' | ||
|
||
package_name = "nginx_#{node['nginx']['version']}-#{node['nginx']['iteration']}_amd64.deb" | ||
|
||
cookbook_file "#{Chef::Config[:file_cache_path]}/#{package_name}" | ||
|
||
dpkg_package "#{Chef::Config[:file_cache_path]}/#{package_name}" | ||
|
||
# Continue to use upstream cookbooks | ||
# for basic configuration and service management | ||
|
||
template "/etc/init.d/nginx" do | ||
source "nginx.init.erb" | ||
owner "root" | ||
group "root" | ||
mode 00755 | ||
variables(:src_binary => "/opt/nginx/sbin/nginx", :pid => node['nginx']['pid_file']) | ||
service 'nginx' do | ||
supports :status => true, :restart => true, :reload => true | ||
action :enable | ||
end | ||
|
||
directory "/opt/nginx/conf/conf.d" | ||
directory "/var/log/nginx" | ||
|
||
include_recipe "nginx::service" | ||
include_recipe "nginx::configuration" | ||
include_recipe 'nginx::commons' |
Oops, something went wrong.