How do you deploy in 10 seconds? (paravoce.bearblog.dev)
from something_random_tho@lemmy.world to linux@lemmy.ml on 20 Oct 14:58
https://lemmy.world/post/21065993

cross-posted from: lemmy.world/post/21065836

Hi friends, as promised, I’m back with my second post. I’ll be hanging around in the comments for any questions!

In this post, I take a look at a typical deployment process, how long each part of it takes, and then I present a simple alternative that I use which is much faster and perfect for hobbit software.

#linux

threaded - newest

MajorHavoc@programming.dev on 20 Oct 15:16 next collapse

This is great stuff.

My comment from the peanut gallery today is just that there’s no law that CI/CD can’t be kept under control and run in ten seconds.

Given the choice between a slow out of control CI/CD mess, or a shell script, I too will take the shell script every time.

But I am living my best life today, and have a simple shell script in my CI/CD pipeline.

ravhall@discuss.online on 20 Oct 16:13 next collapse

Hah. I was just ranting about “modern” deployment pipelines and how ridiculous and complicated they were just to push some code.

I’m a big fan of scripts. Push the button, get the cheese.

sloppy_diffuser@sh.itjust.works on 20 Oct 16:58 collapse

For our lower environments we use rsync like the author but skip the pipeline altogether. The servers have a watch script to restart when files are rsynced. We then have a local watch script that rsyncs on file changes.

Relatively instant deploy (2-5s) whenever a file is saved.

Oth@lemmy.zip on 20 Oct 21:01 collapse

I frequently amaze new colleagues when I show them that deploying an update for our backend application is a sub-second affair. Our pipeline keeps track of what git tag was deployed last, diffs between that tag and the new release, and uploads the files to each of the deployment targets. It takes longer for the pipeline agent to spin up from Cold on a Monday morning, than it does to actually deploy.

The core of the application is just php scripts, and those are either immediately up to date whenever the next call is, or swapped out the next time that component finishes a processing cycle.

Docker containers are nice, but nothing beats the cause of a stack trace being fixed, tested and deployed to the acceptance environment within minutes of it arriving.

mactan@lemmy.ml on 21 Oct 10:06 next collapse

I miss the bygone era of right click > publish

interurbain1er@sh.itjust.works on 21 Oct 12:17 collapse

I mean for a hobby project that no one cares about sure. Otherwise the whole CI/CD process was invented exactly to avoid having devs push untested and untrackable crap on production servers. So once there are more than two people in a team and paying customers with access to a lawyer that’s going to be a hard pass.

Anyway the main reason your CI/CD are slow is that you’re using $5 workers with 1Gb ram. There’s a reason the build is faster on your 12 core/64Gb laptop, the issue is usually not the process, the issue is being cheap on the infrastructure. The only good thing about GitHub CI workers is that they are cheap but performance wise they are garbage.