Skip to content
Open
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
54 changes: 52 additions & 2 deletions .github/workflows/library-dragonfly1.14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,59 @@ jobs:
path: ${{ github.workspace }}/.kraftkit/oci/digests
if-no-files-found: error

test:
needs: [ build ]
strategy:
fail-fast: false
matrix:
include:
- plat: qemu
arch: x86_64
- plat: fc
arch: x86_64

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install KraftKit
run: |
curl -sS https://get.kraftkit.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Test Dragonfly functionality
if: matrix.plat == 'qemu'
run: |
echo "Install redis-tools to test connection"
sudo apt-get update
sudo apt-get install -y redis-tools

echo "Prepare image on the new server..."
kraft build --plat ${{ matrix.plat }} --arch ${{ matrix.arch }}

echo "Start Dragonfly Unikernel in background"
kraft run --rm --plat ${{ matrix.plat }} --arch ${{ matrix.arch }} -M 512M -p 6379:6379 &
KRAFT_PID=$!

echo "Wait 5 seconds for system boot..."
sleep 5

echo "Send PING to Dragonfly on port 6379"
if redis-cli -h 127.0.0.1 -p 6379 ping | grep -q "PONG"; then
echo "SUCCESS: Dragonfly answered with PONG"
kill $KRAFT_PID
exit 0
else
echo "ERROR: Dragonfly did not answer"
kill $KRAFT_PID
exit 1
fi
working-directory: library/dragonfly/1.14

push:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
needs: [ build ]
needs: [ test ]
runs-on: ubuntu-latest

steps:
Expand All @@ -77,4 +127,4 @@ jobs:
uses: ./.github/actions/merge-oci-digests
with:
name: index.unikraft.io/unikraft.org/dragonfly:1.14
push: true
push: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add ending newline.

51 changes: 50 additions & 1 deletion .github/workflows/library-grafana10.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,58 @@ jobs:
path: ${{ github.workspace }}/.kraftkit/oci/digests
if-no-files-found: error

test:
needs: [ build ]
strategy:
fail-fast: false
matrix:
include:
- plat: qemu
arch: x86_64
- plat: fc
arch: x86_64

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install KraftKit
run: |
curl -sS https://get.kraftkit.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Test Grafana functionality
if: matrix.plat == 'qemu'
run: |
echo "Prepare image on the new server..."
kraft build --plat ${{ matrix.plat }} --arch ${{ matrix.arch }}

echo "Start Grafana Unikernel in background"
kraft run --rm --plat ${{ matrix.plat }} --arch ${{ matrix.arch }} -M 2048M -p 3000:3000 &
KRAFT_PID=$!

echo "Wait 10 seconds for the web server to boot"
sleep 10

echo "Send HTTP request to Grafana on port 3000"
# HTTP status code
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3000/ || echo "000")

if [ "$HTTP_STATUS" = "200" ] || [ "$HTTP_STATUS" = "302" ]; then
echo "SUCCESS"
kill $KRAFT_PID
exit 0
else
echo "ERROR"
kill $KRAFT_PID
exit 1
fi
working-directory: library/grafana/10.2

push:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
needs: [ build ]
needs: [ test ]
runs-on: ubuntu-latest

steps:
Expand Down
50 changes: 49 additions & 1 deletion .github/workflows/library-hugo0.122.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,57 @@ jobs:
path: ${{ github.workspace }}/.kraftkit/oci/digests
if-no-files-found: error

test:
needs: [ build ]
strategy:
fail-fast: false
matrix:
include:
- plat: qemu
arch: x86_64
- plat: fc
arch: x86_64

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install KraftKit
run: |
curl -sS https://get.kraftkit.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Test hugo functionality
if: matrix.plat == 'qemu'
run: |
echo "Prepare image on the new server..."
kraft build --plat ${{ matrix.plat }} --arch ${{ matrix.arch }}

echo "Start Hugo Unikernel in background"
kraft run --rm --plat ${{ matrix.plat }} --arch ${{ matrix.arch }} -M 1024M -p 1313:1313 &
KRAFT_PID=$!

echo "Wait 5 seconds for the web server to boot"
sleep 5

echo "Send HTTP request to Hugo on port 1313"
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:1313/ || echo "000")

