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

Create k3s.md #246

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

anshikavashistha
Copy link

@anshikavashistha anshikavashistha commented Aug 4, 2024

This PR addresses the issue of missing documentation for integrating WasmEdge with k3s, a lightweight Kubernetes distribution ideal for edge computing. The goal is to provide a comprehensive guide that outlines the necessary steps for configuring and deploying WasmEdge applications on a k3s cluster.

Explanation

Related issue

Fixes #2132

What type of PR is this

Proposed Changes

This PR addresses the issue of missing documentation for integrating WasmEdge with k3s, a lightweight Kubernetes distribution ideal for edge computing. The goal is to provide a comprehensive guide that outlines the necessary steps for configuring and deploying WasmEdge applications on a k3s cluster. 

Signed-off-by: Anshika Vashistha <[email protected]>
Copy link
Member

juntao commented Aug 4, 2024

Hello, I am a PR summary agent on flows.network. Here are my reviews of code commits in this PR.


Overall, the GitHub patch introduces a new documentation file that provides instructions for integrating WasmEdge with k3s. This is a significant addition as it addresses the missing documentation issue and offers valuable guidance for configuring and deploying WasmEdge applications on a k3s cluster.

However, there are some potential issues to note:

  1. The update in Docker Desktop version requirement from 4.15 to 4.21 may cause compatibility issues for users who have not updated their Docker Desktop versions.
  2. The addition of a new image for configuring Docker without specifying the previous one could lead to confusion or errors if users follow both sets of instructions simultaneously.
  3. The removal of "quick_start_docker.md" file suggests that the functionality it described is no longer supported or relevant, which may cause inconvenience for users who relied on this document for running WasmEdge applications using Docker Desktop.

The most important findings are:

  1. The introduction of a new documentation file, "k3s.md", that provides comprehensive guidance for integrating WasmEdge with k3s.
  2. The update in the Docker Desktop version requirement from 4.15 to 4.21.
  3. The removal of "quick_start_docker.md" file, which may cause inconvenience for users who relied on this document for running WasmEdge applications using Docker Desktop.

Users should be aware of the updated Docker Desktop version requirement and the removal of the "quick_start_docker.md" file to avoid potential errors or confusion.

Details

Commit 495ab8c0b119c86c651b4d91024d1421a249802d

  • This GitHub patch introduces a new documentation file, k3s.md, which provides a comprehensive guide for integrating WasmEdge with k3s, a lightweight Kubernetes distribution for edge computing.
  • The primary goal of this PR is to address the missing documentation issue by outlining the necessary steps for configuring and deploying WasmEdge applications on a k3s cluster.
  • Key changes include:
    • Installing k3s
    • Installing containerd and crun-wasmedge
    • Configuring k3s to use containerd with crun-wasmedge
    • Deploying a WasmEdge application on k3s
    • Accessing the deployed WasmEdge application
  • The guide covers prerequisites, installation steps for k3s and WasmEdge, configuration of containerd and k3s to use crun-wasmedge, deployment of a WasmEdge application using Kubernetes YAML files, and accessing the deployed application.

Commit c7e96b2ca0a326474ad7319d744997983141cb81

  1. The Docker Desktop version requirement has been updated from 4.15 to 4.21.
  2. A new image has been added to the documentation for configuring Docker, which was not present in the previous version.
  3. The guide now covers running a standalone WASM app using Docker. This wasn't explicitly mentioned before but can be inferred from the context of the changes made.

Commit e12b80999faea6095556fd1cd0455ea8ff2897f3

The key changes in this GitHub patch are:

  1. A file named "quick_start_docker.md" has been deleted from the "docs/start/getting-started/" directory. This file likely contained documentation on how to quickly run WasmEdge applications using Docker Desktop, with examples of running standalone WASM apps, HTTP servers, and JavaScript servers.
  2. The deletion of this document suggests that the functionality it described is no longer supported or relevant, possibly due to changes in the project's direction, deprecation of a feature, or updates to the documentation structure.
  3. The removal of these examples may have been done to streamline the documentation and focus on more current or important topics.
  4. It's also possible that the functionality described in this document has been moved to another location within the project's documentation.

Without further context, it's difficult to determine the exact reason for the deletion of this file.

@anshikavashistha
Copy link
Author

@juntao @dannypsnl PTAL

Signed-off-by: Anshika Vashistha <[email protected]>
Copy link
Member

@hydai hydai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you run the steps you wrote in the document?

@anshikavashistha
Copy link
Author

Have you run the steps you wrote in the document?

Yes I have run these steps

@hydai
Copy link
Member

hydai commented Aug 4, 2024

Which Wasm application do you use for the example?
And which Wasm service do you use to verify?
Also, what's the expected output of the execution result of it?

@anshikavashistha
Copy link
Author

Which Wasm application do you use for the example? And which Wasm service do you use to verify? Also, what's the expected output of the execution result of it?

Expected Output of the Execution Result
Deployment YAML:

kind: Deployment
metadata:
  name: wasmedge-demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: wasmedge-demo
  template:
    metadata:
      labels:
        app: wasmedge-demo
    spec:
      containers:
      - name: wasmedge-demo
        image: wasmedge/example-wasm-server:latest
        command: ["wasmedge-tensorflow-lite"]
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 8080

@anshikavashistha
Copy link
Author

Which Wasm application do you use for the example? And which Wasm service do you use to verify? Also, what's the expected output of the execution result of it?

Expected Output of the Execution Result Deployment YAML:

kind: Deployment
metadata:
  name: wasmedge-demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: wasmedge-demo
  template:
    metadata:
      labels:
        app: wasmedge-demo
    spec:
      containers:
      - name: wasmedge-demo
        image: wasmedge/example-wasm-server:latest
        command: ["wasmedge-tensorflow-lite"]
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 8080
kind: Service
metadata:
  name: wasmedge-service
spec:
  selector:
    app: wasmedge-demo
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8080
  type: LoadBalancer

@hydai
Copy link
Member

hydai commented Aug 8, 2024

You didn't show the output generated by the wasm application. The YAML you provided is just the configuration.
Could you please share the screenshot of the execution results? Also, it looks like you are using a service. How do you check if this kind of service is running, and how do you interact with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a document for the installation of the K3s integration
3 participants