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.
- Loading branch information
1 parent
a1c0461
commit d71b3e0
Showing
19 changed files
with
203 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
driver: | ||
name: vagrant | ||
|
||
provisioner: | ||
name: chef_solo | ||
|
||
platforms: | ||
- name: ubuntu-12.04 | ||
|
||
suites: | ||
- name: base | ||
run_list: ["role[base]", "role[vagrant]"] | ||
roles_path: "chef/roles" | ||
data_bags_path: "chef/data_bags" | ||
- name: dbmaster | ||
run_list: ["role[db_master]", "role[vagrant]"] | ||
roles_path: "chef/roles" | ||
data_bags_path: "chef/data_bags" | ||
attributes: | ||
- name: app | ||
run_list: ["role[app]", "role[vagrant]"] | ||
roles_path: "chef/roles" | ||
data_bags_path: "chef/data_bags" | ||
attributes: | ||
application: | ||
name: 'rubygems' | ||
rails_env: vagrant | ||
rails_root: "/applications/rubygems/staging" | ||
server_names: | ||
- "vagrant.rubygems.org" | ||
use_ssl: true | ||
force_ssl: true | ||
ssl_key: rubygems.org.key | ||
ssl_cert: rubygems.org.crt | ||
app_server: | ||
name: unicorn | ||
concurrency: 4 | ||
- name: balancer | ||
run_list: ["role[balancer]", "role[vagrant]"] | ||
roles_path: "chef/roles" | ||
data_bags_path: "chef/data_bags" | ||
attributes: | ||
application: | ||
name: 'rubygems' | ||
rails_env: vagrant | ||
rails_root: "/applications/rubygems/staging" | ||
server_names: | ||
- "vagrant.rubygems.org" | ||
use_ssl: true | ||
force_ssl: true | ||
ssl_key: rubygems.org.key | ||
ssl_cert: rubygems.org.crt | ||
app_server: | ||
name: unicorn | ||
concurrency: 4 |
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,13 +1,23 @@ | ||
name "vagrant" | ||
description "The base vagrant role with a few overrides" | ||
|
||
run_list( | ||
"recipe[rubygems::purge_denyhosts]" | ||
) | ||
|
||
override_attributes( | ||
"authorization" => { | ||
"sudo" => { | ||
"passwordless" => true | ||
} | ||
}, | ||
"denyhosts" => { | ||
"allowed_hosts" => ["10.0.2.2"] | ||
}, | ||
"sudo" => { | ||
"add_vagrant" => true | ||
}, | ||
"nginx" => { | ||
"log_dir" => "/var/log/nginx" | ||
} | ||
) |
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,23 @@ | ||
# | ||
# Cookbook Name:: rubygems | ||
# Recipe:: purge_denyhosts | ||
# | ||
|
||
node.default['denyhosts']['work_dir'] = '/var/lib/denyhosts' | ||
|
||
%w(hosts hosts-restricted hosts-root hosts-valid user-hosts).each do |filename| | ||
file File.join(node['denyhosts']['work_dir'], filename) do | ||
content '' | ||
notifies :restart, 'service[denyhosts]' | ||
end | ||
end | ||
|
||
ruby_block "purge /etc/hosts.deny" do | ||
block do | ||
file = ::Chef::Util::FileEdit.new('/etc/hosts.deny') | ||
file.search_file_delete_line(/^[^#|\s]/) | ||
file.write_file | ||
end | ||
only_if { ::File.exists?('/etc/hosts.deny') } | ||
notifies :restart, 'service[denyhosts]' | ||
end |
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,5 @@ | ||
require 'serverspec' | ||
|
||
include Serverspec::Helper::Exec | ||
include Serverspec::Helper::DetectOS | ||
include Serverspec::Helper::Properties |
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,9 @@ | ||
require 'spec_helper' | ||
|
||
describe 'rubygems::stat-update' do | ||
|
||
describe package('stat-update') do | ||
it { should be_installed } | ||
end | ||
|
||
end |
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,5 @@ | ||
require 'spec_helper' | ||
|
||
describe 'rubygems::default' do | ||
|
||
end |
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,5 @@ | ||
require 'serverspec' | ||
|
||
include Serverspec::Helper::Exec | ||
include Serverspec::Helper::DetectOS | ||
include Serverspec::Helper::Properties |
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,13 @@ | ||
require 'spec_helper' | ||
|
||
describe 'rubygems::system_ruby' do | ||
|
||
describe package('ruby1.9.1-full') do | ||
it { should be_installed } | ||
end | ||
|
||
describe command('ruby -v') do | ||
it { should return_stdout(/ruby 1\.9\.3p0/) } | ||
end | ||
|
||
end |
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,33 @@ | ||
require 'spec_helper' | ||
|
||
describe 'rubygems::users' do | ||
|
||
describe user('deploy') do | ||
it { should exist } | ||
end | ||
|
||
describe group('sysadmin') do | ||
it { should exist } | ||
end | ||
|
||
describe user('dwradcliffe') do | ||
it { should exist } | ||
it { should belong_to_group 'sysadmin' } | ||
end | ||
|
||
describe user('evan') do | ||
it { should exist } | ||
it { should belong_to_group 'sysadmin' } | ||
end | ||
|
||
describe user('samkottler') do | ||
it { should exist } | ||
it { should belong_to_group 'sysadmin' } | ||
end | ||
|
||
describe user('qrush') do | ||
it { should exist } | ||
it { should belong_to_group 'sysadmin' } | ||
end | ||
|
||
end |
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,18 @@ | ||
require 'spec_helper' | ||
|
||
describe 'postgresql' do | ||
|
||
describe package('postgresql-9.2') do | ||
it { should be_installed } | ||
end | ||
|
||
describe command('psql --version') do | ||
it { should return_stdout(/9.2.8/) } | ||
end | ||
|
||
describe service('postgresql') do | ||
it { should be_enabled } | ||
it { should be_running } | ||
end | ||
|
||
end |
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,5 @@ | ||
require 'serverspec' | ||
|
||
include Serverspec::Helper::Exec | ||
include Serverspec::Helper::DetectOS | ||
include Serverspec::Helper::Properties |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.