Port stx-keystone-api-proxy image to debian
This commit enables the creation of stx-keystone-api-proxy image by both distros: CentOS and Debian. Test Plan: PASS - Build python3 wheels tarball on Debian and build stx-keystone-api-proxy image on Debian. Story: 2009831 Task: 46771 Depends-On: https://review.opendev.org/c/starlingx/update/+/864231 Depends-On: https://review.opendev.org/c/starlingx/config/+/864242 Signed-off-by: Hugo Brito <hugo.brito@windriver.com> Change-Id: I2b383782ac9fa7c104f54d729f8dbbdbc5cb9823
This commit is contained in:
parent
d8b1a08d1e
commit
03c6516e66
|
@ -0,0 +1 @@
|
||||||
|
distributedcloud
|
|
@ -0,0 +1 @@
|
||||||
|
distributedcloud-wheels
|
|
@ -0,0 +1 @@
|
||||||
|
distributedcloud
|
|
@ -0,0 +1 @@
|
||||||
|
distributedcloud-wheels
|
|
@ -1 +0,0 @@
|
||||||
wheels/*
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
#export DH_VERBOSE = 1
|
#export DH_VERBOSE = 1
|
||||||
|
|
||||||
export PBR_VERSION = 1.0.0
|
|
||||||
export PYBUILD_NAME = distributedcloud
|
export PYBUILD_NAME = distributedcloud
|
||||||
|
export PBR_VERSION = 1.0.0
|
||||||
|
|
||||||
ROOT = $(CURDIR)/debian/tmp
|
ROOT = $(CURDIR)/debian/tmp
|
||||||
SYSTEMD_DIR = $(ROOT)/usr/lib/systemd/system
|
SYSTEMD_DIR = $(ROOT)/usr/lib/systemd/system
|
||||||
|
@ -15,7 +15,13 @@ BIN_DIR = $(ROOT)/usr/bin
|
||||||
dh $@ --with python3 --buildsystem=pybuild
|
dh $@ --with python3 --buildsystem=pybuild
|
||||||
|
|
||||||
override_dh_install:
|
override_dh_install:
|
||||||
# install systemd unit files
|
python3 setup.py install -f --install-layout=deb \
|
||||||
|
--root=$(CURDIR)/debian/tmp
|
||||||
|
python3 setup.py bdist_wheel \
|
||||||
|
--universal\
|
||||||
|
-d $(CURDIR)/debian/distributedcloud-wheels/usr/share/python-wheels
|
||||||
|
|
||||||
|
# install systemd unit files
|
||||||
install -p -D -m 644 files/dcmanager-api.service $(SYSTEMD_DIR)/dcmanager-api.service
|
install -p -D -m 644 files/dcmanager-api.service $(SYSTEMD_DIR)/dcmanager-api.service
|
||||||
install -p -D -m 644 files/dcmanager-manager.service $(SYSTEMD_DIR)/dcmanager-manager.service
|
install -p -D -m 644 files/dcmanager-manager.service $(SYSTEMD_DIR)/dcmanager-manager.service
|
||||||
install -p -D -m 644 files/dcmanager-audit.service $(SYSTEMD_DIR)/dcmanager-audit.service
|
install -p -D -m 644 files/dcmanager-audit.service $(SYSTEMD_DIR)/dcmanager-audit.service
|
||||||
|
@ -32,30 +38,30 @@ override_dh_install:
|
||||||
install -p -D -m 644 files/dcorch.conf $(TMP_DIR)/dcorch.conf
|
install -p -D -m 644 files/dcorch.conf $(TMP_DIR)/dcorch.conf
|
||||||
install -p -D -m 644 files/dcmanager.conf $(TMP_DIR)/dcmanager.conf
|
install -p -D -m 644 files/dcmanager.conf $(TMP_DIR)/dcmanager.conf
|
||||||
|
|
||||||
# install systemd unit files for optional second instance
|
# install systemd unit files for optional second instance
|
||||||
install -p -D -m 644 files/dcdbsync-openstack-api.service $(SYSTEMD_DIR)/dcdbsync-openstack-api.service
|
install -p -D -m 644 files/dcdbsync-openstack-api.service $(SYSTEMD_DIR)/dcdbsync-openstack-api.service
|
||||||
install -p -D -m 644 files/dcdbsync.conf $(TMP_DIR)/dcdbsync.conf
|
install -p -D -m 644 files/dcdbsync.conf $(TMP_DIR)/dcdbsync.conf
|
||||||
|
|
||||||
install -p -D -m 644 files/distcloud-syslog.conf $(SYS_CONF_DIR)/syslog-ng/conf.d/distcloud.conf
|
install -p -D -m 644 files/distcloud-syslog.conf $(SYS_CONF_DIR)/syslog-ng/conf.d/distcloud.conf
|
||||||
install -p -D -m 644 files/distcloud-logrotate.conf $(SYS_CONF_DIR)/logrotate.d/distcloud.conf
|
install -p -D -m 644 files/distcloud-logrotate.conf $(SYS_CONF_DIR)/logrotate.d/distcloud.conf
|
||||||
|
|
||||||
# install ocf scripts
|
# install ocf scripts
|
||||||
install -d -m 755 $(OCF_DIR)
|
install -d -m 755 $(OCF_DIR)
|
||||||
install -p -D -m 755 ocf/* $(OCF_DIR)/
|
install -p -D -m 755 ocf/* $(OCF_DIR)/
|
||||||
|
|
||||||
# install dcorch cleaner
|
# install dcorch cleaner
|
||||||
install -m 755 -D -p files/clean-dcorch $(BIN_DIR)/clean-dcorch
|
install -m 755 -D -p files/clean-dcorch $(BIN_DIR)/clean-dcorch
|
||||||
|
|
||||||
# install ansible overrides dir
|
# install ansible overrides dir
|
||||||
install -d -m 600 $(ROOT)/var/opt/dc/ansible
|
install -d -m 600 $(ROOT)/var/opt/dc/ansible
|
||||||
|
|
||||||
# Generate sample config and add the current directory to PYTHONPATH so
|
# Generate sample config and add the current directory to PYTHONPATH so
|
||||||
# oslo-config-generator doesn't skip heat's entry points.
|
# oslo-config-generator doesn't skip heat's entry points.
|
||||||
PYTHONPATH=. oslo-config-generator --config-file=./dcmanager/config-generator.conf
|
PYTHONPATH=. oslo-config-generator --config-file=./dcmanager/config-generator.conf
|
||||||
PYTHONPATH=. oslo-config-generator --config-file=./dcorch/config-generator.conf
|
PYTHONPATH=. oslo-config-generator --config-file=./dcorch/config-generator.conf
|
||||||
PYTHONPATH=. oslo-config-generator --config-file=./dcdbsync/config-generator.conf
|
PYTHONPATH=. oslo-config-generator --config-file=./dcdbsync/config-generator.conf
|
||||||
|
|
||||||
# install default config files
|
# install default config files
|
||||||
oslo-config-generator \
|
oslo-config-generator \
|
||||||
--config-file ./dcmanager/config-generator.conf \
|
--config-file ./dcmanager/config-generator.conf \
|
||||||
--output-file ./dcmanager/dcmanager.conf.sample
|
--output-file ./dcmanager/dcmanager.conf.sample
|
||||||
|
@ -71,22 +77,11 @@ override_dh_install:
|
||||||
--output-file ./dcdbsync/dcdbsync.conf.sample
|
--output-file ./dcdbsync/dcdbsync.conf.sample
|
||||||
install -p -D -m 640 ./dcdbsync/dcdbsync.conf.sample $(SYS_CONF_DIR)/dcdbsync/dcdbsync.conf
|
install -p -D -m 640 ./dcdbsync/dcdbsync.conf.sample $(SYS_CONF_DIR)/dcdbsync/dcdbsync.conf
|
||||||
|
|
||||||
python3 setup.py install \
|
|
||||||
--root=$(ROOT) \
|
|
||||||
--prefix=/usr \
|
|
||||||
--install-data=/usr/share \
|
|
||||||
--install-layout=deb \
|
|
||||||
--single-version-externally-managed
|
|
||||||
|
|
||||||
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dcmanagerclient/tests
|
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dcmanagerclient/tests
|
||||||
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dccommon/tests
|
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dccommon/tests
|
||||||
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dcmanager/tests
|
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dcmanager/tests
|
||||||
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dcorch/tests
|
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dcorch/tests
|
||||||
|
|
||||||
python3 setup.py bdist_wheel \
|
|
||||||
--universal \
|
|
||||||
-d $(ROOT)/wheels
|
|
||||||
|
|
||||||
dh_install
|
dh_install
|
||||||
|
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
BUILDER=loci
|
||||||
|
DIST_REPOS="OS"
|
||||||
|
LABEL=stx-keystone-api-proxy
|
||||||
|
PROJECT=infra
|
||||||
|
PROJECT_REPO=nil
|
||||||
|
PIP_PACKAGES="
|
||||||
|
distributedcloud \
|
||||||
|
cgcs-patch \
|
||||||
|
tsconfig \
|
||||||
|
eventlet \
|
||||||
|
pecan \
|
||||||
|
SQLAlchemy \
|
||||||
|
pycrypto \
|
||||||
|
psycopg2 \
|
||||||
|
fmclient \
|
||||||
|
python-barbicanclient \
|
||||||
|
oslo.concurrency \
|
||||||
|
oslo.config \
|
||||||
|
oslo.db \
|
||||||
|
oslo.log \
|
||||||
|
oslo.messaging \
|
||||||
|
oslo.middleware \
|
||||||
|
oslo.policy \
|
||||||
|
oslo.service \
|
||||||
|
oslo.versionedobjects \
|
||||||
|
keystonemiddleware \
|
||||||
|
"
|
|
@ -0,0 +1,28 @@
|
||||||
|
BUILDER=loci
|
||||||
|
DIST_REPOS="OS"
|
||||||
|
LABEL=stx-keystone-api-proxy
|
||||||
|
PROJECT=infra
|
||||||
|
PROJECT_REPO=nil
|
||||||
|
PIP_PACKAGES="
|
||||||
|
distributedcloud \
|
||||||
|
cgcs-patch \
|
||||||
|
tsconfig \
|
||||||
|
eventlet \
|
||||||
|
pecan \
|
||||||
|
SQLAlchemy \
|
||||||
|
cryptography \
|
||||||
|
cgtsclient \
|
||||||
|
psycopg2 \
|
||||||
|
fmclient \
|
||||||
|
python-barbicanclient \
|
||||||
|
oslo.concurrency \
|
||||||
|
oslo.config \
|
||||||
|
oslo.db \
|
||||||
|
oslo.log \
|
||||||
|
oslo.messaging \
|
||||||
|
oslo.middleware \
|
||||||
|
oslo.policy \
|
||||||
|
oslo.service \
|
||||||
|
oslo.versionedobjects \
|
||||||
|
keystonemiddleware \
|
||||||
|
"
|
Loading…
Reference in New Issue