Skip to content

Commit

Permalink
Merge pull request #840 from containerd/issue825
Browse files Browse the repository at this point in the history
change: Rename the image wasi-http to wasi-demo-http
  • Loading branch information
Mossaka authored Feb 13, 2025
2 parents e48c69d + a412fae commit ab57831
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release-wasi-demo-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

env:
CARGO_TERM_COLOR: always
IMAGES: "wasi-demo-app wasi-demo-oci wasi-demo-oci-artifact wasi-http"
IMAGES: "wasi-demo-app wasi-demo-oci wasi-demo-oci-artifact wasi-demo-http"

jobs:
release-wasi-demo:
Expand All @@ -28,7 +28,7 @@ jobs:
wasi_demo_app: ${{ steps.get_digests.outputs.wasi_demo_app }}
wasi_demo_oci: ${{ steps.get_digests.outputs.wasi_demo_oci }}
wasi_demo_oci_artifact: ${{ steps.get_digests.outputs.wasi_demo_oci_artifact }}
wasi_http: ${{ steps.get_digests.outputs.wasi_http }}
wasi_demo_http: ${{ steps.get_digests.outputs.wasi_demo_http }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-env
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- release-wasi-demo
strategy:
matrix:
image: ["wasi_demo_app", "wasi_demo_oci", "wasi_demo_oci_artifact", "wasi_http"]
image: ["wasi_demo_app", "wasi_demo_oci", "wasi_demo_oci_artifact", "wasi_demo_http"]
uses: ./.github/workflows/sign.yml
with:
image-name: ${{ matrix.image }}
Expand All @@ -106,7 +106,7 @@ jobs:
- release-wasi-demo
strategy:
matrix:
image: ["wasi_demo_app", "wasi_demo_oci", "wasi_demo_oci_artifact", "wasi_http"]
image: ["wasi_demo_app", "wasi_demo_oci", "wasi_demo_oci_artifact", "wasi_demo_http"]
uses: ./.github/workflows/sbom.yml
with:
image-name: ${{ matrix.image }}
Expand Down
17 changes: 4 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,21 +220,12 @@ dist/img-oci-artifact.tar: target/wasm32-wasip1/$(OPT_PROFILE)/img-oci-artifact.
@mkdir -p "dist/"
cp "$<" "$@"

.PHONY: pull pull-app pull-oci pull-oci-artifact pull-http
.PHONY: pull pull-%
pull: pull-app pull-oci pull-oci-artifact pull-http
echo "Pulled all images"

pull-app:
sudo ctr image pull ghcr.io/containerd/runwasi/wasi-demo-app:latest

pull-oci:
sudo ctr image pull ghcr.io/containerd/runwasi/wasi-demo-oci:latest

pull-oci-artifact:
sudo ctr image pull ghcr.io/containerd/runwasi/wasi-demo-oci-artifact:latest

pull-http:
sudo ctr image pull ghcr.io/containerd/runwasi/wasi-http:latest
pull-%:
sudo ctr image pull ghcr.io/containerd/runwasi/wasi-demo-$*:latest

docker/load: dist/img.tar
docker load -i $<
Expand All @@ -260,7 +251,7 @@ target/wasm32-wasip1/$(OPT_PROFILE)/img-oci-artifact.tar: target/wasm32-wasip1/$
dist/http-img-oci.tar: crates/containerd-shim-wasm-test-modules/src/modules/hello_wasi_http.wasm
@mkdir -p "dist/"
cargo run --bin oci-tar-builder -- \
--name wasi-http \
--name wasi-demo-http \
--repo ghcr.io/containerd/runwasi \
--tag latest \
--module $< \
Expand Down
4 changes: 2 additions & 2 deletions crates/containerd-shim-wasmtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Use `oci-tar-builder` to create an OCI image with our `http-handler`. Assuming o

```shell
cargo run --bin oci-tar-builder -- \
--name wasi-http \
--name wasi-demo-http \
--repo ghcr.io/containerd/runwasi \
--tag latest --module wasi-http.wasm \
-o ./dist/wasi-http-img-oci.tar
Expand All @@ -67,7 +67,7 @@ make pull-http

```shell
sudo ctr run --rm --net-host --runtime=io.containerd.wasmtime.v1 \
ghcr.io/containerd/runwasi/wasi-http:latest wasi-http /wasi-http.wasm
ghcr.io/containerd/runwasi/wasi-demo-http:latest wasi-http /wasi-http.wasm
```

- Finally, assuming our handler will respond to `GET` requests at `/`, we can
Expand Down

0 comments on commit ab57831

Please sign in to comment.