flatcar / sysext-bakery

Recipes for baking systemd-sysext images
Apache License 2.0
72 stars 37 forks source link

Add wasmCloud 1.0 #67

Closed joonas closed 7 months ago

joonas commented 7 months ago

Adds wasmCloud 1.0 into the release versions

wasmCloud 1.0 landed yesterday, so this adds that as a new build version.

How to use

Once the image is built, you can employ the following configuration ignition configuration (replacing with the appropriate value) to consume it:

---
variant: flatcar
version: 1.0.0
storage:
  files:
    - path: /opt/extensions/wasmcloud/wasmcloud-1.0.0-x86-64.raw
      contents:
        source: https://github.com/<your-repository-goes-here>/sysext-bakery/releases/download/latest/wasmcloud-1.0.0-x86-64.raw
    - path: /etc/sysupdate.wasmcloud.d/wasmcloud.conf
      contents:
        source: https://github.com/<your-repository-goes-here>/sysext-bakery/releases/download/latest/wasmcloud.conf
  links:
    - target: /opt/extensions/wasmcloud/wasmcloud-1.0.0-x86-64.raw
      path: /etc/extensions/wasmcloud.raw
      hard: false
systemd:
  units:
    - name: systemd-sysupdate.timer
      enabled: true
    - name: systemd-sysupdate.service
      dropins:
        - name: wasmcloud.conf
          contents: |
            [Service]
            ExecStartPre=/usr/lib/systemd/systemd-sysupdate -C wasmcloud update
        - name: sysext.conf
          contents: |
            [Service]
            ExecStartPost=systemctl restart systemd-sysext

Testing done

I spun up an instance on DigitalOcean using the above and verified that it ships with the appropriate versions:

core@flatcar-demo-01 ~ $ /usr/bin/wasmcloud  --version                                                                                                                                                                                            
wasmcloud 1.0.0
core@flatcar-demo-01 ~ $ /usr/bin/nats-server --version                                                                                                                                                                                           
nats-server: v2.10.14