rubber 1.12.2 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +10 -0
- data/VERSION +1 -1
- data/generators/vulcanize/templates/base/config/rubber/rubber.yml +11 -0
- data/generators/vulcanize/templates/mongodb/config/rubber/deploy-mongodb.rb +49 -0
- data/generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/mongodb.conf +89 -0
- data/generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/monit-mongodb.cnf +10 -0
- data/generators/vulcanize/templates/mongodb/config/rubber/rubber-mongodb.yml +8 -0
- data/generators/vulcanize/templates/mongodb/templates.yml +3 -0
- data/lib/generators/vulcanize/templates/base/config/rubber/rubber.yml +11 -0
- data/lib/generators/vulcanize/templates/mongodb/config/rubber/deploy-mongodb.rb +49 -0
- data/lib/generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/mongodb.conf +89 -0
- data/lib/generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/monit-mongodb.cnf +10 -0
- data/lib/generators/vulcanize/templates/mongodb/config/rubber/rubber-mongodb.yml +8 -0
- data/lib/generators/vulcanize/templates/mongodb/templates.yml +3 -0
- data/lib/rubber/cloud/aws.rb +3 -3
- data/lib/rubber/recipes/rubber/instances.rb +1 -1
- data/lib/rubber/recipes/rubber/setup.rb +2 -0
- metadata +12 -2
data/CHANGELOG
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
1.13.0
|
2
|
+
-----
|
3
|
+
|
4
|
+
Forgot target roles for start/stop/restart <9b916e8> [Alex Kremer]
|
5
|
+
Fix enabling multiverse on newer canonical AMIs (ie Maverick) <dcf81fa> [Alex Kremer]
|
6
|
+
Initial commit of MongoDB Template <c4f7640> [Alex Kremer]
|
7
|
+
allow FORCE on destroy_all <0db9347> [Matt Conway]
|
8
|
+
Removing a function that wasn't meant to be committed :( <8538041> [Jordan Brock]
|
9
|
+
Added support for changing the region end point, using the EC2 gem "server" key. <326448f> [Jordan Brock]
|
10
|
+
|
1
11
|
1.12.2
|
2
12
|
-----
|
3
13
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.13.0
|
@@ -48,6 +48,17 @@ domain: foo.com
|
|
48
48
|
#
|
49
49
|
cloud_providers:
|
50
50
|
aws:
|
51
|
+
# REQUIRED The endpoint for the region server that you want to use.
|
52
|
+
#
|
53
|
+
# Options include
|
54
|
+
# us-east-1.ec2.amazonaws.com
|
55
|
+
# eu-west-1.ec2.amazonaws.com
|
56
|
+
# ap-northeast-1.ec2.amazonaws.com
|
57
|
+
# ap-southeast-1.ec2.amazonaws.com
|
58
|
+
# ap-southeast-2.ec2.amazonaws.com
|
59
|
+
#
|
60
|
+
server_endpoint: us-east-1.ec2.amazonaws.com
|
61
|
+
|
51
62
|
# REQUIRED The amazon keys and account ID (digits only, no dashes) used to access the AWS API
|
52
63
|
#
|
53
64
|
access_key: XXX
|
@@ -0,0 +1,49 @@
|
|
1
|
+
|
2
|
+
namespace :rubber do
|
3
|
+
|
4
|
+
namespace :mongodb do
|
5
|
+
|
6
|
+
rubber.allow_optional_tasks(self)
|
7
|
+
|
8
|
+
before "rubber:install_packages", "rubber:mongodb:install"
|
9
|
+
after "rubber:install_packages", "rubber:mongodb:setup_paths"
|
10
|
+
|
11
|
+
task :install, :roles => :mongodb do
|
12
|
+
# Setup apt sources to mongodb from 10gen
|
13
|
+
sources = <<-SOURCES
|
14
|
+
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
|
15
|
+
SOURCES
|
16
|
+
sources.gsub!(/^ */, '')
|
17
|
+
put(sources, "/etc/apt/sources.list.d/mongodb.list")
|
18
|
+
rsudo "apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10"
|
19
|
+
end
|
20
|
+
|
21
|
+
task :setup_paths, :roles => :mongodb do
|
22
|
+
rsudo "mkdir -p #{rubber_env.mongodb_data_dir}"
|
23
|
+
rsudo "chown -R mongodb:mongodb #{rubber_env.mongodb_data_dir}"
|
24
|
+
end
|
25
|
+
|
26
|
+
desc <<-DESC
|
27
|
+
Starts the mongodb daemon
|
28
|
+
DESC
|
29
|
+
task :start, :roles => :mongodb do
|
30
|
+
rsudo "service mongodb start"
|
31
|
+
end
|
32
|
+
|
33
|
+
desc <<-DESC
|
34
|
+
Stops the mongodb daemon
|
35
|
+
DESC
|
36
|
+
task :stop, :roles => :mongodb do
|
37
|
+
rsudo "service mongodb stop"
|
38
|
+
end
|
39
|
+
|
40
|
+
desc <<-DESC
|
41
|
+
Restarts the mongodb daemon
|
42
|
+
DESC
|
43
|
+
task :restart, :roles => :mongodb do
|
44
|
+
rsudo "service mongodb restart"
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<%
|
2
|
+
@path = "/etc/mongodb.conf"
|
3
|
+
@post = "service mongodb restart"
|
4
|
+
%>
|
5
|
+
# mongodb.conf
|
6
|
+
|
7
|
+
# Where to store the data.
|
8
|
+
|
9
|
+
# Note: if you run mongodb as a non-root user (recommended) you may
|
10
|
+
# need to create and set permissions for this directory manually,
|
11
|
+
# e.g., if the parent directory isn't mutable by the mongodb user.
|
12
|
+
dbpath=<%= rubber_env.mongodb_data_dir %>
|
13
|
+
|
14
|
+
#where to log
|
15
|
+
logpath=<%= rubber_env.mongodb_log %>
|
16
|
+
|
17
|
+
logappend=true
|
18
|
+
|
19
|
+
port = 27017
|
20
|
+
|
21
|
+
# Enables periodic logging of CPU utilization and I/O wait
|
22
|
+
#cpu = true
|
23
|
+
|
24
|
+
# Turn on/off security. Off is currently the default
|
25
|
+
#noauth = true
|
26
|
+
#auth = true
|
27
|
+
|
28
|
+
# Verbose logging output.
|
29
|
+
#verbose = true
|
30
|
+
|
31
|
+
# Inspect all client data for validity on receipt (useful for
|
32
|
+
# developing drivers)
|
33
|
+
#objcheck = true
|
34
|
+
|
35
|
+
# Enable db quota management
|
36
|
+
#quota = true
|
37
|
+
|
38
|
+
# Set oplogging level where n is
|
39
|
+
# 0=off (default)
|
40
|
+
# 1=W
|
41
|
+
# 2=R
|
42
|
+
# 3=both
|
43
|
+
# 7=W+some reads
|
44
|
+
#diaglog = 0
|
45
|
+
# Diagnostic/debugging option
|
46
|
+
#nocursors = true
|
47
|
+
|
48
|
+
# Ignore query hints
|
49
|
+
#nohints = true
|
50
|
+
|
51
|
+
# Disable the HTTP interface (Defaults to localhost:27018).
|
52
|
+
#nohttpinterface = true
|
53
|
+
|
54
|
+
# Turns off server-side scripting. This will result in greatly limited
|
55
|
+
# functionality
|
56
|
+
#noscripting = true
|
57
|
+
|
58
|
+
# Turns off table scans. Any query that would do a table scan fails.
|
59
|
+
#notablescan = true
|
60
|
+
|
61
|
+
# Disable data file preallocation.
|
62
|
+
#noprealloc = true
|
63
|
+
|
64
|
+
# Specify .ns file size for new databases.
|
65
|
+
# nssize = <size>
|
66
|
+
|
67
|
+
# Accout token for Mongo monitoring server.
|
68
|
+
#mms-token = <token>
|
69
|
+
|
70
|
+
# Server name for Mongo monitoring server.
|
71
|
+
#mms-name = <server-name>
|
72
|
+
|
73
|
+
# Ping interval for Mongo monitoring server.
|
74
|
+
#mms-interval = <seconds>
|
75
|
+
|
76
|
+
# Replication Options
|
77
|
+
|
78
|
+
# in master/slave replicated mongo databases, specify here whether
|
79
|
+
# this is a slave or master
|
80
|
+
#slave = true
|
81
|
+
#source = master.example.com
|
82
|
+
# Slave only: specify a single database to replicate
|
83
|
+
#only = master.example.com
|
84
|
+
# or
|
85
|
+
#master = true
|
86
|
+
#source = slave.example.com
|
87
|
+
|
88
|
+
# in replica set configuration, specify the name of the replica set
|
89
|
+
# replSet = setname
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%
|
2
|
+
@path = '/etc/monit/monit.d/monit-mongodb.conf'
|
3
|
+
%>
|
4
|
+
|
5
|
+
check process mongodb with pidfile <%= rubber_env.mongodb_pid %>
|
6
|
+
group mongodb-<%= RUBBER_ENV %>
|
7
|
+
start program = "/usr/bin/env service mongodb start"
|
8
|
+
stop program = "/usr/bin/env service mongodb stop"
|
9
|
+
if failed port 27017 then restart
|
10
|
+
if 5 restarts within 5 cycles then timeout
|
@@ -48,6 +48,17 @@ domain: foo.com
|
|
48
48
|
#
|
49
49
|
cloud_providers:
|
50
50
|
aws:
|
51
|
+
# REQUIRED The endpoint for the region server that you want to use.
|
52
|
+
#
|
53
|
+
# Options include
|
54
|
+
# us-east-1.ec2.amazonaws.com
|
55
|
+
# eu-west-1.ec2.amazonaws.com
|
56
|
+
# ap-northeast-1.ec2.amazonaws.com
|
57
|
+
# ap-southeast-1.ec2.amazonaws.com
|
58
|
+
# ap-southeast-2.ec2.amazonaws.com
|
59
|
+
#
|
60
|
+
server_endpoint: us-east-1.ec2.amazonaws.com
|
61
|
+
|
51
62
|
# REQUIRED The amazon keys and account ID (digits only, no dashes) used to access the AWS API
|
52
63
|
#
|
53
64
|
access_key: XXX
|
@@ -0,0 +1,49 @@
|
|
1
|
+
|
2
|
+
namespace :rubber do
|
3
|
+
|
4
|
+
namespace :mongodb do
|
5
|
+
|
6
|
+
rubber.allow_optional_tasks(self)
|
7
|
+
|
8
|
+
before "rubber:install_packages", "rubber:mongodb:install"
|
9
|
+
after "rubber:install_packages", "rubber:mongodb:setup_paths"
|
10
|
+
|
11
|
+
task :install, :roles => :mongodb do
|
12
|
+
# Setup apt sources to mongodb from 10gen
|
13
|
+
sources = <<-SOURCES
|
14
|
+
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
|
15
|
+
SOURCES
|
16
|
+
sources.gsub!(/^ */, '')
|
17
|
+
put(sources, "/etc/apt/sources.list.d/mongodb.list")
|
18
|
+
rsudo "apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10"
|
19
|
+
end
|
20
|
+
|
21
|
+
task :setup_paths, :roles => :mongodb do
|
22
|
+
rsudo "mkdir -p #{rubber_env.mongodb_data_dir}"
|
23
|
+
rsudo "chown -R mongodb:mongodb #{rubber_env.mongodb_data_dir}"
|
24
|
+
end
|
25
|
+
|
26
|
+
desc <<-DESC
|
27
|
+
Starts the mongodb daemon
|
28
|
+
DESC
|
29
|
+
task :start, :roles => :mongodb do
|
30
|
+
rsudo "service mongodb start"
|
31
|
+
end
|
32
|
+
|
33
|
+
desc <<-DESC
|
34
|
+
Stops the mongodb daemon
|
35
|
+
DESC
|
36
|
+
task :stop, :roles => :mongodb do
|
37
|
+
rsudo "service mongodb stop"
|
38
|
+
end
|
39
|
+
|
40
|
+
desc <<-DESC
|
41
|
+
Restarts the mongodb daemon
|
42
|
+
DESC
|
43
|
+
task :restart, :roles => :mongodb do
|
44
|
+
rsudo "service mongodb restart"
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<%
|
2
|
+
@path = "/etc/mongodb.conf"
|
3
|
+
@post = "service mongodb restart"
|
4
|
+
%>
|
5
|
+
# mongodb.conf
|
6
|
+
|
7
|
+
# Where to store the data.
|
8
|
+
|
9
|
+
# Note: if you run mongodb as a non-root user (recommended) you may
|
10
|
+
# need to create and set permissions for this directory manually,
|
11
|
+
# e.g., if the parent directory isn't mutable by the mongodb user.
|
12
|
+
dbpath=<%= rubber_env.mongodb_data_dir %>
|
13
|
+
|
14
|
+
#where to log
|
15
|
+
logpath=<%= rubber_env.mongodb_log %>
|
16
|
+
|
17
|
+
logappend=true
|
18
|
+
|
19
|
+
port = 27017
|
20
|
+
|
21
|
+
# Enables periodic logging of CPU utilization and I/O wait
|
22
|
+
#cpu = true
|
23
|
+
|
24
|
+
# Turn on/off security. Off is currently the default
|
25
|
+
#noauth = true
|
26
|
+
#auth = true
|
27
|
+
|
28
|
+
# Verbose logging output.
|
29
|
+
#verbose = true
|
30
|
+
|
31
|
+
# Inspect all client data for validity on receipt (useful for
|
32
|
+
# developing drivers)
|
33
|
+
#objcheck = true
|
34
|
+
|
35
|
+
# Enable db quota management
|
36
|
+
#quota = true
|
37
|
+
|
38
|
+
# Set oplogging level where n is
|
39
|
+
# 0=off (default)
|
40
|
+
# 1=W
|
41
|
+
# 2=R
|
42
|
+
# 3=both
|
43
|
+
# 7=W+some reads
|
44
|
+
#diaglog = 0
|
45
|
+
# Diagnostic/debugging option
|
46
|
+
#nocursors = true
|
47
|
+
|
48
|
+
# Ignore query hints
|
49
|
+
#nohints = true
|
50
|
+
|
51
|
+
# Disable the HTTP interface (Defaults to localhost:27018).
|
52
|
+
#nohttpinterface = true
|
53
|
+
|
54
|
+
# Turns off server-side scripting. This will result in greatly limited
|
55
|
+
# functionality
|
56
|
+
#noscripting = true
|
57
|
+
|
58
|
+
# Turns off table scans. Any query that would do a table scan fails.
|
59
|
+
#notablescan = true
|
60
|
+
|
61
|
+
# Disable data file preallocation.
|
62
|
+
#noprealloc = true
|
63
|
+
|
64
|
+
# Specify .ns file size for new databases.
|
65
|
+
# nssize = <size>
|
66
|
+
|
67
|
+
# Accout token for Mongo monitoring server.
|
68
|
+
#mms-token = <token>
|
69
|
+
|
70
|
+
# Server name for Mongo monitoring server.
|
71
|
+
#mms-name = <server-name>
|
72
|
+
|
73
|
+
# Ping interval for Mongo monitoring server.
|
74
|
+
#mms-interval = <seconds>
|
75
|
+
|
76
|
+
# Replication Options
|
77
|
+
|
78
|
+
# in master/slave replicated mongo databases, specify here whether
|
79
|
+
# this is a slave or master
|
80
|
+
#slave = true
|
81
|
+
#source = master.example.com
|
82
|
+
# Slave only: specify a single database to replicate
|
83
|
+
#only = master.example.com
|
84
|
+
# or
|
85
|
+
#master = true
|
86
|
+
#source = slave.example.com
|
87
|
+
|
88
|
+
# in replica set configuration, specify the name of the replica set
|
89
|
+
# replSet = setname
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%
|
2
|
+
@path = '/etc/monit/monit.d/monit-mongodb.conf'
|
3
|
+
%>
|
4
|
+
|
5
|
+
check process mongodb with pidfile <%= rubber_env.mongodb_pid %>
|
6
|
+
group mongodb-<%= RUBBER_ENV %>
|
7
|
+
start program = "/usr/bin/env service mongodb start"
|
8
|
+
stop program = "/usr/bin/env service mongodb stop"
|
9
|
+
if failed port 27017 then restart
|
10
|
+
if 5 restarts within 5 cycles then timeout
|
data/lib/rubber/cloud/aws.rb
CHANGED
@@ -10,9 +10,9 @@ module Rubber
|
|
10
10
|
def initialize(env, capistrano)
|
11
11
|
super(env, capistrano)
|
12
12
|
@aws_env = env.cloud_providers.aws
|
13
|
-
@ec2 = AWS::EC2::Base.new(:access_key_id => @aws_env.access_key, :secret_access_key => @aws_env.secret_access_key)
|
14
|
-
@ec2elb = AWS::ELB::Base.new(:access_key_id => @aws_env.access_key, :secret_access_key => @aws_env.secret_access_key)
|
15
|
-
AWS::S3::Base.establish_connection!(:access_key_id => @aws_env.access_key, :secret_access_key => @aws_env.secret_access_key)
|
13
|
+
@ec2 = AWS::EC2::Base.new(:access_key_id => @aws_env.access_key, :secret_access_key => @aws_env.secret_access_key, :server => @aws_env.server_endpoint)
|
14
|
+
@ec2elb = AWS::ELB::Base.new(:access_key_id => @aws_env.access_key, :secret_access_key => @aws_env.secret_access_key, :server => @aws_env.server_endpoint)
|
15
|
+
AWS::S3::Base.establish_connection!(:access_key_id => @aws_env.access_key, :secret_access_key => @aws_env.secret_access_key, :server => @aws_env.server_endpoint)
|
16
16
|
end
|
17
17
|
|
18
18
|
def create_instance(ami, ami_type, security_groups, availability_zone)
|
@@ -383,6 +383,8 @@ namespace :rubber do
|
|
383
383
|
sudo_script 'enable_multiverse', <<-ENDSCRIPT
|
384
384
|
if ! grep -qc multiverse /etc/apt/sources.list /etc/apt/sources.list.d/* &> /dev/null; then
|
385
385
|
cat /etc/apt/sources.list | sed 's/main universe/multiverse/' > /etc/apt/sources.list.d/rubber-multiverse-source.list
|
386
|
+
elif grep -q multiverse /etc/apt/sources.list &> /dev/null; then
|
387
|
+
cat /etc/apt/sources.list | sed -n '/multiverse$/s/^#\s*//p' > /etc/apt/sources.list.d/rubber-multiverse-source.list
|
386
388
|
fi
|
387
389
|
ENDSCRIPT
|
388
390
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rubber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.13.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Matt Conway
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-04-13 00:00:00 -04:00
|
14
14
|
default_executable: vulcanize
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -151,6 +151,11 @@ files:
|
|
151
151
|
- generators/vulcanize/templates/memcached/templates.yml
|
152
152
|
- generators/vulcanize/templates/minimal_mysql/templates.yml
|
153
153
|
- generators/vulcanize/templates/minimal_nodb/templates.yml
|
154
|
+
- generators/vulcanize/templates/mongodb/config/rubber/deploy-mongodb.rb
|
155
|
+
- generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/mongodb.conf
|
156
|
+
- generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/monit-mongodb.cnf
|
157
|
+
- generators/vulcanize/templates/mongodb/config/rubber/rubber-mongodb.yml
|
158
|
+
- generators/vulcanize/templates/mongodb/templates.yml
|
154
159
|
- generators/vulcanize/templates/mongrel/config/rubber/deploy-mongrel.rb
|
155
160
|
- generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/mongrel_cluster.yml
|
156
161
|
- generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/monit-mongrel.conf
|
@@ -327,6 +332,11 @@ files:
|
|
327
332
|
- lib/generators/vulcanize/templates/memcached/templates.yml
|
328
333
|
- lib/generators/vulcanize/templates/minimal_mysql/templates.yml
|
329
334
|
- lib/generators/vulcanize/templates/minimal_nodb/templates.yml
|
335
|
+
- lib/generators/vulcanize/templates/mongodb/config/rubber/deploy-mongodb.rb
|
336
|
+
- lib/generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/mongodb.conf
|
337
|
+
- lib/generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/monit-mongodb.cnf
|
338
|
+
- lib/generators/vulcanize/templates/mongodb/config/rubber/rubber-mongodb.yml
|
339
|
+
- lib/generators/vulcanize/templates/mongodb/templates.yml
|
330
340
|
- lib/generators/vulcanize/templates/mongrel/config/rubber/deploy-mongrel.rb
|
331
341
|
- lib/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/mongrel_cluster.yml
|
332
342
|
- lib/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/monit-mongrel.conf
|