!1 Create spec file and package of openstack-ironic-python-agent
From: @zhaorenhai Reviewed-by: @joec88 Signed-off-by: @joec88
This commit is contained in:
commit
f46d9740e3
BIN
ironic-python-agent-stable-victoria.tar.gz
Normal file
BIN
ironic-python-agent-stable-victoria.tar.gz
Normal file
Binary file not shown.
3
openstack-ironic-python-agent.defaultconf
Normal file
3
openstack-ironic-python-agent.defaultconf
Normal file
@ -0,0 +1,3 @@
|
||||
[DEFAULT]
|
||||
use_stderr = True
|
||||
use_journal = True
|
||||
14
openstack-ironic-python-agent.service
Normal file
14
openstack-ironic-python-agent.service
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=OpenStack Ironic Python Agent
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/ironic-python-agent --config-dir /etc/ironic-python-agent --config-dir /etc/ironic-python-agent.conf.d/
|
||||
Restart=always
|
||||
RestartSec=30s
|
||||
StandardOutput=kmsg+console
|
||||
StandardError=inherit
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
177
openstack-ironic-python-agent.spec
Normal file
177
openstack-ironic-python-agent.spec
Normal file
@ -0,0 +1,177 @@
|
||||
%if 0%{?rhel} || 0%{?fedora}
|
||||
%global rdo 1
|
||||
%endif
|
||||
%if 0%{?rhel} == 7
|
||||
%global skip_python3 1
|
||||
%endif
|
||||
%global with_doc 1
|
||||
Name: openstack-ironic-python-agent
|
||||
Version: 6.4.4
|
||||
Release: 0.1.dev1%{?dist}
|
||||
Summary: Ironic Python Agent Ramdisk
|
||||
License: ASL 2.0
|
||||
URL: https://launchpad.net/ironic-python-agent
|
||||
Source0: ironic-python-agent-stable-victoria.tar.gz
|
||||
Source1: openstack-ironic-python-agent.defaultconf
|
||||
Source20: openstack-ironic-python-agent.service
|
||||
BuildRequires: openstack-macros
|
||||
BuildRequires: python3-pint
|
||||
BuildRequires: python3-werkzeug
|
||||
BuildRequires: python3-eventlet
|
||||
BuildRequires: python3-ironic-lib
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-netifaces
|
||||
BuildRequires: python3-oslo-concurrency
|
||||
BuildRequires: python3-oslo-config
|
||||
BuildRequires: python3-oslo-log
|
||||
BuildRequires: python3-oslo-serialization
|
||||
BuildRequires: python3-oslo-service
|
||||
BuildRequires: python3-oslo-utils
|
||||
BuildRequires: python3-oslotest
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-psutil
|
||||
BuildRequires: python3-pyudev
|
||||
BuildRequires: python3-requests
|
||||
BuildRequires: python3-rtslib
|
||||
BuildRequires: python3-stestr
|
||||
BuildRequires: python3-stevedore
|
||||
Requires: python3-ironic-python-agent = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%{?systemd_requires}
|
||||
%else
|
||||
BuildRequires: systemd
|
||||
Requires(post): systemd
|
||||
Requires(postun): systemd
|
||||
Requires(preun): systemd
|
||||
%endif
|
||||
|
||||
%description
|
||||
The ironic-python-agent works with the agent driver in Ironic to provision the node.
|
||||
Starting with ironic-python-agent running on a ramdisk on the unprovisioned node,
|
||||
Ironic makes API calls to ironic-python-agent to provision the machine.
|
||||
|
||||
%package -n python3-ironic-python-agent
|
||||
Summary: Ironic Python Agent Ramdisk - Python module
|
||||
Group: Development/Languages/Python
|
||||
Requires: python3-pint
|
||||
Requires: python3-werkzeug
|
||||
Requires: python3-eventlet
|
||||
Requires: python3-ironic-lib
|
||||
Requires: python3-netifaces
|
||||
Requires: python3-oslo-concurrency
|
||||
Requires: python3-oslo-config
|
||||
Requires: python3-oslo-log
|
||||
Requires: python3-oslo-serialization
|
||||
Requires: python3-oslo-service
|
||||
Requires: python3-oslo-utils
|
||||
Requires: python3-pbr
|
||||
Requires: python3-psutil
|
||||
Requires: python3-pyudev
|
||||
Requires: python3-requests
|
||||
Requires: python3-rtslib
|
||||
Requires: python3-stevedore
|
||||
|
||||
%description -n python3-ironic-python-agent
|
||||
The ironic-python-agent works with the agent driver in Ironic to provision the node.
|
||||
Starting with ironic-python-agent running on a ramdisk on the unprovisioned node,
|
||||
Ironic makes API calls to ironic-python-agent to provision the machine.
|
||||
|
||||
This package contains the Python module.
|
||||
|
||||
%if 0%{?with_doc}
|
||||
%package doc
|
||||
Summary: Ironic Python Agent Ramdisk - Documentation
|
||||
Group: Documentation/HTML
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: python3-openstackdocstheme
|
||||
BuildRequires: python3-sphinxcontrib-apidoc
|
||||
BuildRequires: python3-sphinxcontrib-httpdomain
|
||||
BuildRequires: python3-sphinxcontrib-pecanwsme
|
||||
|
||||
%description doc
|
||||
The ironic-python-agent works with the agent driver in Ironic to provision the node.
|
||||
Starting with ironic-python-agent running on a ramdisk on the unprovisioned node,
|
||||
Ironic makes API calls to ironic-python-agent to provision the machine.
|
||||
|
||||
This package contains the documentation.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n ironic-python-agent-6.4.4.dev1
|
||||
%py_req_cleanup
|
||||
|
||||
%build
|
||||
%{py3_build}
|
||||
|
||||
# config file generation
|
||||
mkdir -p etc/ironic_python_agent
|
||||
PYTHONPATH=. oslo-config-generator --config-file=tools/config/ipa-config-generator.conf
|
||||
|
||||
# build documentation
|
||||
%if 0%{?with_doc}
|
||||
PBR_VERSION=6.4.4.dev1 sphinx-build -b html doc/source doc/build/html
|
||||
rm -rf doc/build/html/.{doctrees,buildinfo}
|
||||
%endif
|
||||
|
||||
%install
|
||||
%{py3_install}
|
||||
|
||||
# Setup directories
|
||||
install -d -m 750 %{buildroot}%{_localstatedir}/{lib,log,cache}/ironic-python-agent
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/ironic-python-agent
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/ironic-python-agent/ironic-python-agent.conf.d
|
||||
|
||||
# install config files
|
||||
install -p -D -m 644 etc/ironic_python_agent/ironic_python_agent.conf.sample %{buildroot}%{_sysconfdir}/ironic-python-agent/ironic-python-agent.conf
|
||||
install -p -D -m 640 %{SOURCE1} %{buildroot}%{_sysconfdir}/ironic-python-agent/ironic-python-agent.conf.d/010-ironic-python-agent.conf
|
||||
|
||||
# install systemd service files
|
||||
install -p -D -m 644 %{SOURCE20} %{buildroot}%{_unitdir}/openstack-ironic-python-agent.service
|
||||
|
||||
# install symlinks on SUSE
|
||||
%if 0%{?suse_version}
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
%endif
|
||||
|
||||
%post
|
||||
%systemd_post openstack-ironic-python-agent.service
|
||||
|
||||
%preun
|
||||
%systemd_preun openstack-ironic-python-agent.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart openstack-ironic-python-agent.service
|
||||
|
||||
%check
|
||||
stestr --test-path ironic_python_agent/tests/unit run || :
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%dir %attr(0750, root, root) %{_sysconfdir}/ironic-python-agent
|
||||
%dir %attr(0750, root, root) %{_sysconfdir}/ironic-python-agent/ironic-python-agent.conf.d
|
||||
%config(noreplace) %attr(0640, root, root) %{_sysconfdir}/ironic-python-agent/ironic-python-agent.conf
|
||||
%config(noreplace) %attr(0640, root, root) %{_sysconfdir}/ironic-python-agent/ironic-python-agent.conf.d/010-ironic-python-agent.conf
|
||||
%{_bindir}/ironic-python-agent
|
||||
%{_bindir}/ironic-collect-introspection-data
|
||||
%{_unitdir}/openstack-ironic-python-agent.service
|
||||
%if 0%{?suse_version}
|
||||
%{_sbindir}/rc%{name}
|
||||
%endif
|
||||
|
||||
%files -n python3-ironic-python-agent
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/ironic_python_agent
|
||||
%{python3_sitelib}/ironic_python_agent-*.egg-info
|
||||
|
||||
%if 0%{?with_doc}
|
||||
%files doc
|
||||
%license LICENSE
|
||||
%doc doc/build/html
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Feb 08 2021 zhaorenhai <zhaorenhai@hotmail.com>
|
||||
- Package Spec generated from rpm-packaging
|
||||
Loading…
x
Reference in New Issue
Block a user