Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): update repo name #2

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ jobs:
- name: package release assets
run: |
mkdir _dist
cp containerd-shim-*/target/${{ matrix.config.arch }}-unknown-linux-musl/release/containerd-shim-*-${{ matrix.shims.version }} _dist/
cp containerd-shim-spin/target/${{ matrix.config.arch }}-unknown-linux-musl/release/containerd-shim-spin-${{ matrix.shims.version }} _dist/
cd _dist
tar czf containerd-wasm-shims-${{ matrix.shims.version }}-${{ matrix.shims.name }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz containerd-shim-*-${{ matrix.shims.version }}
tar czf containerd-shim-spin-${{ matrix.shims.version }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz containerd-shim-spin-${{ matrix.shims.version }}
- name: upload shim artifacts
uses: actions/upload-artifact@v3
with:
name: containerd-wasm-shims-${{ matrix.shims.version }}-${{ matrix.shims.name }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}
path: _dist/containerd-wasm-shims-${{ matrix.shims.version }}-${{ matrix.shims.name }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz
name: containerd-shim-spin-${{ matrix.shims.version }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}
path: _dist/containerd-shim-spin-${{ matrix.shims.version }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz
retention-days: 5
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- name: Extract containerd-wasm-shims-v1-linux-${{ env.ARCH }}
- name: Extract containerd-shim-spin-linux-${{ env.ARCH }}
run: |
mkdir -p ./bin
for f in containerd-wasm-shims-*-*-linux-${{ env.ARCH }}/containerd-wasm-shims-*-*-linux-${{ env.ARCH }}.tar.gz
for f in containerd-shim-spin-*-linux-${{ env.ARCH }}/containerd-shim-spin-*-linux-${{ env.ARCH }}.tar.gz
do tar -xzf "$f" -C ./bin
done
- name: install k3d
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
with:
context: ${{ matrix.image.context }}
load: true
tags: containerd-wasm-shims${{ matrix.image.imageName }}:test
tags: containerd-shim-spin/${{ matrix.image.imageName }}:test
platforms: wasi/wasm
- name: build and push
# we use v3 here because we can't push wasi/wasm images with v4
Expand Down
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ version = "0.10.0"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/deislabs/containerd-wasm-shims"
homepage = "https://github.com/deislabs/containerd-wasm-shims"
repository = "https://github.com/spinkube/containerd-shim-spin"
homepage = "https://github.com/spinkube/containerd-shim-spin"


[workspace]
Expand Down
4 changes: 2 additions & 2 deletions containerd-shim-spin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name = "containerd-shim-spin-v2"
version = "0.10.0"
authors = ["DeisLabs Engineering Team"]
edition = "2021"
repository = 'https://github.com/deislabs/containerd-wasm-shims'
repository = 'https://github.com/spinkube/containerd-shim-spin'
license = "Apache-2.0"
homepage = 'https://github.com/deislabs/containerd-wasm-shims'
homepage = 'https://github.com/spinkube/containerd-shim-spin'
description = """
Containerd shim for running Spin workloads.
"""
Expand Down
8 changes: 4 additions & 4 deletions containerd-shim-spin/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ Before you begin, you need to have the following installed:
Start a k3d cluster with the wasm shims already installed:

```bash
k3d cluster create wasm-cluster --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.10.0 -p "8081:80@loadbalancer" --agents 2 --registry-create mycluster-registry:12345
k3d cluster create wasm-cluster --image ghcr.io/spinkube/containerd-shim-spin/examples/k3d:v0.10.0 -p "8081:80@loadbalancer" --agents 2 --registry-create mycluster-registry:12345
```

Apply RuntimeClass for spin applications to use the spin wasm shim:

```bash
kubectl apply -f https://raw.githubusercontent.com/deislabs/containerd-wasm-shims/main/deployments/workloads/runtime.yaml
kubectl apply -f https://raw.githubusercontent.com/spinkube/containerd-shim-spin/main/deployments/workloads/runtime.yaml
```

## Deploy an existing sample spin application

Deploy a pre-built sample spin application:

```bash
kubectl apply -f https://raw.githubusercontent.com/deislabs/containerd-wasm-shims/main/deployments/workloads/workload.yaml
kubectl apply -f https://raw.githubusercontent.com/spinkube/containerd-shim-spin/main/deployments/workloads/workload.yaml
echo "waiting 5 seconds for workload to be ready"
sleep 5
curl -v http://0.0.0.0:8081/spin/hello
Expand Down Expand Up @@ -59,7 +59,7 @@ Hello world from Spin!
Delete the pre-built sample spin application:

```bash
kubectl delete -f https://raw.githubusercontent.com/deislabs/containerd-wasm-shims/main/deployments/workloads/workload.yaml
kubectl delete -f https://raw.githubusercontent.com/spinkube/containerd-shim-spin/main/deployments/workloads/workload.yaml
```

## Create a new spin sample application
Expand Down
1 change: 1 addition & 0 deletions containerd-shim-spin/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ impl SpinEngine {
match resolved {
ResolvedAppSource::File { manifest_path, .. } => {
// TODO: This should be configurable, see https://github.com/deislabs/containerd-wasm-shims/issues/166
// TODO: ^^ Move aforementioned issue to this repo
let files_mount_strategy = FilesMountStrategy::Direct;
spin_loader::from_file(&manifest_path, files_mount_strategy, None).await
}
Expand Down
4 changes: 2 additions & 2 deletions deployments/k3d/DockerSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ docker buildx build --platform=wasi/wasm --load -t wasmtest_spin:latest ../../im

The `wasi/wasm` platform specifies that the image is a wasm image. The major benefit of using this platform is that you don't need to build each image for a different computer architecture.

The `--load` flag tells Docker to load the image into the local Docker daemon. As described in this [issue](https://github.com/deislabs/containerd-wasm-shims/issues/87), this flag actually doesn't work for wasi/wasm platform. You will need to save the image to a tar file and load it into the local Docker daemon.
The `--load` flag tells Docker to load the image into the local Docker daemon. As described in this [issue](https://github.com/spinkube/containerd-shim-spin/issues/87), this flag actually doesn't work for wasi/wasm platform. You will need to save the image to a tar file and load it into the local Docker daemon.

```shell
docker save wasmtest_spin:latest -o wasmtest_spin.tar
```

### Load the image to k3d

Refer to this [document](https://github.com/deislabs/containerd-wasm-shims/tree/main/deployments/k3d#how-build-get-started-from-source) to create a k3d cluster.
Refer to this [document](https://github.com/spinkube/containerd-shim-spin/tree/main/deployments/k3d#how-build-get-started-from-source) to create a k3d cluster.

Assume you have a k3d cluster named `k3d-default`, you can load the image to the cluster using the following command.

Expand Down
6 changes: 3 additions & 3 deletions deployments/k3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ $ tree .
## How to run the example
The shell script below will create a k3d cluster locally with the Wasm shims installed and containerd configured. The script then applies the runtime classes for the shims and an example service and deployment. Finally, we curl the `/hello` and receive a response from the example workload.
```shell
k3d cluster create wasm-cluster --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.10.0 -p "8081:80@loadbalancer" --agents 2
kubectl apply -f https://github.com/deislabs/containerd-wasm-shims/raw/main/deployments/workloads/runtime.yaml
kubectl apply -f https://github.com/deislabs/containerd-wasm-shims/raw/main/deployments/workloads/workload.yaml
k3d cluster create wasm-cluster --image ghcr.io/spinkube/containerd-shim-spin/examples/k3d:v0.10.0 -p "8081:80@loadbalancer" --agents 2
kubectl apply -f https://github.com/spinkube/containerd-shim-spin/raw/main/deployments/workloads/runtime.yaml
kubectl apply -f https://github.com/spinkube/containerd-shim-spin/raw/main/deployments/workloads/workload.yaml
echo "waiting 5 seconds for workload to be ready"
sleep 15
curl -v http://127.0.0.1:8081/spin/hello
Expand Down
2 changes: 1 addition & 1 deletion deployments/k8s/all-in-one-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
runtimeClassName: wasmtime-spin-v2
containers:
- name: testwasm
image: ghcr.io/deislabs/containerd-wasm-shims/examples/spin-rust-hello:latest
image: ghcr.io/spinkube/containerd-shim-spin/examples/spin-rust-hello:latest
---
apiVersion: v1
kind: Service
Expand Down
2 changes: 1 addition & 1 deletion deployments/workloads/workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
runtimeClassName: wasmtime-spin
containers:
- name: spin-hello
image: ghcr.io/deislabs/containerd-wasm-shims/examples/spin-rust-hello:v0.10.0
image: ghcr.io/spinkube/containerd-shim-spin/examples/spin-rust-hello:v0.10.0
command: ["/"]
resources: # limit the resources to 128Mi of memory and 100m of CPU
limits:
Expand Down
4 changes: 2 additions & 2 deletions images/spin-dapr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sudo mv ./spin /usr/local/bin/
### Run example with K3d:
```sh
# start the K3d cluster
k3d cluster create wasm-cluster --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.10.0 -p "8081:80@loadbalancer"
k3d cluster create wasm-cluster --image ghcr.io/spinkube/containerd-shim-spin/examples/k3d:v0.10.0 -p "8081:80@loadbalancer"
# Install Dapr
dapr init -k --wait
# or via helm
Expand All @@ -36,7 +36,7 @@ mkdir -p test/out_spin-dapr/
docker save spin-dapr:latest -o test/out_spin-dapr/img.tar
k3d image load -c wasm-cluster spin-dapr:latest test/out_spin-dapr/img.tar
# Apply the manifest
kubectl apply -f https://github.com/deislabs/containerd-wasm-shims/raw/main/deployments/workloads/runtime.yaml
kubectl apply -f https://github.com/spinkube/containerd-shim-spin/raw/main/deployments/workloads/runtime.yaml
kubectl apply -f images/spin-dapr/deploy.yaml

# When everythin is up, forward the port and get the last kubernetes event
Expand Down
2 changes: 1 addition & 1 deletion images/spin/go-hello/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


module github.com/deislabs/containerd-wasm-shims/go-hello
module github.com/spinkube/containerd-shim-spin/go-hello

go 1.20

Expand Down
2 changes: 1 addition & 1 deletion tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "containerd-wasm-shims-tests"
name = "containerd-shim-spin-tests"
version.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
Loading