mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-05 05:15:25 +02:00
kata: WIP
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
parent
100fb480e7
commit
d9c64d8aa0
39
recipes-core/kata-containers/kata-agent_git.bb
Normal file
39
recipes-core/kata-containers/kata-agent_git.bb
Normal file
|
@ -0,0 +1,39 @@
|
|||
DESCRIPTION = "Agent run inside a virtual machine, which spawns containers and processes"
|
||||
HOMEPAGE = "https://github.com/kata-containers/agent"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://src/github.com/kata-containers/agent/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
|
||||
GO_IMPORT = "github.com/kata-containers/agent"
|
||||
SRCREV = "e03f7d7453fabffb17e1540f28666c26178d3cbf"
|
||||
SRC_URI = "git://${GO_IMPORT}.git \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN}-dev_append = "bash"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit go
|
||||
|
||||
do_compile() {
|
||||
# Pass the needed cflags/ldflags so that cgo
|
||||
# can find the needed headers files and libraries
|
||||
export GOARCH=${TARGET_GOARCH}
|
||||
export CGO_ENABLED="1"
|
||||
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
cd ${S}/src/${GO_IMPORT}
|
||||
oe_runmake kata-agent
|
||||
}
|
||||
|
||||
do_install() {
|
||||
mkdir -p ${D}/${bindir}/
|
||||
cp ${WORKDIR}/git/src/${GO_IMPORT}/kata-agent ${D}/${bindir}
|
||||
|
||||
mkdir -p ${D}/${systemd_unitdir}/system
|
||||
cp ${WORKDIR}/git/src/${GO_IMPORT}/kata-agent.service ${D}/${systemd_unitdir}/system
|
||||
}
|
||||
|
||||
deltask compile_ptest_base
|
||||
|
||||
FILES_${PN} += "${systemd_unitdir}/*"
|
34
recipes-core/kata-containers/kata-proxy_git.bb
Normal file
34
recipes-core/kata-containers/kata-proxy_git.bb
Normal file
|
@ -0,0 +1,34 @@
|
|||
DESCRIPTION = " Kata Containers stdio proxy component"
|
||||
HOMEPAGE = "https://github.com/kata-containers/proxy"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://src/github.com/kata-containers/proxy/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
|
||||
GO_IMPORT = "github.com/kata-containers/proxy"
|
||||
SRCREV = "1148847739f9a9f47b92e34e4f309dc109d4dba9"
|
||||
SRC_URI = "git://${GO_IMPORT}.git \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN}-dev_append = "bash"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit go
|
||||
|
||||
do_compile() {
|
||||
# Pass the needed cflags/ldflags so that cgo
|
||||
# can find the needed headers files and libraries
|
||||
export GOARCH=${TARGET_GOARCH}
|
||||
export CGO_ENABLED="1"
|
||||
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
cd ${S}/src/${GO_IMPORT}
|
||||
oe_runmake kata-proxy
|
||||
}
|
||||
|
||||
do_install() {
|
||||
mkdir -p ${D}/${libexecdir}/kata-containers
|
||||
cp ${WORKDIR}/git/src/${GO_IMPORT}/kata-proxy ${D}/${libexecdir}/kata-containers
|
||||
}
|
||||
|
||||
deltask compile_ptest_base
|
59
recipes-core/kata-containers/kata-runtime_git.bb
Normal file
59
recipes-core/kata-containers/kata-runtime_git.bb
Normal file
|
@ -0,0 +1,59 @@
|
|||
DESCRIPTION = " The Command-Line Interface (CLI) part of the Kata Containers runtime component"
|
||||
HOMEPAGE = "https://github.com/kata-containers/runtime"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://src/github.com/kata-containers/runtime/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
|
||||
GO_IMPORT = "github.com/kata-containers/runtime"
|
||||
SRCREV = "f4cf2137be58c3778d87a8ee8e258e68d1ede888"
|
||||
SRC_URI = "git://${GO_IMPORT}.git \
|
||||
"
|
||||
RDEPENDS_${PN}-dev_append = "bash"
|
||||
RDEPENDS_${PN} = " \
|
||||
qemu \
|
||||
hyperstart \
|
||||
"
|
||||
|
||||
# grpc
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit go
|
||||
|
||||
do_compile() {
|
||||
# Pass the needed cflags/ldflags so that cgo
|
||||
# can find the needed headers files and libraries
|
||||
export GOARCH=${TARGET_GOARCH}
|
||||
export CGO_ENABLED="1"
|
||||
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
cd ${S}/src/${GO_IMPORT}
|
||||
oe_runmake runtime
|
||||
}
|
||||
|
||||
do_install() {
|
||||
mkdir -p ${D}/${bindir}
|
||||
cp ${WORKDIR}/git/src/${GO_IMPORT}/kata-runtime ${D}/${bindir}
|
||||
|
||||
mkdir -p ${D}/${datadir}/defaults/kata-containers/
|
||||
cp ${WORKDIR}/git/src/${GO_IMPORT}/cli/config/configuration.toml ${D}/${datadir}/defaults/kata-containers/
|
||||
|
||||
sed -e 's|/usr/bin/qemu-lite-system-x86_64|/usr/bin/qemu-system-x86_64|' -i ${D}/${datadir}/defaults/kata-containers/configuration.toml
|
||||
sed -e 's|/usr/share/kata-containers/vmlinuz.container|/var/lib/hyper/kernel|' -i ${D}/${datadir}/defaults/kata-containers/configuration.toml
|
||||
sed -e 's|/usr/share/kata-containers/kata-containers-initrd.img|/var/lib/hyper/hyper-initrd.img|' -i ${D}/${datadir}/defaults/kata-containers/configuration.toml
|
||||
sed -e 's/^\(image =.*\)/# \1/g' -i ${D}/${datadir}/defaults/kata-containers/configuration.toml
|
||||
|
||||
# TODO: modify the config file for the configured kernel and fix the location of the qemu-system-binary
|
||||
|
||||
# /usr/share/defaults/kata-containers/configuration.toml: file /usr/libexec/kata-containers/kata-shim does not exist
|
||||
# fork/exec /usr/libexec/kata-containers/kata-proxy: no such file or directory
|
||||
|
||||
#64 mknod /dev/kvm c 10 232
|
||||
#68 kata-runtime --log=/dev/stdout run --bundle /opt/container/cube-server foo
|
||||
|
||||
|
||||
}
|
||||
|
||||
FILES_${PN} += "${datadir}/defaults/kata-containers/*"
|
||||
|
||||
deltask compile_ptest_base
|
34
recipes-core/kata-containers/kata-shim_git.bb
Normal file
34
recipes-core/kata-containers/kata-shim_git.bb
Normal file
|
@ -0,0 +1,34 @@
|
|||
DESCRIPTION = " Handle stdio and signals of the container process"
|
||||
HOMEPAGE = "https://github.com/kata-containers/shim"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://src/github.com/kata-containers/shim/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
|
||||
GO_IMPORT = "github.com/kata-containers/shim"
|
||||
SRCREV = "bcc35aeca3ef6fa0976005c9e93525906aefed2f"
|
||||
SRC_URI = "git://${GO_IMPORT}.git \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN}-dev_append = "bash"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit go
|
||||
|
||||
do_compile() {
|
||||
# Pass the needed cflags/ldflags so that cgo
|
||||
# can find the needed headers files and libraries
|
||||
export GOARCH=${TARGET_GOARCH}
|
||||
export CGO_ENABLED="1"
|
||||
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
cd ${S}/src/${GO_IMPORT}
|
||||
oe_runmake kata-shim
|
||||
}
|
||||
|
||||
do_install() {
|
||||
mkdir -p ${D}/${libexecdir}/kata-containers
|
||||
cp ${WORKDIR}/git/src/${GO_IMPORT}/kata-shim ${D}/${libexecdir}/kata-containers
|
||||
}
|
||||
|
||||
deltask compile_ptest_base
|
Loading…
Reference in New Issue
Block a user