Skip to content

Commit

Permalink
examples: Use latest image and fixes
Browse files Browse the repository at this point in the history
This commit fixes the build script to be explicit about the
configuration of kraft (kraft's cache), as well as forcing the
unikernel to be re-configured.

Signed-off-by: Alexander Jung <[email protected]>
  • Loading branch information
nderjung committed Oct 13, 2021
1 parent 1be84fb commit 4182a27
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions examples/unikraft-nginx/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,16 @@ outputs:

runs:
- name: build
image: wayfinder/unikraft
image: ghcr.io/lancs-net/wayfinder/unikraft:latest
cores: 1
devices:
- /dev/urandom
cmd:
|
set -ex
export UK_WORKDIR=/usr/src/unikraft
export KRAFTRC=/usr/src/unikraft/.kraftrc
export UK_CACHEDIR=/usr/src/unikraft/.kraftcache
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
for env in $(cat /etc/environment); do \
Expand All @@ -85,7 +87,7 @@ runs:

cd /usr/src/unikraft/apps/nginx

kraft -v configure \
kraft -v configure -F \
--arch x86_64 \
--plat kvm \
--set LWIP_NUM_TCPCON=$LWIP_NUM_TCPCON \
Expand All @@ -99,7 +101,7 @@ runs:
--no LIB9PFS \
--no LIBUK9P

kraft build
kraft build --no-progress --fast
cat /nginx-$OPEN_FILE_CACHE.conf | sed "s/\$WORKER_CONNECTIONS/${WORKER_CONNECTIONS}/g" > ./fs0/nginx/conf/nginx.conf
if [[ $ACCESS_LOG == "y" ]]; then \
export ACCESS_LOG="\/dev\/stdout"; \
Expand All @@ -116,8 +118,8 @@ runs:
tr -dc A-Za-z0-9 </dev/urandom | head -c ${PAYLOAD_SIZE} > ./nginx/html/payload.txt
find -depth -print | tac | bsdcpio -o --format newc > ../initramfs.cpio

- name: run
image: wayfinder/unikraft
- name: test
image: ghcr.io/lancs-net/wayfinder/unikraft:latest
cores: 30
devices:
- /dev/kvm
Expand Down

0 comments on commit 4182a27

Please sign in to comment.