if [ "$HTTP_STATUS" = "200" ] || [ "$HTTP_STATUS" = "302" ]; then
echo "SUCCESS"
kill $KRAFT_PID
exit 0
else
echo "ERROR"
kill $KRAFT_PID
exit 1
fi
working-directory: library/hugo/0.122

push:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
needs: [ build ]
needs: [ test ]
runs-on: ubuntu-latest

steps:
Expand Down
52 changes: 50 additions & 2 deletions .github/workflows/library-imaginary1.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,57 @@ jobs:
path: ${{ github.workspace }}/.kraftkit/oci/digests
if-no-files-found: error

test:
needs: [ build ]
strategy:
fail-fast: false
matrix:
include:
- plat: qemu
arch: x86_64
- plat: fc
arch: x86_64

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install KraftKit
run: |
curl -sS https://get.kraftkit.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Test imaginary functionality
if: matrix.plat == 'qemu'
run: |
echo "Prepare image on the new server..."
kraft build --plat ${{ matrix.plat }} --arch ${{ matrix.arch }}

echo "Start Imaginary in background"
kraft run --rm --plat ${{ matrix.plat }} --arch ${{ matrix.arch }} -M 512M -p 8080:8080 &
KRAFT_PID=$!

echo "Wait 5 seconds for server boot"
sleep 5

echo "Send HTTP request to health endpoint on port 8080"
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8080/health || echo "000")

if [ "$HTTP_STATUS" = "200" ]; then
echo "SUCCESS"
kill $KRAFT_PID
exit 0
else
echo "ERROR"
kill $KRAFT_PID
exit 1
fi
working-directory: library/imaginary/1.2

push:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
needs: [ build ]
needs: [ test ]
runs-on: ubuntu-latest

steps:
Expand All @@ -77,4 +125,4 @@ jobs:
uses: ./.github/actions/merge-oci-digests
with:
name: index.unikraft.io/unikraft.org/imaginary:1.2
push: true
push: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add ending newline.

18 changes: 13 additions & 5 deletions library/redis/7.0/Kraftfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ name: redis

rootfs: ./rootfs

cmd: ["/redis.conf"]
#cmd: ["/redis.conf"]
cmd: ["/redis-server", "/redis.conf", "--protected-mode", "no"]

unikraft:
version: staging
#version: staging
#version: v0.14.0
version: stable
kconfig:
CONFIG_LIBDEVFS_AUTOMOUNT: 'y'
CONFIG_LIBDEVFS: 'y'
Expand Down Expand Up @@ -43,9 +46,13 @@ targets:
- fc/arm64

libraries:
musl: staging
#musl: staging
#musl: v0.14.0
musl: stable
lwip:
version: staging
#version: staging
#version: v0.14.0
version: stable
kconfig:
CONFIG_LWIP_UKNETDEV: 'y'
CONFIG_LWIP_TCP: 'y'
Expand All @@ -58,7 +65,8 @@ libraries:
CONFIG_LWIP_DHCP: 'y'
CONFIG_LWIP_DNS: 'y'
redis:
version: staging
#version: staging
version: stable
kconfig:
CONFIG_LIBREDIS_SERVER: 'y'
CONFIG_LIBREDIS_COMMON: 'y'
Expand Down
8 changes: 4 additions & 4 deletions library/redis/7.2/Kraftfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ cmd: ["/usr/bin/redis-server", "/etc/redis/redis.conf"]

template:
source: https://github.com/unikraft/app-elfloader.git
version: staging
version: stable

unikraft:
source: https://github.com/unikraft/unikraft.git
version: staging
version: stable
kconfig:
# Configurations options for app-elfloader
# (they can't be part of the template atm)
Expand Down Expand Up @@ -117,7 +117,7 @@ unikraft:
libraries:
lwip:
source: https://github.com/unikraft/lib-lwip.git
version: staging
version: stable
kconfig:
CONFIG_LWIP_LOOPIF: 'y'
CONFIG_LWIP_UKNETDEV: 'y'
Expand All @@ -139,7 +139,7 @@ libraries:
CONFIG_LWIP_ICMP: 'y'
libelf:
source: https://github.com/unikraft/lib-libelf.git
version: staging
version: stable

targets:
- fc/x86_64
Expand Down
Loading