Standardize app configs (re-submission)

This is a re-submission of [1], which was reverted due to
issues with centos builds. This change can merge now that
centos is no longer supported.

Fixed versioning and adjusted some build files
to bring them as close to a standard as possible.

- Removed centos files
- Fixed mismatch in plugin name, set to python3-k8sapp-<app>
- Standardized plugin debian files (rules, *.install)

Note:
- Version tracking changes made in [1] were not added here
  as they are addressed in a different commit

[1] https://review.opendev.org/c/starlingx/openstack-armada-app/+/868294

Test Plan:
PASS build-pkgs
PASS wheel version updated

Story: 2010542
Task: 47515

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: Id696b3b7f60aa92421da3545d712d85fd6b0bdeb
This commit is contained in:
Leonardo Fagundes Luz Serrano 2023-02-24 18:06:48 +00:00
parent 6f2ce8908d
commit 7f5244e6a1
104 changed files with 44 additions and 508 deletions

View File

@ -30,11 +30,11 @@
- starlingx/update
- starlingx/utilities
files:
- python-k8sapp-openstack/k8sapp_openstack/*
- python3-k8sapp-openstack/k8sapp_openstack/*
vars:
tox_envlist: py36
python_version: 3.6
tox_extra_args: -c python-k8sapp-openstack/k8sapp_openstack/tox.ini
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
- job:
name: k8sapp-openstack-tox-py39
parent: tox-py39
@ -47,11 +47,11 @@
- starlingx/update
- starlingx/utilities
files:
- python-k8sapp-openstack/k8sapp_openstack/*
- python3-k8sapp-openstack/k8sapp_openstack/*
vars:
tox_envlist: py39
python_version: 3.9
tox_extra_args: -c python-k8sapp-openstack/k8sapp_openstack/tox.ini
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
- job:
name: stx-openstack-armada-app-upload-git-mirror
parent: upload-git-mirror
@ -76,10 +76,10 @@
- starlingx/update
- starlingx/utilities
files:
- python-k8sapp-openstack/*
- python3-k8sapp-openstack/*
vars:
tox_envlist: pylint
tox_extra_args: -c python-k8sapp-openstack/k8sapp_openstack/tox.ini
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
- job:
name: k8sapp-openstack-tox-pep8
@ -93,10 +93,10 @@
- starlingx/update
- starlingx/utilities
files:
- python-k8sapp-openstack/*
- python3-k8sapp-openstack/*
vars:
tox_envlist: pep8
tox_extra_args: -c python-k8sapp-openstack/k8sapp_openstack/tox.ini
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
- secret:
name: stx-openstack-armada-app-github-secret

View File

@ -1 +0,0 @@
flock

View File

@ -1,2 +0,0 @@
# Packages used by build-helm-charts.sh
stx-openstack-helm-fluxcd

View File

@ -1,5 +0,0 @@
openstack-helm
openstack-helm-infra
stx-openstack-helm
stx-openstack-helm-fluxcd
python-k8sapp-openstack

View File

@ -1,4 +0,0 @@
openstack-helm
openstack-helm-infra
stx-openstack-helm
stx-openstack-helm-fluxcd

View File

@ -1,2 +0,0 @@
openstack-helm-7803000a545687ec40b0ddc41d46a6b377dea45f.tar.gz#openstack-helm#https://github.com/openstack/openstack-helm/archive/7803000a545687ec40b0ddc41d46a6b377dea45f.tar.gz#http##
openstack-helm-infra-8351fdd0f1228717342c2accc96977b0cdc36dc3.tar.gz#openstack-helm-infra#https://github.com/openstack/openstack-helm-infra/archive/8351fdd0f1228717342c2accc96977b0cdc36dc3.tar.gz#http##

View File

@ -1,5 +1,5 @@
openstack-helm
openstack-helm-infra
python-k8sapp-openstack
python3-k8sapp-openstack
stx-openstack-helm
stx-openstack-helm-fluxcd

View File

@ -1,8 +0,0 @@
TAR_NAME=openstack-helm-infra
SHA=8351fdd0f1228717342c2accc96977b0cdc36dc3
VERSION=1.0.0
TAR="$TAR_NAME-$SHA.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR $PKG_BASE/files/*"
TIS_PATCH_VER=PKG_GITREVCOUNT

View File

@ -1,91 +0,0 @@
%global sha 8351fdd0f1228717342c2accc96977b0cdc36dc3
%global helm_folder /usr/lib/helm
Summary: Openstack-Helm-Infra charts
Name: openstack-helm-infra
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
URL: https://github.com/openstack/openstack-helm-infra
Source0: %{name}-%{sha}.tar.gz
Source1: repositories.yaml
BuildArch: noarch
Patch01: 0001-Add-imagePullSecrets-in-service-account.patch
Patch03: 0003-Partial-revert-of-31e3469d28858d7b5eb6355e88b6f49fd6.patch
Patch04: 0004-Fix-pod-restarts-on-all-workers-when-worker-added-re.patch
Patch05: 0005-Add-io_thread_pool-for-rabbitmq.patch
Patch06: 0006-Enable-override-of-rabbitmq-probe-parameters.patch
Patch09: 0009-Enable-override-of-mariadb-server-probe-parameters.patch
Patch11: 0011-Add-mariadb-database-config-override-to-support-ipv6.patch
Patch12: 0012-enable-Values.conf.database.config_override-for-mari.patch
Patch13: 0013-Allow-set-public-endpoint-url-for-all-openstack-types.patch
Patch17: 0017-Enable-taint-toleration-for-Openstack-services.patch
Patch18: 0018-Add-GaleraDB-Secure-Replica-Traffic.patch
Patch19: 0019-Add-force_boot-command-to-rabbit-start-template.patch
Patch20: 0020-Fix-tls-in-openstack-helm-infra.patch
Patch21: 0021-Remove-mariadb-tls.patch
Patch22: 0022-Remove-rabbitmq-tls.patch
Patch23: 0023-Update-RabbitMQ-probes.patch
Patch24: 0024-Update-openstack-Ingress-for-networking-api-v1.patch
Patch25: 0025-Update-templates-syntax-for-fluxcd-helm-v3.patch
BuildRequires: helm
BuildRequires: chartmuseum
%description
Openstack Helm Infra charts
%prep
%setup -n openstack-helm-infra
%patch01 -p1
%patch03 -p1
%patch04 -p1
%patch05 -p1
%patch06 -p1
%patch09 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%build
# Host a server for the charts
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." &
sleep 2
helm repo add local http://localhost:8879/charts
# Make the charts. These produce tgz files
make helm-toolkit
make gnocchi
make ingress
make libvirt
make mariadb
make memcached
make openvswitch
make rabbitmq
make ceph-rgw
# 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}
%files
%dir %attr(0755,root,root) %{helm_folder}
%defattr(-,root,root,-)
%{helm_folder}/*

View File

@ -1,8 +0,0 @@
TAR_NAME=openstack-helm
SHA=7803000a545687ec40b0ddc41d46a6b377dea45f
VERSION=1.0.0
TAR="$TAR_NAME-$SHA.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR $PKG_BASE/files/* "
TIS_PATCH_VER=PKG_GITREVCOUNT

View File

@ -1,110 +0,0 @@
%global sha 7803000a545687ec40b0ddc41d46a6b377dea45f
%global helm_folder /usr/lib/helm
%global toolkit_version 0.2.19
%global helmchart_version 0.1.0
%global _default_patch_flags --no-backup-if-mismatch --prefix=/tmp/junk
Summary: Openstack-Helm charts
Name: openstack-helm
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
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
Patch01: 0001-Remove-stale-Apache2-service-pids-when-a-POD-starts.patch
Patch02: 0002-Nova-console-ip-address-search-optionality.patch
Patch03: 0003-Nova-chart-Support-ephemeral-pool-creation.patch
Patch04: 0004-Support-ingress-creation-for-keystone-admin-endpoint.patch
Patch05: 0005-Allow-set-public-endpoint-url-for-keystone-endpoints.patch
Patch06: 0006-Wrong-usage-of-rbd_store_chunk_size.patch
Patch07: 0007-Add-stx_admin-account.patch
Patch09: 0009-Add-flavor-extra-spec-hw-pci_irq_affinity_mask.patch
Patch10: 0010-Enable-taint-toleration-for-Openstack-services.patch
Patch11: 0011-Fix-nova-compute-ssh-init-to-execute-as-runAsUser.patch
Patch12: 0012-Replace-deprecated-Nova-VNC-configurations.patch
Patch13: 0013-Remove-TLS-from-openstack-services.patch
Patch14: 0014-Remove-mariadb-and-rabbit-tls.patch
Patch15: 0015-Decrease-terminationGracePeriodSeconds-on-glance-api.patch
Patch16: 0016-Update-RBAC-authorization-api-to-v1.patch
Patch17: 0017-Fixing-cinder-helm-release-hooks-weights-helmv3.patch
Patch18: 0018-Fixing-placement-helm-release-hooks.patch
Patch19: 0019-Fixing-nova-helm-release-hooks-and-weights.patch
Patch20: 0020-Fixing-keystone-helm-release-hooks-and-weights.patch
BuildRequires: helm
BuildRequires: openstack-helm-infra
BuildRequires: chartmuseum
Requires: openstack-helm-infra
%description
Openstack Helm charts
%prep
%setup -n openstack-helm
%patch01 -p1
%patch02 -p1
%patch03 -p1
%patch04 -p1
%patch05 -p1
%patch06 -p1
%patch07 -p1
%patch09 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%build
# Stage helm-toolkit in the local repo
cp %{helm_folder}/helm-toolkit-%{toolkit_version}.tgz .
# Host a server for the charts
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." &
sleep 2
helm repo add local http://localhost:8879/charts
# Make the charts. These produce a tgz file
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 helm server (the last backgrounded task)
kill %1
# Remove the helm-toolkit tarball
rm helm-toolkit-%{toolkit_version}.tgz
%install
# helm_folder is created by openstack-helm-infra
install -d -m 755 ${RPM_BUILD_ROOT}%{helm_folder}
install -p -D -m 755 *.tgz ${RPM_BUILD_ROOT}%{helm_folder}
%files
#helm_folder is owned by openstack-helm-infra
%defattr(-,root,root,-)
%{helm_folder}/*

View File

@ -1,9 +0,0 @@
SRC_DIR="k8sapp_openstack"
# Bump the version by the previous version value prior to decoupling as this
# will align the GITREVCOUNT value to increment the version by one. Remove this
# (i.e. reset to 0) on then next major version changes when TIS_BASE_SRCREV
# changes. This version should align with the version of the helm charts in
# stx-openstack-helm
TIS_BASE_SRCREV=8d3452a5e864339101590e542c24c375bb3808fb
TIS_PATCH_VER=GITREVCOUNT+20

View File

@ -1,56 +0,0 @@
%global pypi_name k8sapp-openstack
%global sname k8sapp_openstack
Name: python-%{pypi_name}
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: StarlingX sysinv extensions: Openstack K8S app
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python-setuptools
BuildRequires: python-pbr
BuildRequires: python2-pip
BuildRequires: python2-wheel
%description
StarlingX sysinv extensions: Openstack K8S app
%prep
%setup
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
export PBR_VERSION=%{version}
%{__python2} setup.py build
%py2_build_wheel
%install
export PBR_VERSION=%{version}.%{tis_patch_ver}
export SKIP_PIP_INSTALL=1
%{__python2} setup.py install --skip-build --root %{buildroot}
mkdir -p ${RPM_BUILD_ROOT}/plugins
install -m 644 dist/*.whl ${RPM_BUILD_ROOT}/plugins/
%files
%{python2_sitelib}/%{sname}
%{python2_sitelib}/%{sname}-*.egg-info
%package wheels
Summary: %{name} wheels
%description wheels
Contains python wheels for %{name}
%files wheels
/plugins/*
%changelog
* Wed Sep 20 2019 Robert Church <robert.church@windriver.com>
- Initial version

View File

@ -1,2 +0,0 @@
usr/lib/python3/dist-packages/k8sapp_openstack-1.0.0.egg-info/*
usr/lib/python3/dist-packages/k8sapp_openstack/*

View File

@ -1,26 +0,0 @@
#!/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
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

View File

@ -0,0 +1 @@
usr/lib/python3/dist-packages/k8sapp_*

View File

@ -0,0 +1,33 @@
#!/usr/bin/make -f
# export DH_VERBOSE = 1
export APP_NAME = k8sapp-openstack
export PYBUILD_NAME = k8sapp-openstack
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
export MAJOR = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-')
export MINOR_PATCH = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.')
export PBR_VERSION = $(MAJOR).$(MINOR_PATCH)
export ROOT = $(CURDIR)/debian/tmp
export SKIP_PIP_INSTALL = 1
%:
dh $@ --with=python3 --buildsystem=pybuild
override_dh_auto_install:
env | sort
python3 setup.py install \
--install-layout=deb \
--root $(ROOT)
python3 setup.py bdist_wheel \
--universal \
-d $(ROOT)/plugins
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
override_dh_auto_test:
PYTHONDIR=$(CURDIR) stestr run

View File

@ -72,5 +72,5 @@ systemconfig.armada.manifest_ops =
systemconfig.app_lifecycle =
openstack = k8sapp_openstack.lifecycle.lifecycle_openstack:OpenstackAppLifecycleOperator
[wheel]
[bdist_wheel]
universal = 1

Some files were not shown because too many files have changed in this diff Show More