rubber 2.10.2 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 239ffc8c689608d6456d4f1b4a83f2e319c0afc7
4
- data.tar.gz: 33b446fe43afa51d206ba2114eb4531d384ee6cb
3
+ metadata.gz: cb719c42daba4da22b9c9566bb445e3077b198b0
4
+ data.tar.gz: 7fb644c6a3d571ee6019ac55fc2afae3aa0766f0
5
5
  SHA512:
6
- metadata.gz: c09382ca073d53e14fed8c14f6f27a0309fd647cd7ad6f982d6ed6fa2fcdb01ea32a588dc856963067fd94f870a43fb37c3b07f989e3d90b4ad68b18225e0b0c
7
- data.tar.gz: 8f4f463f2ad97308e1684dda9fe2b52004d80d2e9077f81c6301eecd48b91c74aaa405da28cc6f5d0dbdefb63338129cb1fe06650ada213430163760d306b92d
6
+ metadata.gz: bfcc3023241d63d494a98f1e441fc048e98800db6c2c390ee8c700c2572d551167a72de4e9e138dbbff121e0deaf6a164ac0c464a8900bfe5bd8d714c6bc6bdf
7
+ data.tar.gz: e753355f2ea865547888732ccc864e0480a294a9f4094c126f768b4dcf17e0ece7f0350ce18bba47f735192ce370f452db2be938c5d5d2c6c7410075af244983
data/CHANGELOG CHANGED
@@ -1,3 +1,28 @@
1
+ 2.11.0 (08/07/2014)
2
+
3
+ New Features:
4
+ ============
5
+
6
+ [passenger] Upgraded to Passenger 4. <09c7e64>
7
+
8
+ Improvements:
9
+ ============
10
+
11
+ [core] Print an error if trying to mount a volume that is mounted under a different device in /etc/fstab. <855fc4c>
12
+ [passenger_nginx] Lock the Passenger version number down for more reliable provisioning. <1ca742a>
13
+ [passenger_nginx] Cleaned up the stock config a bit. <46b5abb, 31de467, e7bdc80>
14
+ [postgresql] Reduced shared_buffers size in PostgreSQL so it'll work out of the box on a 512 MB Digital Ocean droplet. <e032b3a>
15
+
16
+ Bug Fixes:
17
+ =========
18
+
19
+ [base] Update the regions with private networking in Digital Ocean. <0d96318>
20
+ [base] Make sure we load deploy-* files in lexicographic order. <332b69e>
21
+ [core] We need to expand the SSH key filename before checking if it exists. <f9db7c4>
22
+ [core] Fixed a problem with loading Rubber via git in bundler on older releases of RubyGems (e.g., the ones that shipped with Ruby 1.9.3). <869d3d4>
23
+ [graylog] Fixed bootstrapping graylog by removing bad config. <ea5a9b4>
24
+
25
+
1
26
  2.10.2 (07/07/2014)
2
27
 
3
28
  Improvements:
@@ -29,8 +29,9 @@ module Rubber
29
29
  super(env, capistrano)
30
30
  end
31
31
 
32
- # Currently New York 2 (id 4) supports private networking
33
- REGIONS_WITH_PRIVATE_NETWORKING = [4]
32
+ # As of July 2014 Digital Ocean supports private networking in
33
+ # New York 2 (id 4), Amsterdam 2 (id 5), Singapore 1 (id 6) and London 1 (id 7)
34
+ REGIONS_WITH_PRIVATE_NETWORKING = [4, 5, 6, 7]
34
35
 
35
36
  def create_instance(instance_alias, image_name, image_type, security_groups, availability_zone, region)
36
37
  do_region = compute_provider.regions.find { |r| r.name == region }
@@ -105,7 +105,7 @@ namespace :rubber do
105
105
 
106
106
  # Check that the configuration not only exists, but is also valid.
107
107
  normalized_ssh_keys.each do |key|
108
- unless File.exists?(key)
108
+ unless File.exists?(File.expand_path(key))
109
109
  fatal "Invalid SSH key path '#{key}': File does not exist.\nPlease check your cloud provider's 'key_file' setting for correctness."
110
110
  end
111
111
  end
@@ -159,6 +159,13 @@ namespace :rubber do
159
159
  #{('yes | mkfs -t ' + vol_spec['filesystem'] + ' ' + '$device') if created}
160
160
  #{("mkdir -p '#{vol_spec['mount']}'") if vol_spec['mount']}
161
161
  #{("mount '#{vol_spec['mount']}'") if vol_spec['mount']}
