Skip to content

Commit

Permalink
Merge branch 'singularity-client-s3logs' into hs_staging
Browse files Browse the repository at this point in the history
  • Loading branch information
tpetr committed Apr 7, 2015
2 parents a2d5803 + 720bfd9 commit 2cf3f35
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cookbook/attributes/logrotate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
default[:singularity][:log_file] = '/var/log/singularity/singularity.log'
default[:singularity][:logs_to_keep] = 14
default[:singularity][:log_rotate_frequency] = 'daily'
1 change: 1 addition & 0 deletions cookbook/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
depends 'database'
depends 'hostsfile'
depends 'java'
depends 'logrotate'
1 change: 1 addition & 0 deletions cookbook/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
include_recipe "singularity::mesos_slave"
include_recipe "singularity::mysql"
include_recipe "singularity::java"
include_recipe 'singularity::logrotate'
15 changes: 15 additions & 0 deletions cookbook/recipes/logrotate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
logrotate_app 'singularity' do
path node[:singularity][:log_file]
if node[:singularity][:size]
size node[:singularity][:size]
else
frequency node[:singularity][:frequency]
end
rotate node[:singularity][:logs_to_keep]
create '644 root root'
template_mode '0644'
options %w(copytruncate
missingok
compress
delaycompress)
end

0 comments on commit 2cf3f35

Please sign in to comment.