diff --git a/centos_pkg_dirs b/centos_pkg_dirs index 499c18faa1..cd8273d09c 100644 --- a/centos_pkg_dirs +++ b/centos_pkg_dirs @@ -1,3 +1,4 @@ +kubernetes/applications/stx-openstack/stx-openstack-helm worker-utils workerconfig configutilities diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/centos/stx-openstack-helm.spec b/kubernetes/applications/stx-openstack/stx-openstack-helm/centos/stx-openstack-helm.spec index 2a7eaa0568..c613ebfd66 100644 --- a/kubernetes/applications/stx-openstack/stx-openstack-helm/centos/stx-openstack-helm.spec +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/centos/stx-openstack-helm.spec @@ -13,6 +13,7 @@ Packager: Wind River URL: unknown Source0: %{name}-%{version}.tar.gz + BuildArch: noarch BuildRequires: helm @@ -26,10 +27,29 @@ StarlingX Openstack Application Helm charts %setup %build -# initialize helm and stage the toolkit -helm init --client-only -# Host a server for the charts +# 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 files/repositories.yaml %{helm_home}/repository/repositories.yaml + +# Stage a local repo index that can be updated by the build +cp files/index.yaml %{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 helm serve --repo-path . & helm repo rm local helm repo add local http://localhost:8879/charts @@ -38,6 +58,9 @@ helm repo add local http://localhost:8879/charts make nova-api-proxy make rbd-provisioner +# terminate helm server (the last backgrounded task) +kill %1 + # remove helm-toolkit. This will be packaged with openstack-helm-infra rm ./helm-toolkit-%{toolkit_version}.tgz diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/files/index.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/files/index.yaml new file mode 100644 index 0000000000..36db709b19 --- /dev/null +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/files/index.yaml @@ -0,0 +1,3 @@ +apiVersion: v1 +entries: {} +generated: 2019-01-07T12:33:46.098166523-06:00 diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/files/repositories.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/files/repositories.yaml new file mode 100644 index 0000000000..e613b63b16 --- /dev/null +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-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: "" +