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.
Threader is an independent project created by only two developers. The site gets 500,000+ visits a month and our iOS Twitter client was featured as an App of the Day by Apple. Running this space is expensive and time consuming. If you find Threader useful, please consider supporting us to make it a sustainable project.