Define your dev environment as code. For microservice apps on Kubernetes.
Kubernetes for Prod, Tilt for Dev
Modern apps are made of too many services. They're everywhere and in constant communication.
Tilt powers microservice development and makes sure they behave!
Run tilt up to work in a complete dev environment configured for your team.
Tilt automates all the steps from a code change to a new process: watching
files, building container images, and bringing your environment
up-to-date. Think docker build && kubectl apply or docker-compose up.
Installing the tilt binary is a one-step command.
curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.ps1'))
For specific package managers (Homebrew, Scoop, Conda, asdf), see the Installation Guide.
New to Tilt? Our tutorial will get you started.
Configuring a Service? We have best practice guides for HTML, NodeJS, Python, Go, Java, and C#.
Optimizing a Tiltfile? Search for the function you need in our complete API reference.
Questions: Join the Kubernetes slack and find us in the #tilt channel. Or file an issue. For code snippets of Tiltfile functionality shared by the Tilt community, check out Tilt Extensions.
Contribute: Check out our guidelines to contribute to Tilt's source code. To extend the capabilities of Tilt via new Tiltfile functionality, read more about Extensions.
Help us make Tilt even better: Tilt sends anonymized usage data, so we can improve Tilt on every platform. Details in "What does Tilt send?".
We expect everyone in our community (users, contributors, followers, and employees alike) to abide by our Code of Conduct.
The maintainers take security seriously. If you discover a security issue, please bring it to their attention right away!
Please DO NOT file a public issue, instead send your report privately to security@docker.com.
Security reports are greatly appreciated and we will publicly thank you for it. We also like to send gifts—if you're into Docker schwag, make sure to let us know. We currently do not offer a paid security bounty program, but are not ruling it out in the future.
Copyright 2022 Docker, Inc.
Licensed under the Apache License, Version 2.0
k8s_custom_deploy resources that share a docker_build image can re-apply an older image
https://github.com/tilt-dev/tilt/issues/6872
Labels: bug
So you want to make a change to tilt!
We welcome contributions, either as bug reports, feature requests, or pull requests.
We want everyone to feel at home in this repo and community! Please read our Code of Conduct for some rules that govern everyone's participation.
Most of this page describes how to get set up making & testing changes. See a YouTube walkthrough showing some of the steps below, for macOS.
Small PRs are better than large ones. If you have an idea for a major feature, please file an issue first.
To check out Tilt for the first time, run:
git clone https://github.com/tilt-dev/tilt.git
If you just want to build Tilt:
go.mod for supported version)To use the local Webpack server for UI (default for locally compiled versions of Tilt):
To install tilt on PATH, run:
make build-js
make install
Running the
build-jstask is currently optional but highly recommended. If available, the build will embed the frontend assets in thetiltbinary, which allows Tilt to work offline. Otherwise, assets will be served at runtime from a remote server.
This will install the new tilt binary in $GOPATH/bin - typically $HOME/go/bin.
You can verify this is the binary you just built with:
"$(go env GOPATH)/bin/tilt" version
The build date should match the current date.
Be aware that you might already have a tilt binary in your $PATH, so running tilt without specifying exactly which tilt binary you want might have you running the wrong binary.
To start using Tilt, run tilt up in any project with a Tiltfile -- i.e., NOT the root of the Tilt source code.
There are plenty of toy projects to play with in the integration directory
(see e.g. ./integration/oneup), or check out one of these sample repos to get started:
If you want to run the tests:
tilt build steps do work inside of containers
so that you don't need to install extra toolchains locally (e.g., the protobuf compiler).go get -u sigs.k8s.io/kustomizeTo run the fast test suite, run:
make shorttest
To run the slow test suite that interacts with Docker and builds real images, run:
make test
If you want to run an integration test suite that deploys servers to Kubernetes and verifies them, run:
make integration
Other development commands:
go install golang.org/x/tools/cmd/goimports@latest (to sort imports)
make goimports-local github.com/tilt-devThe Tilt APIServer is our new system for managing Tilt internals: https://github.com/tilt-dev/tilt-apiserver
To add a new first-party type, run:
scripts/api-new-type.sh MyResourceType
and follow the instructions.
Once you've added fields for your type, run:
scripts/update-codegen.sh
to regenerate client code for reading and writing the new type.
Tilt exposes the standard Go pprof hooks over HTTP.
To look at a 30-second CPU profile:
go tool pprof http://localhost:10350/debug/pprof/profile?seconds=30
To look at the heap profile:
go tool pprof http://localhost:10350/debug/pprof/heap
This opens a special REPL that lets you explore the data.
Type web in the REPL to see a CPU graph.
For more information on pprof, see https://github.com/google/pprof/blob/master/doc/README.md.
tilt up runs a web server hosting a React single page application on port 10350 (customizable with --port or TILT_PORT).
(--web-mode)There are several possibilities for how Tilt serves the web assets based on the build configuration.
By default, non-release builds of Tilt use a local Webpack dev server. When Tilt first starts, it will launch the Webpack dev server for you. If you immediately open the Tilt web UI, you might get an error