matross 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/lib/matross/fog.rb +9 -9
- data/lib/matross/foreman.rb +9 -9
- data/lib/matross/version.rb +1 -1
- metadata +2 -3
- data/.ruby-version +0 -1
data/.gitignore
CHANGED
data/lib/matross/fog.rb
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
dep_included?
|
1
|
+
dep_included? 'fog'
|
2
2
|
|
3
3
|
_cset(:fog_config) { "#{shared_path}/config/fog_config.yml" }
|
4
|
-
_cset :fog_region,
|
4
|
+
_cset :fog_region, 'us-east-1'
|
5
5
|
_cset :fog_public, false
|
6
6
|
|
7
7
|
namespace :fog do
|
8
8
|
|
9
|
-
desc
|
10
|
-
task :setup, :roles => :app do
|
9
|
+
desc 'Creates the fog_config.yml in shared path'
|
10
|
+
task :setup, :roles => [:app, :dj] do
|
11
11
|
run "mkdir -p #{shared_path}/config"
|
12
|
-
template
|
12
|
+
template 'fog/fog_config.yml.erb', fog_config
|
13
13
|
end
|
14
|
-
after
|
14
|
+
after 'deploy:setup', 'fog:setup'
|
15
15
|
|
16
|
-
desc
|
17
|
-
task :symlink, :roles => :app do
|
16
|
+
desc 'Updates the symlink for fog_config.yml for deployed release'
|
17
|
+
task :symlink, :roles => [:app, :dj] do
|
18
18
|
run "ln -nfs #{fog_config} #{release_path}/config/fog_config.yml"
|
19
19
|
end
|
20
|
-
after
|
20
|
+
after 'bundle:install', 'fog:symlink'
|
21
21
|
end
|
data/lib/matross/foreman.rb
CHANGED
@@ -8,13 +8,13 @@ _cset :rails_env, ''
|
|
8
8
|
namespace :foreman do
|
9
9
|
|
10
10
|
desc "Pre-setup, creates the shared upstart folder"
|
11
|
-
task :pre_setup, except
|
11
|
+
task :pre_setup, :except => { :no_release => true } do
|
12
12
|
run "mkdir -p #{shared_path}/upstart"
|
13
13
|
end
|
14
14
|
before "foreman:setup", "foreman:pre_setup"
|
15
15
|
|
16
16
|
desc "Merges all partial Procfiles and defines a specific dotenv"
|
17
|
-
task :setup, except
|
17
|
+
task :setup, :except => { :no_release => true } do
|
18
18
|
cmd = <<-EOF.gsub(/^\s+/, '')
|
19
19
|
rm -f #{shared_path}/Procfile-matross;
|
20
20
|
for file in #{current_path}/Procfile #{shared_path}/Procfile.*; do \
|
@@ -26,12 +26,12 @@ namespace :foreman do
|
|
26
26
|
$(test -f #{current_path}/.env-#{stage} && echo \"$_\") > \
|
27
27
|
#{shared_path}/.env-matross;
|
28
28
|
EOF
|
29
|
-
run cmd, shell
|
29
|
+
run cmd, :shell => "/bin/bash"
|
30
30
|
end
|
31
31
|
before "foreman:export", "foreman:setup"
|
32
32
|
|
33
33
|
desc "Export the Procfile to Ubuntu's upstart scripts"
|
34
|
-
task :export, except
|
34
|
+
task :export, :except => { no_release => true } do
|
35
35
|
matross_path = "#{shared_path}/matross"
|
36
36
|
run "mkdir -p #{matross_path}"
|
37
37
|
upload File.expand_path("../templates/foreman", __FILE__), matross_path,
|
@@ -65,14 +65,14 @@ namespace :foreman do
|
|
65
65
|
before "deploy:restart", "foreman:export"
|
66
66
|
|
67
67
|
desc "Symlink configuration scripts"
|
68
|
-
task :symlink, except
|
68
|
+
task :symlink, :except => { :no_release => true } do
|
69
69
|
run "ln -nfs #{shared_path}/Procfile-matross #{current_path}/Procfile-matross"
|
70
70
|
run "ln -nfs #{shared_path}/.env-matross #{current_path}/.env-matross"
|
71
71
|
end
|
72
72
|
after "foreman:setup", "foreman:symlink"
|
73
73
|
|
74
74
|
desc "Symlink upstart logs to application shared/log"
|
75
|
-
task :log, except
|
75
|
+
task :log, :except => { :no_release => true } do
|
76
76
|
run <<-EOF.gsub(/^s+/, '')
|
77
77
|
ls #{shared_path}/upstart -1 | while read line; do
|
78
78
|
logname=$(basename $line | sed "s/.conf$/.log/");
|
@@ -85,18 +85,18 @@ namespace :foreman do
|
|
85
85
|
after "foreman:export", "foreman:log"
|
86
86
|
|
87
87
|
desc "Stop services"
|
88
|
-
task :stop, except
|
88
|
+
task :stop, :except => { :no_release => true } do
|
89
89
|
run "#{sudo} stop #{application}"
|
90
90
|
end
|
91
91
|
|
92
92
|
desc "Restart services"
|
93
|
-
task :restart, except
|
93
|
+
task :restart, :except => { :no_release => true } do
|
94
94
|
run "#{sudo} start #{application} || #{sudo} restart #{application}"
|
95
95
|
end
|
96
96
|
after "deploy:restart", "foreman:restart"
|
97
97
|
|
98
98
|
desc "Remove upstart scripts"
|
99
|
-
task :remove, except
|
99
|
+
task :remove, :except => { :no_release => true } do
|
100
100
|
run "cd #{shared_path}/upstart && rm -f Procfile*"
|
101
101
|
run "cd /etc/init/ && #{sudo} rm #{application}*"
|
102
102
|
end
|
data/lib/matross/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matross
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-12-
|
13
|
+
date: 2013-12-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -69,7 +69,6 @@ extensions: []
|
|
69
69
|
extra_rdoc_files: []
|
70
70
|
files:
|
71
71
|
- .gitignore
|
72
|
-
- .ruby-version
|
73
72
|
- Gemfile
|
74
73
|
- LICENSE.txt
|
75
74
|
- README.md
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.9.3-p448
|