Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-flock / stx-openstack-armada-app / openstack-helm_1.0.bb
1
2 SUMMARY = "Openstack Helm charts"
3 DESCRIPTION = "Openstack 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     openstack-helm-infra \
11 "
12
13 PROTOCOL = "https"
14 BRANCH = "r/stx.3.0"
15 SRCREV_openstack-helm = "82c72367c85ca94270f702661c7b984899c1ae38"
16 SRCREV_openstack-armada-app = "863f4b9733d3d4f4fd490606a94b84cfdaf2df2c"
17
18 SRC_URI = " \
19     git://github.com/openstack/openstack-helm;protocol=${PROTOCOL};name=openstack-helm \
20     file://0001-Ceilometer-chart-add-the-ability-to-publish-events-t.patch \
21     file://0002-Remove-stale-Apache2-service-pids-when-a-POD-starts.patch \
22     file://0003-Nova-console-ip-address-search-optionality.patch \
23     file://0004-Nova-chart-Support-ephemeral-pool-creation.patch \
24     file://0005-Nova-Add-support-for-disabling-Readiness-Liveness-pr.patch \
25     file://0006-Add-Placement-Chart.patch \
26     file://repositories.yaml \
27     file://index.yaml \
28     "
29
30 PATCHTOOL = "git"
31 PATCH_COMMIT_FUNCTIONS = "1"
32
33 S = "${WORKDIR}/git"
34
35 inherit allarch
36
37 helm_folder = "${nonarch_libdir}/helm"
38 toolkit_version = "0.1.0"
39 helmchart_version = "0.1.0"
40
41 do_configure[noexec] = "1"
42
43 do_compile () {
44         # initialize helm and build the toolkit
45         # helm init --client-only does not work if there is no networking
46         # The following commands do essentially the same as: helm init
47         export HOME="${B}/${USER}"
48         export helm_home="${B}/${USER}/.helm"
49         rm -rf ${helm_home}
50
51         mkdir -p ${helm_home}
52         mkdir ${helm_home}/repository
53         mkdir ${helm_home}/repository/cache
54         mkdir ${helm_home}/repository/local
55         mkdir ${helm_home}/plugins
56         mkdir ${helm_home}/starters
57         mkdir ${helm_home}/cache
58         mkdir ${helm_home}/cache/archive
59
60         # Stage a repository file that only has a local repo
61         install -m 0644 ${WORKDIR}/repositories.yaml ${helm_home}/repository/repositories.yaml
62
63         # Stage a local repo index that can be updated by the build
64         install -m 0644 ${WORKDIR}/index.yaml ${helm_home}/repository/local/index.yaml
65
66         # Stage helm-toolkit in the local repo
67         cp ${RECIPE_SYSROOT}${helm_folder}/helm-toolkit-${toolkit_version}.tgz .
68
69         # Host a server for the charts
70         helm serve --repo-path . &
71         sleep 1
72         helm repo rm local
73         helm repo add local http://localhost:8879/charts
74
75         # Make the charts. These produce a tgz file
76         make aodh
77         make barbican
78         make ceilometer
79         make cinder
80         make glance
81         make heat
82         make horizon
83         make ironic
84         make keystone
85         make magnum
86         make neutron
87         make nova
88         make panko
89         make placement
90
91         # terminate helm server (the last backgrounded task)
92         kill $!
93         rm -rf ${helm_home}
94
95         # Remove the helm-toolkit tarball
96         rm helm-toolkit-${toolkit_version}.tgz
97 }
98
99 do_install () {
100         install -d -m 755 ${D}${helm_folder}
101         install -p -D -m 755 ${B}/*.tgz ${D}${helm_folder}
102 }
103
104 FILES_${PN} = "${helm_folder}"
105
106 RDEPENDS_${PN} = " \
107     helm \
108     openstack-helm-infra \
109 "