Charity Majors @mipsytipsy CTO @honeycombio, ex-Parse, Facebook, Linden Lab; cowrote Database Reliability Engineering; loves whiskey, rainbows. I test in production and so do you. 🌈🖤 Sep. 29, 2019 1 min read

Wow, lots of interest in my shitty cron deploys. Ok, here's how they work (or how I wired them up three years ago anyway):

CI/CD does its thing on each commit. As a last step, it uploads version stamped artifacts to S3.

Every service runs in an ASG named after the service that runs there. Every 30 min or so from cron, a shitty bash script runs that checks s3 for a newer artifact for its service name.

If it finds one, it sleeps random seconds and then fetches and installs it.

The script is smart enough to revert and start back up the old version if the new one can't start up for some reason.

You can also invoke a rolling restart by just using dsh to run the deploy script instead of waiting for cron.

Db migrations need to be run by a human. Deploy won't succeed if migrations out of date.

Service name gets interpolated from terraform config into everything to hostname, ec2 tags, chef role, asg config, deploy target, binary, log file name, you name it. Hella. Useful.

You can follow @mipsytipsy.


Tip: mention @threader_app on a Twitter thread with the keyword “compile” to get a link to it.

Enjoy Threader? Sign up.

Since you’re here...

... we’re asking visitors like you to make a contribution to support this independent project. In these uncertain times, access to information is vital. Threader gets 1,000,000+ visits a month and our iOS Twitter client was featured as an App of the Day by Apple. Your financial support will help two developers to keep working on this app. Everyone’s contribution, big or small, is so valuable. Support Threader by becoming premium or by donating on PayPal. Thank you.