Tilt: dev environment as code

  • Interesting to see this pop up here! I’ve been using Tilt for multiple years now but the pace of development seems to have slowed down after the Docker acquisition.

    I love how Tilt enables creating a local development environment that lets my services run the same in production , test and development. Greatly simplifies my service code and improved my quality.

    In particular, I’d love to see Tilt be better around handling things like CRDs (there’s no way to mark a k8s_yaml as depending on a CRD being available, a frequent source of broken tilt up invocations).

    Having said that, the first thing I do, when working on any new project, is to get “tilt up” working.

    Things I’ve used for testing include: eBPF-based collectors for security and observability, data pipelines, helm chart development, and Kubernetes controllers. It’s very flexible and powerful for a wide range of development.

  • The pitch is kinda funny to me:

    > Modern apps are made of too many services. They're everywhere and in constant communication.

    So we made tooling to make it easier for you to make more of them!

  • You're always trading off speed with fidelity. Usually, trying to maintain a local integration environment is going to become too slow and expensive. The problem isn't even necessarily Kubernetes, but as dependencies increase it just gets slower and slower to try and run a copy of the world locally.

    I like a fast svelte dev environment with something like docker-compose which might require some mocked out dependencies to keep things fast and then using Kubernetes for other environments once I have local tests passing.

  • I still think "dev environments" really ought to be running tests directly with your languages native tool. e.g. `cargo test`, `bundle exec rspec`, etc. If you make me run a VM that runs Kubernetes that runs a docker container that runs the tests, I will be very, very upset. Doing this properly and reliably can still be a lot of work, possibly more work if not relying on Docker is a design goal (which must be if you want to run natively on macOS).

    There seem to be a lot of tools in this space. I wish they wouldn't call themselves tools for "dev environments" when they are really more like tools for "deploying an app to your local machine", which is rather different.

  • Can't not mention nix-shell: https://nix.dev/manual/nix/2.18/command-ref/nix-shell

  • If you want to see Tilt in action, our Chroma open-source repo uses it to run the distributed version of the database for development and ci. It's pretty cool - just clone then run `tilt up` and it's working:

    https://github.com/chroma-core/chroma

  • I don’t think my problem has ever been with setting up a local environment.

    Single cluster deployments are very easy.

    My problem is that these services we manage in production are deployed across multiple regions (or k8s clusters).

    Debugging _distributed_ applications is the issue.

  • How does Tilt compare to “skaffold dev“? We use skaffold exactly for that purpose. To develop within a the cluster.

  • Isn't this essentially dev containers?

  • I briefly tried Tilt awhile back. Tilt, Garden, maybe a couple others, settled on DevSpace. IIRC, it aligned best with my existing prod infrastructure without having to rewrite everything a different way.

    i.e., it worked with my existing kustomize+k8s setup. It adds portforwarding, and fast file sync into the running containers, which is all I really want. Rebuilding an image every time you make a change sucks.

  • I'm showing my age here, but I legitimately think this classic 2004 progressive anthem from Tilt (Andy Moor project) would have been bang-on perfect for the demo video compared to... whatever stock music that was: https://www.youtube.com/watch?v=0Cm-nrm8H78

  • i don't get the value of a tool like this.

    Do we really struggle bringing up services as containers and applying kube configs?

    For my development of services that run in kube, I don't dev with kube, you shouldn't have to. I also use docker-compose for most dev env services.

    Perhaps i'm not developing the right kind of software. Whoever finds this type of tool useful, when would you use it?

  • I hadn't heard of Tilt until this year. I inherited an environment with it integrated. It's a great reliable tool

  • Backdays we used to have

      # vim: ts=2 sw=2 et
    
    
    And a shebang line

  • Been using tilt as a make alternative for years. Great tooling, even as just file watch + pythonic syntax for running tests, etc.

    Obvs the real magic is the live syncing patches into remote containers though

  • Love tilt, have found it much more difficult to set up in a docker-compose environment than a cloud native / minikube context

  • I did a blog post for Linkerd showing some of the benefits of using Tilt https://linkerd.io/2024/12/02/tilt-linkerd-nginx-part-1/.

    TL;DR you can run some of your infra in local-dev that provide parity with your production environment.

  • Why do not use well organized Makefile instead of invent new junk. Is it a product placement?