
This commit makes the necessary changes to convert the pci-irq-affinity-agent into a container, to be deployed along with OpenStack application. What was modified: - Agent logging facility changed from syslog to stdout - Agent session creation includes CA certificate to work with TLS - Agent can now use environment variables with properties from the host running the containerized agent - Files changed to build a wheel for the agent - Files added to build the container image Test Plan: PASS: Verify that logging facility was changed to stdout PASS: Verify that agent can communicate with Nova using TLS PASS: Verify that agent image was built successfully PASS: Verify that agent can be run properly in a container PASS: Verify that agent can load and use environment variables with properties from the host like hostname and filepaths Regression: PASS: Verify that agent logs no errors while running in a container PASS: Verify that agent connects to rabbit and nova properly while running in a container Story: 2009299 Task: 43650 Signed-off-by: Heitor Matsui <HeitorVieira.Matsui@windriver.com> Change-Id: I7680e39de734e16affebff893df21c6b5089dc76
85 lines
2.4 KiB
RPMSpec
85 lines
2.4 KiB
RPMSpec
Summary: StarlingX PCI Interrupt Affinity Agent Package
|
|
Name: pci-irq-affinity-agent
|
|
Version: 1.0
|
|
Release: %{tis_patch_ver}%{?_tis_dist}
|
|
License: Apache-2.0
|
|
Group: base
|
|
Packager: StarlingX
|
|
URL: unknown
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
Requires: python-novaclient
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: systemd-devel
|
|
BuildRequires: python2-wheel
|
|
|
|
%description
|
|
StarlingX PCI Interrupt Affinity Agent Package
|
|
|
|
%define local_etc_initd /etc/init.d/
|
|
%define local_etc_pmond /etc/pmon.d/
|
|
%define pythonroot /usr/lib64/python2.7/site-packages
|
|
%define debug_package %{nil}
|
|
|
|
%prep
|
|
%setup
|
|
|
|
# Remove bundled egg-info
|
|
rm -rf *.egg-info
|
|
|
|
%build
|
|
%{__python} setup.py build
|
|
%{__python} setup.py bdist_wheel
|
|
|
|
%install
|
|
%{__python} setup.py install --root=%{buildroot} \
|
|
--install-lib=%{pythonroot} \
|
|
--prefix=/usr \
|
|
--install-data=/usr/share \
|
|
--single-version-externally-managed
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
|
%{__install} -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
|
|
|
%{__install} -d -m 755 %{buildroot}%{local_etc_initd}
|
|
%{__install} -p -D -m 755 pci-irq-affinity-agent %{buildroot}%{local_etc_initd}/pci-irq-affinity-agent
|
|
|
|
%{__install} -d -m 755 %{buildroot}%{local_etc_pmond}
|
|
%{__install} -p -D -m 644 pci-irq-affinity-agent.conf %{buildroot}%{local_etc_pmond}/pci-irq-affinity-agent.conf
|
|
%{__install} -p -D -m 644 pci-irq-affinity-agent.service %{buildroot}%{_unitdir}/pci-irq-affinity-agent.service
|
|
|
|
%{__install} -d %{buildroot}%{_bindir}
|
|
%{__install} -p -D -m 755 nova-sriov %{buildroot}%{_bindir}/nova-sriov
|
|
|
|
%{__install} -d %{buildroot}%{_sysconfdir}/pci_irq_affinity
|
|
%{__install} -p -D -m 600 config.ini %{buildroot}%{_sysconfdir}/pci_irq_affinity/config.ini
|
|
|
|
%post
|
|
/usr/bin/systemctl enable pci-irq-affinity-agent.service >/dev/null 2>&1
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE
|
|
%{local_etc_initd}/pci-irq-affinity-agent
|
|
%{local_etc_pmond}/pci-irq-affinity-agent.conf
|
|
%{_unitdir}/pci-irq-affinity-agent.service
|
|
%{pythonroot}/pci_irq_affinity/*
|
|
%{pythonroot}/pci_irq_affinity_agent-%{version}*.egg-info
|
|
|
|
%{_bindir}/pci-irq-affinity-agent
|
|
%{_bindir}/nova-sriov
|
|
%config(noreplace) %{_sysconfdir}/pci_irq_affinity/config.ini
|
|
|
|
%package wheels
|
|
Summary: %{name} wheels
|
|
|
|
%description wheels
|
|
Contains python wheels for %{name}
|
|
|
|
%files wheels
|
|
/wheels/*
|