All of lore.kernel.org
 help / color / mirror / Atom feed
From: chunrong.guo@nxp.com
To: meta-freescale@yoctoproject.org
Cc: Chunrong Guo <chunrong.guo@nxp.com>
Subject: [PATCH v2 2/7] qoriq-eds-kubelet: add recipes
Date: Tue,  8 May 2018 17:29:43 +0800	[thread overview]
Message-ID: <1525771788-15025-2-git-send-email-chunrong.guo@nxp.com> (raw)
In-Reply-To: <1525771788-15025-1-git-send-email-chunrong.guo@nxp.com>

From: Chunrong Guo <chunrong.guo@nxp.com>

*include the following changes:
d3ada01 - Kubernetes version v1.7.0 file updates
14b32e4 - Merge pull request #48162 from yguo0905/automated-cherry-pick-of-#47549-upstream-release-1.7
4a4b04e - Merge pull request #48266 from piosz/automated-cherry-pick-of-#48066-upstream-release-1.7
e8b5441 - Revert "Decrese fluentd cpu request"
d420643 - Merge pull request #48218 from dnardo/automated-cherry-pick-of-#48004-upstream-release-1.7
3a79966 - Merge pull request #48155 from ajitak/automated-cherry-pick-of-#47892-upstream-release-1.7
3648549 - Merge pull request #48229 from caesarxuchao/automated-cherry-pick-of-#48205-#48183-#48118-upstream-release-1.7
5afafb6 - Merge pull request #48238 from caesarxuchao/automated-cherry-pick-of-#48235-upstream-release-1.7
d7bb1ef - Implement GetCapacity in container_manager_unsupported
77c5be4 - Merge pull request #48230 from caesarxuchao/automated-cherry-pick-of-#48123-upstream-release-1.7
641ace7 - Kubelet: Centralize Capacity discovery of standard resources in Container manager. Have storage derive node capacity from container manager. Move certain cAdvisor interfa
28c96d1 - Ensures node becomes schedulable at the end of tests that delete nodes
72c2705 - Fix kube-proxy panic when running with "--cleanup-iptables=true"

Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
---
 recipes-containers/qoriq-eds/qoriq-eds-kubelet.bb  | 90 ++++++++++++++++++++++
 .../build-kube-toolchain-to-run-on-host.patch      | 19 +++++
 2 files changed, 109 insertions(+)
 create mode 100644 recipes-containers/qoriq-eds/qoriq-eds-kubelet.bb
 create mode 100644 recipes-containers/qoriq-eds/qoriq-eds-kubelet/build-kube-toolchain-to-run-on-host.patch

