Add build package for dcagent
The purpose of this change is to add the build information for the dcagent package introduced by [1]. It adds the service information and Openstack API code. [1] https://review.opendev.org/c/starlingx/distcloud/+/923350 Test Plan: - PASS: Build dcagent package - PASS: Install and bootstrap system with custom ISO containing the newly created dcagent package - PASS: Verify that the dcagent-api.service is loaded Story: 2011106 Task: 50635 Change-Id: Id21e0441c73c13bfd732c9b995bb994eed72246e Signed-off-by: Lucas de Ataides <lucas.deataidesbarreto@windriver.com>
This commit is contained in:
parent
949ab0e0df
commit
185056ac72
@ -5,5 +5,6 @@ distributedcloud-dccommon
|
||||
distributedcloud-dcdbsync
|
||||
distributedcloud-dcmanager
|
||||
distributedcloud-dcorch
|
||||
distributedcloud-dcagent
|
||||
|
||||
python3-redfish
|
||||
|
12
distributedcloud/dcagent/config-generator.conf
Normal file
12
distributedcloud/dcagent/config-generator.conf
Normal file
@ -0,0 +1,12 @@
|
||||
[DEFAULT]
|
||||
output_file = etc/dcagent/dcagent.conf.sample
|
||||
wrap_width = 79
|
||||
namespace = dcagent.common.config
|
||||
namespace = dcagent.api.api_config
|
||||
namespace = keystonemiddleware.auth_token
|
||||
namespace = oslo.middleware
|
||||
namespace = oslo.log
|
||||
namespace = oslo.policy
|
||||
namespace = oslo.service.service
|
||||
namespace = oslo.service.periodic_task
|
||||
namespace = oslo.service.sslutils
|
@ -75,6 +75,14 @@ Depends:
|
||||
Description: Distributed Cloud DCorch DBsync Agent
|
||||
Distributed Cloud DCorch DBsync Agent
|
||||
|
||||
Package: distributedcloud-dcagent
|
||||
Architecture: any
|
||||
Depends:
|
||||
${misc:Depends},
|
||||
${python3:Depends}
|
||||
Description: Distributed Cloud DCAgent
|
||||
Distributed Cloud DCAgent
|
||||
|
||||
Package: distributedcloud-wheels
|
||||
Architecture: any
|
||||
Depends:
|
||||
|
@ -0,0 +1 @@
|
||||
/var/log/dcagent
|
@ -0,0 +1,6 @@
|
||||
etc/dcagent/dcagent.conf
|
||||
usr/bin/dcagent-api
|
||||
usr/lib/ocf/resource.d/openstack/dcagent-*
|
||||
usr/lib/python3/dist-packages/dcagent/*
|
||||
usr/lib/systemd/system/dcagent-api.service
|
||||
usr/lib/tmpfiles.d/dcagent.conf
|
@ -38,9 +38,11 @@ override_dh_install:
|
||||
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/dcagent-api.service $(SYSTEMD_DIR)/dcagent-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 -p -D -m 644 files/dcagent.conf $(TMP_DIR)/dcagent.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
|
||||
@ -64,6 +66,7 @@ override_dh_install:
|
||||
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
|
||||
PYTHONPATH=. oslo-config-generator --config-file=./dcagent/config-generator.conf
|
||||
|
||||
# install default config files
|
||||
oslo-config-generator \
|
||||
@ -81,6 +84,11 @@ override_dh_install:
|
||||
--output-file ./dcdbsync/dcdbsync.conf.sample
|
||||
install -p -D -m 640 ./dcdbsync/dcdbsync.conf.sample $(SYS_CONF_DIR)/dcdbsync/dcdbsync.conf
|
||||
|
||||
oslo-config-generator \
|
||||
--config-file ./dcagent/config-generator.conf \
|
||||
--output-file ./dcagent/dcagent.conf.sample
|
||||
install -p -D -m 640 ./dcagent/dcagent.conf.sample $(SYS_CONF_DIR)/dcagent/dcagent.conf
|
||||
|
||||
# install rvmc_install.py script
|
||||
install -d $(ROOT)/usr/local/bin/
|
||||
install -p -D -m 700 scripts/rvmc_install.py $(ROOT)/usr/local/bin
|
||||
@ -89,6 +97,7 @@ override_dh_install:
|
||||
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
|
||||
rm -rf $(ROOT)/usr/lib/python3/dist-packages/dcagent/tests
|
||||
|
||||
dh_install
|
||||
|
||||
@ -99,7 +108,8 @@ override_dh_fixperms:
|
||||
dh_fixperms \
|
||||
--exclude etc/dcdbsync/dcdbsync.conf \
|
||||
--exclude etc/dcmanager/dcmanager.conf \
|
||||
--exclude etc/dcorch/dcorch.conf
|
||||
--exclude etc/dcorch/dcorch.conf \
|
||||
--exclude etc/dcagent/dcagent.conf
|
||||
|
||||
execute_after_dh_fixperms:
|
||||
# forcing 600 for /var/opt/dc/ansible
|
||||
|
4
distributedcloud/etc/dcagent/README-dcagent.conf.txt
Normal file
4
distributedcloud/etc/dcagent/README-dcagent.conf.txt
Normal file
@ -0,0 +1,4 @@
|
||||
To generate the sample dcagent.conf file, run the following
|
||||
command from the top level of the dcagent directory:
|
||||
|
||||
tox -egenconfig
|
5
distributedcloud/etc/dcagent/policy.json
Executable file
5
distributedcloud/etc/dcagent/policy.json
Executable file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"context_is_admin": "role:admin",
|
||||
"admin_or_owner": "is_admin:True or project_id:%(project_id)s",
|
||||
"default": "rule:admin_or_owner"
|
||||
}
|
12
distributedcloud/files/dcagent-api.service
Normal file
12
distributedcloud/files/dcagent-api.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=DC DCAgent API Service
|
||||
After=syslog.target network.target mysqld.service openstack-keystone.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
ExecStart=/usr/bin/dcagent --config-file /etc/dcagent/dcagent.conf
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -25,6 +25,7 @@ packages =
|
||||
dcmanager
|
||||
dcorch
|
||||
dcdbsync
|
||||
dcagent
|
||||
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
@ -41,8 +42,11 @@ console_scripts =
|
||||
dcorch-manage = dcorch.cmd.manage:main
|
||||
dcorch-api-proxy = dcorch.cmd.api_proxy:main
|
||||
dcdbsync-api = dcdbsync.cmd.api:main
|
||||
dcagent-api = dcagent.cmd.audit:main
|
||||
|
||||
oslo.config.opts =
|
||||
dcagent.common.config = dcagent.common.config:list_opts
|
||||
dcagent.common.api.api_config = dcagent.api.api_config:list_opts
|
||||
dcorch.common.config = dcorch.common.config:list_opts
|
||||
dcorch.common.api.api_config = dcorch.api.api_config:list_opts
|
||||
dcorch.engine.quota_manager = dcorch.engine.quota_manager:list_opts
|
||||
|
Loading…
Reference in New Issue
Block a user