DirectEmployers/MyJobs-urls — pull request #22 by tdphillips (2013-10-08 20:56:35+00:00)
Title: Use logrotate to push logs to S3 [MJ-611]

Assumption: .s3cfg will be managed by Jenkins, similar to the MyJobs secrets file.

Requirement: server must have s3cmd installed.

The shortest interval supported by logrotate is daily. This can be solved by creating a secondary logrotate.conf for the desired interval and then adding a cron job that uses that conf.

The Jenkins job will need to copy .s3cfg to its final destination (/etc/logrotate.d/.s3cfg here), as well as copying conf/etc/logrotate.hourly.conf to /etc and conf/etc/cron.hourly/logrotate to /etc/cron.hourly.

Running logrotate in debug mode (-d flag) makes it seem like this will do what is intended, but I'm not entirely sure about the configuration.

All tests still pass.