diff --git a/recipes-containers/qoriq-eds/qoriq-eds-kubelet.bb b/recipes-containers/qoriq-eds/qoriq-eds-kubelet.bb
new file mode 100644
index 0000000..26da900
--- /dev/null
+++ b/recipes-containers/qoriq-eds/qoriq-eds-kubelet.bb
@@ -0,0 +1,90 @@
+HOMEPAGE = "git://github.com/kubernetes/kubernetes"
+SUMMARY = "Production-Grade Container Scheduling and Management"
+DESCRIPTION = "Kubernetes is an open source system for managing containerized \
+applications across multiple hosts, providing basic mechanisms for deployment, \
+maintenance, and scaling of applications. \
+"
+
+SRC_URI = "git://github.com/kubernetes/kubernetes.git;nobranch=1;name=kubernetes \
+      file://build-kube-toolchain-to-run-on-host.patch \
+"
+SRCREV = "d3ada0119e776222f11ec7945e6d860061339aad"
+
+DEPENDS += "rsync-native \
+            coreutils-native \
+           "
+ALLOW_EMPTY_${PN} = "1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+GO_IMPORT = "import"
+
+inherit systemd
+inherit go
+inherit goarch
+
+do_compile() {
+        sed -i "s:export CC=.*-gcc$:export CC=${HOST_PREFIX}gcc:g" ${S}/src/import/hack/lib/golang.sh
+	export GOARCH="${TARGET_GOARCH}"
+	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+	export GOPATH="${S}/src/import:${S}/src/import/vendor"
+
+	# Pass the needed cflags/ldflags so that cgo
+	# can find the needed headers files and libraries
+	export CGO_ENABLED="1"
+	export CFLAGS=""
+	export LDFLAGS=""
+	export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+	export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+
+	# link fixups for compilation
+	rm -f ${S}/src/import/vendor/src
+	ln -sf ./ ${S}/src/import/vendor/src
+
+	export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+	export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
+
+	# Pass the needed cflags/ldflags so that cgo
+	# can find the needed headers files and libraries
+	export CGO_ENABLED="1"
+	export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+	export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+
+	cd ${S}/src/import
+        export KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}"
+	export GOARCH="${BUILD_GOARCH}"
+	make generated_files
+	export KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${TARGET_GOARCH}"
+	export GOARCH="${TARGET_GOARCH}"
+	# to limit what is built, use 'WHAT', i.e. make WHAT=cmd/kubelet
+	make WHAT="/cmd/libs/go2idl/deepcopy-gen"
+        make WHAT=cmd/kubelet
+}
+
+do_install() {
+    install -d ${D}${bindir}
+    install -d ${D}${systemd_unitdir}/system/
+    install -d ${D}${systemd_unitdir}/system/kubelet.service.d/
+
+    install -d ${D}${sysconfdir}/kubernetes/manifests/
+
+    #install -m 755 -D ${S}/src/import/_output/bin/kube* ${D}/${bindir}
+    if ls ${S}/src/import/_output/local/bin/*/${TARGET_GOARCH}/kube* > /dev/null 2>&1 ; then
+        install -m 755 -D ${S}/src/import/_output/local/bin/*/${TARGET_GOARCH}/kube* ${D}/${bindir}
+    elif ls ${S}/src/import/_output/bin/kube* > /dev/null 2>&1 ; then
+        install -m 755 -D ${S}/src/import/_output/bin/kube* ${D}/${bindir}
+    fi
+    install -m 0644 ${S}/src/import/build/debs/kubelet.service  ${D}${systemd_unitdir}/system/
+}
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kubelet','',d)}"
+SYSTEMD_SERVICE_kubelet = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kubelet.service','',d)}"
+SYSTEMD_AUTO_ENABLE_kubelet = "enable"
+
+
+INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} += "ldflags already-stripped"
+
+deltask compile_ptest_base
+BBCLASSEXTEND = "nativesdk"
diff --git a/recipes-containers/qoriq-eds/qoriq-eds-kubelet/build-kube-toolchain-to-run-on-host.patch b/recipes-containers/qoriq-eds/qoriq-eds-kubelet/build-kube-toolchain-to-run-on-host.patch
new file mode 100644
index 0000000..0bd26e2
--- /dev/null
+++ b/recipes-containers/qoriq-eds/qoriq-eds-kubelet/build-kube-toolchain-to-run-on-host.patch
@@ -0,0 +1,19 @@
+Upstream-Status: Inappropriate [embedded-specific]
+
+Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
+
+--- a/src/import/hack/lib/golang.shold	2017-06-30 06:53:16.000000000 +0800
++++ b/src/import/hack/lib/golang.sh	2018-05-02 14:32:40.706915559 +0800
+@@ -668,9 +668,11 @@
+         parallel=false
+       fi
+     fi
+-
++    local goarch_backup=${GOARCH}
++    export GOARCH=$(go env GOHOSTARCH)
+     # First build the toolchain before building any other targets
+     kube::golang::build_kube_toolchain
++    export GOARCH="$goarch_backup"
+ 
+     kube::log::status "Generating bindata:" "${KUBE_BINDATAS[@]}"
+     for bindata in ${KUBE_BINDATAS[@]}; do
-- 
2.7.4



  reply	other threads:[~2018-05-08 13:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  9:29 [PATCH v2 1/7] qoriq-edgescale-eds: add recipes chunrong.guo
2018-05-08  9:29 ` chunrong.guo [this message]
2018-05-08  9:29 ` [PATCH v2 3/7] qoriq-kubelet-extras: " chunrong.guo
2018-05-08  9:29 ` [PATCH v2 4/7] qoriq-eds-bootstrap: " chunrong.guo
2018-05-08  9:29 ` [PATCH v2 5/7] qoriq-eds-puppet: " chunrong.guo
2018-05-08  9:29 ` [PATCH v2 6/7] mqtt: " chunrong.guo
2018-05-22 20:55   ` Otavio Salvador
2018-05-08  9:29 ` [PATCH v2 7/7] est-client-go: " chunrong.guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1525771788-15025-2-git-send-email-chunrong.guo@nxp.com \
    --to=chunrong.guo@nxp.com \
    --cc=meta-freescale@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.