diff --git a/debian_pkg_dirs b/debian_pkg_dirs new file mode 100644 index 00000000..020be5da --- /dev/null +++ b/debian_pkg_dirs @@ -0,0 +1,4 @@ +openstack-helm +openstack-helm-infra +python-k8sapp-openstack +stx-openstack-helm diff --git a/openstack-helm-infra/debian/deb_folder/changelog b/openstack-helm-infra/debian/deb_folder/changelog new file mode 100644 index 00000000..531ef275 --- /dev/null +++ b/openstack-helm-infra/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +openstack-helm-infra (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Tracey Bogue Wed, 27 Oct 2021 13:42:42 +0000 diff --git a/openstack-helm-infra/debian/deb_folder/control b/openstack-helm-infra/debian/deb_folder/control new file mode 100644 index 00000000..d33b9ea5 --- /dev/null +++ b/openstack-helm-infra/debian/deb_folder/control @@ -0,0 +1,18 @@ +Source: openstack-helm-infra +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + chartmuseum, + helm, + procps +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: openstack-helm-infra +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Openstack Helm Infrastructure + This package contains a patched version of the openstack-helm-infra + repo. diff --git a/openstack-helm-infra/debian/deb_folder/copyright b/openstack-helm-infra/debian/deb_folder/copyright new file mode 100644 index 00000000..fa51af9c --- /dev/null +++ b/openstack-helm-infra/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: openstack-helm-infra +Source: https://opendev.org/starlingx/openstack-armada-app/ + +Files: * +Copyright: (c) 2013-2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/openstack-helm-infra/debian/deb_folder/openstack-helm-infra.install b/openstack-helm-infra/debian/deb_folder/openstack-helm-infra.install new file mode 100644 index 00000000..8a0c6dea --- /dev/null +++ b/openstack-helm-infra/debian/deb_folder/openstack-helm-infra.install @@ -0,0 +1 @@ +usr/lib/helm/* diff --git a/openstack-helm-infra/debian/deb_folder/rules b/openstack-helm-infra/debian/deb_folder/rules new file mode 100755 index 00000000..4a6ec2dc --- /dev/null +++ b/openstack-helm-infra/debian/deb_folder/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f +export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export HELM_FOLDER = $(ROOT)/usr/lib/helm + +%: + dh $@ + +override_dh_auto_build: + # Move the source files from the extracted root directory to build root. + mv openstack-helm-infra/* . + # Apply the openstack-helm-infra patches. + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0001-Add-imagePullSecrets-in-service-account.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0003-Partial-revert-of-31e3469d28858d7b5eb6355e88b6f49fd6.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0004-Fix-pod-restarts-on-all-workers-when-worker-added-re.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0005-Add-io_thread_pool-for-rabbitmq.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0006-Enable-override-of-rabbitmq-probe-parameters.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0009-Enable-override-of-mariadb-server-probe-parameters.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0011-Add-mariadb-database-config-override-to-support-ipv6.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0012-enable-Values.conf.database.config_override-for-mari.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0013-Allow-set-public-endpoint-url-for-all-openstack-types.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0016-Disabling-helm3_hooks.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0017-Enable-taint-toleration-for-Openstack-services.patch + # Host a server for the helm charts. + chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." & + sleep 2 + helm repo add local http://localhost:8879/charts + # Create the chart TGZ files. + make helm-toolkit + make gnocchi + make ingress + make libvirt + make mariadb + make memcached + make openvswitch + make rabbitmq + make ceph-rgw + # Terminate the helm chart server. + pkill chartmuseum + +override_dh_auto_install: + # Install the chart tar files. + install -d -m 755 $(HELM_FOLDER) + install -p -D -m 755 *.tgz $(HELM_FOLDER) + +override_dh_auto_test: + +override_dh_usrlocal: diff --git a/openstack-helm-infra/debian/deb_folder/source/format b/openstack-helm-infra/debian/deb_folder/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/openstack-helm-infra/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/openstack-helm-infra/debian/dl_hook b/openstack-helm-infra/debian/dl_hook new file mode 100755 index 00000000..60163674 --- /dev/null +++ b/openstack-helm-infra/debian/dl_hook @@ -0,0 +1,26 @@ +#!/bin/bash +set -x + +PKG_BUILD_NAME=$1 +PKG_BUILD_ROOT=$(realpath `pwd`/${PKG_BUILD_NAME}) +PKG_DIR="openstack-helm-infra" +STX_BASE=$(realpath ${MY_REPO}/stx) +SRC=$(realpath ${STX_BASE}/openstack-armada-app/${PKG_DIR}) + +mkdir -p ${PKG_BUILD_ROOT} +pushd ${PKG_BUILD_ROOT} + +# Local mirror workaround until CGCS_BASE mirror is supported. +STX_MIRROR=$(realpath "/import/mirrors/starlingx") + +# Download openstack-helm-infra source package. +SHA="8351fdd0f1228717342c2accc96977b0cdc36dc3" +OPENSTACK_PKG="openstack-helm-infra-${SHA}.tar.gz" +OPENSTACK_SRC_PATH=$(realpath ${STX_MIRROR}/downloads/${OPENSTACK_PKG}) +cp ${OPENSTACK_SRC_PATH} ${PKG_BUILD_ROOT} + +# Extract the openstack-helm-infra tar file. +tar xfz ${OPENSTACK_PKG} + +# Copy source files to the build directory. +cp -pr ${SRC}/files/* ${PKG_BUILD_ROOT} diff --git a/openstack-helm-infra/debian/meta_data.yaml b/openstack-helm-infra/debian/meta_data.yaml new file mode 100644 index 00000000..fff1a512 --- /dev/null +++ b/openstack-helm-infra/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: openstack-helm-infra +debver: 1.0-1 +dl_hook: dl_hook +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/openstack-helm/debian/deb_folder/changelog b/openstack-helm/debian/deb_folder/changelog new file mode 100644 index 00000000..cdd3bddf --- /dev/null +++ b/openstack-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +openstack-helm (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Tracey Bogue Mon, 1 Nov 2021 12:22:42 +0000 diff --git a/openstack-helm/debian/deb_folder/control b/openstack-helm/debian/deb_folder/control new file mode 100644 index 00000000..7998aa10 --- /dev/null +++ b/openstack-helm/debian/deb_folder/control @@ -0,0 +1,19 @@ +Source: openstack-helm +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + chartmuseum, + helm, + openstack-helm-infra, + procps +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: openstack-helm +Section: libs +Architecture: any +Depends: ${misc:Depends}, openstack-helm-infra +Description: StarlingX Openstack Helm + This package contains a patched version of the openstack-helm + repo. diff --git a/openstack-helm/debian/deb_folder/copyright b/openstack-helm/debian/deb_folder/copyright new file mode 100644 index 00000000..fe5528ee --- /dev/null +++ b/openstack-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: openstack-helm +Source: https://opendev.org/starlingx/openstack-armada-app/ + +Files: * +Copyright: (c) 2013-2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/openstack-helm/debian/deb_folder/openstack-helm.install b/openstack-helm/debian/deb_folder/openstack-helm.install new file mode 100644 index 00000000..8a0c6dea --- /dev/null +++ b/openstack-helm/debian/deb_folder/openstack-helm.install @@ -0,0 +1 @@ +usr/lib/helm/* diff --git a/openstack-helm/debian/deb_folder/rules b/openstack-helm/debian/deb_folder/rules new file mode 100755 index 00000000..33d7c2f1 --- /dev/null +++ b/openstack-helm/debian/deb_folder/rules @@ -0,0 +1,60 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/helm + +export HELM_FOLDER=/usr/lib/helm +export TOOLKIT_VERSION = 0.2.19 + +%: + dh $@ + +override_dh_auto_build: + # Move the source files from the extracted root directory to build root. + mv openstack-helm/* . + # Stage helm-toolkit in the local repo. + cp $(HELM_FOLDER)/helm-toolkit-$(TOOLKIT_VERSION).tgz . + # Apply the openstack-helm patches. + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0001-Remove-stale-Apache2-service-pids-when-a-POD-starts.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0002-Nova-console-ip-address-search-optionality.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0003-Nova-chart-Support-ephemeral-pool-creation.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0004-Support-ingress-creation-for-keystone-admin-endpoint.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0005-Allow-set-public-endpoint-url-for-keystone-endpoints.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0006-Wrong-usage-of-rbd_store_chunk_size.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0007-Add-stx_admin-account.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0008-Disabling-helm3_hook.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0009-Add-flavor-extra-spec-hw-pci_irq_affinity_mask.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0010-Enable-taint-toleration-for-Openstack-services.patch + # Host a server for the helm charts. + chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" \ + --storage-local-rootdir="." & + sleep 2 + helm repo add local http://localhost:8879/charts + # Create the chart TGZ files. + make aodh + make barbican + make ceilometer + make cinder + make glance + make heat + make horizon + make ironic + make keystone + make magnum + make neutron + make nova + make placement + # Terminate the helm chart server. + pkill chartmuseum + # Remove the helm-toolkit tarball + rm helm-toolkit-$(TOOLKIT_VERSION).tgz + +override_dh_auto_install: + # Install the chart tar files. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 *.tgz $(APP_FOLDER) + +override_dh_auto_test: + +override_dh_usrlocal: diff --git a/openstack-helm/debian/deb_folder/source/format b/openstack-helm/debian/deb_folder/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/openstack-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/openstack-helm/debian/dl_hook b/openstack-helm/debian/dl_hook new file mode 100755 index 00000000..33c24221 --- /dev/null +++ b/openstack-helm/debian/dl_hook @@ -0,0 +1,26 @@ +#!/bin/bash +set -x + +PKG_BUILD_NAME=$1 +PKG_BUILD_ROOT=$(realpath `pwd`/${PKG_BUILD_NAME}) +PKG_DIR="openstack-helm" +STX_BASE=$(realpath ${MY_REPO}/stx) +SRC=$(realpath ${STX_BASE}/openstack-armada-app/${PKG_DIR}) + +mkdir -p ${PKG_BUILD_ROOT} +pushd ${PKG_BUILD_ROOT} + +# Local mirror workaround until CGCS_BASE mirror is supported. +STX_MIRROR=$(realpath "/import/mirrors/starlingx") + +# Download openstack-helm source package. +SHA="7803000a545687ec40b0ddc41d46a6b377dea45f" +OPENSTACK_PKG="openstack-helm-${SHA}.tar.gz" +OPENSTACK_SRC_PATH=$(realpath ${STX_MIRROR}/downloads/${OPENSTACK_PKG}) +cp ${OPENSTACK_SRC_PATH} ${PKG_BUILD_ROOT} + +# Extract the openstack-helm tar file. +tar xfz ${OPENSTACK_PKG} + +# Copy source files to the build directory. +cp -pr ${SRC}/files/* ${PKG_BUILD_ROOT} diff --git a/openstack-helm/debian/meta_data.yaml b/openstack-helm/debian/meta_data.yaml new file mode 100644 index 00000000..dd48aec1 --- /dev/null +++ b/openstack-helm/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: openstack-helm +debver: 1.0-1 +dl_hook: dl_hook +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/python-k8sapp-openstack/debian/deb_folder/changelog b/python-k8sapp-openstack/debian/deb_folder/changelog new file mode 100644 index 00000000..0eeca3c6 --- /dev/null +++ b/python-k8sapp-openstack/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +python3-k8sapp-openstack (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Tracey Bogue Mon, 1 Nov 2021 12:49:42 +0000 diff --git a/python-k8sapp-openstack/debian/deb_folder/control b/python-k8sapp-openstack/debian/deb_folder/control new file mode 100644 index 00000000..b963a766 --- /dev/null +++ b/python-k8sapp-openstack/debian/deb_folder/control @@ -0,0 +1,28 @@ +Source: python3-k8sapp-openstack +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + dh-python, + python3-all, + python3-pbr, + python3-setuptools, + python3-wheel +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: python3-k8sapp-openstack +Section: libs +Architecture: any +Depends: ${misc:Depends}, ${python3:Depends} +Description: StarlingX Sysinv Openstack Extensions + This package contains sysinv plugins for the Openstack armada + K8S app. + +Package: python3-k8sapp-openstack-wheels +Section: libs +Architecture: any +Depends: ${misc:Depends}, ${python3:Depends}, python3-wheel +Description: StarlingX Sysinv Openstack Extension Wheels + This package contains python wheels for the Openstack armada + K8S app plugins. diff --git a/python-k8sapp-openstack/debian/deb_folder/copyright b/python-k8sapp-openstack/debian/deb_folder/copyright new file mode 100644 index 00000000..4d04f4df --- /dev/null +++ b/python-k8sapp-openstack/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: python3-k8sapp-openstack +Source: https://opendev.org/starlingx/openstack-armada-app/ + +Files: * +Copyright: (c) 2013-2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/python-k8sapp-openstack/debian/deb_folder/python3-k8sapp-openstack-wheels.install b/python-k8sapp-openstack/debian/deb_folder/python3-k8sapp-openstack-wheels.install new file mode 100644 index 00000000..9fd0fc93 --- /dev/null +++ b/python-k8sapp-openstack/debian/deb_folder/python3-k8sapp-openstack-wheels.install @@ -0,0 +1 @@ +plugins/k8sapp-openstack/*.whl diff --git a/python-k8sapp-openstack/debian/deb_folder/python3-k8sapp-openstack.install b/python-k8sapp-openstack/debian/deb_folder/python3-k8sapp-openstack.install new file mode 100644 index 00000000..e8bdd3aa --- /dev/null +++ b/python-k8sapp-openstack/debian/deb_folder/python3-k8sapp-openstack.install @@ -0,0 +1,2 @@ +usr/lib/python3/dist-packages/k8sapp_openstack-1.0.0.egg-info/* +usr/lib/python3/dist-packages/k8sapp_openstack/* diff --git a/python-k8sapp-openstack/debian/deb_folder/rules b/python-k8sapp-openstack/debian/deb_folder/rules new file mode 100755 index 00000000..71b8e8e9 --- /dev/null +++ b/python-k8sapp-openstack/debian/deb_folder/rules @@ -0,0 +1,26 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export APP_NAME=k8sapp-openstack +export PBR_VERSION=1.0.0 +export PYBUILD_NAME=k8sapp-openstack +export SKIP_PIP_INSTALL=1 +export ROOT=debian/tmp + +%: + dh $@ --with=python3 --buildsystem=pybuild + +override_dh_auto_install: + python3 setup.py install --install-layout=deb --root $(ROOT) + python3 setup.py bdist_wheel \ + --universal \ + -d $(ROOT)/plugins/$(APP_NAME) + +override_dh_python3: + dh_python3 --shebang=/usr/bin/python3 + +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) +override_dh_auto_test: + # (tbogue) FIXME + PYTHONDIR=$(CURDIR) stestr run || true +endif diff --git a/python-k8sapp-openstack/debian/deb_folder/source/format b/python-k8sapp-openstack/debian/deb_folder/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/python-k8sapp-openstack/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/python-k8sapp-openstack/debian/meta_data.yaml b/python-k8sapp-openstack/debian/meta_data.yaml new file mode 100644 index 00000000..6e8e8e51 --- /dev/null +++ b/python-k8sapp-openstack/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: python3-k8sapp-openstack +debver: 1.0-1 +src_path: k8sapp_openstack +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/stx-openstack-helm/debian/deb_folder/changelog b/stx-openstack-helm/debian/deb_folder/changelog new file mode 100644 index 00000000..5b15f3ba --- /dev/null +++ b/stx-openstack-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +stx-openstack-helm (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Tracey Bogue Mon, 1 Nov 2021 13:15:42 +0000 diff --git a/stx-openstack-helm/debian/deb_folder/control b/stx-openstack-helm/debian/deb_folder/control new file mode 100644 index 00000000..604d64de --- /dev/null +++ b/stx-openstack-helm/debian/deb_folder/control @@ -0,0 +1,22 @@ +Source: stx-openstack-helm +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + chartmuseum, + helm, + openstack-helm-infra, + procps +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: stx-openstack-helm +Section: libs +Architecture: any +Depends: ${misc:Depends}, + openstack-helm, + openstack-helm-infra, + python3-k8sapp-openstack-wheels +Description: StarlingX Openstack Armada Helm Charts + This package contains Armada helm charts for the Openstack armada + application. diff --git a/stx-openstack-helm/debian/deb_folder/copyright b/stx-openstack-helm/debian/deb_folder/copyright new file mode 100644 index 00000000..1a3cfca8 --- /dev/null +++ b/stx-openstack-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: stx-openstack-helm +Source: https://opendev.org/starlingx/openstack-armada-app/ + +Files: * +Copyright: (c) 2013-2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/stx-openstack-helm/debian/deb_folder/rules b/stx-openstack-helm/debian/deb_folder/rules new file mode 100755 index 00000000..8eaf540c --- /dev/null +++ b/stx-openstack-helm/debian/deb_folder/rules @@ -0,0 +1,42 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/application +export ARMADA_FOLDER = $(ROOT)/usr/lib/armada +export HELM_FOLDER = /usr/lib/helm +export TOOLKIT_VERSION = 0.2.19 + +%: + dh $@ + +override_dh_auto_build: + # Stage helm-toolkit in the local repo. + cp $(HELM_FOLDER)/helm-toolkit-$(TOOLKIT_VERSION).tgz helm-charts/ + # Host a server for the helm charts. + chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" \ + --storage-local-rootdir="./helm-charts" & + sleep 2 + helm repo add local http://localhost:8879/charts + # Create the TGZ file. + cd helm-charts && make nova-api-proxy + cd helm-charts && make pci-irq-affinity-agent + cd helm-charts && make garbd + cd helm-charts && make keystone-api-proxy + cd helm-charts && make fm-rest-api + cd helm-charts && make nginx-ports-control + cd helm-charts && make dcdbsync + cd helm-charts && make psp-rolebinding + # Terminate the helm chart server. + pkill chartmuseum + # Remove helm-toolkit. This will be packaged with openstack-helm-infra. + rm helm-charts/helm-toolkit-$(TOOLKIT_VERSION).tgz + +override_dh_auto_install: + # Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 files/metadata.yaml $(APP_FOLDER) + install -d -m 755 $(ROOT)$(HELM_FOLDER) + install -p -D -m 755 helm-charts/*.tgz $(ROOT)$(HELM_FOLDER) + install -d -m 755 $(ARMADA_FOLDER) + install -p -D -m 755 manifests/*.yaml $(ARMADA_FOLDER) diff --git a/stx-openstack-helm/debian/deb_folder/source/format b/stx-openstack-helm/debian/deb_folder/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/stx-openstack-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/stx-openstack-helm/debian/deb_folder/stx-openstack-helm.install b/stx-openstack-helm/debian/deb_folder/stx-openstack-helm.install new file mode 100644 index 00000000..834e530c --- /dev/null +++ b/stx-openstack-helm/debian/deb_folder/stx-openstack-helm.install @@ -0,0 +1,3 @@ +usr/lib/application/* +usr/lib/armada/* +usr/lib/helm/* diff --git a/stx-openstack-helm/debian/dl_hook b/stx-openstack-helm/debian/dl_hook new file mode 100755 index 00000000..698e0fc9 --- /dev/null +++ b/stx-openstack-helm/debian/dl_hook @@ -0,0 +1,28 @@ +#!/bin/bash +set -x + +PKG_BUILD_NAME=$1 +PKG_BUILD_ROOT=$(realpath `pwd`/${PKG_BUILD_NAME}) +PKG_DIR="stx-openstack-helm" + +STX_BASE=$(realpath ${MY_REPO}/stx) +SRC=$(realpath ${STX_BASE}/openstack-armada-app/${PKG_DIR}/${PKG_DIR}) + +FM_CHART_PKG="fm-rest-api" +FM_HELM_CHARTS=$(realpath ${STX_BASE}/helm-charts/${FM_CHART_PKG}/${FM_CHART_PKG}/helm-charts) + +PSP_CHART_PKG="psp-rolebinding" +PSP_HELM_CHARTS=$(realpath ${STX_BASE}/helm-charts/${PSP_CHART_PKG}/${PSP_CHART_PKG}/helm-charts) + +mkdir -p ${PKG_BUILD_ROOT} + +# Copy fm-rest-api helm charts to the build directory. +cp -pr ${FM_HELM_CHARTS} ${PKG_BUILD_ROOT} + +# Copy psp-rolebinding helm charts to the build directory. +cp -pr ${PSP_HELM_CHARTS} ${PKG_BUILD_ROOT} + +# Copy source files to the build directory. +cp -pr ${SRC}/files ${PKG_BUILD_ROOT} +cp -pr ${SRC}/helm-charts/* ${PKG_BUILD_ROOT}/helm-charts +cp -pr ${SRC}/manifests ${PKG_BUILD_ROOT} diff --git a/stx-openstack-helm/debian/meta_data.yaml b/stx-openstack-helm/debian/meta_data.yaml new file mode 100644 index 00000000..20009f43 --- /dev/null +++ b/stx-openstack-helm/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: stx-openstack-helm +debver: 1.0-1 +dl_hook: dl_hook +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true