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

sysext: add wasmedge recipe #101

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Conversation

hydai
Copy link
Contributor

@hydai hydai commented Nov 26, 2024

Add WasmEdge sysext

This PR creates a sysext for running WasmEdge on Flatcar.

How to use

Run create_wasmedge_sysext.sh for building the .raw file.

Then, use the following config:

variant: flatcar
version: 1.0.0
storage:
  files:
    - path: /opt/extensions/wasmedge-0.14.1-x86-64.raw
      mode: 0420
      contents:
        source: https://github.com/flatcar/sysext-bakery/releases/download/wasmedge-0.14.1-x86-64.raw
  links:
    - target: /opt/extensions/wasmedge-0.14.1-x86-64.raw
      path: /etc/extensions/wasmedge.raw
      hard: false

Testing done

I deployed an instance with Flatcar-Stable-4081.2.0 on DigitalOcean. You can provide any wasm file to verify it. I just used a very simple wasm that adds two numbers.

Last login: Tue Nov 26 04:32:52 UTC 2024 from 60.248.109.122 on ssh
Flatcar Container Linux by Kinvolk stable 4081.2.0 for DigitalOcean
core@core-3 ~ $ wasmedge --reactor /tmp/add.wasm add 1 3
4

Note:

For testing, I used the following template:

variant: flatcar
version: 1.0.0
storage:
  files:
    - path: /opt/extensions/wasmedge-0.14.1-x86-64.raw
      mode: 0420
      contents:
        source: https://github.com/second-state/flatcar-sysext-bakery/releases/download/0.0.1/wasmedge-0.14.1-x86-64.raw
  links:
    - target: /opt/extensions/wasmedge-0.14.1-x86-64.raw
      path: /etc/extensions/wasmedge.raw
      hard: false

Copy link
Contributor

@tormath1 tormath1 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this contribution, I've tested it looks fine :)

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.

2 participants