Browse Source

Updating helm build process to not require networking

The spec files for openstack-helm-infra and openstack-helm
have been updated to not require networking, and therefore
can be built the same as other std targets rather than as
a container target.

helm init --client-only was using networking and DNS lookup.
This commit sets up helm without running that command.

Story: 2004005
Task: 28793
Change-Id: I35c9b547a98fac559793bc2ec00012f6eded8ffa
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
changes/13/680913/1
Al Bailey 4 years ago
parent
commit
99eec10f56
  1. 21
      openstack-helm-infra/centos/openstack-helm-infra.spec
  2. 12
      openstack-helm-infra/files/repositories.yaml
  3. 32
      openstack-helm/centos/openstack-helm.spec
  4. 4
      openstack-helm/files/index.yaml
  5. 12
      openstack-helm/files/repositories.yaml

21
openstack-helm-infra/centos/openstack-helm-infra.spec

@ -11,6 +11,7 @@ Packager: Wind River <info@windriver.com>
URL: https://github.com/openstack/openstack-helm-infra
Source0: %{name}-%{sha}.tar.gz
Source1: repositories.yaml
BuildArch: noarch
@ -31,8 +32,20 @@ Openstack Helm Infra charts
%build
# initialize helm and build the toolkit
helm init --client-only
make helm-toolkit
# helm init --client-only does not work if there is no networking
# The following commands do essentially the same as: helm init
%define helm_home %{getenv:HOME}/.helm
mkdir %{helm_home}
mkdir %{helm_home}/repository
mkdir %{helm_home}/repository/cache
mkdir %{helm_home}/repository/local
mkdir %{helm_home}/plugins
mkdir %{helm_home}/starters
mkdir %{helm_home}/cache
mkdir %{helm_home}/cache/archive
# Stage a repository file that only has a local repo
cp %{SOURCE1} %{helm_home}/repository/repositories.yaml
# Host a server for the charts
helm serve /tmp/charts --address localhost:8879 --url http://localhost:8879/charts &
@ -40,6 +53,7 @@ helm repo rm local
helm repo add local http://localhost:8879/charts
# Make the charts. These produce tgz files
make helm-toolkit
make gnocchi
make ingress
make libvirt
@ -48,6 +62,9 @@ make memcached
make openvswitch
make rabbitmq
# terminate helm server (the last backgrounded task)
kill %1
%install
install -d -m 755 ${RPM_BUILD_ROOT}%{helm_folder}
install -p -D -m 755 *.tgz ${RPM_BUILD_ROOT}%{helm_folder}

12
openstack-helm-infra/files/repositories.yaml

@ -0,0 +1,12 @@
---
apiVersion: v1
generated: 2019-01-02T15:19:36.215111369-06:00
repositories:
- caFile: ""
cache: /builddir/.helm/repository/cache/local-index.yaml
certFile: ""
keyFile: ""
name: local
password: ""
url: http://127.0.0.1:8879/charts
username: ""

32
openstack-helm/centos/openstack-helm.spec

@ -13,6 +13,8 @@ Packager: Wind River <info@windriver.com>
URL: https://github.com/openstack/openstack-helm
Source0: %{name}-%{sha}.tar.gz
Source1: repositories.yaml
Source2: index.yaml
BuildArch: noarch
@ -38,10 +40,29 @@ Openstack Helm charts
%patch05 -p1
%build
# initialize helm and stage the toolkit
helm init --client-only
# initialize helm and build the toolkit
# helm init --client-only does not work if there is no networking
# The following commands do essentially the same as: helm init
%define helm_home %{getenv:HOME}/.helm
mkdir %{helm_home}
mkdir %{helm_home}/repository
mkdir %{helm_home}/repository/cache
mkdir %{helm_home}/repository/local
mkdir %{helm_home}/plugins
mkdir %{helm_home}/starters
mkdir %{helm_home}/cache
mkdir %{helm_home}/cache/archive
# Stage a repository file that only has a local repo
cp %{SOURCE1} %{helm_home}/repository/repositories.yaml
# Stage a local repo index that can be updated by the build
cp %{SOURCE2} %{helm_home}/repository/local/index.yaml
# Stage helm-toolkit in the local repo
cp %{helm_folder}/helm-toolkit-%{toolkit_version}.tgz .
# Host a server for the charts
cp %{helm_folder}/helm-toolkit-%{toolkit_version}.tgz .
helm serve --repo-path . &
helm repo rm local
helm repo add local http://localhost:8879/charts
@ -61,8 +82,11 @@ make neutron
make nova
make panko
# terminate helm server (the last backgrounded task)
kill %1
# Remove the helm-toolkit tarball
rm helm-toolkit-%{toolkit_version}.tgz
rm helm-toolkit-%{toolkit_version}.tgz
%install
# helm_folder is created by openstack-helm-infra

4
openstack-helm/files/index.yaml

@ -0,0 +1,4 @@
---
apiVersion: v1
entries: {}
generated: 2019-01-07T12:33:46.098166523-06:00

12
openstack-helm/files/repositories.yaml

@ -0,0 +1,12 @@
---
apiVersion: v1
generated: 2019-01-02T15:19:36.215111369-06:00
repositories:
- caFile: ""
cache: /builddir/.helm/repository/cache/local-index.yaml
certFile: ""
keyFile: ""
name: local
password: ""
url: http://127.0.0.1:8879/charts
username: ""
Loading…
Cancel
Save