A microservice app that demonstrates the power of tilt
Branch: master
Clone or download
jazzdan Remove references to composite_service (#73)
I realized during TGIK8s that the composite_service verbiage doesn't
really make sense since we've gotten rid of it.
Latest commit 0ae6ec1 Feb 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci initial checkin of servantes Aug 28, 2018
deploy Add img_repo function to make it easier to change repositories (#72) Feb 5, 2019
doggos make demo noisier (#68) Feb 1, 2019
emoji Update Tiltfile to be more idiomatic (#60) Dec 10, 2018
fe Describe how to play with Servantes with Tilt (#69) Feb 1, 2019
fortune Update Tiltfile to be more idiomatic (#60) Dec 10, 2018
hypothesizer Update Tiltfile to be more idiomatic (#60) Dec 10, 2018
images readme: add quickstart directions and screenshot (#38) Oct 1, 2018
secrets Update Tiltfile to be more idiomatic (#60) Dec 10, 2018
sleep Add img_repo function to make it easier to change repositories (#72) Feb 5, 2019
snack Describe how to play with Servantes with Tilt (#69) Feb 1, 2019
spoonerisms Fix spoonerisms Dockerfile (#63) Jan 8, 2019
vigoda make demo noisier (#68) Feb 1, 2019
words Update Tiltfile to be more idiomatic (#60) Dec 10, 2018
.dockerignore upgrade all deployments to v1 (#39) Oct 8, 2018
.gitignore git: add goland tempfiles to gitignore so maia and matt can develop i… Oct 17, 2018
.python-version hypothesizer: add a hypothetical question generator (#14) Sep 6, 2018
Dockerfile.go.base hypothesizer: add a hypothetical question generator (#14) Sep 6, 2018
Dockerfile.js.base node.js spoonerism service (#15) Sep 7, 2018
Dockerfile.py.base hypothesizer: add a hypothetical question generator (#14) Sep 6, 2018
LICENSE Initial commit Aug 27, 2018
Makefile serantes: organize into subpackages Aug 28, 2018
README.md readme update (#70) Feb 4, 2019
Tiltfile Remove references to composite_service (#73) Feb 7, 2019
Tiltfile.dc fastbuild for docker compose (#71) Feb 4, 2019
docker-compose.yml fastbuild for docker compose (#71) Feb 4, 2019
skaffold.yaml skaffold handles multiple services (#58) Dec 4, 2018

README.md

servantes

A microservice app that demonstrates the power of Tilt.

(Like Miguel de Cervantes, but with servers!)

Quick start

  1. Install tilt
  2. git clone git@github.com:windmilleng/servantes.git
  3. cd servantes
  4. tilt up

This will deploy several microservice apps in to the default namespace of your current kubernetes cluster. Use the arrow keys to navigate between services in the Tilt HUD. Hit 'b' to open a service in the (B)rowser; the service fe is the frontend, and the most interesting to look at.

Screenshot

Screenshot of Servantes

Demo Workflows

If you're exploring Tilt via Servantes, here are some things you can do to Servantes to see features of Tilt.

Update Your App

The Snack service is easy to edit. Open the file snack/main.go and find the constant strings that are the options for snacks it will recommend. Comment all them out and write "Hello Tilt". Save, and watch Tilt build and update. Then reload Servantes in your web browse and see the new string.

Pinpoint Problems

Tilt's UX is built to highlight active problems, no matter where they're happening. Here are some ways you can break Servantes and see errors in Tilt.

Build Breakage

In snack/main.go, type in random characters and save. Tilt will start a build, and when it fails put the error in the HUD.

Fix the error and move on.

Startup Error

Kubernetes Pods can get into CrashLoopBackOff when they can't startup, e.g. because they can't find a necessary resource file.

Interactive Onboarding

Tilt's onboarding is nifty because you can do it interactively, as described in our Tutorial. Instead of writing your config first then running Tilt, Tilt watches your config and updates itself as you configure it.

You can recreate this experience by resetting to a pre-Tilt state and then adding it back in:

  1. Stop tilt
  2. Run tilt down to delete what Tilt has created
  3. Open Tiltfile in your editor and delete/comment out the entire contents.
  4. Run tilt up with an empty Tiltfile
  5. Add lines back (you'll want to add it back in the order in the original Tiltfile).

You can see Tilt spring to life as it gets more data.

fast_build

Tilt can update Kubernetes in seconds, not minutes by using fast_build. Because Servantes is a demo app, most services are small enough that they don't need optimizations. We purposely built our frontend to have a slow build (it links in the Kubernetes client library which can take minutes to build). Servantes uses fast_build for the frontend to demo Tilt's speed at updating running services.

In fe/main.go, change the constant maxWidgets to display fewer widgets. Tilt will update fe in-place in seconds. Then reload Servantes and you should see your chosen number of services.