add tree output to demo
This commit is contained in:
parent
521f112b46
commit
8596d5aeb7
|
@ -5,7 +5,7 @@
|
||||||
[instance]: ../docs/glossary.md#instance
|
[instance]: ../docs/glossary.md#instance
|
||||||
[instances]: ../docs/glossary.md#instance
|
[instances]: ../docs/glossary.md#instance
|
||||||
[hello]: https://github.com/monopole/hello
|
[hello]: https://github.com/monopole/hello
|
||||||
[off-the-shelf config]: https://github.com/kinflate/example-hello
|
[config]: https://github.com/kinflate/example-hello
|
||||||
[original]: https://github.com/kinflate/example-hello
|
[original]: https://github.com/kinflate/example-hello
|
||||||
|
|
||||||
# Demo: hello world with instances
|
# Demo: hello world with instances
|
||||||
|
@ -34,10 +34,9 @@ Alternatively, use
|
||||||
## Clone an example
|
## Clone an example
|
||||||
|
|
||||||
Let's run the [hello] service.
|
Let's run the [hello] service.
|
||||||
|
Here's an existing [config] for it.
|
||||||
|
|
||||||
Here's an [off-the-shelf config] for it.
|
Clone this config to a directory called `base`:
|
||||||
|
|
||||||
Clone it to a directory called `base`:
|
|
||||||
|
|
||||||
<!-- @cloneIt @test -->
|
<!-- @cloneIt @test -->
|
||||||
```
|
```
|
||||||
|
@ -51,6 +50,19 @@ git clone \
|
||||||
tree $DEMO_HOME
|
tree $DEMO_HOME
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Expecting something like:
|
||||||
|
> ```
|
||||||
|
> /tmp/tmp.IyYQQlHaJP
|
||||||
|
> └── base
|
||||||
|
> ├── configMap.yaml
|
||||||
|
> ├── deployment.yaml
|
||||||
|
> ├── Kube-manifest.yaml
|
||||||
|
> ├── LICENSE
|
||||||
|
> ├── README.md
|
||||||
|
> └── service.yaml
|
||||||
|
> ```
|
||||||
|
|
||||||
|
|
||||||
One could immediately apply these resources to a
|
One could immediately apply these resources to a
|
||||||
cluster:
|
cluster:
|
||||||
|
|
||||||
|
@ -58,8 +70,8 @@ cluster:
|
||||||
> kubectl apply -f $DEMO_HOME/base
|
> kubectl apply -f $DEMO_HOME/base
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
to instantiate the _hello_ service. This ignores
|
to instantiate the _hello_ service. `kubectl`
|
||||||
the [manifest], and just uses the raw resources.
|
would only recognize the resource files.
|
||||||
|
|
||||||
## The Manifest
|
## The Manifest
|
||||||
|
|
||||||
|
@ -102,8 +114,8 @@ Create a _staging_ and _production_ [overlay]:
|
||||||
|
|
||||||
* _Staging_ enables a risky feature not enabled in production.
|
* _Staging_ enables a risky feature not enabled in production.
|
||||||
* _Production_ has a higher replica count.
|
* _Production_ has a higher replica count.
|
||||||
* Greetings from these cluster [instances] will differ
|
* Web server greetings from these cluster
|
||||||
from each other.
|
[instances] will differ from each other.
|
||||||
|
|
||||||
<!-- @overlayDirectories @test -->
|
<!-- @overlayDirectories @test -->
|
||||||
```
|
```
|
||||||
|
@ -210,7 +222,7 @@ EOF
|
||||||
|
|
||||||
- an _overlays_ directory, containing the manifests
|
- an _overlays_ directory, containing the manifests
|
||||||
and patches required to create distinct _staging_
|
and patches required to create distinct _staging_
|
||||||
and _production_ instance in a cluster.
|
and _production_ instances in a cluster.
|
||||||
|
|
||||||
Review the directory structure and differences:
|
Review the directory structure and differences:
|
||||||
|
|
||||||
|
@ -219,6 +231,25 @@ Review the directory structure and differences:
|
||||||
tree $DEMO_HOME
|
tree $DEMO_HOME
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Expecting something like:
|
||||||
|
> ```
|
||||||
|
> /tmp/tmp.IyYQQlHaJP1<
|
||||||
|
> ├── base
|
||||||
|
> │ ├── configMap.yaml
|
||||||
|
> │ ├── deployment.yaml
|
||||||
|
> │ ├── Kube-manifest.yaml
|
||||||
|
> │ ├── LICENSE
|
||||||
|
> │ ├── README.md
|
||||||
|
> │ └── service.yaml
|
||||||
|
> └── overlays
|
||||||
|
> ├── production
|
||||||
|
> │ ├── deployment.yaml
|
||||||
|
> │ └── Kube-manifest.yaml
|
||||||
|
> └── staging
|
||||||
|
> ├── Kube-manifest.yaml
|
||||||
|
> └── map.yaml
|
||||||
|
> ```
|
||||||
|
|
||||||
<!-- @compareOutput -->
|
<!-- @compareOutput -->
|
||||||
```
|
```
|
||||||
diff \
|
diff \
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Loading…
Reference in New Issue