You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
vHive adopts the [Knative](https://knative.dev/) flexible programming model, allowing the researchers to quickly deploy
26
26
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
30
30
vHive empowers systems researchers to innovate on key serverless features,
31
31
including functions autoscaling and cold-start delay optimization with several snapshotting mechanisms.
32
32
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.
Copy file name to clipboardExpand all lines: docs/quickstart_guide.md
+64-16Lines changed: 64 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ SSD-equipped nodes are highly recommended. Full list of CloudLab nodes can be fo
151
151
>```
152
152
3. Start `firecracker-containerd`in a background terminal named `firecracker`:
153
153
```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)"
155
155
```
156
156
157
157
4. Build vHive host orchestrator:
@@ -202,8 +202,7 @@ SSD-equipped nodes are highly recommended. Full list of CloudLab nodes can be fo
202
202
> If you built the cluster using the `stock-only` flag, execute the following
203
203
> script instead:
204
204
> ```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)
207
206
> ```
208
207
209
208
### 4. Configure Worker Nodes
@@ -254,9 +253,8 @@ Execute the following below **as a non-root user with sudo rights** using **bash
254
253
> **IMPORTANT**
255
254
> Currently `stargz` is only supported in native kubelet contexts without firecracker.
256
255
> 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`.
260
258
2. Start `containerd` in a background terminal named `containerd`:
261
259
```bash
262
260
sudo screen -dmS containerd containerd; sleep 5;
@@ -351,27 +349,77 @@ for benchmarking asynchronous (i.e., Knative Eventing) case and more details abo
351
349
```
352
350
353
351
## 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:
355
361
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:
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:
357
375
```bash
358
376
kn service apply stargz-test -f configs/knative_workloads/stargz-node.yaml --concurrency-target 1
359
377
```
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
361
406
**On the master node**, execute the following using **bash**:
362
407
363
408
```bash
364
409
kn service apply <name> -f <yaml_config_path> --concurrency-target 1
365
410
```
366
411
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:
0 commit comments