Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-flock / stx-monitor-armada-app / monitor-helm_1.0.bb
1
2 SUMMARY = "Monitor Helm charts"
3 DESCRIPTION = "Monitor Helm charts"
4
5 LICENSE = "Apache-2.0"
6 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
7
8 DEPENDS += " \
9     helm-native \
10     monitor-helm-elastic \
11 "
12
13 PROTOCOL = "https"
14 BRANCH = "r/stx.3.0"
15 SRCREV_helm-charts = "92b6289ae93816717a8453cfe62bad51cbdb8ad0"
16 SRCREV_monitor-armada-app = "e5ee6b3a07b74479b93fe90eff0662cf81890f73"
17
18 SRC_URI = " \
19     git://github.com/helm/charts;protocol=${PROTOCOL};name=helm-charts \
20     git://opendev.org/starlingx/monitor-armada-app.git;protocol=${PROTOCOL};branch=${BRANCH};name=monitor-armada-app;destsuffix=monitor-armada-app \
21     file://0001-Add-Makefile-for-helm-charts.patch \
22     file://0002-kibana-workaround-checksum-for-configmap.yaml.patch \
23     file://0003-helm-chart-changes-for-stx-monitor.patch \
24     file://0004-ipv6-helm-chart-changes.patch \
25     file://0005-decouple-config.patch \
26     file://0006-add-system-info.patch \
27     file://0007-three-masters.patch \
28     file://0008-Update-stx-monitor-for-kubernetes-API-1.16.patch \
29     file://0009-add-curator-as-of-2019-10-10.patch \
30     file://0010-Update-kube-state-metrics-1.8.0-to-commit-09daf19.patch \
31     file://0011-update-init-container-env-to-include-node-name.patch \
32     file://0012-Add-imagePullSecrets.patch \
33     file://0013-removed-unused-images.patch \
34     file://index.yaml \
35     file://repositories.yaml \
36     "
37
38 PATCHTOOL = "git"
39 PATCH_COMMIT_FUNCTIONS = "1"
40
41 S = "${WORKDIR}/git"
42
43 inherit allarch
44
45 helm_folder = "${nonarch_libdir}/helm"
46 helmchart_version = "0.1.0"
47
48 do_configure[noexec] = "1"
49
50 do_compile () {
51         # initialize helm and build the toolkit
52         # helm init --client-only does not work if there is no networking
53         # The following commands do essentially the same as: helm init
54         export HOME="${B}/${USER}"
55         export helm_home="${B}/${USER}/.helm"
56         rm -rf ${helm_home}
57
58         mkdir -p ${helm_home}
59         mkdir ${helm_home}/repository
60         mkdir ${helm_home}/repository/cache
61         mkdir ${helm_home}/repository/local
62         mkdir ${helm_home}/plugins
63         mkdir ${helm_home}/starters
64         mkdir ${helm_home}/cache
65         mkdir ${helm_home}/cache/archive
66
67         # Stage a repository file that only has a local repo
68         install -m 0644 ${WORKDIR}/repositories.yaml ${helm_home}/repository/repositories.yaml
69
70         # Stage a local repo index that can be updated by the build
71         install -m 0644 ${WORKDIR}/index.yaml ${helm_home}/repository/local/index.yaml
72
73         # Host a server for the charts
74         helm serve --repo-path . &
75         sleep 1
76         helm repo rm local
77         helm repo add local http://localhost:8879/charts
78
79         # Create the tgz files
80         cd stable
81         make filebeat
82         make metricbeat
83         make kube-state-metrics
84         make kibana
85         make nginx-ingress
86         make logstash
87         make elasticsearch-curator
88
89         # terminate helm server (the last backgrounded task)
90         kill $!
91         rm -rf ${helm_home}
92 }
93
94 do_install () {
95         install -d -m 755 ${D}${helm_folder}
96         install -p -D -m 755 ${S}/stable/*.tgz ${D}${helm_folder}
97 }
98
99 FILES_${PN} = "${helm_folder}"
100
101 RDEPENDS_${PN} = " \
102     helm \
103     monitor-helm-elastic \
104 "