zendesk / samson

Web interface for deployments, with plugin architecture and kubernetes support
Other
1.45k stars 234 forks source link

Ability to schedule deployments / jobs / tasks #2313

Open agilgur5 opened 7 years ago

agilgur5 commented 7 years ago

Was looking for a way to schedule a deployment of a stage, i.e. a way to say "deploy master to stage-x at 3 am each day".

Saw here https://github.com/zendesk/samson/pull/1522#issuecomment-265631900 that background jobs may be "too tedious" to support, but it seemed like this could be as easy as running a cron job at a specified interval to call the code to make a deployment of a revision on a stage. Monitoring it would just be through the regular monitoring for that stage then.

Correct me if I'm missing something because that was my understanding after reading docs and a bunch of PRs and issues.

grosser commented 7 years ago

Periodic deploys might be helpful see https://github.com/zendesk/samson/pull/2175

this will deploy selected stages once a day (you can chose the interval but not the start time)

/fyi @yizhang-zen

agilgur5 commented 6 years ago

As far as I can tell, the interval is also only chosen once globally . Customizing it per deploy would be much more useful. Right now I'm just running a CronJob to hit the deploy webhook as a workaround

grosser commented 6 years ago

using cron sounds like a decent solution ... keeping track of timers etc inside of samson sounds like a lot of work that won't be used by many users and I'd prefer to avoid :)

agilgur5 commented 6 years ago

I would think that the same timers that are used for Locks can be used here, no? Alternatively, if cron is already being used inside of Samson, this could just create / delete cron files

grosser commented 6 years ago

Yeah ... Could create deploys with scheduled at field ... Then make sure to never start them ... And have a timer check/start them every minute or so

On Nov 5, 2017 14:56, "Anton Gilgur" notifications@github.com wrote:

I would think that the same timers that are used for Locks can be used here, no?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/zendesk/samson/issues/2313#issuecomment-342012922, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAsZ0VzG62al-L_LBOJXUDahOUG_ebvks5szjz6gaJpZM4QFT6b .