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 = "Monitor Helm Elastic charts"
17 DESCRIPTION = "Monitor Helm Elastic charts"
19 LICENSE = "Apache-2.0"
20 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
29 SRCREV_helm-charts-elastic = "2bd7616ceddbdf2eee88965e2028ee37d304c79c"
30 SRCREV_monitor-armada-app = "e5ee6b3a07b74479b93fe90eff0662cf81890f73"
33 git://github.com/elastic/helm-charts;protocol=${PROTOCOL};name=helm-charts-elastic \
34 git://opendev.org/starlingx/monitor-armada-app.git;protocol=${PROTOCOL};branch=${BRANCH};name=monitor-armada-app;destsuffix=monitor-armada-app \
41 patch_folder = "${WORKDIR}/monitor-armada-app/monitor-helm-elastic/files"
42 helm_folder = "${nonarch_libdir}/helm"
43 helmchart_version = "0.1.0"
47 git am ${patch_folder}/0001-add-makefile.patch
48 git am ${patch_folder}/0002-Add-compatibility-for-k8s-1.16.patch
49 git am ${patch_folder}/0003-use-oss-image.patch
50 git am ${patch_folder}/0004-Update-to-Elastic-7.4.0-Release.patch
51 git am ${patch_folder}/0005-set-initial-masters-to-master-0.patch
59 # initialize helm and build the toolkit
60 # helm init --client-only does not work if there is no networking
61 # The following commands do essentially the same as: helm init
62 export HOME="${B}/${USER}"
63 export helm_home="${B}/${USER}/.helm"
67 mkdir ${helm_home}/repository
68 mkdir ${helm_home}/repository/cache
69 mkdir ${helm_home}/repository/local
70 mkdir ${helm_home}/plugins
71 mkdir ${helm_home}/starters
72 mkdir ${helm_home}/cache
73 mkdir ${helm_home}/cache/archive
75 # Stage a repository file that only has a local repo
76 install -m 0644 ${patch_folder}/repositories.yaml \
77 ${helm_home}/repository/repositories.yaml
79 # Stage a local repo index that can be updated by the build
80 install -m 0644 ${patch_folder}/index.yaml ${helm_home}/repository/local/index.yaml
82 # Host a server for the charts
83 helm serve --repo-path . &
86 helm repo add local http://localhost:8879/charts
88 # Create the tgz files
89 rm -rf elasticsearch/Makefile
92 # terminate helm server (the last backgrounded task)
98 install -d -m 755 ${D}${helm_folder}
99 install -p -D -m 755 ${B}/*.tgz ${D}${helm_folder}
102 FILES_${PN} = "${helm_folder}"