|
1 | 1 | # |
2 | | -# Cookbook Name:: es-with-fluentd |
| 2 | +# Cookbook Name:: elasticsearch-aio |
3 | 3 | # Recipe:: default |
4 | 4 | # |
5 | 5 | # Copyright 2013, Kazuto Kusama @jacopen |
6 | 6 | # |
7 | 7 |
|
8 | | -include_recipe "apt" |
9 | | -include_recipe "td-agent" |
10 | | -include_recipe "nginx" |
11 | | - |
12 | | -config = node[:es_with_fluentd] |
13 | | - |
14 | | -%w(openjdk-7-jdk git curl unzip).each do |pkg| |
15 | | - package pkg |
16 | | -end |
17 | | - |
18 | | -remote_file "/tmp/#{config[:es_deb_filename]}" do |
19 | | - source config[:es_base_url] + config[:es_deb_filename] |
20 | | - action :create_if_missing |
21 | | -end |
22 | | - |
23 | | -dpkg_package "/tmp/#{config[:es_deb_filename]}" do |
24 | | - action :install |
25 | | -end |
26 | | - |
27 | | -remote_file "/tmp/kibana-latest.zip" do |
28 | | - source config[:kibana][:zip] |
29 | | -end |
30 | | - |
31 | | -bash "extract kibana" do |
32 | | - code "unzip -o /tmp/kibana-latest.zip -d /var/www" |
33 | | -end |
34 | | - |
35 | | -git "/var/www/eh" do |
36 | | - repository config[:elasticsearch_head][:git] |
37 | | - action :sync |
38 | | - notifies :restart, "service[nginx]" |
39 | | -end |
40 | | - |
41 | | -template "/etc/elasticsearch/elasticsearch.yml" do |
42 | | - notifies :restart, "service[elasticsearch]" |
43 | | -end |
44 | | - |
45 | | -template "/etc/td-agent/td-agent.conf" do |
46 | | - notifies :restart, "service[td-agent]" |
47 | | -end |
48 | | - |
49 | | -template "/etc/nginx/sites-available/kibana" do |
50 | | - notifies :restart, "service[nginx]" |
51 | | -end |
52 | | - |
53 | | -link File.join("/etc/nginx/sites-available/kibana") do |
54 | | - to File.join("/etc/nginx/sites-enabled/kibana") |
55 | | -end |
56 | | - |
57 | | -file "/var/log/fluentd-kibana" do |
58 | | - action :touch |
59 | | - owner "td-agent" |
60 | | - group "td-agent" |
61 | | -end |
62 | | - |
63 | | -file "/var/log/syslog" do |
64 | | - action :touch |
65 | | - mode "0644" |
66 | | -end |
67 | | - |
68 | | -service "elasticsearch" do |
69 | | - supports [:restart] |
70 | | - action :enable |
71 | | -end |
72 | | - |
73 | | -service "nginx" do |
74 | | - supports [:restart, :reload] |
75 | | - action :enable |
76 | | -end |
77 | | - |
78 | | -service "td-agent" do |
79 | | - supports [:restart, :reload] |
80 | | - action :enable |
81 | | -end |
| 8 | +include_recipe "elasticsearch-aio::td-agent" |
| 9 | +include_recipe "elasticsearch-aio::elasticsearch" |
0 commit comments