capistrano-devops 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capistrano/devops/version.rb +1 -1
- data/lib/capistrano/tasks/papertrail.rake +10 -7
- data/sample_app/Gemfile.lock +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eba69848b365f41bf57691041ed336f90c4a7913
|
4
|
+
data.tar.gz: 23170fe2ba77ccef73946233c63b0b8cb9fe6274
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7b9f9de45a9f713c6072ff5dfe1b81a67cda1d91b50da0a711a647f1907df3facb782023955bebebe78c9bfe245ebf0a217953eac2060c8cb8443540121b41e
|
7
|
+
data.tar.gz: 9ddfb7affac8e3bc2e112e1ac34e8d059d17620d4d704280fcf8f4b1e21249a8cea147ee6182152fce735c7e5b85884769d72918dffef38c8f3c78d8054c1c7c
|
@@ -21,18 +21,21 @@ namespace :papertrail do
|
|
21
21
|
|
22
22
|
# desc 'Install remote_syslog on all app servers'
|
23
23
|
task :remote_syslog do
|
24
|
-
on roles(:app) do
|
24
|
+
on roles(:app) do |host|
|
25
25
|
as :root do
|
26
|
+
# TODO: only install the gem if the command doesn't exist
|
27
|
+
# maybe which remote_syslog ?
|
26
28
|
execute :gem, 'install remote_syslog'
|
27
29
|
|
28
30
|
LOG_FILES_YML = <<-EOF
|
29
31
|
files:
|
30
|
-
- #{shared_path.join('log').to_s}
|
32
|
+
- #{shared_path.join('log').to_s}/*.log
|
31
33
|
destination:
|
32
34
|
host: #{fetch(:papertrail_host, 'logs.papertrailapp.com')}
|
33
35
|
port: #{fetch(:papertrail_port, 1234)}
|
34
|
-
prepend: #{
|
35
|
-
|
36
|
+
prepend: #{capture('hostname')} ->
|
37
|
+
hostname: #{fetch(:application)}-#{host}
|
38
|
+
EOF
|
36
39
|
|
37
40
|
within '/etc' do
|
38
41
|
# again, DRY this up (because as() doesn't work with upload! or within yet)
|
@@ -51,8 +54,8 @@ respawn
|
|
51
54
|
|
52
55
|
pre-start exec /usr/bin/test -e /etc/log_files.yml
|
53
56
|
|
54
|
-
exec /usr/local/bin/remote_syslog -D
|
55
|
-
|
57
|
+
exec /usr/local/bin/remote_syslog -D
|
58
|
+
EOF
|
56
59
|
|
57
60
|
# TODO: find out where the remote_syslog is (or if it even got installed)
|
58
61
|
# find / -name remote_syslog
|
@@ -63,7 +66,7 @@ exec /usr/local/bin/remote_syslog -D --tls
|
|
63
66
|
|
64
67
|
end
|
65
68
|
|
66
|
-
execute :service, 'remote_syslog
|
69
|
+
execute :service, 'remote_syslog restart'
|
67
70
|
|
68
71
|
end
|
69
72
|
end
|
data/sample_app/Gemfile.lock
CHANGED
@@ -22,9 +22,9 @@ GIT
|
|
22
22
|
|
23
23
|
GIT
|
24
24
|
remote: git://github.com/parasquid/capistrano-devops.git
|
25
|
-
revision:
|
25
|
+
revision: bebdfb4ac33f80fba5cc06e93af96ced0f741f9a
|
26
26
|
specs:
|
27
|
-
capistrano-devops (0.0.
|
27
|
+
capistrano-devops (0.0.2)
|
28
28
|
capistrano (~> 3)
|
29
29
|
capistrano-bundler
|
30
30
|
|