capistrano-mb 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/lib/capistrano/mb/version.rb +1 -1
- data/lib/capistrano/tasks/defaults.rake +9 -2
- data/lib/capistrano/tasks/postgresql.rake +0 -28
- data/lib/capistrano/tasks/rbenv.rake +27 -16
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a635a5c0e264df5e8a8471ba83d32095b5155ff
|
|
4
|
+
data.tar.gz: 0f8a89893367acf14bf4a5f29e013f253e72973a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1935554eb3a9c48b1b8119bb64f7dd5f30dddeb20ef6c216df85a139534b25881c7aadfead3a97b07cad1829e632f9d87386185b53334eaf64d6247d57db2f52
|
|
7
|
+
data.tar.gz: 5cf45d13b17e22210ae5cd5e533106f07172a409fd9f2980c5ffefad82d9b8c8f858bdbe00c3ef79e4574d7e3b3b33518fdb6e51af16ea283dab1856af4e69ef
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
* Your contribution here!
|
|
4
4
|
|
|
5
|
+
## [0.26.0][] (2016-01-08)
|
|
6
|
+
|
|
7
|
+
* Remove `mb:postgresql:tune` task. The [pgtune](https://github.com/gregs1104/pgtune) tool no longer works with the latest versions of PostgresSQL.
|
|
8
|
+
* Overhaul the `mb:rbenv:*` tasks.
|
|
9
|
+
* Use the official rbenv-installer script
|
|
10
|
+
* Install necessary dev packages via `mb:aptitude:install` rather than relying on an external (and outdated) script
|
|
11
|
+
* Remove several unused rbenv plugins, keeping only: `ruby-build`, `rbenv-vars`, `rbenv-update`
|
|
12
|
+
* Install plugins using our own code, rather than using external script
|
|
13
|
+
* No longer install the `psych` gem
|
|
14
|
+
|
|
5
15
|
## [0.25.0][] (2015-10-09)
|
|
6
16
|
|
|
7
17
|
* Add `X-Accel-Mapping` and appropriate NGINX configuration so that `send_file` used in a Rails controller is now accelerated using `X-Accel-Redirect`. For security this only works if the file being sent resides in the Rails app directory (e.g. `<rails_root>/tmp` or `<rails_root>/public`). This means `send_file` files will be served by NGINX natively, rather than through Rack.
|
|
@@ -146,7 +156,8 @@ Flush console output after each line is printed. This allows deployment progress
|
|
|
146
156
|
|
|
147
157
|
Initial Rubygems release!
|
|
148
158
|
|
|
149
|
-
[Unreleased]: https://github.com/mattbrictson/capistrano-mb/compare/v0.
|
|
159
|
+
[Unreleased]: https://github.com/mattbrictson/capistrano-mb/compare/v0.26.0...HEAD
|
|
160
|
+
[0.26.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.25.0...v0.26.0
|
|
150
161
|
[0.25.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.24.0...v0.25.0
|
|
151
162
|
[0.24.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.23.1...v0.24.0
|
|
152
163
|
[0.23.1]: https://github.com/mattbrictson/capistrano-mb/compare/v0.23.0...v0.23.1
|
|
@@ -22,15 +22,23 @@ namespace :load do
|
|
|
22
22
|
set :mb_privileged_user, "root"
|
|
23
23
|
|
|
24
24
|
set :mb_aptitude_packages,
|
|
25
|
+
"build-essential" => :all,
|
|
25
26
|
"curl" => :all,
|
|
26
27
|
"debian-goodies" => :all,
|
|
27
28
|
"git-core" => :all,
|
|
28
29
|
"libpq-dev@ppa:pitti/postgresql" => :all,
|
|
30
|
+
"libreadline-gplv2-dev" => :all,
|
|
31
|
+
"libssl-dev" => :all,
|
|
32
|
+
"libxml2" => :all,
|
|
33
|
+
"libxml2-dev" => :all,
|
|
34
|
+
"libxslt1-dev" => :all,
|
|
29
35
|
"nginx@ppa:nginx/stable" => :web,
|
|
30
36
|
"nodejs@ppa:chris-lea/node.js" => :all,
|
|
31
37
|
"postgresql-client@ppa:pitti/postgresql" => :all,
|
|
32
38
|
"postgresql@ppa:pitti/postgresql" => :db,
|
|
33
|
-
"
|
|
39
|
+
"tklib" => :all,
|
|
40
|
+
"ufw" => :all,
|
|
41
|
+
"zlib1g-dev" => :all
|
|
34
42
|
|
|
35
43
|
set :mb_bundler_lockfile, "Gemfile.lock"
|
|
36
44
|
set :mb_bundler_gem_install_command,
|
|
@@ -48,7 +56,6 @@ namespace :load do
|
|
|
48
56
|
set :mb_nginx_redirect_hosts, {}
|
|
49
57
|
|
|
50
58
|
ask :mb_postgresql_password, nil, :echo => false
|
|
51
|
-
set :mb_postgresql_max_connections, 25
|
|
52
59
|
set :mb_postgresql_pool_size, 5
|
|
53
60
|
set :mb_postgresql_host, "localhost"
|
|
54
61
|
set :mb_postgresql_database,
|
|
@@ -10,34 +10,6 @@ end
|
|
|
10
10
|
|
|
11
11
|
namespace :mb do
|
|
12
12
|
namespace :postgresql do
|
|
13
|
-
desc "Update postgresql.conf using pgtune"
|
|
14
|
-
task :tune do
|
|
15
|
-
privileged_on primary(:db), :in => :sequence do
|
|
16
|
-
pgtune_dir = "/tmp/pgtune"
|
|
17
|
-
pgtune_output = "/tmp/postgresql.conf.pgtune"
|
|
18
|
-
pg_conf = "/etc/postgresql/9.1/main/postgresql.conf"
|
|
19
|
-
|
|
20
|
-
execute :sudo, "rm", "-rf", pgtune_dir
|
|
21
|
-
execute :sudo, "git",
|
|
22
|
-
"clone",
|
|
23
|
-
"-q",
|
|
24
|
-
"https://github.com/gregs1104/pgtune.git",
|
|
25
|
-
pgtune_dir
|
|
26
|
-
|
|
27
|
-
execute "sudo #{pgtune_dir}/pgtune",
|
|
28
|
-
"--input-config", pg_conf,
|
|
29
|
-
"--output-config", pgtune_output,
|
|
30
|
-
"--type", "Web",
|
|
31
|
-
"--connections", fetch(:mb_postgresql_max_connections)
|
|
32
|
-
|
|
33
|
-
# Log diff for informational purposes
|
|
34
|
-
execute :sudo, "diff", pg_conf, pgtune_output, "|| true"
|
|
35
|
-
|
|
36
|
-
execute :sudo, "cp", pgtune_output, pg_conf
|
|
37
|
-
execute :sudo, "service", "postgresql", "restart"
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
|
|
41
13
|
desc "Create user if it doesn't already exist"
|
|
42
14
|
task :create_user do
|
|
43
15
|
privileged_on primary(:db) do
|
|
@@ -7,15 +7,15 @@ namespace :mb do
|
|
|
7
7
|
desc "Install rbenv and compile ruby"
|
|
8
8
|
task :install do
|
|
9
9
|
invoke "mb:rbenv:run_installer"
|
|
10
|
+
invoke "mb:rbenv:add_plugins"
|
|
10
11
|
invoke "mb:rbenv:modify_bashrc"
|
|
11
|
-
invoke "mb:rbenv:bootstrap_ubuntu_for_ruby_compile"
|
|
12
12
|
invoke "mb:rbenv:compile_ruby"
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
desc "Install the latest version of Ruby"
|
|
16
16
|
task :upgrade do
|
|
17
|
+
invoke "mb:rbenv:add_plugins"
|
|
17
18
|
invoke "mb:rbenv:update_rbenv"
|
|
18
|
-
invoke "mb:rbenv:bootstrap_ubuntu_for_ruby_compile"
|
|
19
19
|
invoke "mb:rbenv:compile_ruby"
|
|
20
20
|
end
|
|
21
21
|
|
|
@@ -40,10 +40,31 @@ namespace :mb do
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
task :run_installer do
|
|
43
|
+
installer_url = \
|
|
44
|
+
"https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer"
|
|
45
|
+
|
|
43
46
|
on release_roles(:all) do
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
with :path => "$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" do
|
|
48
|
+
execute :curl, "-fsSL", installer_url, "| bash"
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
task :add_plugins do
|
|
54
|
+
plugins = %w(
|
|
55
|
+
sstephenson/rbenv-vars
|
|
56
|
+
sstephenson/ruby-build
|
|
57
|
+
rkh/rbenv-update
|
|
58
|
+
)
|
|
59
|
+
plugins.each do |plugin|
|
|
60
|
+
git_repo = "https://github.com/#{plugin}.git"
|
|
61
|
+
plugin_dir = "$HOME/.rbenv/plugins/#{plugin.split('/').last}"
|
|
62
|
+
|
|
63
|
+
on release_roles(:all) do
|
|
64
|
+
unless test("[ -d #{plugin_dir} ]")
|
|
65
|
+
execute :git, "clone", git_repo, plugin_dir
|
|
66
|
+
end
|
|
67
|
+
end
|
|
47
68
|
end
|
|
48
69
|
end
|
|
49
70
|
|
|
@@ -59,15 +80,6 @@ namespace :mb do
|
|
|
59
80
|
end
|
|
60
81
|
end
|
|
61
82
|
|
|
62
|
-
task :bootstrap_ubuntu_for_ruby_compile do
|
|
63
|
-
privileged_on release_roles(:all) do |host, user|
|
|
64
|
-
with :debian_frontend => "noninteractive" do
|
|
65
|
-
execute "sudo ~#{user}/.rbenv/plugins/rbenv-bootstrap/bin/rbenv-bootstrap-ubuntu-12-04"
|
|
66
|
-
execute "sudo aptitude -y -q install libffi-dev"
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
|
|
71
83
|
task :compile_ruby do
|
|
72
84
|
ruby_version = fetch(:mb_rbenv_ruby_version)
|
|
73
85
|
on release_roles(:all) do
|
|
@@ -78,8 +90,7 @@ namespace :mb do
|
|
|
78
90
|
if force
|
|
79
91
|
execute "CFLAGS=-O3 rbenv install --force #{ruby_version}"
|
|
80
92
|
execute "rbenv global #{ruby_version}"
|
|
81
|
-
execute "gem install bundler
|
|
82
|
-
execute "rbenv rehash"
|
|
93
|
+
execute "gem install bundler --no-document"
|
|
83
94
|
end
|
|
84
95
|
end
|
|
85
96
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capistrano-mb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.26.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Brictson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: capistrano
|
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
158
|
version: '0'
|
|
159
159
|
requirements: []
|
|
160
160
|
rubyforge_project:
|
|
161
|
-
rubygems_version: 2.
|
|
161
|
+
rubygems_version: 2.5.1
|
|
162
162
|
signing_key:
|
|
163
163
|
specification_version: 4
|
|
164
164
|
summary: Additional Capistrano 3 recipes
|