162
+
163
+ elif ! grep -q '#{vol_spec['mount']}' /etc/fstab | grep -q '#{vol_spec['device']}'; then
164
+ echo 'You already have #{vol_spec['mount']} mounted as a different device in /etc/fstab'
165
+ echo 'Please choose a different mount point or manually edit /etc/fstab'
166
+ echo 'and re-run cap rubber:setup_volumes'
167
+
168
+ exit 1
162
169
  fi
163
170
  ENDSCRIPT
164
171
  end
@@ -1,3 +1,3 @@
1
1
  module Rubber
2
- VERSION = '2.10.2'.freeze
2
+ VERSION = '2.11.0'.freeze
3
3
  end
@@ -6,7 +6,7 @@ require 'rubber/version'
6
6
  Gem::Specification.new do |s|
7
7
 
8
8
  s.name = "rubber"
9
- s.version = Rubber::VERSION
9
+ s.version = Rubber::VERSION.dup
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.authors = ["Matt Conway", "Kevin Menard"]
12
12
  s.email = ["matt@conwaysplace.com", "nirvdrum@gmail.com"]
@@ -71,7 +71,7 @@ namespace :deploy do
71
71
  end
72
72
 
73
73
  # load in the deploy scripts installed by vulcanize for each rubber module
74
- Dir["#{File.dirname(__FILE__)}/rubber/deploy-*.rb"].each do |deploy_file|
74
+ Dir["#{File.dirname(__FILE__)}/rubber/deploy-*.rb"].sort.each do |deploy_file|
75
75
  load deploy_file
76
76
  end
77
77
 
@@ -52,7 +52,7 @@ rest_transport_uri = http://<%= rubber_instances[rubber_env.host].internal_ip %>
52
52
 
53
53
  # Embedded elasticsearch configuration file
54
54
  # pay attention to the working directory of the server, maybe use an absolute path here
55
- elasticsearch_config_file = /etc/graylog2-elasticsearch.yml
55
+ #elasticsearch_config_file = /etc/graylog2-elasticsearch.yml
56
56
 
57
57
  elasticsearch_max_docs_per_index = 20000000
58
58
 
@@ -5,14 +5,11 @@ namespace :rubber do
5
5
 
6
6
  rubber.allow_optional_tasks(self)
7
7
 
