From: Jackie Huang Date: Wed, 23 Oct 2019 07:26:03 +0000 (+0800) Subject: node-feature-discovery: add new recipe X-Git-Tag: bronze-rc0~128 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=23e0bb08f0414f7ec7d21c6009918840ff141c15;p=pti%2Frtp.git node-feature-discovery: add new recipe This software enables node feature discovery for Kubernetes. It detects hardware features available on each node in a Kubernetes cluster, and advertises those features using node labels. Issue-ID: INF-4 Signed-off-by: Jackie Huang Change-Id: I3f8756abec7fda2d9c8f7990cad56bd0a763b57e --- diff --git a/meta-oran/recipes-containers/kubernetes-plugins/node-feature-discovery_0.4.0.bb b/meta-oran/recipes-containers/kubernetes-plugins/node-feature-discovery_0.4.0.bb new file mode 100644 index 0000000..129a340 --- /dev/null +++ b/meta-oran/recipes-containers/kubernetes-plugins/node-feature-discovery_0.4.0.bb @@ -0,0 +1,51 @@ +# +# Copyright (C) 2019 Wind River Systems, Inc. +# + +SUMMARY = "Node feature discovery for Kubernetes" +DESCRIPTION = "\ + This software enables node feature discovery for Kubernetes. \ + It detects hardware features available on each node in a Kubernetes \ + cluster, and advertises those features using node labels. \ + \ + NFD consists of two software components: \ + - nfd-master is responsible for labeling Kubernetes node objects \ + - nfd-worker is detects features and communicates them to nfd-master. \ + One instance of nfd-worker is supposed to be run on each node of the \ + cluster \ +" +HOMEPAGE = "https://github.com/kubernetes-sigs/node-feature-discovery" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e23fadd6ceef8c618fc1c65191d846fa" + +SRC_URI = "\ + https://github.com/kubernetes-sigs/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BPN}-v${PV}.tar.gz \ + file://docker-img-nfd-v0.4.0.tar.bz2;unpack=0 \ +" + +SRC_URI[md5sum] = "16bcac1d904351a88faa5c6752420ce5" +SRC_URI[sha256sum] = "c9f826e6c7a42161befc155ca0f465ac5667903e74c857e978a99c74574f635e" + +S = "${WORKDIR}/${BPN}-${PV}" + +PACKAGES =+ "${PN}-img" + +DOCKER_IMG = "/opt/docker_images/${BPN}" +K8S_PLUGINS = "${sysconfdir}/kubernetes/plugins/${BPN}" + +do_install() { + install -d ${D}${K8S_PLUGINS} + install -m 644 ${S}/README.md ${D}${K8S_PLUGINS} + install -m 644 ${S}/nfd-daemonset-combined.yaml.template ${D}${K8S_PLUGINS} + install -m 644 ${S}/nfd-worker.conf.example ${D}${K8S_PLUGINS} + install -m 644 ${S}/nfd-worker-job.yaml.template ${D}${K8S_PLUGINS} + install -m 644 ${S}/nfd-master.yaml.template ${D}${K8S_PLUGINS}/nfd-master.yaml + install -m 644 ${S}/nfd-worker-daemonset.yaml.template ${D}${K8S_PLUGINS}/nfd-worker-daemonset.yaml + + # Install the saved docker image + install -d ${D}${DOCKER_IMG} + install -m 644 ${WORKDIR}/docker-img-*.tar.bz2 ${D}${DOCKER_IMG} +} + +FILES_${PN}-img = "${DOCKER_IMG}"