Add debian packaging for distributedcloud
Add debian packaging structure distributedcloud Test Plan: Pass: build package on Debian Pass: build Debian image Pass: install Debian image Pass: build package on CentOS Pass: build CentOS image Pass: install CentOS image Pass: CentOS controller unlocked/available Story: 2009101 Task: 44042 Signed-off-by: Fabricio Henrique Ramos <fabriciohenrique.ramos@windriver.com> Change-Id: Ie777d4ec4db6b54e46092d43509ecef799fcebbe
This commit is contained in:
parent
646b69a3c2
commit
aa8d142696
|
@ -0,0 +1 @@
|
||||||
|
distributedcloud
|
|
@ -0,0 +1,5 @@
|
||||||
|
distributedcloud (1.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Initial release.
|
||||||
|
|
||||||
|
-- Fabricio Henrique Ramos <fabriciohenrique.ramos@windriver.com> Thu, 11 Nov 2021 15:08:35 -0300
|
|
@ -0,0 +1,89 @@
|
||||||
|
Source: distributedcloud
|
||||||
|
Section: admin
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||||
|
Build-Depends:
|
||||||
|
debhelper-compat (= 13),
|
||||||
|
dh-python,
|
||||||
|
python3-openssl,
|
||||||
|
python3-babel,
|
||||||
|
python3-cryptography,
|
||||||
|
python3-dev,
|
||||||
|
python3-eventlet,
|
||||||
|
python3-jsonschema (>= 2.0.0),
|
||||||
|
python3-keyring,
|
||||||
|
python3-keystoneauth1 (>= 3.1.0),
|
||||||
|
python3-keystonemiddleware,
|
||||||
|
python3-netaddr,
|
||||||
|
python3-oslo.concurrency (>= 3.29.1),
|
||||||
|
python3-oslo.config,
|
||||||
|
python3-oslo.context,
|
||||||
|
python3-oslo.db,
|
||||||
|
python3-oslo.i18n,
|
||||||
|
python3-oslo.log,
|
||||||
|
python3-oslo.messaging,
|
||||||
|
python3-oslo.middleware,
|
||||||
|
python3-oslo.policy,
|
||||||
|
python3-oslo.rootwrap,
|
||||||
|
python3-oslo.serialization,
|
||||||
|
python3-oslo.service,
|
||||||
|
python3-oslo.utils,
|
||||||
|
python3-oslo.versionedobjects,
|
||||||
|
python3-pbr (>= 1.8),
|
||||||
|
python3-pecan (>= 1.0.0),
|
||||||
|
python3-pip,
|
||||||
|
python3-routes (>= 1.12.3),
|
||||||
|
python3-setuptools,
|
||||||
|
python3-sphinx,
|
||||||
|
python3-sphinxcontrib.httpdomain,
|
||||||
|
python3-wheel
|
||||||
|
Standards-Version: 4.1.2
|
||||||
|
Homepage: https://www.starlingx.io
|
||||||
|
|
||||||
|
Package: distributedcloud-dccommon
|
||||||
|
Architecture: any
|
||||||
|
Depends:
|
||||||
|
${misc:Depends},
|
||||||
|
${python3:Depends},
|
||||||
|
python3:any,
|
||||||
|
python3-kubernetes
|
||||||
|
Description: Distributed Cloud Common Module
|
||||||
|
Distributed Cloud Common Module
|
||||||
|
|
||||||
|
Package: distributedcloud-dcmanager
|
||||||
|
Architecture: any
|
||||||
|
Depends:
|
||||||
|
${misc:Depends},
|
||||||
|
${python3:Depends},
|
||||||
|
python3:any,
|
||||||
|
Description: Distributed Cloud Manager
|
||||||
|
Distributed Cloud Manager
|
||||||
|
|
||||||
|
Package: distributedcloud-dcorch
|
||||||
|
Architecture: any
|
||||||
|
Depends:
|
||||||
|
${misc:Depends},
|
||||||
|
${python3:Depends},
|
||||||
|
openstack-resource-agents,
|
||||||
|
python3:any,
|
||||||
|
python3-psutil
|
||||||
|
Description: Distributed Cloud Orchestrator
|
||||||
|
Distributed Cloud Orchestrator
|
||||||
|
|
||||||
|
Package: distributedcloud-dcdbsync
|
||||||
|
Architecture: any
|
||||||
|
Depends:
|
||||||
|
${misc:Depends},
|
||||||
|
${python3:Depends},
|
||||||
|
python3:any
|
||||||
|
Description: Distributed Cloud DCorch DBsync Agent
|
||||||
|
Distributed Cloud DCorch DBsync Agent
|
||||||
|
|
||||||
|
Package: distributedcloud-wheels
|
||||||
|
Architecture: any
|
||||||
|
Depends:
|
||||||
|
${misc:Depends},
|
||||||
|
${python3:Depends},
|
||||||
|
python3:any
|
||||||
|
Description: Distributed Cloud wheels
|
||||||
|
Contains python wheels for distributedcloud
|
|
@ -0,0 +1,24 @@
|
||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: distcloud-client
|
||||||
|
Upstream-Contact: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||||
|
Source: https://opendev.org/starlingx/distcloud-client
|
||||||
|
|
||||||
|
Files: debian/*
|
||||||
|
Copyright: 2021 Wind River Systems, Inc.
|
||||||
|
License: Apache-2
|
||||||
|
|
||||||
|
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'.
|
|
@ -0,0 +1,4 @@
|
||||||
|
etc/logrotate.d/distcloud.conf
|
||||||
|
etc/syslog-ng/conf.d/distcloud.conf
|
||||||
|
usr/lib/python3/dist-packages/dccommon/*
|
||||||
|
usr/lib/python3/dist-packages/distributedcloud-*.egg-info
|
|
@ -0,0 +1,7 @@
|
||||||
|
etc/dcdbsync/dcdbsync.conf
|
||||||
|
usr/bin/dcdbsync-api
|
||||||
|
usr/lib/ocf/resource.d/openstack/dcdbsync-*
|
||||||
|
usr/lib/python3/dist-packages/dcdbsync/*
|
||||||
|
usr/lib/systemd/system/dcdbsync-api.service
|
||||||
|
usr/lib/systemd/system/dcdbsync-openstack-api.service
|
||||||
|
usr/lib/tmpfiles.d/dcdbsync.conf
|
|
@ -0,0 +1 @@
|
||||||
|
/opt/dc/ansible
|
|
@ -0,0 +1,15 @@
|
||||||
|
etc/dcmanager/dcmanager.conf
|
||||||
|
usr/bin/dcmanager-api
|
||||||
|
usr/bin/dcmanager-audit
|
||||||
|
usr/bin/dcmanager-audit-worker
|
||||||
|
usr/bin/dcmanager-manage
|
||||||
|
usr/bin/dcmanager-manager
|
||||||
|
usr/bin/dcmanager-orchestrator
|
||||||
|
usr/lib/ocf/resource.d/openstack/dcmanager-*
|
||||||
|
usr/lib/python3/dist-packages/dcmanager/*
|
||||||
|
usr/lib/systemd/system/dcmanager-api.service
|
||||||
|
usr/lib/systemd/system/dcmanager-audit.service
|
||||||
|
usr/lib/systemd/system/dcmanager-audit-worker.service
|
||||||
|
usr/lib/systemd/system/dcmanager-orchestrator.service
|
||||||
|
usr/lib/systemd/system/dcmanager-manager.service
|
||||||
|
usr/lib/tmpfiles.d/dcmanager.conf
|
|
@ -0,0 +1,13 @@
|
||||||
|
etc/dcorch/dcorch.conf
|
||||||
|
usr/bin/clean-dcorch
|
||||||
|
usr/bin/dcorch-api
|
||||||
|
usr/bin/dcorch-api-proxy
|
||||||
|
usr/bin/dcorch-engine
|
||||||
|
usr/bin/dcorch-manage
|
||||||
|
usr/lib/ocf/resource.d/openstack/dcorch-*
|
||||||
|
usr/lib/python3/dist-packages/dcorch/*
|
||||||
|
usr/lib/systemd/system/dcorch-api.service
|
||||||
|
usr/lib/systemd/system/dcorch-engine.service
|
||||||
|
usr/lib/systemd/system/dcorch-sysinv-api-proxy.service
|
||||||
|
usr/lib/systemd/system/dcorch-identity-api-proxy.service
|
||||||
|
usr/lib/tmpfiles.d/dcorch.conf
|
|
@ -0,0 +1 @@
|
||||||
|
wheels/*
|
|
@ -0,0 +1,2 @@
|
||||||
|
# translate pycrypto to python3-cryptography
|
||||||
|
pycrypto python3-cryptography
|
|
@ -0,0 +1,103 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
#export DH_VERBOSE = 1
|
||||||
|
|
||||||
|
export PBR_VERSION = 1.0.0
|
||||||
|
export PYBUILD_NAME = distributedcloud
|
||||||
|
|
||||||
|
ROOT = $(CURDIR)/debian/tmp
|
||||||
|
SYSTEMD_DIR = $(ROOT)/usr/lib/systemd/system
|
||||||
|
TMP_DIR = $(ROOT)/usr/lib/tmpfiles.d
|
||||||
|
OCF_DIR = $(ROOT)/usr/lib/ocf/resource.d/openstack
|
||||||
|
SYS_CONF_DIR = $(ROOT)/etc
|
||||||
|
BIN_DIR = $(ROOT)/usr/bin
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with python3 --buildsystem=pybuild
|
||||||
|
|
||||||
|
override_dh_install:
|
||||||
|
# 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-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-worker.service $(SYSTEMD_DIR)/dcmanager-audit-worker.service
|
||||||
|
install -p -D -m 644 files/dcmanager-orchestrator.service $(SYSTEMD_DIR)/dcmanager-orchestrator.service
|
||||||
|
|
||||||
|
install -p -D -m 644 files/dcorch-api.service $(SYSTEMD_DIR)/dcorch-api.service
|
||||||
|
install -p -D -m 644 files/dcorch-engine.service $(SYSTEMD_DIR)/dcorch-engine.service
|
||||||
|
install -p -D -m 644 files/dcorch-sysinv-api-proxy.service $(SYSTEMD_DIR)/dcorch-sysinv-api-proxy.service
|
||||||
|
install -p -D -m 644 files/dcorch-identity-api-proxy.service $(SYSTEMD_DIR)/dcorch-identity-api-proxy.service
|
||||||
|
|
||||||
|
install -p -D -m 644 files/dcdbsync-api.service $(SYSTEMD_DIR)/dcdbsync-api.service
|
||||||
|
|
||||||
|
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 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.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-logrotate.conf $(SYS_CONF_DIR)/logrotate.d/distcloud.conf
|
||||||
|
|
||||||
|
# install ocf scripts
|
||||||
|
install -d -m 755 $(OCF_DIR)
|
||||||
|
install -p -D -m 755 ocf/* $(OCF_DIR)/
|
||||||
|
|
||||||
|
# install dcorch cleaner
|
||||||
|
install -m 755 -D -p files/clean-dcorch $(BIN_DIR)/clean-dcorch
|
||||||
|
|
||||||
|
# install ansible overrides dir
|
||||||
|
install -d -m 600 $(ROOT)/opt/dc/ansible
|
||||||
|
|
||||||
|
# Generate sample config and add the current directory to PYTHONPATH so
|
||||||
|
# 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=./dcorch/config-generator.conf
|
||||||
|
PYTHONPATH=. oslo-config-generator --config-file=./dcdbsync/config-generator.conf
|
||||||
|
|
||||||
|
# install default config files
|
||||||
|
oslo-config-generator \
|
||||||
|
--config-file ./dcmanager/config-generator.conf \
|
||||||
|
--output-file ./dcmanager/dcmanager.conf.sample
|
||||||
|
install -p -D -m 640 ./dcmanager/dcmanager.conf.sample $(SYS_CONF_DIR)/dcmanager/dcmanager.conf
|
||||||
|
|
||||||
|
oslo-config-generator \
|
||||||
|
--config-file ./dcorch/config-generator.conf \
|
||||||
|
--output-file ./dcorch/dcorch.conf.sample
|
||||||
|
install -p -D -m 640 ./dcorch/dcorch.conf.sample $(SYS_CONF_DIR)/dcorch/dcorch.conf
|
||||||
|
|
||||||
|
oslo-config-generator \
|
||||||
|
--config-file ./dcdbsync/config-generator.conf \
|
||||||
|
--output-file ./dcdbsync/dcdbsync.conf.sample
|
||||||
|
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/dccommon/tests
|
||||||
|
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dcmanager/tests
|
||||||
|
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dcorch/tests
|
||||||
|
|
||||||
|
python3 setup.py bdist_wheel \
|
||||||
|
--universal \
|
||||||
|
-d $(ROOT)/wheels
|
||||||
|
|
||||||
|
dh_install
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
echo "do nothing..."
|
||||||
|
|
||||||
|
override_dh_fixperms:
|
||||||
|
dh_fixperms \
|
||||||
|
--exclude etc/dcdbsync/dcdbsync.conf \
|
||||||
|
--exclude etc/dcmanager/dcmanager.conf \
|
||||||
|
--exclude etc/dcorch/dcorch.conf
|
||||||
|
|
||||||
|
execute_after_dh_fixperms:
|
||||||
|
# forcing 600 for /opt/dc/ansible
|
||||||
|
chmod 600 debian/distributedcloud-dcmanager/opt/dc/ansible
|
|
@ -0,0 +1 @@
|
||||||
|
3.0 (quilt)
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
PKG_BUILD_NAME=$1
|
||||||
|
PKG_BUILD_DIR=$(realpath `pwd`/${PKG_BUILD_NAME})
|
||||||
|
|
||||||
|
STX_BASE=$(realpath ${MY_REPO}/stx)
|
||||||
|
PKG_BASE=$(realpath ${STX_BASE}/distributedcloud/distributedcloud)
|
||||||
|
|
||||||
|
mkdir ${PKG_BUILD_NAME}
|
||||||
|
|
||||||
|
cp -r ${PKG_BASE}/* ${PKG_BUILD_DIR}/
|
||||||
|
|
||||||
|
mkdir ${PKG_BUILD_DIR}/files
|
||||||
|
cp ${PKG_BUILD_DIR}/centos/files/* ${PKG_BUILD_DIR}/files/
|
||||||
|
|
||||||
|
rm -rf ${PKG_BUILD_DIR}/centos
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
debname: distributedcloud
|
||||||
|
debver: 1.0-1
|
||||||
|
dl_hook: dl_hook
|
||||||
|
revision:
|
||||||
|
dist: $STX_DIST
|
||||||
|
PKG_GITREVCOUNT: true
|
Loading…
Reference in New Issue