Skip to content

Commit 5f36e49

Browse files
DavidBuzatu-Marianustiugov
authored andcommitted
Included eStargz in other docs
Addressed PR comments Expanded quickstart to include more detailed running steps for eStargz Updated documents to include eStargz changes Signed-off-by: davidbuzatu-marian <[email protected]>
1 parent efd7212 commit 5f36e49

File tree

4 files changed

+81
-17
lines changed

4 files changed

+81
-17
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88

99
### Fixed
1010

11+
## v1.6
12+
[@davidbuzatu-marian](https://github.com/DavidBuzatu-Marian)
13+
### Added
14+
- Added support for [eStargz](https://github.com/containerd/stargz-snapshotter) in stock-only setup.
15+
- Added [setup script](./scripts/stargz/setup_stargz.sh) for stargz-snapshotter.
16+
- Added [example](./configs/knative_workloads/stargz-node.yaml) knative deployment for eStargz.
17+
### Changed
18+
- Changed stock-only setup steps to support eStargz installation.
19+
- Changed quickstart guide to include description of *eStargz* and how to use it.
20+
- Changed [README.md](./README.md) to include eStargz support.
21+
### Fixed
22+
1123

1224
## v1.5
1325

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ of a modern serverless platform. Hence, we built vHive to be representative of t
2020
Function-as-a-Service (FaaS) providers, integrating the same production-grade components used by the providers, including
2121
[AWS Firecracker hypervisor](https://firecracker-microvm.github.io/),
2222
Cloud Native Computing Foundation's [Containerd](https://containerd.io/),
23-
and [Kubernetes](https://kubernetes.io/).
23+
and [Kubernetes](https://kubernetes.io/).
2424

2525
vHive adopts the [Knative](https://knative.dev/) flexible programming model, allowing the researchers to quickly deploy
2626
and experiment with *any* serverless applications that may comprise many functions,
@@ -30,6 +30,8 @@ Both the functions and the stateful services can be deployed using OCI/Docker im
3030
vHive empowers systems researchers to innovate on key serverless features,
3131
including functions autoscaling and cold-start delay optimization with several snapshotting mechanisms.
3232

33+
vHive has added support for the state-of-the-art extension [eStargz](https://github.com/containerd/stargz-snapshotter) to container layers and lazy pull support for container images.
34+
3335

3436
## vHive architecture
3537

docs/developers_guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,5 @@ We plan to keep our code loosely up to date with the upstream Firecracker reposi
190190

191191
* vHive uses a [fork](https://github.com/ease-lab/kind) of [kind](https://github.com/kubernetes-sigs/kind)
192192
to speed up testing environment setup requiring Kubernetes.
193+
194+
* Current [eStargz](https://github.com/containerd/stargz-snapshotter) version is 0.13.0.

docs/quickstart_guide.md

Lines changed: 64 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ SSD-equipped nodes are highly recommended. Full list of CloudLab nodes can be fo
151151
> ```
152152
3. Start `firecracker-containerd` in a background terminal named `firecracker`:
153153
```bash
154-
sudo PATH=$PATH screen -dmS firecracker bash -c "/usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml > >(tee -a /tmp/vhive-logs/firecracker.stdout) 2> >(tee -a /tmp/vhive-logs/firecracker.stderr >&2)"
154+
sudo PATH=$PATH screen -dmS firecracker bash -c "/usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml > >(tee -a /tmp/vhive-logs/firecracker.stdout 2> >(tee -a /tmp/vhive-logs/firecracker.stderr >&2)"
155155
```
156156

157157
4. Build vHive host orchestrator:
@@ -202,8 +202,7 @@ SSD-equipped nodes are highly recommended. Full list of CloudLab nodes can be fo
202202
> If you built the cluster using the `stock-only` flag, execute the following
203203
> script instead:
204204
> ```bash
205-
> ./scripts/cluster/create_multinode_cluster.sh stock-only > >(tee -a /tmp/vhive-logs/
206-
> create_multinode_cluster.stdout) 2> >(tee -a /tmp/vhive-logs/create_multinode_cluster.stderr >&2)
205+
> ./scripts/cluster/create_multinode_cluster.sh stock-only > >(tee -a /tmp/vhive-logs/create_multinode_cluster.stdout) 2> >(tee -a /tmp/vhive-logs/create_multinode_cluster.stderr >&2)
207206
> ```
208207
209208
### 4. Configure Worker Nodes
@@ -254,9 +253,8 @@ Execute the following below **as a non-root user with sudo rights** using **bash
254253
> **IMPORTANT**
255254
> Currently `stargz` is only supported in native kubelet contexts without firecracker.
256255
> Therefore, the following steps from this guide must **not** be executed:
257-
> * `2.3 - Start firecracker-containerd in a background terminal named firecracker`,
258-
> * `2.4 - Build vHive host orchestrator`,
259-
> * `2.5 - Start vHive in a background terminal named vhive`.
256+
> * `1.3 - Start firecracker-containerd in a background terminal named firecracker`,
257+
> * `1.5 - Start vHive in a background terminal named vhive`.
260258
2. Start `containerd` in a background terminal named `containerd`:
261259
```bash
262260
sudo screen -dmS containerd containerd; sleep 5;
@@ -351,27 +349,77 @@ for benchmarking asynchronous (i.e., Knative Eventing) case and more details abo
351349
```
352350
353351
## V. Deploying eStargz-based Functions
354-
This section provides an example function run using a `nodejs` base image that has been converted to the `stargz` format. To create other images supported by `stargz`, please refer to the [creating-estargz-images-using-ctr-remote](https://github.com/containerd/stargz-snapshotter/tree/cmd/v0.12.1#creating-estargz-images-using-ctr-remote) section of the official `stargz` repository.
352+
This section provides an example function run using a `nodejs` base image that has been converted to the `stargz` format. To create other images supported by `stargz`, please refer to the [creating-estargz-images-using-ctr-remote](https://github.com/containerd/stargz-snapshotter/tree/cmd/v0.12.1#creating-estargz-images-using-ctr-remote) section of the official `stargz` repository or follow the instructions below.
353+
354+
### 1. Convert a native image to stargz format
355+
If all installation steps have been followed accordingly, the `ctr-remote` CLI tool will be available on your node(s).
356+
To start, pull the image by replacing the path in the following command:
357+
358+
`ctr-remote image pull <registry/image:tag>`
359+
360+
Next, convert the image to the eStargz expected format by replacing the old path and new path in the following:
355361
356-
Our example image can be found in [/configs/knative_workloads/stargz-node.yaml](../configs/knative_workloads/stargz-node.yaml) and can be run with:
362+
`ctr-remote image optimize --oci <registry/image:tag> <registry/image:new_tag>`
363+
364+
Finally, push the image to your repository by replacing the new path in the following:
365+
366+
`ctr-remote image push <registry/image:new_tag>`
367+
368+
> **Note**
369+
>
370+
> If prompted for authentication, add the following flag to the previous command:
371+
> `-u name:auth_token`
372+
373+
374+
Our example deployment configuration can be found in [/configs/knative_workloads/stargz-node.yaml](../configs/knative_workloads/stargz-node.yaml) and can be run with:
357375
```bash
358376
kn service apply stargz-test -f configs/knative_workloads/stargz-node.yaml --concurrency-target 1
359377
```
360-
### 1. Deploy and Invoke Functions
378+
379+
To create your own deployment, replace the marked fields as needed:
380+
381+
```yaml
382+
apiVersion: serving.knative.dev/v1
383+
kind: Pod
384+
metadata:
385+
// required
386+
name: <deployment_name>
387+
spec:
388+
template:
389+
spec:
390+
containers:
391+
// required
392+
- name: <container_name>
393+
// required
394+
image: <stargz_image_registry_path>
395+
// optional
396+
command: [<command>]
397+
// optional
398+
args: <args>
399+
// optional
400+
ports:
401+
- containerPort: <port_number>
402+
```
403+
404+
405+
### 2. Deploy Function
361406
**On the master node**, execute the following using **bash**:
362407
363408
```bash
364409
kn service apply <name> -f <yaml_config_path> --concurrency-target 1
365410
```
366411
367-
Interact with the deployed function from any node using the exposed interface of the deployed function.
368-
### 2. Delete Deployed Function
369-
**On the master node**, execute the following using **bash**:
412+
### 3. Interact with your function
413+
Interact with the deployed function from any node using the exposed interface of the deployed function. Considering our example deployment running exposing port `80` we can run:
414+
```bash
415+
curl http://stargz-test.default.<deployment_ip>.sslip.io
416+
```
417+
### 4. Delete Deployed Function
418+
**On the master node**, execute the following using to delete all deployed functions:
370419
371-
1. Delete **all** deployed functions:
372-
```bash
373-
kn service delete --all
374-
```
420+
```bash
421+
kn service delete --all
422+
```
375423
376424
[github-toc]: https://github.blog/changelog/2021-04-13-table-of-contents-support-in-markdown-files/
377425
[cloudlab]: https://www.cloudlab.us

0 commit comments

Comments
 (0)