Skip to content

Commit 1f83a75

Browse files
Oudmaijer, S - SPLXLOudmaijer, S - SPLXL
authored andcommitted
fixes and fine tuning for redhat
1 parent 86bd7c5 commit 1f83a75

8 files changed

Lines changed: 30 additions & 6 deletions

File tree

attributes/default.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
# java
22
override[:java][:install_flavor] = "openjdk"
33
override[:java][:jdk_version] = "7"
4-
override[:java][:openjdk_packages] = ["openjdk-7-jdk", "openjdk-7-jre-headless"]
4+
5+
if platform?("ubuntu", "debian")
6+
override[:java][:openjdk_packages] = ["openjdk-7-jdk", "openjdk-7-jre-headless"]
7+
end
8+
9+
if platform?("redhat", "centos")
10+
override[:java][:openjdk_packages] = ["java-1.7.0-openjdk", "java-1.7.0-openjdk-devel"]
11+
end

attributes/nginx.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
override[:nginx][:default_site_enabled] = false
2-
default[:graylog2][:nginx_port] = 80
2+
default[:graylog2][:nginx_port] = 80
3+
default[:graylog2][:nginx_location] = "/"

attributes/web-interface.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
default[:graylog2][:web_user] = 'graylog2-web'
33
default[:graylog2][:web_service_name] = 'graylog2-web-interface'
44
default[:graylog2][:web_group] = 'graylog2'
5-
default[:graylog2][:web_url] = 'http://localhost:9000'
5+
default[:graylog2][:web_url] = 'http://localhost:9000/'
6+
default[:graylog2][:web_context] = "/" # only root currently supported, see: https://github.com/Graylog2/graylog2-web-interface/issues/588
67
default[:graylog2][:web_mem] = 256
78
default[:graylog2][:web_tz] = 'Europe/Amsterdam'
89
default[:graylog2][:web_package] = 'https://github.com/Graylog2/graylog2-web-interface/releases/download/0.20.0-rc.1-1/graylog2-web-interface-0.20.0-rc.1-1.tgz'

metadata.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
recipe "graylog2::web-interace", "Installs and configures a graylog2 web interface"
1212
recipe "graylog2::nginx", "Installs and configures nginx as reverse proxy for the web interface"
1313

14-
%w{ ubuntu debian }.each do |os|
14+
%w{ ubuntu debian redhat centos }.each do |os|
1515
supports os
1616
end
1717

1818
depends "ark", "= 0.4.0"
1919
depends "java", "= 1.14.0"
2020
depends "elasticsearch", "= 0.3.7"
21-
depends "mongodb", "= 0.14.3"
21+
depends "mongodb", "= 0.14.6"
2222
depends "nginx", "= 2.2.0"

recipes/web-interface.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@
3232
owner node[:graylog2][:web_user]
3333
group node[:graylog2][:web_group]
3434
mode 00644
35+
notifies :restart, "service[graylog2-web-interface]", :delayed
36+
end
37+
38+
template File.join(node[:graylog2][:web_home], "conf/application.conf") do
39+
source "application.conf.erb"
40+
owner node[:graylog2][:web_user]
41+
group node[:graylog2][:web_group]
42+
mode 00644
43+
notifies :restart, "service[graylog2-web-interface]", :delayed
3544
end
3645

3746
template "/etc/init.d/graylog2-web-interface" do
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Global config that is packaged in classpath. You can overwrite everything here in your graylog2-web-interface.conf
2+
3+
# Do not change this setting, doing so will prevent the web interface from starting :)
4+
application.global=lib.Global

templates/default/graylog2-web-interface.conf.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ application.secret="<%= node[:graylog2][:server_password_secret] %>"
1515
# Graylog2 stores all timestamps in UTC. To properly display times, set the default timezone of the interface.
1616
# If you leave this out, Graylog2 will pick your system default as the timezone. Usually you will want to configure it explicitly.
1717
timezone="<%= node[:graylog2][:web_tz] %>"
18+
19+
application.context="<%= node[:graylog2][:web_context] %>"

templates/default/nginx.conf.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
server {
22
listen <%= node[:graylog2][:nginx_port] %>;
33

4-
location / {
4+
location <%= node[:graylog2][:nginx_location] %> {
55

66
proxy_pass <%= node[:graylog2][:web_url] %>;
77
proxy_set_header Host $host;

0 commit comments

Comments
 (0)