Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use worker number only.

Makes for nicer process names.
Also enabled df checks for collectd.
  • Loading branch information...
commit c5455cc9cb5de834f7767babdbdfb3fbccbb55cf 1 parent 70d4c0e
@roidrage roidrage authored
View
5 worker_host/travis_worker/attributes/default.rb
@@ -13,3 +13,8 @@
default[:travis][:worker][:hostname] = "#{node[:travis][:worker][:env]}.worker.travis-ci.com"
default[:travis][:worker][:log_level] = 'info'
default[:travis][:worker][:workers] = 1
+default[:papertrail][:watch_files] = {}
+
+1.upto(node[:travis][:worker][:workers]) do |num|
+ set[:papertrail][:watch_files]["/etc/sv/travis-worker-#{num}/log/main/current"] = 'travis-worker'
+end
View
4 worker_host/travis_worker/metadata.rb
@@ -1,6 +1,6 @@
maintainer "Travis CI"
maintainer_email "mathias@travis-ci.org"
license "Apache 2.0"
-description "Installs/Configures Travis Worker"
-version "0.4.0"
+description "Installs/Configures the Travis Worker"
+version "0.5.0"
depends "runit"
View
8 worker_host/travis_worker/recipes/bluebox.rb
@@ -16,7 +16,7 @@
app = "worker-#{worker}"
worker_name = "#{app}.#{node[:fqdn]}"
home = "#{node[:travis][:worker][:home]}/#{app}"
- service_name = "travis-worker-#{app}"
+ service_name = "travis-worker-#{worker}"
service service_name do
action :nothing
@@ -25,7 +25,7 @@
directory home do
action :create
recursive true
- owner "travis"
+ owner "travis"
group "travis"
mode "0755"
end
@@ -67,7 +67,7 @@
notifies :restart, resources(:service => service_name)
end
- runit_service "travis-worker-#{app}" do
+ runit_service "travis-worker-#{worker}" do
options :jruby => node[:jruby][:bin],
:worker_home => home,
:user => "travis",
@@ -75,7 +75,7 @@
template_name "travis-worker"
end
- template "/etc/monit/conf.d/travis-worker-#{app}.monitrc" do
+ template "/etc/monit/conf.d/travis-worker-#{worker}.monitrc" do
source "travis-worker.monitrc.erb"
owner "root"
group "root"
View
7 worker_host/travis_worker_collectd/recipes/bluebox.rb
@@ -0,0 +1,7 @@
+include_recipe "travis_worker_collectd"
+
+collectd_plugin "df" do
+ options :mount_point => "/",
+ :report_reserved => false,
+ :report_inodes => false
+end
View
1  worker_host/travis_worker_collectd/recipes/default.rb
@@ -9,3 +9,4 @@
collectd_plugin "interface" do
options :interface => "lo", :ignore_selected => true
end
+
Please sign in to comment.
Something went wrong with that request. Please try again.