2 ## Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 SUMMARY = "StarlingX Platform Helm charts"
17 DESCRIPTION = "StarlingX Platform Helm charts"
19 LICENSE = "Apache-2.0"
20 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
25 openstack-helm-infra \
30 SRCREV_platform-armada-app = "c67d1eeb605ea1da4ebb2a1219a6f54f05e3eb5e"
31 SRCREV_helm-charts = "c01426a2500269fbf1a781214a361de0796297d1"
34 git://opendev.org/starlingx/platform-armada-app.git;protocol=${PROTOCOL};branch=${BRANCH};name=platform-armada-app \
35 git://opendev.org/starlingx/helm-charts.git;protocol=${PROTOCOL};branch=${BRANCH};name=helm-charts;destsuffix=helm-charts \
38 S = "${WORKDIR}/git/stx-platform-helm/stx-platform-helm"
42 toolkit_version = "0.1.0"
43 helm_folder = "${RECIPE_SYSROOT}${nonarch_libdir}/helm"
44 helm_repo = "stx-platform"
46 app_name = "platform-integ-apps"
47 app_staging = "${B}/staging"
48 app_tarball = "${app_name}.tgz"
49 app_folder = "/usr/local/share/applications/helm"
56 # initialize helm and build the toolkit
57 # helm init --client-only does not work if there is no networking
58 # The following commands do essentially the same as: helm init
59 export HOME="${B}/${USER}"
60 export helm_home="${B}/${USER}/.helm"
64 mkdir ${helm_home}/repository
65 mkdir ${helm_home}/repository/cache
66 mkdir ${helm_home}/repository/local
67 mkdir ${helm_home}/plugins
68 mkdir ${helm_home}/starters
69 mkdir ${helm_home}/cache
70 mkdir ${helm_home}/cache/archive
72 # Stage a repository file that only has a local repo
73 cp ${S}/files/repositories.yaml ${helm_home}/repository/repositories.yaml
75 # Stage a local repo index that can be updated by the build
76 cp ${S}/files/index.yaml ${helm_home}/repository/local/index.yaml
78 # Stage helm-toolkit in the local repo
79 cp ${helm_folder}/helm-toolkit-${toolkit_version}.tgz ${S}/helm-charts/
81 # Host a server for the charts
82 helm serve --repo-path . &
85 helm repo add local http://localhost:8879/charts
87 # Make the charts. These produce a tgz file
88 cp -rf ${WORKDIR}/helm-charts/node-feature-discovery/node-feature-discovery/helm-charts/node-feature-discovery/ \
93 make node-feature-discovery
96 # Terminate helm server (the last backgrounded task)
100 # Create a chart tarball compliant with sysinv kube-app.py
102 mkdir -p ${app_staging}
103 cp ${S}/files/metadata.yaml ${app_staging}
104 cp ${S}/manifests/manifest.yaml ${app_staging}
106 mkdir -p ${app_staging}/charts
107 cp ${S}/helm-charts/*.tgz ${app_staging}/charts
111 sed -i 's/@APP_NAME@/${app_name}/g' ${app_staging}/metadata.yaml
112 sed -i 's/@APP_VERSION@/${version}-${tis_patch_ver}/g' ${app_staging}/metadata.yaml
113 sed -i 's/@HELM_REPO@/${helm_repo}/g' ${app_staging}/metadata.yaml
116 find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
117 tar -zcf ${B}/${app_tarball} -C ${app_staging}/ .
120 rm -fr ${app_staging}
124 install -d -m 755 ${D}/${app_folder}
125 install -p -D -m 755 ${B}/${app_tarball} ${D}/${app_folder}
126 install -d -m 755 ${D}/opt/extracharts
127 install -p -D -m 755 ${S}/helm-charts/node-feature-discovery-*.tgz ${D}/opt/extracharts
138 openstack-helm-infra \