From dfba3a27df46867d0754f5e8929747ef80e0c7d4 Mon Sep 17 00:00:00 2001 From: Leonardo Fagundes Luz Serrano Date: Wed, 1 Feb 2023 18:12:24 +0000 Subject: [PATCH] Standardize app configs Fixed versioning and adjusted some build files to bring them as close to a standard as possible. - Removed centos files, however stx_ceph_manager docker image tag is still master-centos-stable-latest - Added debian_pkg_dirs and debian_iso_image.inc (stx-rook-ceph-helm not added into the debian iso) - Added version tracking via GITREVCOUNT - Fixed mismatch in plugin name, set to python3-k8sapp- - Standardized plugin debian files (rules, *.install) - Plugin wheels saved to /plugin instead of /plugin/ - Removed some Armada hooks and files which were preventing the app from uploading on the debian system Note: app name is not in line with the stx-APP-helm template Test Plan: PASS - Build-pkgs PASS - app tarball contains wheel file PASS - wheel versioning updated properly PASS - app upload Story: 2010542 Task: 47250 Depends-On: https://review.opendev.org/c/starlingx/rook-ceph/+/842363 Signed-off-by: Leonardo Fagundes Luz Serrano Change-Id: I5aedaa509914dad45cab667d33253cb3926c8053 --- .zuul.yaml | 20 +-- HACKING.rst | 4 +- centos_build_layer.cfg | 1 - centos_iso_image.inc | 1 - centos_pkg_dirs | 2 - debian_iso_image.inc | 2 + debian_pkg_dirs | 2 + python-k8sapp-rook/centos/build_srpm.data | 5 - .../centos/python-k8sapp-rook.spec | 57 --------- .../python3-k8sapp-rook-wheels.install | 1 - .../deb_folder/python3-k8sapp-rook.install | 2 - python-k8sapp-rook/debian/deb_folder/rules | 26 ---- python-k8sapp-rook/debian/meta_data.yaml | 7 -- .../debian/deb_folder/changelog | 0 .../debian/deb_folder/control | 6 +- .../debian/deb_folder/copyright | 0 .../python3-k8sapp-rook-wheels.install | 1 + .../deb_folder/python3-k8sapp-rook.install | 1 + python3-k8sapp-rook/debian/deb_folder/rules | 33 +++++ .../debian/deb_folder/source/format | 0 python3-k8sapp-rook/debian/meta_data.yaml | 9 ++ .../k8sapp_rook/.gitignore | 0 .../k8sapp_rook/.stestr.conf | 0 .../k8sapp_rook/LICENSE | 0 .../k8sapp_rook/README.rst | 0 .../k8sapp_rook/k8sapp_rook/__init__.py | 0 .../k8sapp_rook/common/__init__.py | 0 .../k8sapp_rook/common/constants.py | 0 .../k8sapp_rook/k8sapp_rook/helm/__init__.py | 0 .../k8sapp_rook/k8sapp_rook/helm/rook_ceph.py | 0 .../k8sapp_rook/helm/rook_ceph_provisioner.py | 0 .../k8sapp_rook/helm/rook_operator.py | 0 .../k8sapp_rook/lifecycle/__init__.py | 0 .../lifecycle/lifecycle_rook_ceph.py | 0 .../k8sapp_rook/k8sapp_rook/tests/__init__.py | 0 .../k8sapp_rook/tests/test_plugins.py | 0 .../k8sapp_rook/pylint.rc | 0 .../k8sapp_rook/requirements.txt | 0 .../k8sapp_rook/setup.cfg | 5 +- .../k8sapp_rook/setup.py | 0 .../k8sapp_rook/test-requirements.txt | 0 .../k8sapp_rook/tox.ini | 0 .../k8sapp_rook/upper-constraints.txt | 0 stx-rook-ceph/centos/build_srpm.data | 8 -- stx-rook-ceph/centos/stx-rook-ceph.spec | 119 ------------------ stx-rook-ceph/debian/deb_folder/rules | 2 +- stx-rook-ceph/debian/meta_data.yaml | 4 +- .../stx-rook-ceph/manifests/manifest.yaml | 99 --------------- 48 files changed, 67 insertions(+), 350 deletions(-) delete mode 100644 centos_build_layer.cfg delete mode 100644 centos_iso_image.inc delete mode 100644 centos_pkg_dirs create mode 100644 debian_iso_image.inc create mode 100644 debian_pkg_dirs delete mode 100644 python-k8sapp-rook/centos/build_srpm.data delete mode 100644 python-k8sapp-rook/centos/python-k8sapp-rook.spec delete mode 100644 python-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook-wheels.install delete mode 100644 python-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook.install delete mode 100755 python-k8sapp-rook/debian/deb_folder/rules delete mode 100644 python-k8sapp-rook/debian/meta_data.yaml rename {python-k8sapp-rook => python3-k8sapp-rook}/debian/deb_folder/changelog (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/debian/deb_folder/control (80%) rename {python-k8sapp-rook => python3-k8sapp-rook}/debian/deb_folder/copyright (100%) create mode 100644 python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook-wheels.install create mode 100644 python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook.install create mode 100755 python3-k8sapp-rook/debian/deb_folder/rules rename {python-k8sapp-rook => python3-k8sapp-rook}/debian/deb_folder/source/format (100%) create mode 100644 python3-k8sapp-rook/debian/meta_data.yaml rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/.gitignore (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/.stestr.conf (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/LICENSE (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/README.rst (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/__init__.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/common/__init__.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/common/constants.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/helm/__init__.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/helm/rook_ceph.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/helm/rook_ceph_provisioner.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/helm/rook_operator.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/lifecycle/__init__.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/lifecycle/lifecycle_rook_ceph.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/tests/__init__.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/k8sapp_rook/tests/test_plugins.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/pylint.rc (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/requirements.txt (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/setup.cfg (91%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/setup.py (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/test-requirements.txt (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/tox.ini (100%) rename {python-k8sapp-rook => python3-k8sapp-rook}/k8sapp_rook/upper-constraints.txt (100%) delete mode 100644 stx-rook-ceph/centos/build_srpm.data delete mode 100644 stx-rook-ceph/centos/stx-rook-ceph.spec delete mode 100644 stx-rook-ceph/stx-rook-ceph/manifests/manifest.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 4e16c40..ac4ca97 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -34,10 +34,10 @@ - starlingx/update - starlingx/utilities files: - - python-k8sapp-rook/* + - python3-k8sapp-rook/* vars: tox_envlist: py27 - tox_extra_args: -c python-k8sapp-rook/k8sapp_rook/tox.ini + tox_extra_args: -c python3-k8sapp-rook/k8sapp_rook/tox.ini - job: name: k8sapp-rook-ceph-tox-py39 @@ -51,11 +51,11 @@ - starlingx/update - starlingx/utilities files: - - python-k8sapp-rook/* + - python3-k8sapp-rook/* vars: python_version: 3.9 tox_envlist: py39 - tox_extra_args: -c python-k8sapp-rook/k8sapp_rook/tox.ini + tox_extra_args: -c python3-k8sapp-rook/k8sapp_rook/tox.ini - job: @@ -65,10 +65,10 @@ Run flake8 test for k8sapp_rook_ceph nodeset: ubuntu-focal files: - - python-k8sapp-rook/* + - python3-k8sapp-rook/* vars: tox_envlist: flake8 - tox_extra_args: -c python-k8sapp-rook/k8sapp_rook/tox.ini + tox_extra_args: -c python3-k8sapp-rook/k8sapp_rook/tox.ini - job: name: k8sapp-rook-ceph-tox-pylint @@ -82,10 +82,10 @@ - starlingx/update - starlingx/utilities files: - - python-k8sapp-rook/* + - python3-k8sapp-rook/* vars: tox_envlist: pylint - tox_extra_args: -c python-k8sapp-rook/k8sapp_rook/tox.ini + tox_extra_args: -c python3-k8sapp-rook/k8sapp_rook/tox.ini - job: name: k8sapp-rook-ceph-tox-bandit @@ -94,10 +94,10 @@ Run bandit test for k8sapp_rook_ceph nodeset: ubuntu-focal files: - - python-k8sapp-rook/* + - python3-k8sapp-rook/* vars: tox_envlist: bandit - tox_extra_args: -c python-k8sapp-rook/k8sapp_rook/tox.ini + tox_extra_args: -c python3-k8sapp-rook/k8sapp_rook/tox.ini - job: name: stx-rook-ceph-apps-upload-git-mirror diff --git a/HACKING.rst b/HACKING.rst index c21ae1f..799b787 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -1,11 +1,11 @@ -StarlingX Rook-Ceph-Armada-App Style Commandments +StarlingX Rook-Ceph-App Style Commandments ================================================ - Step 1: Read the OpenStack style commandments https://docs.openstack.org/hacking/latest/ - Step 2: Read on -Rook-Ceph-Armada-App Specific Commandments +Rook-Ceph-App Specific Commandments ----------------------------------------- None so far diff --git a/centos_build_layer.cfg b/centos_build_layer.cfg deleted file mode 100644 index c581999..0000000 --- a/centos_build_layer.cfg +++ /dev/null @@ -1 +0,0 @@ -flock diff --git a/centos_iso_image.inc b/centos_iso_image.inc deleted file mode 100644 index 1d2a467..0000000 --- a/centos_iso_image.inc +++ /dev/null @@ -1 +0,0 @@ -stx-rook-ceph diff --git a/centos_pkg_dirs b/centos_pkg_dirs deleted file mode 100644 index b9c1cb7..0000000 --- a/centos_pkg_dirs +++ /dev/null @@ -1,2 +0,0 @@ -stx-rook-ceph -python-k8sapp-rook diff --git a/debian_iso_image.inc b/debian_iso_image.inc new file mode 100644 index 0000000..48db5a4 --- /dev/null +++ b/debian_iso_image.inc @@ -0,0 +1,2 @@ +#stx-rook-ceph +#stx-rook-ceph (not being added to the iso) \ No newline at end of file diff --git a/debian_pkg_dirs b/debian_pkg_dirs new file mode 100644 index 0000000..ff77373 --- /dev/null +++ b/debian_pkg_dirs @@ -0,0 +1,2 @@ +python3-k8sapp-rook +stx-rook-ceph diff --git a/python-k8sapp-rook/centos/build_srpm.data b/python-k8sapp-rook/centos/build_srpm.data deleted file mode 100644 index c69594d..0000000 --- a/python-k8sapp-rook/centos/build_srpm.data +++ /dev/null @@ -1,5 +0,0 @@ -SRC_DIR="k8sapp_rook" - -OPT_DEP_LIST="$STX_BASE/rook-ceph/stx-rook-ceph" -TIS_BASE_SRCREV=10c623509a68acad945d4e0c06a86b3e8486ad5b -TIS_PATCH_VER=GITREVCOUNT diff --git a/python-k8sapp-rook/centos/python-k8sapp-rook.spec b/python-k8sapp-rook/centos/python-k8sapp-rook.spec deleted file mode 100644 index c8fccba..0000000 --- a/python-k8sapp-rook/centos/python-k8sapp-rook.spec +++ /dev/null @@ -1,57 +0,0 @@ -%global app_name rook-ceph-apps -%global pypi_name k8sapp-rook -%global sname k8sapp_rook - -Name: python-%{pypi_name} -Version: 1.0 -Release: %{tis_patch_ver}%{?_tis_dist} -Summary: StarlingX sysinv extensions: Rook Ceph 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: Rook Ceph 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/%{app_name} -install -m 644 dist/*.whl ${RPM_BUILD_ROOT}/plugins/%{app_name}/ - -%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 -* Tue Jun 2 2020 Martin Chen -- Initial version diff --git a/python-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook-wheels.install b/python-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook-wheels.install deleted file mode 100644 index e07bd60..0000000 --- a/python-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook-wheels.install +++ /dev/null @@ -1 +0,0 @@ -plugins/rook-ceph-apps/*.whl diff --git a/python-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook.install b/python-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook.install deleted file mode 100644 index 8e722f6..0000000 --- a/python-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/python3/dist-packages/k8sapp_rook-1.0.0.egg-info/* -usr/lib/python3/dist-packages/k8sapp_rook/* diff --git a/python-k8sapp-rook/debian/deb_folder/rules b/python-k8sapp-rook/debian/deb_folder/rules deleted file mode 100755 index 62180fd..0000000 --- a/python-k8sapp-rook/debian/deb_folder/rules +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/make -f -# export DH_VERBOSE = 1 - -export APP_NAME=rook-ceph-apps -export PBR_VERSION=1.0.0 -export PYBUILD_NAME=k8sapp-rook -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-rook/debian/meta_data.yaml b/python-k8sapp-rook/debian/meta_data.yaml deleted file mode 100644 index 3b0c0df..0000000 --- a/python-k8sapp-rook/debian/meta_data.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -debname: python3-k8sapp-rook -debver: 1.0-1 -src_path: k8sapp_rook -revision: - dist: $STX_DIST - PKG_GITREVCOUNT: true diff --git a/python-k8sapp-rook/debian/deb_folder/changelog b/python3-k8sapp-rook/debian/deb_folder/changelog similarity index 100% rename from python-k8sapp-rook/debian/deb_folder/changelog rename to python3-k8sapp-rook/debian/deb_folder/changelog diff --git a/python-k8sapp-rook/debian/deb_folder/control b/python3-k8sapp-rook/debian/deb_folder/control similarity index 80% rename from python-k8sapp-rook/debian/deb_folder/control rename to python3-k8sapp-rook/debian/deb_folder/control index acd4394..b7b24b6 100644 --- a/python-k8sapp-rook/debian/deb_folder/control +++ b/python3-k8sapp-rook/debian/deb_folder/control @@ -16,13 +16,11 @@ Section: libs Architecture: any Depends: ${misc:Depends}, ${python3:Depends} Description: StarlingX Sysinv Rook Ceph Extensions - This package contains sysinv plugins for the Rook Ceph armada - K8S app. + Sysinv plugins for the Rook Ceph K8S app. Package: python3-k8sapp-rook-wheels Section: libs Architecture: any Depends: ${misc:Depends}, ${python3:Depends}, python3-wheel Description: StarlingX Sysinv Rook Ceph Extension Wheels - This package contains python wheels for the Rook Ceph platform armada - K8S app plugins. + Python wheels for the Rook Ceph K8S app plugins. diff --git a/python-k8sapp-rook/debian/deb_folder/copyright b/python3-k8sapp-rook/debian/deb_folder/copyright similarity index 100% rename from python-k8sapp-rook/debian/deb_folder/copyright rename to python3-k8sapp-rook/debian/deb_folder/copyright diff --git a/python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook-wheels.install b/python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook-wheels.install new file mode 100644 index 0000000..743aeac --- /dev/null +++ b/python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook-wheels.install @@ -0,0 +1 @@ +plugins/*.whl diff --git a/python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook.install b/python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook.install new file mode 100644 index 0000000..91d1d9d --- /dev/null +++ b/python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook.install @@ -0,0 +1 @@ +usr/lib/python3/dist-packages/k8sapp_* diff --git a/python3-k8sapp-rook/debian/deb_folder/rules b/python3-k8sapp-rook/debian/deb_folder/rules new file mode 100755 index 0000000..2379738 --- /dev/null +++ b/python3-k8sapp-rook/debian/deb_folder/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export APP_NAME = rook-ceph-apps +export PYBUILD_NAME = k8sapp-rook + +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 diff --git a/python-k8sapp-rook/debian/deb_folder/source/format b/python3-k8sapp-rook/debian/deb_folder/source/format similarity index 100% rename from python-k8sapp-rook/debian/deb_folder/source/format rename to python3-k8sapp-rook/debian/deb_folder/source/format diff --git a/python3-k8sapp-rook/debian/meta_data.yaml b/python3-k8sapp-rook/debian/meta_data.yaml new file mode 100644 index 0000000..9148f26 --- /dev/null +++ b/python3-k8sapp-rook/debian/meta_data.yaml @@ -0,0 +1,9 @@ +--- +debname: python3-k8sapp-rook +debver: 1.0-1 +src_path: k8sapp_rook +revision: + dist: $STX_DIST + GITREVCOUNT: + SRC_DIR: ${MY_REPO}/stx/rook-ceph + BASE_SRCREV: 10c623509a68acad945d4e0c06a86b3e8486ad5b diff --git a/python-k8sapp-rook/k8sapp_rook/.gitignore b/python3-k8sapp-rook/k8sapp_rook/.gitignore similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/.gitignore rename to python3-k8sapp-rook/k8sapp_rook/.gitignore diff --git a/python-k8sapp-rook/k8sapp_rook/.stestr.conf b/python3-k8sapp-rook/k8sapp_rook/.stestr.conf similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/.stestr.conf rename to python3-k8sapp-rook/k8sapp_rook/.stestr.conf diff --git a/python-k8sapp-rook/k8sapp_rook/LICENSE b/python3-k8sapp-rook/k8sapp_rook/LICENSE similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/LICENSE rename to python3-k8sapp-rook/k8sapp_rook/LICENSE diff --git a/python-k8sapp-rook/k8sapp_rook/README.rst b/python3-k8sapp-rook/k8sapp_rook/README.rst similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/README.rst rename to python3-k8sapp-rook/k8sapp_rook/README.rst diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/__init__.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/__init__.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/__init__.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/__init__.py diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/__init__.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/__init__.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/__init__.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/__init__.py diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/constants.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/constants.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/constants.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/constants.py diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/__init__.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/__init__.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/__init__.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/__init__.py diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph.py diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph_provisioner.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph_provisioner.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph_provisioner.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph_provisioner.py diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_operator.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_operator.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_operator.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_operator.py diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/__init__.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/__init__.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/__init__.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/__init__.py diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/lifecycle_rook_ceph.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/lifecycle_rook_ceph.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/lifecycle_rook_ceph.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/lifecycle_rook_ceph.py diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/__init__.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/__init__.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/__init__.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/__init__.py diff --git a/python-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/test_plugins.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/test_plugins.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/test_plugins.py rename to python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/test_plugins.py diff --git a/python-k8sapp-rook/k8sapp_rook/pylint.rc b/python3-k8sapp-rook/k8sapp_rook/pylint.rc similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/pylint.rc rename to python3-k8sapp-rook/k8sapp_rook/pylint.rc diff --git a/python-k8sapp-rook/k8sapp_rook/requirements.txt b/python3-k8sapp-rook/k8sapp_rook/requirements.txt similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/requirements.txt rename to python3-k8sapp-rook/k8sapp_rook/requirements.txt diff --git a/python-k8sapp-rook/k8sapp_rook/setup.cfg b/python3-k8sapp-rook/k8sapp_rook/setup.cfg similarity index 91% rename from python-k8sapp-rook/k8sapp_rook/setup.cfg rename to python3-k8sapp-rook/k8sapp_rook/setup.cfg index 2cb09f6..15f45c8 100644 --- a/python-k8sapp-rook/k8sapp_rook/setup.cfg +++ b/python3-k8sapp-rook/k8sapp_rook/setup.cfg @@ -39,11 +39,8 @@ systemconfig.helm_plugins.rook_ceph_apps = 002_rook-ceph = k8sapp_rook.helm.rook_ceph:RookCephHelm 003_rook-ceph-provisioner = k8sapp_rook.helm.rook_ceph_provisioner:RookCephProvisionerHelm -systemconfig.armada.manifest_ops = - rook-ceph-apps = k8sapp_rook.armada.manifest_rook_ceph:RookCephArmadaManifestOperator - systemconfig.app_lifecycle = rook-ceph-apps = k8sapp_rook.lifecycle.lifecycle_rook_ceph:RookCephAppLifecycleOperator -[wheel] +[bdist_wheel] universal = 1 diff --git a/python-k8sapp-rook/k8sapp_rook/setup.py b/python3-k8sapp-rook/k8sapp_rook/setup.py similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/setup.py rename to python3-k8sapp-rook/k8sapp_rook/setup.py diff --git a/python-k8sapp-rook/k8sapp_rook/test-requirements.txt b/python3-k8sapp-rook/k8sapp_rook/test-requirements.txt similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/test-requirements.txt rename to python3-k8sapp-rook/k8sapp_rook/test-requirements.txt diff --git a/python-k8sapp-rook/k8sapp_rook/tox.ini b/python3-k8sapp-rook/k8sapp_rook/tox.ini similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/tox.ini rename to python3-k8sapp-rook/k8sapp_rook/tox.ini diff --git a/python-k8sapp-rook/k8sapp_rook/upper-constraints.txt b/python3-k8sapp-rook/k8sapp_rook/upper-constraints.txt similarity index 100% rename from python-k8sapp-rook/k8sapp_rook/upper-constraints.txt rename to python3-k8sapp-rook/k8sapp_rook/upper-constraints.txt diff --git a/stx-rook-ceph/centos/build_srpm.data b/stx-rook-ceph/centos/build_srpm.data deleted file mode 100644 index 2fe1716..0000000 --- a/stx-rook-ceph/centos/build_srpm.data +++ /dev/null @@ -1,8 +0,0 @@ -SRC_DIR="stx-rook-ceph" -COPY_LIST="files/* $PKG_BASE/$SRC_DIR/fluxcd-manifests/*" - -EXCLUDE_LIST_FROM_TAR=".stestr" - -OPT_DEP_LIST="$STX_BASE/rook-ceph/python-k8sapp-rook" -TIS_BASE_SRCREV=10c623509a68acad945d4e0c06a86b3e8486ad5b -TIS_PATCH_VER=GITREVCOUNT diff --git a/stx-rook-ceph/centos/stx-rook-ceph.spec b/stx-rook-ceph/centos/stx-rook-ceph.spec deleted file mode 100644 index b831d7c..0000000 --- a/stx-rook-ceph/centos/stx-rook-ceph.spec +++ /dev/null @@ -1,119 +0,0 @@ -# Application tunables (maps to metadata) -%global app_name rook-ceph-apps -%global helm_repo stx-platform - -# Install location -%global app_folder /usr/local/share/applications/helm - -# Build variables -%global helm_folder /usr/lib/helm -#%global toolkit_version 0.1.0 -%global rook_version 1.9.6 - -Summary: StarlingX K8S application: Rook Ceph -Name: stx-rook-ceph -Version: 1.0 -Release: %{tis_patch_ver}%{?_tis_dist} -License: Apache-2.0 -Group: base -Packager: Intel -URL: unknown - -Source0: %{name}-%{version}.tar.gz -Source1: rook-mon-exit.sh - -BuildArch: noarch - -BuildRequires: helm -BuildRequires: openstack-helm-infra -BuildRequires: chartmuseum -BuildRequires: python-k8sapp-rook -BuildRequires: python-k8sapp-rook-wheels - -%description -The StarlingX K8S application for Rook Ceph - -%package fluxcd -Summary: StarlingX K8s application for Rook Ceph FluxCD -Group: base -License: Apache-2.0 - -%description fluxcd -StarlingX K8s application for Rook Ceph FluxCD - -%prep -%setup - -%build -# Host a server for the 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 - -# Make the charts. These produce a tgz file -cd helm-charts -make rook-operator -make rook-ceph -make rook-ceph-provisioner -cd - - -# Terminate helm server (the last backgrounded task) -kill %1 - -# Create a chart tarball compliant with sysinv kube-app.py -%define app_staging %{_builddir}/staging -%define app_tarball_armada %{app_name}-%{version}-%{tis_patch_ver}.tgz -%define app_tarball_fluxcd %{app_name}-fluxcd-%{version}-%{tis_patch_ver}.tgz - -# Setup staging -mkdir -p %{app_staging} -cp files/metadata.yaml %{app_staging} -cp manifests/manifest.yaml %{app_staging} -mkdir -p %{app_staging}/charts -cp helm-charts/*.tgz %{app_staging}/charts -cd %{app_staging} - -# Populate metadata -sed -i 's/@APP_NAME@/%{app_name}/g' %{app_staging}/metadata.yaml -sed -i 's/@APP_VERSION@/%{version}-%{tis_patch_ver}/g' %{app_staging}/metadata.yaml -sed -i 's/@HELM_REPO@/%{helm_repo}/g' %{app_staging}/metadata.yaml - -# Copy the plugins: installed in the buildroot -mkdir -p %{app_staging}/plugins -cp /plugins/%{app_name}/*.whl %{app_staging}/plugins - -# package Armada -find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 -tar -zcf %{_builddir}/%{app_tarball_armada} -C %{app_staging}/ . - -# package FluxCD -rm -f %{app_staging}/manifest.yaml - -cd - -cp -R fluxcd-manifests %{app_staging}/ -cd %{app_staging} - -find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 -tar -zcf %{_builddir}/%{app_tarball_fluxcd} -C %{app_staging}/ . - -cd - - -# Cleanup staging -rm -fr %{app_staging} - -%install -install -d -m 755 %{buildroot}/%{app_folder} -install -d -m 755 %{buildroot}%{_initrddir} -install -p -D -m 755 %{_builddir}/%{app_tarball_armada} %{buildroot}/%{app_folder} -install -m 750 %{SOURCE1} %{buildroot}%{_initrddir}/rook-mon-exit - -install -p -D -m 755 %{_builddir}/%{app_tarball_fluxcd} %{buildroot}/%{app_folder} - -%files -%defattr(-,root,root,-) -%{app_folder}/%{app_tarball_armada} -%{_initrddir}/rook-mon-exit - -%files fluxcd -%defattr(-,root,root,-) -%{app_folder}/%{app_tarball_fluxcd} diff --git a/stx-rook-ceph/debian/deb_folder/rules b/stx-rook-ceph/debian/deb_folder/rules index 14f7f86..1b454aa 100644 --- a/stx-rook-ceph/debian/deb_folder/rules +++ b/stx-rook-ceph/debian/deb_folder/rules @@ -56,7 +56,7 @@ override_dh_auto_build: # Copy the plugins: installed in the buildroot mkdir -p $(STAGING_FLUXCD)/plugins - cp /plugins/$(APP_NAME)/*.whl $(STAGING_FLUXCD)/plugins + cp /plugins/*.whl $(STAGING_FLUXCD)/plugins # Package it up cd $(STAGING_FLUXCD) diff --git a/stx-rook-ceph/debian/meta_data.yaml b/stx-rook-ceph/debian/meta_data.yaml index e866280..5616546 100644 --- a/stx-rook-ceph/debian/meta_data.yaml +++ b/stx-rook-ceph/debian/meta_data.yaml @@ -6,4 +6,6 @@ src_files: - files revision: dist: $STX_DIST - PKG_GITREVCOUNT: true + GITREVCOUNT: + SRC_DIR: ${MY_REPO}/stx/rook-ceph + BASE_SRCREV: 10c623509a68acad945d4e0c06a86b3e8486ad5b diff --git a/stx-rook-ceph/stx-rook-ceph/manifests/manifest.yaml b/stx-rook-ceph/stx-rook-ceph/manifests/manifest.yaml deleted file mode 100644 index f502274..0000000 --- a/stx-rook-ceph/stx-rook-ceph/manifests/manifest.yaml +++ /dev/null @@ -1,99 +0,0 @@ ---- -schema: armada/Chart/v1 -metadata: - schema: metadata/Document/v1 - name: kube-system-rook-operator -data: - chart_name: rook-operator - release: rook-operator - namespace: kube-system - wait: - resources: - - type: pod - labels: - app: rook-ceph-operator - timeout: 1800 - install: - no_hooks: false - upgrade: - no_hooks: false - source: - type: tar - location: http://172.17.0.1:8080/helm_charts/stx-platform/rook-operator-0.1.0.tgz - subpath: rook-operator - reference: master - dependencies: [] ---- -schema: armada/Chart/v1 -metadata: - schema: metadata/Document/v1 - name: kube-system-rook-ceph -data: - chart_name: rook-ceph - release: rook-ceph - namespace: kube-system - wait: - resources: - - type: pod - labels: - app: rook-ceph-mgr - - type: pod - labels: - app: rook-ceph-mon - - type: pod - labels: - app: rook-ceph-osd - timeout: 1800 - install: - no_hooks: false - upgrade: - no_hooks: false - source: - type: tar - location: http://172.17.0.1:8080/helm_charts/stx-platform/rook-ceph-0.1.0.tgz - subpath: rook-ceph - reference: master - dependencies: [] ---- -schema: armada/Chart/v1 -metadata: - schema: metadata/Document/v1 - name: kube-system-rook-ceph-provisioner -data: - chart_name: rook-ceph-provisioner - release: rook-ceph-provisioner - namespace: kube-system - wait: - resources: - - type: job - labels: - release: stx-rook-ceph-provisioner - install: - no_hooks: false - source: - type: tar - location: http://172.17.0.1:8080/helm_charts/stx-platform/rook-ceph-provisioner-0.1.0.tgz - subpath: rook-ceph-provisioner - reference: master - dependencies: [] ---- -schema: armada/ChartGroup/v1 -metadata: - schema: metadata/Document/v1 - name: starlingx-rook-charts -data: - description: StarlingX Rook Ceph Charts - sequenced: true - chart_group: - - kube-system-rook-operator - - kube-system-rook-ceph - - kube-system-rook-ceph-provisioner ---- -schema: armada/Manifest/v1 -metadata: - schema: metadata/Document/v1 - name: rook-ceph-manifest -data: - release_prefix: stx - chart_groups: - - starlingx-rook-charts