Coder Social home page Coder Social logo

wasmedge-containers-examples's Introduction

Running lightweight WasmEdge apps side by side with Linux containers

The crun project now supports WasmEdge as a "container" runtime! Since crun is widely supported across the Kubernetes ecosystem, WasmEdge applications can now run everywhere Kubernetes runs!

This repository contains scripts, tutorials, and GitHub Actions to demostrate how WasmEdge applications work side by side with Linux containers.

Example: A simple WebAssembly app

Example: A HTTP microservice written in Rust and compiled into WebAssembly

wasmedge-containers-examples's People

Contributors

0xe282b0 avatar alabulei1 avatar avengermojo avatar captainvincent avatar dm4 avatar hydai avatar jcjinchen avatar juntao avatar mileyfu avatar tpmccallum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wasmedge-containers-examples's Issues

CI workflow for CRI-O HTTP server test failed

The CI context is

name: CRI-O HTTP server test

on:
  workflow_dispatch:
    inputs:
      logLevel:
        description: 'Log level'
        required: true
        default: 'info'
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  schedule:
    - cron: "0 0 */1 * *"

jobs:
  build:

    runs-on: ubuntu-20.04

    steps:
      
    - name: Install apt-get packages
      run: |
        sudo ACCEPT_EULA=Y apt-get update
        sudo ACCEPT_EULA=Y apt-get upgrade
        sudo ACCEPT_EULA=Y apt-get install git wget
        
    - name: Install CRI-O and crun
      run: |
        wget -qO- https://raw.githubusercontent.com/second-state/wasmedge-containers-examples/main/crio/install.sh | bash
        
    - name: Run demo in CRI-O
      run: |
        wget -qO- https://raw.githubusercontent.com/second-state/wasmedge-containers-examples/main/crio/http_server/http_server_application.sh | bash

According the log of CI, when creating pod, an error appeared,

Creating POD ...
time="2022-07-17T00:29:31Z" level=fatal msg="connect: connect endpoint 'unix:///var/run/crio/crio.sock', make sure you are running as root and the endpoint has been started: context deadline exceeded"

Similarly, some CIs builded successfully, if you look into the output log, some errors maybe occur.
For example,running Containerd test CI, the output log,

Creating POD ...
{"msg":"exec container process `/wasi_example_main.wasm`: Exec format error","level":"error","time":"2022-07-18T00:07:38.000967372Z"}

crun: could not get wasmedge process module context

At first, I failed to compile crun:
containers/crun#934

I modified the code referring to this:
containers/crun#933

When I run simple_wasi_application.sh I get the following error:

    crun: could not get wasmedge process module context
    pod default/wasi-demo terminated (Error)
    Wait 60s
    NAMESPACE     NAME                       READY   STATUS             RESTARTS        AGE   IP          NODE        NOMINATED NODE   READINESS GATES
    default       wasi-demo                  0/1     Error              0               68s   127.0.0.1   127.0.0.1   <none>           <none>
    kube-system   coredns-755cd654d4-wxq5b   0/1     CrashLoopBackOff   12 (4m4s ago)   40m   10.88.0.2   127.0.0.1   <none>           <none>

Questions about k8s installation method and wasmedge operation method

Hello, I am very pleased to see the article, thank you for your contribution. I have two questions:

  1. According to the document, k8s is installed in a hack way. I would like to ask whether installing k8s in binary mode can support wasmedge? Have you tried this way?
  2. When k8s runs the wasmedge container, it runs directly in pod mode? Does it support pod controllers? Such as deployment?
    Thanks

Can I run WasmEdge on K3S?

If so, is there anything special I need to do so have a properly running environment for experimenting with WasmEdge?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.