News for hackers. Stuff that matters.
Re:Air – Live reload when developing with Go by rckrd on Saturday July 31, 2021 @10:08PM (#28023151)
I built something like this in Go a few years ago but it reloads your infrastructure when it changes, recompiles your code when it needs to, and syncs static files or interpreted files to wherever your app is running (desktop or cloud). Think of it like docker-compose but with file watching + sync + smart rebuilds. https://skaffold.dev/
Re:Air – Live reload when developing with Go by nklmilojevic on Sunday August 01, 2021 @07:00AM (#28025398)
One of my most used tools. Absolute joy to work with it and its Helm integration.
Re:Air – Live reload when developing with Go by __float on Saturday July 31, 2021 @11:07PM (#28023485)
Is there a skaffold for borg that inspired this? Curious if there are any existing things you were inspired by, or particular pitfalls in alternatives you wanted to avoid!
Re:Air – Live reload when developing with Go by rckrd on Saturday July 31, 2021 @11:15PM (#28023518)
No but I heavily drew from three tools:

(1) minikube, which I also maintained at Google. I saw how difficult getting started with Kubernetes could be even when you were able to create a local cluster. I also knew all the shortcuts that you could take to streamline local Kubernetes workflows (e.g., loading images directly into the minikube docker daemon).

(2) docker compose, which remains a great tool but had no analogue for Kubernetes. It also didn't have a concept of syncing for hot-reloadable projects or built-in file watcher.

(1), Draft by the Deis folks at Microsoft, which was a great tool but suffered from having a component that you needed to install on the cluster to work, where the skaffold architecture was purely client side (making it a lot easier to get started, and faster). I also wanted to make skaffold pluggable, so it supported helm, kubectl, docker, bazel, and other tools right from the start. It also had clear boundaries between build and deploy and ideas for CI and gitops workflows built in.

Re:Air – Live reload when developing with Go by cpgeier on Sunday August 01, 2021 @11:55AM (#28027186)
Skaffold makes bringing up and down a complex stack on Kubernetes a breeze. Thank you for an awesome tool!
Re:Air – Live reload when developing with Go by gavinray on Saturday July 31, 2021 @10:27PM (#28023283)
You're the author of Skaffold? Damn that's impressive
Re:Air – Live reload when developing with Go by rejectedandsad on Sunday August 01, 2021 @04:52AM (#28024864)
How does it handle watch mode for compiled or built code?
Re:Air – Live reload when developing with Go by rckrd on Sunday August 01, 2021 @08:53AM (#28025929)
It parses a Dockerfile (or queries dependencies in a tool like bazel) to get a list of file dependencies and then kicks off an optimized rebuild and redeploy. If you're using buildkit and caches this can be done really quickly (close to native compile without a Docker image)

You can tell it to just sync certain changes (e.g. syncing a javascript file to a container running webpack).