-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCapfile.v2
58 lines (45 loc) · 2.15 KB
/
Capfile.v2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#encoding: utf-8
role :nodes_clt, "[email protected]:22281", "[email protected]:22291", "[email protected]:22301", :type => 'production'
role :nodes_www, "[email protected]:22281", "[email protected]:22291", "[email protected]:22301", :type => 'production'
role :nodes_clt, "[email protected]", :type => 'testing'
role :nodes_www, "[email protected]" , :type => 'testing'
namespace :a2 do
task :deploy, :roles => :nodes_clt, :except => { :type => 'production' } do
run "ln -sf /home/www/sites/uri.xdcdn.net/config/ssh-keys/config /home/www/.ssh/config && \
ln -sf /home/www/sites/uri.xdcdn.net/config/supervisord.conf /etc/"
end
task :update, :roles => :nodes_clt, :except => { :type => 'production' } do
run "supervisorctl update"
end
desc "在 uri.xindong.com 上释出新版本"
task :release, :roles => :nodes_www, :except => { :type => 'production' } do
run "cd /home/www/sites/uri.xdcdn.net \
&& git pull \
&& chmod 0600 config/ssh-keys/*"
update
run "touch /home/www/sites/uri.xdcdn.net/tmp/restart.txt"
end
task :status, :roles => :nodes_clt, :except => { :type => 'production' } do
run "tail -n 10 /home/www/sites/uri.xdcdn.net/log/*.txt"
end
end
namespace :pd do
task :deploy, :roles => :nodes_clt, :except => { :type => 'testing' } do
run "ln -sf /home/www/sites/uri.xdcdn.net/config/ssh-keys/config /home/www/.ssh/config && \
ln -sf /home/www/sites/uri.xdcdn.net/config/supervisord.conf /etc/"
end
task :update, :roles => :nodes_clt, :except => { :type => 'testing' } do
run "supervisorctl update"
end
desc "在 uri.xdcdn.net 上释出新版本"
task :release, :roles => :nodes_www, :except => { :type => 'testing' } do
run "cd /home/www/sites/uri.xdcdn.net \
&& git pull \
&& chmod 0600 config/ssh-keys/*"
update
run "touch /home/www/sites/uri.xdcdn.net/tmp/restart.txt"
end
task :status, :roles => :nodes_clt, :except => { :type => 'testing' } do
run "tail -n 10 /home/www/sites/uri.xdcdn.net/log/*.txt"
end
end