armada: add new recipe

armada is required by the ansible boostrap,
so add the new recipe and add it into the image.

Story: 2008952
Task: 42576

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I4b30993a4144f80edf92d8d7be3df6dd97ec3794
This commit is contained in:
Jackie Huang 2021-06-16 15:06:05 +08:00
parent b5cdff0918
commit c50318aaa7
2 changed files with 75 additions and 1 deletions

View File

@ -200,7 +200,8 @@ RDEPENDS_packagegroup-stx-integ = " \
mariadb \
drbd-utils \
docker-distribution \
docker-forward-journald \
docker-forward-journald \
armada \
etcd \
kubernetes \
ldapscripts \

View File

@ -0,0 +1,73 @@
SUMMARY = "An orchestrator for managing a collection of Kubernetes Helm charts"
DESCRIPTION = "An orchestrator for managing a collection of Kubernetes Helm charts"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
DEPENDS += " \
helm-native \
armada-helm-toolkit \
"
PROTOCOL = "https"
SRCREV = "7ef4b8643b5ec5216a8f6726841e156c0aa54a1a"
PV = "0.2.0+git${SRCPV}"
inherit allarch
inherit stx-chartmuseum
inherit stx-metadata
STX_REPO = "integ"
STX_SUBPATH = "kubernetes/${BPN}/centos/files"
SRC_URI_STX = " \
file://0001-Add-Helm-v2-client-initialization-using-tiller-postS.patch \
"
SRC_URI = " \
git://opendev.org/airship/${BPN}.git;protocol=${PROTOCOL} \
"
S = "${WORKDIR}/git"
helm_folder = "${nonarch_libdir}/helm"
toolkit_version = "0.1.0"
charts_staging = "./charts"
do_configure[noexec] = "1"
do_compile () {
# Stage helm-toolkit in the local repo
cp ${RECIPE_SYSROOT}${helm_folder}/armada-helm-toolkit-${toolkit_version}.tgz ${charts_staging}/helm-toolkit-${toolkit_version}.tgz
# Host a server for the charts
chartmuseum --debug --port=${CHARTMUSEUM_PORT} --context-path='/charts' --storage="local" --storage-local-rootdir="${charts_staging}" &
sleep 2
helm repo add local http://localhost:${CHARTMUSEUM_PORT}/charts
cd ${charts_staging}
helm dependency update armada
helm lint armada
rm -v -f ./requirements.lock ./requirements.yaml
helm template --set pod.resources.enabled=true armada
helm package armada
cd -
# terminate helm server (the last backgrounded task)
kill $!
# Remove the helm-toolkit tarball
rm ${charts_staging}/helm-toolkit-${toolkit_version}.tgz
}
do_install () {
install -d -m 755 ${D}/opt/extracharts
install -p -D -m 755 ${B}/${charts_staging}/armada-*.tgz ${D}/opt/extracharts
}
FILES_${PN} = "/opt/extracharts"
RDEPENDS_${PN} = " \
helm \
"