8
- after "rubber:install_gems", "rubber:passenger:custom_install"
9
-
10
- task :custom_install, :roles => :passenger do
11
- rubber.sudo_script 'install_passenger', <<-ENDSCRIPT
12
- passenger_lib=$(find #{rubber_env.ruby_path} -path "*/passenger-#{rubber_env.passenger_version}/*/mod_passenger.so" 2> /dev/null)
13
- if [[ -z $passenger_lib ]]; then
14
- echo -en "\n\n\n\n" | passenger-install-apache2-module
15
- fi
8
+ before "rubber:install_packages", "rubber:passenger:setup_apt_sources"
9
+ task :setup_apt_sources do
10
+ rubber.sudo_script 'configure_passenger_nginx_repository', <<-ENDSCRIPT
11
+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
12
+ add-apt-repository -y https://oss-binaries.phusionpassenger.com/apt/passenger
16
13
  ENDSCRIPT
17
14
  end
18
15
 
@@ -26,7 +26,7 @@ Listen <%= port %>
26
26
  # Don't show haproxy checks in access log (see also apache2.conf)
27
27
  SetEnvIf Request_URI "^/httpchk.txt$" dontlog
28
28
 
29
- RailsEnv <%= Rubber.env %>
29
+ PassengerAppEnv <%= Rubber.env %>
30
30
 
31
31
  XSendFile on
32
32
 
@@ -2,44 +2,41 @@
2
2
  @path = '/etc/apache2/mods-available/passenger.conf'
3
3
  @post = 'cd /etc/apache2/mods-enabled && ln -fs ../mods-available/passenger.conf'
4
4
  %>
5
- LoadModule passenger_module <%= rubber_env.passenger_lib %>
6
- PassengerRoot <%= rubber_env.passenger_root %>
7
- PassengerRuby <%= rubber_env.passenger_ruby %>
8
- PassengerUseGlobalQueue on
5
+ <IfModule mod_passenger.c>
6
+ PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
7
+ PassengerDefaultRuby <%= rubber_env.passenger_ruby %>
9
8
 
10
- PassengerUserSwitching on
11
- PassengerUser <%= rubber_env.app_user %>
12
- PassengerGroup <%= rubber_env.app_user %>
9
+ PassengerUserSwitching on
10
+ PassengerUser <%= rubber_env.app_user %>
11
+ PassengerGroup <%= rubber_env.app_user %>
13
12
 
14
- # max number of rails instances per appserver
15
- PassengerMaxPoolSize <%= rubber_env.max_app_connections %>
13
+ # max number of rails instances per appserver
14
+ PassengerMaxPoolSize <%= rubber_env.max_app_connections %>
16
15
 
17
- # min number of rails instances per appserver (by setting this as the max, we make sure we only wait for workers to spawn on the first request)
18
- PassengerMinInstances <%= rubber_env.max_app_connections %>
16
+ # min number of rails instances per appserver (by setting this as the max, we make sure we only wait for workers to spawn on the first request)
17
+ PassengerMinInstances <%= rubber_env.max_app_connections %>
19
18
 
20
- # Use PassengerMaxPoolSize for limit as we only have 1 app
21
- PassengerMaxInstancesPerApp 0
19
+ # Use PassengerMaxPoolSize for limit as we only have 1 app
20
+ PassengerMaxInstancesPerApp 0
22
21
 
23
- # For performances sake, never shutdown rails instances when idle
24
- PassengerPoolIdleTime 0
22
+ # For performances sake, never shutdown rails instances when idle
23
+ PassengerPoolIdleTime 0
25
24
 
26
- # For performances sake, never shutdown a rails instance after N requests
27
- PassengerMaxRequests 0
25
+ # For performances sake, never shutdown a rails instance after N requests
26
+ PassengerMaxRequests 0
28
27
 
29
- # Passenger checks stuff like restart.txt on every request when this is 0
30
- PassengerStatThrottleRate <%= Rubber.env == 'production' ? '60' : '0' %>
28
+ # Passenger checks stuff like restart.txt on every request when this is 0
29
+ PassengerStatThrottleRate <%= Rubber.env == 'production' ? '60' : '0' %>
31
30
 
32
- # Turning this on breaks mod_rewrite
33
- PassengerHighPerformance off
31
+ # Turning this on breaks mod_rewrite
32
+ PassengerHighPerformance off
34
33
 
35
- # Cache framework code per application
36
- RailsSpawnMethod smart-lv2
34
+ # Cache framework code per application
35
+ PassengerSpawnMethod smart
37
36
 
38
- # For performances sake, don't ever unload framework spawner
39
- RailsFrameworkSpawnerIdleTime 0
37
+ # For performances sake, don't ever unload app spawner
38
+ PassengerMaxPreloaderIdleTime 0
40
39
 
41
- # For performances sake, don't ever unload app spawner
42
- RailsAppSpawnerIdleTime 0
43
-
44
- # Don't show the friendly error pages in production because it could leak information the public shouldn't see.
45
- PassengerFriendlyErrorPages <%= Rubber.env == 'production' ? 'off' : 'on' %>
40
+ # Don't show the friendly error pages in production because it could leak information the public shouldn't see.
41
+ PassengerFriendlyErrorPages <%= Rubber.env == 'production' ? 'off' : 'on' %>
42
+ </IfModule>
@@ -1,7 +1,5 @@
1
- passenger_version: 3.0.19
2
- passenger_root: "#{`bash -l -c 'find #{ruby_path} -name passenger-#{passenger_version}'`.strip}"
1
+ passenger_version: '1:4.0.48-1~`lsb_release -sc`1'
3
2
  passenger_ruby: "#{ruby_path}/bin/ruby"
4
- passenger_lib: "#{passenger_root}/ext/apache2/mod_passenger.so"
5
3
  passenger_listen_port: 7000
6
4
  passenger_listen_ssl_port: 7001
7
5
  max_app_connections: 20
@@ -11,8 +9,7 @@ role_dependencies:
11
9
 
12
10
  roles:
13
11
  passenger:
14
- packages: [apache2-mpm-prefork, apache2-prefork-dev, libcurl4-openssl-dev, libapache2-mod-xsendfile]
15
- gems: [fastthread, rack, [passenger, "#{passenger_version}"]]
12
+ packages: [apache2-mpm-prefork, apache2-prefork-dev, libcurl4-openssl-dev, libapache2-mod-xsendfile, [libapache2-mod-passenger, "#{passenger_version}"]]
16
13
  rolling_restart_port: "#{passenger_listen_port}"
17
14
 
18
15
  web_tools:
@@ -47,7 +47,7 @@ http
47
47
  error_log <%= rubber_env.nginx_log_dir %>/error.log notice;
48
48
  access_log <%= rubber_env.nginx_log_dir %>/access.log main;
49
49
 
50
- passenger_root <%= rubber_env.passenger_root %>;
50
+ passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
51
51
  passenger_ruby <%= rubber_env.passenger_ruby %>;
52
52
 
53
53
  passenger_max_pool_size <%= rubber_env.max_app_connections %>;
@@ -55,11 +55,12 @@ http
55
55
  passenger_max_instances_per_app 0;
56
56
  passenger_pool_idle_time 0;
57
57
  passenger_max_preloader_idle_time 0;
58
- rails_env <%= Rubber.env %>;
58
+ passenger_app_env <%= Rubber.env %>;
59
59
  passenger_friendly_error_pages <%= Rubber.env == 'production' ? 'off' : 'on' %>;
60
60
 
61
61
  passenger_user <%= rubber_env.app_user %>;
62
-
62
+ passenger_group <%= rubber_env.app_user %>;
63
+
63
64
  include /etc/nginx/rubber/passenger_nginx.conf;
64
65
  <% if rubber_instances[rubber_env.host].role_names.include?('web_tools') %>
65
66
  include /etc/nginx/rubber/tools.conf;
@@ -1,4 +1,4 @@
1
- passenger_root: "/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini"
1
+ passenger_version: '1:4.0.48-1~`lsb_release -sc`1'
2
2
  passenger_ruby: "#{ruby_path}/bin/ruby"
3
3
  nginx_log_dir: /mnt/nginx/logs
4
4
  passenger_listen_port: 7000
@@ -14,4 +14,4 @@ use_ssl_key: false
14
14
 
15
15
  roles:
16
16
  passenger_nginx:
17
- packages: [libcurl4-openssl-dev, libpcre3-dev, nginx-extras, passenger]
17
+ packages: [libcurl4-openssl-dev, libpcre3-dev, nginx-extras, [passenger, "#{passenger_version}"]
@@ -109,7 +109,7 @@ unix_socket_directory = '/var/run/postgresql' # (change requires restart)
109
109
 
110
110
  # - Memory -
111
111
 
112
- shared_buffers = 384MB # min 128kB
112
+ shared_buffers = 28MB # min 128kB
113
113
  # (change requires restart)
114
114
  #temp_buffers = 8MB # min 800kB
115
115
  #max_prepared_transactions = 0 # zero disables the feature
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubber
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.2
4
+ version: 2.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Conway
@@ -9,176 +9,176 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-07 00:00:00.000000000 Z
12
+ date: 2014-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: capistrano
16
- version_requirements: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ~>
19
- - !ruby/object:Gem::Version
20
- version: '2.12'
21
15
  requirement: !ruby/object:Gem::Requirement
22
16
  requirements:
23
17
  - - ~>
24
18
  - !ruby/object:Gem::Version
25
19
  version: '2.12'
20
+ name: capistrano
26
21
  prerelease: false
27
22
  type: :runtime
28
- - !ruby/object:Gem::Dependency
29
- name: net-ssh
30
23
  version_requirements: !ruby/object:Gem::Requirement
31
24
  requirements:
32
25
  - - ~>
33
26
  - !ruby/object:Gem::Version
34
- version: '2.6'
27
+ version: '2.12'
28
+ - !ruby/object:Gem::Dependency
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - ~>
38
32
  - !ruby/object:Gem::Version
39
33
  version: '2.6'
34
+ name: net-ssh
40
35
  prerelease: false
41
36
  type: :runtime
42
- - !ruby/object:Gem::Dependency
43
- name: thor
44
37
  version_requirements: !ruby/object:Gem::Requirement
45
38
  requirements:
46
- - - '>='
39
+ - - ~>
47
40
  - !ruby/object:Gem::Version
48
- version: '0'
41
+ version: '2.6'
42
+ - !ruby/object:Gem::Dependency
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
45
  - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
48
+ name: thor
54
49
  prerelease: false
55
50
  type: :runtime
56
- - !ruby/object:Gem::Dependency
57
- name: clamp
58
51
  version_requirements: !ruby/object:Gem::Requirement
59
52
  requirements:
60
53
  - - '>='
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
56
+ - !ruby/object:Gem::Dependency
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
59
  - - '>='
66
60
  - !ruby/object:Gem::Version
67
61
  version: '0'
62
+ name: clamp
68
63
  prerelease: false
69
64
  type: :runtime
70
- - !ruby/object:Gem::Dependency
71
- name: open4
72
65
  version_requirements: !ruby/object:Gem::Requirement
73
66
  requirements:
74
67
  - - '>='
75
68
  - !ruby/object:Gem::Version
76
69
  version: '0'
70
+ - !ruby/object:Gem::Dependency
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
73
  - - '>='
80
74
  - !ruby/object:Gem::Version
81
75
  version: '0'
76
+ name: open4
82
77
  prerelease: false
83
78
  type: :runtime
84
- - !ruby/object:Gem::Dependency
85
- name: fog
86
79
  version_requirements: !ruby/object:Gem::Requirement
87
80
  requirements:
88
- - - ~>
81
+ - - '>='
89
82
  - !ruby/object:Gem::Version
90
- version: '1.6'
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
91
85
  requirement: !ruby/object:Gem::Requirement
92
86
  requirements:
93
87
  - - ~>
94
88
  - !ruby/object:Gem::Version
95
89
  version: '1.6'
90
+ name: fog
96
91
  prerelease: false
97
92
  type: :runtime
98
- - !ruby/object:Gem::Dependency
99
- name: json
100
93
  version_requirements: !ruby/object:Gem::Requirement
101
94
  requirements:
102
- - - '>='
95
+ - - ~>
103
96
  - !ruby/object:Gem::Version
104
- version: '0'
97
+ version: '1.6'
98
+ - !ruby/object:Gem::Dependency
105
99
  requirement: !ruby/object:Gem::Requirement
106
100
  requirements:
107
101
  - - '>='
108
102
  - !ruby/object:Gem::Version
109
103
  version: '0'
104
+ name: json
110
105
  prerelease: false
111
106
  type: :runtime
112
- - !ruby/object:Gem::Dependency
113
- name: rake
114
107
  version_requirements: !ruby/object:Gem::Requirement
115
108
  requirements:
116
109
  - - '>='
117
110
  - !ruby/object:Gem::Version
118
111
  version: '0'
112
+ - !ruby/object:Gem::Dependency
119
113
  requirement: !ruby/object:Gem::Requirement
120
114
  requirements:
121
115
  - - '>='
122
116
  - !ruby/object:Gem::Version
123
117
  version: '0'
118
+ name: rake
124
119
  prerelease: false
125
120
  type: :development
126
- - !ruby/object:Gem::Dependency
127
- name: test-unit
128
121
  version_requirements: !ruby/object:Gem::Requirement
129
122
  requirements:
130
123
  - - '>='
131
124
  - !ruby/object:Gem::Version
132
125
  version: '0'
126
+ - !ruby/object:Gem::Dependency
133
127
  requirement: !ruby/object:Gem::Requirement
134
128
  requirements:
135
129
  - - '>='
136
130
  - !ruby/object:Gem::Version
137
131
  version: '0'
132
+ name: test-unit
138
133
  prerelease: false
139
134
  type: :development
140
- - !ruby/object:Gem::Dependency
141
- name: shoulda-context
142
135
  version_requirements: !ruby/object:Gem::Requirement
143
136
  requirements:
144
137
  - - '>='
145
138
  - !ruby/object:Gem::Version
146
139
  version: '0'
140
+ - !ruby/object:Gem::Dependency
147
141
  requirement: !ruby/object:Gem::Requirement
148
142
  requirements:
149
143
  - - '>='
150
144
  - !ruby/object:Gem::Version
151
145
  version: '0'
146
+ name: shoulda-context
152
147
  prerelease: false
153
148
  type: :development
154
- - !ruby/object:Gem::Dependency
155
- name: mocha
156
149
  version_requirements: !ruby/object:Gem::Requirement
157
150
  requirements:
158
151
  - - '>='
159
152
  - !ruby/object:Gem::Version
160
153
  version: '0'
154
+ - !ruby/object:Gem::Dependency
161
155
  requirement: !ruby/object:Gem::Requirement
162
156
  requirements:
163
157
  - - '>='
164
158
  - !ruby/object:Gem::Version
165
159
  version: '0'
160
+ name: mocha
166
161
  prerelease: false
167
162
  type: :development
168
- - !ruby/object:Gem::Dependency
169
- name: awesome_print
170
163
  version_requirements: !ruby/object:Gem::Requirement
171
164
  requirements:
172
165
  - - '>='
173
166
  - !ruby/object:Gem::Version
174
167
  version: '0'
168
+ - !ruby/object:Gem::Dependency
175
169
  requirement: !ruby/object:Gem::Requirement
176
170
  requirements:
177
171
  - - '>='
178
172
  - !ruby/object:Gem::Version
179
173
  version: '0'
174
+ name: awesome_print
180
175
  prerelease: false
181
176
  type: :development
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
182
  description: |2
183
183
  The rubber plugin enables relatively complex multi-instance deployments of RubyOnRails applications to
184
184
  Amazon's Elastic Compute Cloud (EC2). Like capistrano, rubber is role based, so you can define a set