Add stx-fm-rest-api loci image
This change reorganizes the source directories of the stx-fm-rest-api container to be reused by both CentOS and Debian Dockerfiles in order to build the images having the corresponding OS-specic base. As part of this, the fm-api, fm-rest-api, fm-common and python-fmclient packages have been ported in order to generate deb files that contain .whl. Test plan: PASS: Build debian iso and perform fresh install. Verify fm commands are working as expected. PASS: Build python3 wheels tarball on Debian. Verify fm, fm_api, fm_core and fmclient .whl files are added. PASS: Build Debian-based container and push it to a public registry. Apply openstack application and update the fm-rest-api url to pull this new image. Verify that: - pods are up and running with the new image/tag specified. - the container is running on Debian. - from inside the container, fm querys are working as expected. Story: 2009831 Task: 46634 Depends-On: https://review.opendev.org/c/starlingx/config/+/862498 Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com> Change-Id: I2b35139f8775141e39f97a5a6037c5de2b4d5d76
This commit is contained in:
parent
8a07de3ea1
commit
cd0f5c38c2
1
debian_stable_docker_images.inc
Normal file
1
debian_stable_docker_images.inc
Normal file
@ -0,0 +1 @@
|
|||||||
|
fm-rest-api
|
4
debian_stable_wheels.inc
Normal file
4
debian_stable_wheels.inc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
fm-api-wheel
|
||||||
|
fm-common-wheel
|
||||||
|
fm-rest-api-wheel
|
||||||
|
python-fmclient-wheel
|
@ -2,7 +2,7 @@ Source: fm-api
|
|||||||
Section: admin
|
Section: admin
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Starlingx Developers <starlingx-discuss@lists.starlingx.io>
|
Maintainer: Starlingx Developers <starlingx-discuss@lists.starlingx.io>
|
||||||
Build-Depends: debhelper-compat (= 13), dh-python, python3-setuptools, python3-all
|
Build-Depends: debhelper-compat (= 13), dh-python, python3-setuptools, python3-all, python3-wheel
|
||||||
Standards-Version: 4.4.1
|
Standards-Version: 4.4.1
|
||||||
Homepage: https://www.starlingx.io
|
Homepage: https://www.starlingx.io
|
||||||
|
|
||||||
@ -14,3 +14,8 @@ Description: Starlingx fault management api
|
|||||||
active alarms.
|
active alarms.
|
||||||
.
|
.
|
||||||
This package installs the library for Python 3.
|
This package installs the library for Python 3.
|
||||||
|
|
||||||
|
Package: fm-api-wheel
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${python3:Depends}, ${misc:Depends}
|
||||||
|
Description: Contains python wheels for fm-api
|
||||||
|
1
fm-api/debian/deb_folder/python3-fm-api.install
Normal file
1
fm-api/debian/deb_folder/python3-fm-api.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
usr/lib/python*/dist-packages/*
|
@ -2,6 +2,14 @@
|
|||||||
#export DH_VERBOSE = 1
|
#export DH_VERBOSE = 1
|
||||||
|
|
||||||
export PYBUILD_NAME=fm-api
|
export PYBUILD_NAME=fm-api
|
||||||
|
DEBIAN_DESTDIR := $(CURDIR)/debian/tmp
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@ --with python3 --buildsystem=pybuild
|
dh $@ --with python3 --buildsystem=pybuild
|
||||||
|
|
||||||
|
override_dh_install:
|
||||||
|
python3 setup.py install -f --install-layout=deb --root=${DEBIAN_DESTDIR}
|
||||||
|
python3 setup.py bdist_wheel \
|
||||||
|
--universal \
|
||||||
|
-d ${CURDIR}/debian/fm-api-wheel/usr/share/python-wheels
|
||||||
|
dh_install
|
||||||
|
@ -9,6 +9,7 @@ Build-Depends: debhelper-compat (= 13),
|
|||||||
python3,
|
python3,
|
||||||
python3-dev,
|
python3-dev,
|
||||||
python3-setuptools,
|
python3-setuptools,
|
||||||
|
python3-wheel,
|
||||||
uuid-dev
|
uuid-dev
|
||||||
Standards-Version: 4.5.1
|
Standards-Version: 4.5.1
|
||||||
Rules-Requires-Root: no
|
Rules-Requires-Root: no
|
||||||
@ -26,15 +27,6 @@ Description: StarlingX fault management client library - header files
|
|||||||
.
|
.
|
||||||
This package contains the header files
|
This package contains the header files
|
||||||
|
|
||||||
Package: fm-common
|
|
||||||
Architecture: any
|
|
||||||
Multi-Arch: same
|
|
||||||
Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
|
|
||||||
Description: StarlingX fault management client library
|
|
||||||
StarlingX Fault Management Client Library that provides APIs for applications
|
|
||||||
to raise/clear/update active alarms. This package contains symbolic links,
|
|
||||||
header files, and related items necessary for software development.
|
|
||||||
|
|
||||||
Package: fm-common-doc
|
Package: fm-common-doc
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Section: doc
|
Section: doc
|
||||||
@ -46,3 +38,16 @@ Description: StarlingX fault management client library - documentation
|
|||||||
.
|
.
|
||||||
This package contains the documentation for fm-common
|
This package contains the documentation for fm-common
|
||||||
|
|
||||||
|
Package: fm-common
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: same
|
||||||
|
Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
|
||||||
|
Description: StarlingX fault management client library
|
||||||
|
StarlingX Fault Management Client Library that provides APIs for applications
|
||||||
|
to raise/clear/update active alarms. This package contains symbolic links,
|
||||||
|
header files, and related items necessary for software development.
|
||||||
|
|
||||||
|
Package: fm-common-wheel
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${python3:Depends}, ${misc:Depends}
|
||||||
|
Description: Contains python wheels for fm-common
|
||||||
|
@ -15,7 +15,11 @@ override_dh_auto_install:
|
|||||||
LIBDIR=/usr/lib \
|
LIBDIR=/usr/lib \
|
||||||
INCDIR=/usr/include \
|
INCDIR=/usr/include \
|
||||||
CGCS_DOC_DEPLOY=/opt/deploy/cgcs_doc install
|
CGCS_DOC_DEPLOY=/opt/deploy/cgcs_doc install
|
||||||
python3 setup.py install --install-layout=deb --root $(ROOT)
|
python3 setup.py install --install-layout=deb --skip-build --root $(ROOT)
|
||||||
|
|
||||||
|
python3 setup.py bdist_wheel \
|
||||||
|
--universal \
|
||||||
|
-d $(CURDIR)/debian/fm-common-wheel/usr/share/python-wheels
|
||||||
|
|
||||||
override_dh_fixperms:
|
override_dh_fixperms:
|
||||||
dh_fixperms -XfmClientCli
|
dh_fixperms -XfmClientCli
|
||||||
|
@ -20,6 +20,7 @@ Build-Depends: debhelper-compat (= 13),
|
|||||||
python3-setuptools,
|
python3-setuptools,
|
||||||
python3-sqlalchemy,
|
python3-sqlalchemy,
|
||||||
python3-wsme,
|
python3-wsme,
|
||||||
|
python3-wheel,
|
||||||
tsconfig
|
tsconfig
|
||||||
Standards-Version: 4.5.1
|
Standards-Version: 4.5.1
|
||||||
Rules-Requires-Root: no
|
Rules-Requires-Root: no
|
||||||
@ -34,3 +35,8 @@ Depends: ${python3:Depends},
|
|||||||
python3-paste
|
python3-paste
|
||||||
Description: Fault Management Openstack REST API
|
Description: Fault Management Openstack REST API
|
||||||
This package contains the Openstack REST API for fault management.
|
This package contains the Openstack REST API for fault management.
|
||||||
|
|
||||||
|
Package: fm-rest-api-wheel
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${python3:Depends}, ${misc:Depends}
|
||||||
|
Description: Contains python wheels for fm-rest-api
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
etc/fm/fm.conf
|
etc/fm/fm.conf
|
||||||
etc/fm/policy.yaml
|
etc/fm/policy.yaml
|
||||||
etc/init.d
|
etc/init.d
|
||||||
|
usr/bin/
|
||||||
|
usr/lib/python*/dist-packages/*
|
||||||
usr/share/starlingx/pmon.d/fm-api.conf
|
usr/share/starlingx/pmon.d/fm-api.conf
|
||||||
|
@ -11,6 +11,9 @@ export INITDIR=$(ROOT)/etc/init.d
|
|||||||
dh $@ --with=python3 --buildsystem=pybuild
|
dh $@ --with=python3 --buildsystem=pybuild
|
||||||
|
|
||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
|
python3 setup.py install -f --install-layout=deb --root=$(CURDIR)/$(ROOT)
|
||||||
|
python3 setup.py bdist_wheel --universal \
|
||||||
|
-d $(CURDIR)/debian/fm-rest-api-wheel/usr/share/python-wheels
|
||||||
install -d -m 755 $(INITDIR)
|
install -d -m 755 $(INITDIR)
|
||||||
install -p -D -m 755 scripts/fm-api $(INITDIR)/fm-api
|
install -p -D -m 755 scripts/fm-api $(INITDIR)/fm-api
|
||||||
install -d -m 755 $(PMONDIR)
|
install -d -m 755 $(PMONDIR)
|
||||||
|
26
fm-rest-api/debian/stx-fm-rest-api.stable_docker_image
Normal file
26
fm-rest-api/debian/stx-fm-rest-api.stable_docker_image
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
BUILDER=loci
|
||||||
|
LABEL=stx-fm-rest-api
|
||||||
|
# Set PROJECT=infra and PROJECT_REPO=nil because we are not cloning a repo
|
||||||
|
PROJECT=infra
|
||||||
|
PROJECT_REPO=nil
|
||||||
|
DIST_PACKAGES="postgresql fm-common"
|
||||||
|
DIST_REPOS="OS"
|
||||||
|
|
||||||
|
PIP_PACKAGES="
|
||||||
|
cgtsclient \
|
||||||
|
httplib2 \
|
||||||
|
keystone \
|
||||||
|
keystonemiddleware \
|
||||||
|
oslo.db \
|
||||||
|
oslo.log \
|
||||||
|
oslo.middleware \
|
||||||
|
oslo.policy \
|
||||||
|
oslo.versionedobjects \
|
||||||
|
PyMySQL \
|
||||||
|
python_neutronclient \
|
||||||
|
tsconfig \
|
||||||
|
pecan \
|
||||||
|
fm \
|
||||||
|
fm_api \
|
||||||
|
fm_core \
|
||||||
|
WSME"
|
@ -2,7 +2,7 @@ Source: python-fmclient
|
|||||||
Section: admin
|
Section: admin
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||||
Build-Depends: debhelper-compat (= 12), dh-python, python3-setuptools, python3-all, python3-pbr
|
Build-Depends: debhelper-compat (= 12), dh-python, python3-setuptools, python3-all, python3-pbr, python3-wheel
|
||||||
Build-Depends-Indep:
|
Build-Depends-Indep:
|
||||||
python3-oslo.utils,
|
python3-oslo.utils,
|
||||||
python3-prettytable,
|
python3-prettytable,
|
||||||
@ -23,3 +23,8 @@ Depends: ${python3:Depends},
|
|||||||
bash-completion
|
bash-completion
|
||||||
Description: Client library for fault management
|
Description: Client library for fault management
|
||||||
A python client library for Fault Management
|
A python client library for Fault Management
|
||||||
|
|
||||||
|
Package: python-fmclient-wheel
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${python3:Depends}, ${misc:Depends}
|
||||||
|
Description: Contains python wheels for python-fmclient
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
#export DH_VERBOSE = 1
|
#export DH_VERBOSE = 1
|
||||||
|
|
||||||
export PYBUILD_NAME=python-fmclient
|
export PYBUILD_NAME=fmclient
|
||||||
|
export PBR_VERSION=1.0.0
|
||||||
|
export ROOT=$(CURDIR)/debian/tmp
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@ --with python3 --buildsystem=pybuild
|
dh $@ --with python3 --buildsystem=pybuild
|
||||||
|
|
||||||
|
override_dh_install:
|
||||||
|
python3 setup.py install -f --install-layout=deb --root=$(ROOT)
|
||||||
|
python3 setup.py bdist_wheel --universal -d ${CURDIR}/debian/python-fmclient-wheel/usr/share/python-wheels
|
||||||
|
dh_install
|
||||||
|
Loading…
Reference in New Issue
Block a user