buoyantio / emojivoto Goto Github PK
View Code? Open in Web Editor NEWExample application to help demonstrate the Linkerd service mesh
License: Apache License 2.0
Example application to help demonstrate the Linkerd service mesh
License: Apache License 2.0
Make the following changes to make things clearer to people using the emojivoto
demo application:
Similar to linkerd/linkerd2#3847, the Kubernetes docs recommend a common set of labels for resources:
https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels
Add the following 3 labels to all emojivoto workloads:
app.kubernetes.io/name: web # or voting, etc
app.kubernetes.io/part-of: Emojivoto
app.kubernetes.io/version: v9
The test environment introduced in #41, intended to exercising route, telemetry, and
service discovery lifecycles in Conduit, includes the following:
We should extend this environment to exercise additional dimensions, namely:
The Prometheus Benchmark
Grafana dashboard introduced in linkerd/linkerd2#984 should provide better performance analysis of Prometheus in Conduit.
Relates to #42.
Not sure where we need to be placing this in the React project, maybe through import?...
=====
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-60040560-4"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-60040560-4'); </script>make build
fails when run with recent versions of protocol. We should update the build tooling to work on recent dependencies.
With the --single-namespace
flag being added in linkerd/linkerd2#1721, emojivoto is no longer a viable demo for that configuration. This is due to a naming collision between Linkerd's web
deployment and emojivoto's web
deployment.
Output from --single-namespace
installation:
$ bin/go-run cli install --single-namespace -l emojivoto|kubectl apply -f -
...
$ curl -sL https://run.linkerd.io/emojivoto.yml | bin/go-run cli inject -l emojivoto - | kubectl apply -f -
...
The Deployment "web" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"app":"web-svc", "linkerd.io/control-plane-ns":"emojivoto", "linkerd.io/proxy-deployment":"web"}: `selector` does not match template `labels`
As a workaround, replace this:
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: web
namespace: emojivoto
...with...
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: web-svc
namespace: emojivoto
I use docker-compose to deploy the applications, and got some log which seem a little strange.
voting-svc_1 | 2019/10/26 08:41:15 Starting grpc server on GRPC_PORT=[8080]
emoji-svc_1 | 2019/10/26 08:41:15 Starting grpc server on GRPC_PORT=[8080]
web_1 | 2019/10/26 08:41:16 Connecting to [voting-svc:8080]
web_1 | 2019/10/26 08:41:16 Connecting to [emoji-svc:8080]
web_1 | 2019/10/26 08:41:16 Starting web server on WEB_PORT=[8080]
voting-svc_1 | 2019/10/26 08:42:55 Voted for [:interrobang:], which now has a total of [1] votes
web_1 | 2019/10/26 08:42:56 Error serving request [&{GET /api/vote?choice=:doughnut: HTTP/1.1 1 1 map[User-Agent:[Go-http-client/1.1] Accept-Encoding:[gzip]] {} 0 [] false localhost:8089 map[choice:[:doughnut:]] map[] map[] 172.19.0.1:33281 /api/vote?choice=:doughnut: 0xc0002858c0}]: rpc error: code = Unknown desc = ERROR
voting-svc_1 | 2019/10/26 08:42:57 Voted for [:poop:], which now has a total of [1] votes
voting-svc_1 | 2019/10/26 08:42:58 Voted for [:dancer:], which now has a total of [1] votes
I got an error message of web_1.
The docker-compose
version: '3'
services:
web:
image: buoyantio/emojivoto-web:v8
environment:
- WEB_PORT=8080
- EMOJISVC_HOST=emoji-svc:8080
- VOTINGSVC_HOST=voting-svc:8080
- INDEX_BUNDLE=dist/index_bundle.js
ports:
- "8080:8080"
depends_on:
- voting-svc
- emoji-svc
emoji-svc:
image: buoyantio/emojivoto-emoji-svc:v8
environment:
- GRPC_PORT=8080
ports:
- "8081:8080"
voting-svc:
image: buoyantio/emojivoto-voting-svc:v8
environment:
- GRPC_PORT=8080
ports:
- "8082:8080"
I use go run main.go
to run the emojivoto-vote-bot.
I also deploy the application to k8s, and got an error of web-svc,
2019/10/25 07:09:47 Connecting to [voting-svc-2.emojivoto:8080]
2019/10/25 07:09:47 Connecting to [emoji-svc-2.emojivoto:8080]
2019/10/25 07:09:47 Starting web server on WEB_PORT=[8080]
2019/10/25 07:10:08 Error serving request [&{GET /api/list HTTP/1.1 1 1 map[] {} 0 [] false web-svc-2.emojivoto.svc.cluster.local:8080 map[] map[] map[] 172.16.60.3:58724 /api/list 0xc00023ff80}]: rpc error: code = Canceled desc = context canceled
2019/10/25 07:10:08 Error serving request [&{GET /api/list HTTP/1.1 1 1 map[] {} 0 [] false web-svc-2.emojivoto.svc.cluster.local:8080 map[] map[] map[] 172.16.60.3:58742 /api/list 0xc000360040}]: rpc error: code = Canceled desc = context canceled.
What do the error means?
- [ ] Add Lato webfont
- [ ] Link leaderboard CTA block to Conduit
- [ ] Add svg to leaderboard CTA
- [ ] Add Buoyant social experiment link
- [ ] Add trademark 2017 in footer
The emojivoto-api
app appears to be unused, since the web app also serves api endpoints. We should remove emojivoto-api
to avoid confusion.
This repo does not have a license associated with it.
Are there plans to license this code under a standard open source license?
When trying to access the web app through kubectl proxy
at http://localhost:8001/api/v1/namespaces/emojivoto/services/web-svc:http/proxy/ , I get a blank page:
These other web apps work fine:
add a .travis.yml that tests emojivote
It looks like we have the same styles applied to the emoji on the home page and the emoji on the leaderboard, such that hovering over a leaderboard emoji looks like this:
That gives the impression that the emoji is clickable, but clicking on an emoji on the leaderboard doesn't do anything. I think it would be better to remove the hover background color and pointer tooltip for the emoji on that page.
Follow up from #41. Containers in the lifecycle test app intentionally exit after a given number of requests. Per kubernetes/kubernetes#57291, Kubernetes puts these pods into an exponential CrashLoopBackoff
, with up to 5 minute backoff. Ideally for our testing, we need a faster restart.
One option to mitigate this would be a script that periodically runs a kubectl delete po/foo
command.
In MOOC LinuxFoundationX LFS143x - Introduction to Service Mesh with Linkerd Chapter 11. Canary and Blue-Green Deployments / Canary and Blue-Green Deployments / Using TrafficSplit: Part 2
Next, update the vote-bot deployment:
Run: kubectl apply -f https://raw.githubusercontent.com/BuoyantIO/emojivoto/linux-training/training/traffic-split/vote-bot-update.yml
Command above fails because of the version number mismatch which exists in the current/existing resource. i.e. The current resource has v11 and the file still has v10.
File Path: emojivoto/training/traffic-split/vote-bot-update.yml
Linkerd Version Client version: stable-2.10.2 Server version: stable-2.10.2
Change the version number to v11.
Hey π
We'd love to use emojivoto as an example workload in @polarsignals. To produce some data for Polar Signals Continuous Profiler we'de love to add pprof endpoints to each of the components. Would you be open to us adding the pprof endpoints in a similar manner as the prometheus endpoint? If you prefer we can also generalize them into a single "telemetry" port.
Let me know what you think, we're happy to take care of it!
The failure page (e.g. when donut is clicked) has the text "404" in it, but this is actually a 500 response.
Add favicon to demo app. Check with @siggy about serving resource deployment and where we need to reference in the React project.
//emoji-app-favicon.png//
In order to see stats generated by the vote-bot service, we need to move the vote-bot image into its own pod in the emojivoto namespace
Hey Buoyant folks π
Problem
$ make deploy-to-docker-compose
docker-compose stop
docker-compose rm -vf
No stopped containers
/Library/Developer/CommandLineTools/usr/bin/make -C emojivoto-web build-container
docker build .. -t "buoyantio/emojivoto-web:v10" --build-arg svc_name=emojivoto-web
Sending build context to Docker daemon 37.67MB
Step 1/5 : FROM buoyantio/emojivoto-svc-base:v10
v10: Pulling from buoyantio/emojivoto-svc-base
91028a6d2ef7: Pull complete
21c90fa7ccf4: Pull complete
Digest: sha256:1e7039ceb589274f493d3c29f6d0e0b764795b268693ecafe127285808f63f03
Status: Downloaded newer image for buoyantio/emojivoto-svc-base:v10
---> f59fdbacafa2
Step 2/5 : ARG svc_name
---> Running in 5fcd7438e7b3
Removing intermediate container 5fcd7438e7b3
---> 50be637330ab
Step 3/5 : COPY $svc_name/target/ /usr/local/bin/
COPY failed: stat /var/lib/docker/tmp/docker-builder245391831/emojivoto-web/target: no such file or directory
make[1]: *** [build-container] Error 1
make: *** [deploy-to-docker-compose] Error 2
Solution
I ran the following:
$ make web
.
.
Successfully tagged buoyantio/emojivoto-web:v10
$ make emoji-svc
.
.
Successfully tagged buoyantio/emojivoto-emoji-svc:v10
$ make voting-svc
.
.
Successfully tagged buoyantio/emojivoto-voting-svc:v10
.. and then it worked.
OS, Go version, docker-compose version
MacOS, go 1.15.3 darwin, docker-compose version 1.24.1
docker.l5d.io/buoyantio/emojivoto-emoji-svc:v11
are not currently pullable
In my local setup I have a headless Linux machine running minikube and stuff. I ssh into the Linux box and do local dev on my desktop. It makes commands like minikube -n emojivoto service web-svc
not work correctly because it can't figure out how to open a browser window.
Anyway just a quick note that for the instructions step 5 works for local, but this works for remote:
kubectl -n emojivoto port-forward svc/web-svc 8899:80 --address MYIP
. Then open in your browser window http://MYIP:8899/
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.