recipiez 0.9.6 → 0.9.7
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 +7 -0
- data/lib/recipiez/version.rb +1 -1
- data/recipes/filebeat.rb +33 -0
- data/recipes/templates/filebeat.erb +39 -0
- data/recipiez.gemspec +0 -1
- metadata +28 -56
- data/recipes/campfire.rb +0 -27
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 331e119849bb4cfc246b770be73873ea0f84369c
|
|
4
|
+
data.tar.gz: d5e00c20a3bc67b8301bde7d3205defd4a6909fc
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: f74ad666bf86d96d851fc9aa29208d59231ecf9e04047743f5cb6dc59579a1d0d2981c16b5cf099fb9d7418544a40d1a2635af769dd8b3ee8814d68bdd774980
|
|
7
|
+
data.tar.gz: bfe039d678ba5308fe7f5cfe9b706b2d38380fdcadaff2996eafa0d66ff29f4c49ef1ce204be34346c2e8af44cb09376ce90053b744525a6768925bc23ffec64
|
data/lib/recipiez/version.rb
CHANGED
data/recipes/filebeat.rb
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Capistrano::Configuration.instance(true).load do
|
|
2
|
+
|
|
3
|
+
namespace :filebeat do
|
|
4
|
+
|
|
5
|
+
desc "Install filebeat on remote servers"
|
|
6
|
+
task :install do
|
|
7
|
+
run "echo \"deb https://packages.elastic.co/beats/apt stable main\" | sudo tee -a /etc/apt/sources.list.d/beats.list"
|
|
8
|
+
run "wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -"
|
|
9
|
+
sudo "apt-get update"
|
|
10
|
+
sudo "apt-get install -y filebeat"
|
|
11
|
+
sudo "mkdir -p /etc/pki/tls/certs"
|
|
12
|
+
run "wget https://gist.githubusercontent.com/pyrat/0ef4a2e6e9d5b8556518385379648187/raw/29479a25ce70bd0ddb24ed02562f73ab7c209d71/logstash-forwarder.crt"
|
|
13
|
+
sudo "mv logstash-forwarder.crt /etc/pki/tls/certs/"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
desc "Configure filebeat on remote servers"
|
|
17
|
+
task :configure do
|
|
18
|
+
|
|
19
|
+
generated = render('filebeat', binding)
|
|
20
|
+
puts generated
|
|
21
|
+
put generate, "#{application}"
|
|
22
|
+
sudo "mv #{application}, /etc/filebeat/filebeat.yml"
|
|
23
|
+
|
|
24
|
+
sudo "service filebeat restart"
|
|
25
|
+
sudo "update-rc.d filebeat defaults 95 10"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
################### Filebeat Configuration Example #########################
|
|
2
|
+
#
|
|
3
|
+
############################# Filebeat #####################################
|
|
4
|
+
filebeat:
|
|
5
|
+
# List of prospectors to fetch data.
|
|
6
|
+
prospectors:
|
|
7
|
+
# This is a text lines files harvesting definition
|
|
8
|
+
-
|
|
9
|
+
# Path like /var/log/*/*.log can be used.
|
|
10
|
+
# Make sure no file is defined twice as this can lead to unexpected behaviour.
|
|
11
|
+
paths:
|
|
12
|
+
- /var/www/apps/*/current/log/production.log
|
|
13
|
+
# Ignore files which were modified more then the defined timespan in the past
|
|
14
|
+
# Time strings like 2h (2 hours), 5m (5 minutes) can be used.
|
|
15
|
+
ignore_older: 24h
|
|
16
|
+
# Type to be published in the 'type' field.
|
|
17
|
+
document_type: nodejs
|
|
18
|
+
# Name of the registry file, which is used to keep track of the location
|
|
19
|
+
# of logs in the files that have already been sent between restarts
|
|
20
|
+
# of the filebeat process.
|
|
21
|
+
registry_file: /var/lib/filebeat/registry
|
|
22
|
+
###############################################################################
|
|
23
|
+
############################# Libbeat Config ##################################
|
|
24
|
+
# Base config file used by all other beats for using libbeat features
|
|
25
|
+
############################# Output ##########################################
|
|
26
|
+
# Configure what outputs to use when sending the data collected by the beat.
|
|
27
|
+
output:
|
|
28
|
+
logstash:
|
|
29
|
+
# The Logstash hosts
|
|
30
|
+
hosts: ["ec2-54-216-1-197.eu-west-1.compute.amazonaws.com:5000"]
|
|
31
|
+
bulk_max_size: 1024
|
|
32
|
+
tls:
|
|
33
|
+
# List of root certificates for HTTPS server verifications
|
|
34
|
+
certificate_authorities: ["/etc/pki/tls/certs/logstash-forwarder.crt"]
|
|
35
|
+
############################# Logging #########################################
|
|
36
|
+
# default to syslog.
|
|
37
|
+
logging:
|
|
38
|
+
files:
|
|
39
|
+
rotateeverybytes: 10485760 # = 10MB
|
data/recipiez.gemspec
CHANGED
|
@@ -16,7 +16,6 @@ Gem::Specification.new do |s|
|
|
|
16
16
|
s.description = "Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit, NodeJS, Nginx"
|
|
17
17
|
|
|
18
18
|
s.license = 'MIT'
|
|
19
|
-
s.add_dependency('tinder')
|
|
20
19
|
# s.add_dependency('travis')
|
|
21
20
|
|
|
22
21
|
s.required_rubygems_version = ">= 1.3.1"
|
metadata
CHANGED
|
@@ -1,53 +1,32 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: recipiez
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
segments:
|
|
6
|
-
- 0
|
|
7
|
-
- 9
|
|
8
|
-
- 6
|
|
9
|
-
version: 0.9.6
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.9.7
|
|
10
5
|
platform: ruby
|
|
11
|
-
authors:
|
|
6
|
+
authors:
|
|
12
7
|
- Alastair Brunton
|
|
13
8
|
autorequire:
|
|
14
9
|
bindir: bin
|
|
15
10
|
cert_chain: []
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
name: tinder
|
|
22
|
-
prerelease: false
|
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
|
24
|
-
requirements:
|
|
25
|
-
- - ">="
|
|
26
|
-
- !ruby/object:Gem::Version
|
|
27
|
-
segments:
|
|
28
|
-
- 0
|
|
29
|
-
version: "0"
|
|
30
|
-
type: :runtime
|
|
31
|
-
version_requirements: *id001
|
|
32
|
-
description: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit, NodeJS, Nginx
|
|
33
|
-
email:
|
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp,
|
|
14
|
+
Activecollab, Monit, NodeJS, Nginx
|
|
15
|
+
email:
|
|
34
16
|
- info@simplyexcited.co.uk
|
|
35
17
|
executables: []
|
|
36
|
-
|
|
37
18
|
extensions: []
|
|
38
|
-
|
|
39
19
|
extra_rdoc_files: []
|
|
40
|
-
|
|
41
|
-
files:
|
|
20
|
+
files:
|
|
42
21
|
- .gitignore
|
|
43
22
|
- MIT-LICENSE
|
|
44
23
|
- README.md
|
|
45
24
|
- lib/recipiez/capistrano.rb
|
|
46
25
|
- lib/recipiez/version.rb
|
|
47
26
|
- recipes/apache.rb
|
|
48
|
-
- recipes/campfire.rb
|
|
49
27
|
- recipes/chef.rb
|
|
50
28
|
- recipes/deployment_recipiez.rb
|
|
29
|
+
- recipes/filebeat.rb
|
|
51
30
|
- recipes/foreman.rb
|
|
52
31
|
- recipes/go.rb
|
|
53
32
|
- recipes/logrotate.rb
|
|
@@ -57,6 +36,7 @@ files:
|
|
|
57
36
|
- recipes/render.rb
|
|
58
37
|
- recipes/ssl.rb
|
|
59
38
|
- recipes/templates/apache_monit.erb
|
|
39
|
+
- recipes/templates/filebeat.erb
|
|
60
40
|
- recipes/templates/go_monit.erb
|
|
61
41
|
- recipes/templates/logrotate.erb
|
|
62
42
|
- recipes/templates/logrotate_ec2.erb
|
|
@@ -84,37 +64,29 @@ files:
|
|
|
84
64
|
- recipes/travis.rb
|
|
85
65
|
- recipiez.gemspec
|
|
86
66
|
- release_gem.sh
|
|
87
|
-
has_rdoc: true
|
|
88
67
|
homepage: http://github.com/pyrat/deployment_recipiez
|
|
89
|
-
licenses:
|
|
68
|
+
licenses:
|
|
90
69
|
- MIT
|
|
70
|
+
metadata: {}
|
|
91
71
|
post_install_message:
|
|
92
72
|
rdoc_options: []
|
|
93
|
-
|
|
94
|
-
require_paths:
|
|
73
|
+
require_paths:
|
|
95
74
|
- lib
|
|
96
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
|
-
requirements:
|
|
98
|
-
- -
|
|
99
|
-
- !ruby/object:Gem::Version
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- - ">="
|
|
106
|
-
- !ruby/object:Gem::Version
|
|
107
|
-
segments:
|
|
108
|
-
- 1
|
|
109
|
-
- 3
|
|
110
|
-
- 1
|
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
|
+
requirements:
|
|
77
|
+
- - '>='
|
|
78
|
+
- !ruby/object:Gem::Version
|
|
79
|
+
version: '0'
|
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
|
+
requirements:
|
|
82
|
+
- - '>='
|
|
83
|
+
- !ruby/object:Gem::Version
|
|
111
84
|
version: 1.3.1
|
|
112
85
|
requirements: []
|
|
113
|
-
|
|
114
86
|
rubyforge_project:
|
|
115
|
-
rubygems_version:
|
|
87
|
+
rubygems_version: 2.0.14
|
|
116
88
|
signing_key:
|
|
117
|
-
specification_version:
|
|
118
|
-
summary: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab,
|
|
89
|
+
specification_version: 4
|
|
90
|
+
summary: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab,
|
|
91
|
+
Monit, NodeJS, Nginx
|
|
119
92
|
test_files: []
|
|
120
|
-
|
data/recipes/campfire.rb
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
require 'tinder'
|
|
2
|
-
|
|
3
|
-
Capistrano::Configuration.instance(true).load do
|
|
4
|
-
|
|
5
|
-
namespace :campfire do
|
|
6
|
-
task :notify do
|
|
7
|
-
campfire = Tinder::Campfire.new campfire_subdomain, :token => campfire_token, :ssl_options => {:verify => false}
|
|
8
|
-
campfire_room = campfire.find_room_by_id(campfire_room_id)
|
|
9
|
-
announced_deployer = `git config user.name`
|
|
10
|
-
announced_stage = fetch(:stage, 'production')
|
|
11
|
-
announcement = "#{announced_deployer} has deployed #{application} to #{announced_stage}"
|
|
12
|
-
campfire_room.speak announcement
|
|
13
|
-
begin
|
|
14
|
-
command = %(git log --pretty=format:"* #{"[%h, %an] %s"}" #{previous_revision}..#{latest_revision})
|
|
15
|
-
puts command
|
|
16
|
-
rev_log = %x( git log --pretty=format:"* #{"[%h, %an] %s"}" #{previous_revision}..#{latest_revision} )
|
|
17
|
-
campfire_room.paste rev_log
|
|
18
|
-
rescue Faraday::Error::ParsingError
|
|
19
|
-
# FIXME deal with crazy color output instead of rescuing
|
|
20
|
-
# it's stuff like: ^[[0;33m and ^[[0m
|
|
21
|
-
campfire_room.speak "Error pasting log."
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
end
|
|
27
|
-
|