TTORK: Tilt Orchestration Tool for Micro-service Development Andy Waller, June 20, 2024June 20, 2024 Textual Tilt ORKestrator, or ttork for short, is a rich terminal application for managing multiple instances of the wonderful Tilt (tilt.dev) micro-service development tool across multiple micro-repositories. Why Create the Textual Tilt ORKestration Tool? Those that know me, know that I’m a huge fan of the microservice development tool, Tilt (tilt.dev)! It’s an amazing toolkit for alleviating the pains of microservice development and testing, allowing for a consistent development experience across a myriad of projects and technologies within an organization. Tilt solves a lot of interesting problems. Just to name a few: Generalized tooling interface for bring-up of microservice development environments Simplification of developer onboarding Live updating of running local development services as the source code is modified by the developer Running unit testing automatically during the inner-development loop, as code is written. Development configuration as code, written in Starlark, allowing for more complex logic within the configuration. Tilt works amazingly well when your microservices all live in a mono-repository: you can simply write a top-level Tiltfile at the base of your repository, and it will manage the bring-up of all relevant services and processes for development. But what do you do when your organization follows a micro-repository philosophy, with hundreds of separate project repositories? This is the “Many Tiltfiles and Many Repositories” problem. There are a few strategies you could use for leveraging Tilt in this environment: Have a Tilt-specific repository which holds your Tilt configuration files for all projects. One main Tiltfile that sub-includes a subdirectory Tiltfile for each service. These are great when you have a few repositories, but when you have dozens of repositories, each with their own technologies and development requirements, it can be tough to maintain. Also, centralizing those configurations into a central repository will most likely mean that many developers are trying to check in changes to the same repository (and files), possibly causing a situation where they’re constantly resolving merge-conflicts and waiting on code reviews to get their config changes in! This is where the TTORK project bridges the gap! With just a simple yaml file listing your projects that you care about, and the absolute path to their individual project Tiltfiles, ttork will manage the bring-up of a Tilt instance for each of the projects, providing a single interface showing the status of each resource, and giving the developer the ability to easily inspect resources in their local Kubernetes environment. Here’s a quick little demo clip showing ttork in action: This has the following advantages: Tiltfiles are maintained on a per-repository basis, and can be stand-alone, or brought up as part of a larger group of services. This simplifies configuration management for each of the repositories. Configurations are kept at the project-specific repository level where they belong, making it simple for developers to see how bring-up of that repositories development environment works. The individual developer has control over which projects they want to bring up while they’re doing development, and where they want those deployments going, through the simple ttork.yaml configuration. The Tilt WebUI for each project is accessible from ttork by simply selecting the project in the tree on the left-hand side of the UI, and pressing the space-bar! Instead of having to play 20-questions using kubectl to find pod-id’s and inspect deployment specifications inside of Kubernetes, the ttork UI shows the running deployments in real time, and allows the developer to inspect each of those and their constituent resources within the cluster. This part of ttork was inspired by the wonderful Kubernetes management tool, K9s. ttork is NOT meant to be a k8s management tool, but instead, a super-simple interface for inspecting the k8s resources that are relevant to the developer while doing micro-service development. Using ttork, the developer can even rapidly shell into a running development services container to inspect the filesystem and running processes! Just select the container, and press ‘s’ to open up a shell! Best of All: ttork is a fully open-source project! The ttork tool will always be available as a free and open-source project! Feel free to come on over to our public Github Repository and suggest improvements, or even contribute code! Installation instructions can be found there as well 🙂 Python Tools