Hacker News new | ask | show | jobs
by twic 4443 days ago
Thanks for your responses. This all sounds really sensible.

Concerning rcron, you don't actually need explicit support for it, as it's just part of the scheduled command. However, some integration could make it obscenely pleasant to use. Probably, i would need to manually set up rcron on a group of servers, then configure some sort of 'virtual server' in the hub which contains the servers in the group. When i schedule a job on the virtual server, it is added to the crontabs on all the real servers, but guarded with rcron, so it only executes on one. The reporting would then deal with the fact that only the master in the group actually runs the job: if the rcron wraps the minicron, then it would deal with the fact that only one server sent a report; if the minicron wraps the rcron, it would just hide the empty reports from the non-master servers.

We currently manage most of our cron jobs through Puppet. If we adopted minicron, we'd want to keep doing that. That means we would write a Puppet defined type which adds a job in the hub. It would be really useful if there was an API, or ideally a command-line tool, to do that. It would be nice if there was then an easy way to distinguish Puppet-managed and interactively defined jobs in the hub, so that people didn't attempt to fiddle with the Puppetted ones. Maybe a flag that makes them read-only in the UI, but allows them to be managed in the API? That's probably something we would address in a fork if we did adopt minicron.

Some kind of auditing for changes to job definitions would be useful. We currently use Jenkins for ad-hoc scheduled jobs, and our very weak audit trail for it is a recurrent pain point. Would it make any sense to keep job definitions in a Git repository? Might be quite a pain to provide an interactive UI on top of that, though.

1 comments

Thanks for the info on rcron, it sounds like a really useful tool. I think I prefer the approach of rcron wrapping minicron so it doesn't require added complexity to minicron. I've added an issue here for potentially doing this https://github.com/jamesrwhite/minicron/issues/66 if you want to follow along with the progress.

The fronted is actually all API based, in theory I don't see any reason why external apps couldn't use the API. I'll try and add some documentation for it. I quite like the idea of puppet/chef/whatever defined jobs. When I add permission support to the hub/api you could set up a user for puppet which would have its own API credentials so the API would be able to show who the job was created by. On of the features of the permissions system will most likely be that users can only edit jobs they created unless they are an admin or some kind of user with extra privileges. I think this feature would be useful for a lot of people so hopefully it can be added without forking the project!

Logging activity and some kind of revision control is definitely something I've thought about and plan to add in the future. I remember seeing a ruby gem a little while back that could basically track changes to arbitrary ActiveRecord models, that might be useful here. I've added two tickets for this to remind me! https://github.com/jamesrwhite/minicron/issues/67 + https://github.com/jamesrwhite/minicron/issues/68