Skip to content

Commit

Permalink
fixes and fine tuning for redhat
Browse files Browse the repository at this point in the history
  • Loading branch information
Oudmaijer, S - SPLXL authored and Oudmaijer, S - SPLXL committed Feb 2, 2014
1 parent 86bd7c5 commit 1f83a75
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 6 deletions.
9 changes: 8 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# java
override[:java][:install_flavor] = "openjdk"
override[:java][:jdk_version] = "7"
override[:java][:openjdk_packages] = ["openjdk-7-jdk", "openjdk-7-jre-headless"]

if platform?("ubuntu", "debian")
override[:java][:openjdk_packages] = ["openjdk-7-jdk", "openjdk-7-jre-headless"]
end

if platform?("redhat", "centos")
override[:java][:openjdk_packages] = ["java-1.7.0-openjdk", "java-1.7.0-openjdk-devel"]
end
3 changes: 2 additions & 1 deletion attributes/nginx.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
override[:nginx][:default_site_enabled] = false
default[:graylog2][:nginx_port] = 80
default[:graylog2][:nginx_port] = 80
default[:graylog2][:nginx_location] = "/"
3 changes: 2 additions & 1 deletion attributes/web-interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
default[:graylog2][:web_user] = 'graylog2-web'
default[:graylog2][:web_service_name] = 'graylog2-web-interface'
default[:graylog2][:web_group] = 'graylog2'
default[:graylog2][:web_url] = 'http://localhost:9000'
default[:graylog2][:web_url] = 'http://localhost:9000/'
default[:graylog2][:web_context] = "/" # only root currently supported, see: https://github.com/Graylog2/graylog2-web-interface/issues/588
default[:graylog2][:web_mem] = 256
default[:graylog2][:web_tz] = 'Europe/Amsterdam'
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'
4 changes: 2 additions & 2 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
recipe "graylog2::web-interace", "Installs and configures a graylog2 web interface"
recipe "graylog2::nginx", "Installs and configures nginx as reverse proxy for the web interface"

%w{ ubuntu debian }.each do |os|
%w{ ubuntu debian redhat centos }.each do |os|
supports os
end

depends "ark", "= 0.4.0"
depends "java", "= 1.14.0"
depends "elasticsearch", "= 0.3.7"
depends "mongodb", "= 0.14.3"
depends "mongodb", "= 0.14.6"
depends "nginx", "= 2.2.0"
9 changes: 9 additions & 0 deletions recipes/web-interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
owner node[:graylog2][:web_user]
group node[:graylog2][:web_group]
mode 00644
notifies :restart, "service[graylog2-web-interface]", :delayed
end

template File.join(node[:graylog2][:web_home], "conf/application.conf") do
source "application.conf.erb"
owner node[:graylog2][:web_user]
group node[:graylog2][:web_group]
mode 00644
notifies :restart, "service[graylog2-web-interface]", :delayed
end

template "/etc/init.d/graylog2-web-interface" do
Expand Down
4 changes: 4 additions & 0 deletions templates/default/application.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Global config that is packaged in classpath. You can overwrite everything here in your graylog2-web-interface.conf

# Do not change this setting, doing so will prevent the web interface from starting :)
application.global=lib.Global
2 changes: 2 additions & 0 deletions templates/default/graylog2-web-interface.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ application.secret="<%= node[:graylog2][:server_password_secret] %>"
# Graylog2 stores all timestamps in UTC. To properly display times, set the default timezone of the interface.
# If you leave this out, Graylog2 will pick your system default as the timezone. Usually you will want to configure it explicitly.
timezone="<%= node[:graylog2][:web_tz] %>"

application.context="<%= node[:graylog2][:web_context] %>"
2 changes: 1 addition & 1 deletion templates/default/nginx.conf.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server {
listen <%= node[:graylog2][:nginx_port] %>;

location / {
location <%= node[:graylog2][:nginx_location] %> {

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

0 comments on commit 1f83a75

Please sign in to comment.