This is the Faces demo application. It has a single-page web GUI that presents a grid of cells, each of which should show a grinning face on a light blue background. Spoiler alert: installed exactly as committed to this repo, that isn't what you'll get -- many, many things can go wrong, and will. The point of the demo is let you try to fix things.
In here you will find:
-
DEMO.md, a Markdown file containing the resilience demo presented live at a couple of events. This uses Emissary-ingress and the latest edge release of Linkerd. -
DEMO-BEL.md, a Markdown file for the same resilience demo, but using Buoyant Enterprise for Linkerd.
The easiest way to use either demo is to run it with demosh. Both demos
assume that you have an empty k3d cluster to play with! If you don't have one,
you can create one with bash create-cluster.sh (this will delete any
existing k3d cluster named "faces").
Note: most of the demo doesn't actually care what kind of cluster you use.
The sole dependency is that, as written, the demo assumes that it will be able
to reach the emissary-ingress service in the emissary namespace on
localhost port 80. If you're using something other than k3d, you'll need to
tweak the demo to talk to the correct URL.
-
Make sure
$KUBECONFIGis set correctly. -
If you need to, run
bash create-cluster.shto create a newk3dcluster to use.- Note:
create-cluster.shwill delete any existingk3dcluster named "faces".
- Note:
-
To run the demo as we've given it before, check out DEMO.md. The easiest way to use that is to run it with demosh.
The Faces architecture is fairly simple:
-
The
faces-guiworkload, reached on the/faces/path, just returns the HTML and Javascript for the GUI. The GUI is a single-page webapp that displays a grid of cells: for each cell, the GUI calls thefaceworkload. -
The
faceworkload, reached on the/face/path, calls thesmileyworkload to get a smiley face and thecolorworkload to get a color. It then composes the responses together and returns the smiley/color combination to the GUI for display.faceuses HTTP to talk tosmileyand gRPC to talk tocolor. -
The
smileyworkload returns a smiley face. By default, this is a grinning smiley, U+1F603, but you can set theSMILEYenvironment variable to any key in theSmileysmap fromconstants.goto get a different smiley. -
The
colorworkload returns a color. By default, this is a light blue, but you can set theCOLORenvironment variable to any key in theColorsmap fromconstants.goto get a different color, or to any arbitrary hex color code (e.g.#ff0000for bright red).The named colors in the
Colorsmap are meant to work for normal color vision as well as for various kinds of colorblindness, and use a palette designed by Paul Tol in his Introduction to Colour Schemes -- specifically, the Bright color scheme for qualitative data. The comments inpkg/faces/constants.gohave more information, but Paul Tol's work is definitely required reading if you have any interest in the topic. Feedback here is especially welcome, since the Faces authors have normal color vision...
