mana 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -16,6 +16,10 @@ stdout_path "<%= node[:shared_path] %>/log/unicorn.log"
|
|
16
16
|
preload_app true
|
17
17
|
GC.copy_on_write_friendly = true if GC.respond_to?(:copy_on_write_friendly=)
|
18
18
|
|
19
|
+
before_exec do |server|
|
20
|
+
ENV['BUNDLE_GEMFILE'] = '<%= node[:current_path] %>/Gemfile'
|
21
|
+
end
|
22
|
+
|
19
23
|
before_fork do |server, worker|
|
20
24
|
old_pid = "#{server.config[:pid]}.oldbin"
|
21
25
|
if File.exists?(old_pid) && server.pid != old_pid
|
data/lib/mana/capistrano.rb
CHANGED
@@ -22,25 +22,21 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
22
22
|
|
23
23
|
# Roundsman fine-tuning
|
24
24
|
|
25
|
-
set :chef_version, '
|
25
|
+
set :chef_version, '10.12.0'
|
26
26
|
set :cookbooks_directory, 'config/deploy/cookbooks'
|
27
27
|
set :stream_roundsman_output, false
|
28
|
-
set :ruby_install_script do
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
./install.sh
|
36
|
-
CONFIGURE_OPTS='--disable-install-rdoc' ruby-build #{fetch(:ruby_version)} #{fetch(:ruby_install_dir)}
|
37
|
-
}
|
38
|
-
end
|
28
|
+
set :ruby_install_script do %Q{
|
29
|
+
apt-get install -y python-software-properties
|
30
|
+
apt-add-repository -y ppa:brightbox/ruby-ng
|
31
|
+
apt-get update
|
32
|
+
apt-get install -y ruby1.9.3
|
33
|
+
gem install bundler
|
34
|
+
} end
|
39
35
|
|
40
36
|
# Mana
|
41
37
|
|
42
38
|
namespace :mana do
|
43
|
-
desc 'Complete
|
39
|
+
desc 'Complete update of all software'
|
44
40
|
task :default do
|
45
41
|
if roundsman.install.install_ruby?
|
46
42
|
abort "Node is not boostrapped yet. Please run 'cap mana:setup' instead"
|
@@ -78,8 +74,8 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
78
74
|
|
79
75
|
desc 'Upgrade software'
|
80
76
|
task :upgrade do
|
81
|
-
sudo "#{fetch(:package_manager)} -yq update"
|
82
|
-
sudo "#{fetch(:package_manager)} -yq upgrade"
|
77
|
+
sudo "DEBIAN_FRONTEND=noninteractive #{fetch(:package_manager)} -yq update"
|
78
|
+
sudo "DEBIAN_FRONTEND=noninteractive #{fetch(:package_manager)} -yq upgrade"
|
83
79
|
end
|
84
80
|
|
85
81
|
desc "Open SSH connection to server"
|
@@ -94,7 +90,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
94
90
|
namespace :deploy do
|
95
91
|
desc 'Update the database with seed data'
|
96
92
|
task :seed, roles: :db, only: {primary: true} do
|
97
|
-
run "cd #{current_path}; rake db:seed RAILS_ENV=#{rails_env}"
|
93
|
+
run "cd #{current_path}; bundle exec rake db:seed RAILS_ENV=#{rails_env}"
|
98
94
|
end
|
99
95
|
|
100
96
|
desc "Restart unicorn"
|
data/lib/mana/version.rb
CHANGED
data/templates/config/deploy.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|