[meta-virtualization] [PATCH 1/4] cni: add 0.7.1 for cni and 0.7.5 for plugins
ChenQi
Qi.Chen at windriver.com
Tue Aug 13 18:41:54 PDT 2019
On 08/13/2019 08:31 PM, Bruce Ashfield wrote:
>
>
> On Tue, Aug 13, 2019 at 3:52 AM Chen Qi <Qi.Chen at windriver.com
> <mailto:Qi.Chen at windriver.com>> wrote:
>
> This version is proved to work well for simple k8s flannel setup.
>
>
> Nope. We have no reason to use version locked recipes for this. I want
> one version for the layer, not a _git and a versioned set of plugins.
>
> Upgrade the main _cni plugin to the latest version, make sure it works
> with kubernetes and that's the version we'll use.
>
I've replied in another email what problem is with the current version
of cni. Hope you can reproduce it on your side.
Apart form this, I have several questions, and I hope to hear your opinion.
1. Docker version with k8s
I've seen warnings from k8s telling me that the current docker
version is not supported/validated upstream. Do you think it's a
problem? From what I know, k8s team is not very interested in validating
latest docker.
2. Docker upstream
We are currently using moby. There's another recipe called
docker-ce, making use of docker-ce repo. Ubuntu is using docker-ce. I
did a little investigation. Moby is actually the community version while
docker-ce is maintained by Docker Inc. Do you think we should do
something about it? Which one should we prefer? moby or docker-ce?
3. k8s version
The current version is not the latest stable version (1.15.2). I
hope this 1.16 version would come be released stable, but we cannot
control it. Do you think we should have a stable version of k8s?
From what I know, OE's policy is using stable version unless there's
some compelling reason. All these container/k8s things are being
actively developed, and that could be a reason. But should we also have
some stable versions? I don't think users would like to use unstable
version in their production environment.
Best Regards,
Chen Qi
> Cheers,
>
> Bruce
>
> Signed-off-by: Chen Qi <Qi.Chen at windriver.com
> <mailto:Qi.Chen at windriver.com>>
> ---
> recipes-networking/cni/cni_0.7.1.bb <http://cni_0.7.1.bb> | 79
> +++++++++++++++++++++++++++++
> 1 file changed, 79 insertions(+)
> create mode 100644 recipes-networking/cni/cni_0.7.1.bb
> <http://cni_0.7.1.bb>
>
> diff --git a/recipes-networking/cni/cni_0.7.1.bb
> <http://cni_0.7.1.bb> b/recipes-networking/cni/cni_0.7.1.bb
> <http://cni_0.7.1.bb>
> new file mode 100644
> index 0000000..7a3b87f
> --- /dev/null
> +++ b/recipes-networking/cni/cni_0.7.1.bb <http://cni_0.7.1.bb>
> @@ -0,0 +1,79 @@
> +HOMEPAGE = "https://github.com/containernetworking/cni"
> +SUMMARY = "Container Network Interface - networking for Linux
> containers"
> +DESCRIPTION = "CNI (Container Network Interface), a Cloud Native
> Computing \
> +Foundation project, consists of a specification and libraries for
> writing \
> +plugins to configure network interfaces in Linux containers,
> along with a \
> +number of supported plugins. CNI concerns itself only with
> network connectivity \
> +of containers and removing allocated resources when the container
> is deleted. \
> +Because of this focus, CNI has a wide range of support and the
> specification \
> +is simple to implement. \
> +"
> +
> +# 0.7.1
> +SRCREV_cni = "4cfb7b568922a3c79a23e438dc52fe537fc9687e"
> +# 0.7.5
> +SRCREV_plugins = "a62711a5da7a2dc2eb93eac47e103738ad923fd6"
> +SRC_URI = "\
> +
> git://github.com/containernetworking/cni.git;branch=master;name=cni
> <http://github.com/containernetworking/cni.git;branch=master;name=cni>
> \
> +
> git://github.com/containernetworking/plugins.git;branch=v0.7;destsuffix=plugins;name=plugins
> <http://github.com/containernetworking/plugins.git;branch=v0.7;destsuffix=plugins;name=plugins>
> \
> + "
> +
> +RPROVIDES_${PN} += "kubernetes-cni"
> +
> +LICENSE = "Apache-2.0"
> +LIC_FILES_CHKSUM =
> "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
> +
> +GO_IMPORT = "import"
> +
> +PV = "0.7.1"
> +
> +inherit go
> +inherit goarch
> +
> +do_compile() {
> + # link fixups for compilation
> + rm -f ${S}/src/import/vendor/src
> + mkdir -p ${S}/src/import/vendor/
> + ln -sf ./ ${S}/src/import/vendor/src
> + rm -rf ${S}/src/import/plugins
> + rm -rf
> ${S}/src/import/vendor/github.com/containernetworking/plugins
> <http://github.com/containernetworking/plugins>
> +
> + mkdir -p
> ${S}/src/import/vendor/github.com/containernetworking/cni
> <http://github.com/containernetworking/cni>
> +
> + ln -sf ../../../../libcni
> ${S}/src/import/vendor/github.com/containernetworking/cni/libcni
> <http://github.com/containernetworking/cni/libcni>
> + ln -sf ../../../../pkg
> ${S}/src/import/vendor/github.com/containernetworking/cni/pkg
> <http://github.com/containernetworking/cni/pkg>
> + ln -sf ../../../../cnitool
> ${S}/src/import/vendor/github.com/containernetworking/cni/cnitool
> <http://github.com/containernetworking/cni/cnitool>
> + ln -sf ${WORKDIR}/plugins
> ${S}/src/import/vendor/github.com/containernetworking/plugins
> <http://github.com/containernetworking/plugins>
> +
> + export
> GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
> + export CGO_ENABLED="1"
> +
> + cd
> ${S}/src/import/vendor/github.com/containernetworking/cni/libcni
> <http://github.com/containernetworking/cni/libcni>
> + ${GO} build
> +
> + cd
> ${S}/src/import/vendor/github.com/containernetworking/cni/cnitool
> <http://github.com/containernetworking/cni/cnitool>
> + ${GO} build
> +
> + cd
> ${S}/src/import/vendor/github.com/containernetworking/plugins/
> <http://github.com/containernetworking/plugins/>
> + PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/ipam/*; ls
> -d plugins/main/* | grep -v windows)"
> + mkdir -p ${WORKDIR}/plugins/bin/
> + for p in $PLUGINS; do
> + plugin="$(basename "$p")"
> + echo "building: $p"
> + ${GO} build -o ${WORKDIR}/plugins/bin/$plugin
> github.com/containernetworking/plugins/$p
> <http://github.com/containernetworking/plugins/$p>
> + done
> +}
> +
> +do_install() {
> + localbindir="/opt/cni/bin"
> +
> + install -d ${D}${localbindir}
> + install -d ${D}/${sysconfdir}/cni/net.d
> +
> + install -m 755 ${S}/src/import/cnitool/cnitool
> ${D}/${localbindir}
> + install -m 755 -D ${WORKDIR}/plugins/bin/* ${D}/${localbindir}
> +}
> +
> +FILES_${PN} += "/opt/cni/bin/*"
> +
> +INSANE_SKIP_${PN} += "ldflags already-stripped"
> --
> 2.17.1
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization at yoctoproject.org
> <mailto:meta-virtualization at yoctoproject.org>
> https://lists.yoctoproject.org/listinfo/meta-virtualization
>
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-virtualization/attachments/20190814/b6a7f4c4/attachment.html>
More information about the meta-virtualization
mailing list