Skip to content

Commit 300070b

Browse files
authored
Update pipeline-overview.md
1 parent 9270f9a commit 300070b

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

labs/pipeline-overview.md

+35-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,41 @@
11
# Pipeline Overview
22

3-
CI -- tests and builds image
4-
CD -- takes known good images and pushes to production
3+
## Definitions
4+
| Term | Definition |
5+
| --- | --- |
6+
| Continuous Integration (CI) | tests and builds image |
7+
| Continuous Delivery (CD) | takes known good images and pushes to production |
8+
9+
## Pipeline
10+
11+
![](../docs/img/pipeline-overview.png)
512

613
Dev tags commit -->[GSR] --> [GCR builds image based on tag] -> [Spin deploys off of new image] -> [k8s]
714

815
## App Explanation
16+
17+
## The sample app
18+
You'll use a very simple sample application - `gceme` - as the basis for your CD pipeline. `gceme` is written in Go and is located in the `sample-app` directory in this repo. When you run the `gceme` binary on a GCE instance, it displays the instance's metadata in a pretty card:
19+
20+
![](docs/img/info_card.png)
21+
22+
The binary supports two modes of operation, designed to mimic a microservice. In backend mode, `gceme` will listen on a port (8080 by default) and return GCE instance metadata as JSON, with content-type=application/json. In frontend mode, `gceme` will query a backend `gceme` service and render that JSON in the UI you saw above. It looks roughly like this:
23+
24+
```
25+
----------- ------------ ~~~~~~~~~~~~ -----------
26+
| | | | | | | |
27+
| user | ---> | gceme | ---> | lb/proxy | -----> | gceme |
28+
|(browser)| |(frontend)| |(optional)| | |(backend)|
29+
| | | | | | | | |
30+
----------- ------------ ~~~~~~~~~~~~ | -----------
31+
| -----------
32+
| | |
33+
|--> | gceme |
34+
|(backend)|
35+
| |
36+
-----------
37+
```
38+
Both the frontend and backend modes of the application support two additional URLs:
39+
40+
1. `/version` prints the version of the binary (declared as a const in `main.go`)
41+
1. `/healthz` reports the health of the application. In frontend mode, health will be OK if the backend is reachable.

0 commit comments

Comments
 (0)