cpu-manager-for-kubernetes: add new recipe
[pti/rtp.git] / meta-oran / recipes-containers / kubernetes-plugins / cpu-manager-for-kubernetes_1.3.1.bb
1 #
2 # Copyright (C) 2019 Wind River Systems, Inc.
3 #
4
5 SUMMARY = "CPU Manager for Kubernetes"
6 uDESCRIPTION = "\
7   This project provides basic core affinity for NFV-style workloads \
8   on top of vanilla Kubernetes v1.5+. \
9   This project ships a single multi-use command-line program to perform \
10   various functions for host configuration, managing groups of CPUs, \
11   and constraining workloads to specific CPUs. \
12 "
13 HOMEPAGE = "https://github.com/intel/CPU-Manager-for-Kubernetes"
14
15 LICENSE = "Apache-2.0"
16 LIC_FILES_CHKSUM = "file://LICENSE;md5=d62f25248fea71c71fb2b520c72b5171"
17
18 SRC_URI = "\
19     https://github.com/intel/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BPN}-v${PV}.tar.gz \
20     file://docker-img-cmk-v1.3.1.tar.bz2;unpack=0 \
21     file://cmk-requirements.txt-add-urllib3-1.24.patch \
22     file://cmk-cluster-init-pod-template.yaml \
23 "
24
25 SRC_URI[md5sum] = "5ec9f665524b86654dedb2e6826851ed"
26 SRC_URI[sha256sum] = "e86feb81751c6715247577c47070beca273022b470ae09c856e6da72f185688f"
27
28 S = "${WORKDIR}/CPU-Manager-for-Kubernetes-${PV}"
29
30 PACKAGES =+ "${PN}-img"
31
32 DOCKER_IMG = "/opt/docker_images/${BPN}"
33 K8S_PLUGINS_SRC = "/opt/kubernetes_plugins/${BPN}"
34 K8S_PLUGINS = "${sysconfdir}/kubernetes/plugins/${BPN}"
35
36 do_configure() {
37     :
38 }
39
40 do_compile() {
41     :
42 }
43
44 do_install() {
45     # Install the config files
46     install -d ${D}${K8S_PLUGINS}
47     install -m 644 ${S}/resources/authorization/cmk-serviceaccount.yaml ${D}${K8S_PLUGINS}
48     install -m 644 ${S}/resources/authorization/cmk-rbac-rules.yaml ${D}${K8S_PLUGINS}
49     install -m 644 ${WORKDIR}/cmk-cluster-init-pod-template.yaml ${D}${K8S_PLUGINS}
50
51     # Install the saved docker image
52     install -d ${D}${DOCKER_IMG}
53     install -m 644 ${WORKDIR}/docker-img-*.tar.bz2 ${D}${DOCKER_IMG}
54
55     # Install all the src
56     install -d ${D}${K8S_PLUGINS_SRC}
57     cp -a --no-preserve=ownership ${S}/* ${D}${K8S_PLUGINS_SRC}
58 }
59
60 FILES_${PN} += "${K8S_PLUGINS_SRC}"
61 FILES_${PN}-img = "${DOCKER_IMG}"
62
63 # provides a short alias
64 RPROVIDES_${PN} = "cmk"
65 RPROVIDES_${PN}-img = "cmk-img"
66
67 INSANE_SKIP_${PN} = "file-rdeps"