| |
@@ -1,169 +1,132 @@
|
| |
+ %global srcname nodepool
|
| |
+
|
| |
+ %global nfsmountable 1
|
| |
+
|
| |
Name: nodepool
|
| |
- Version: 3.0.0
|
| |
- Release: 7%{?dist}
|
| |
- Summary: Node pool management for a distributed test infrastructure
|
| |
+ Version: 3.9.0
|
| |
+ Release: 1%{?dist}
|
| |
+ Summary: Nodepool management for a distributed test infrastructure
|
| |
|
| |
License: ASL 2.0
|
| |
URL: https://zuul-ci.org
|
| |
- Source0: http://tarballs.openstack.org/nodepool/nodepool-%{version}.tar.gz
|
| |
+ # Use gitea because tarball published by openstack doesn't have symlinks.
|
| |
+ # It's also smaller as it doesn't contain built html bundles.
|
| |
+ Source0: https://opendev.org/zuul/nodepool/archive/%{version}.tar.gz
|
| |
Source1: nodepool-launcher.service
|
| |
Source2: nodepool-builder.service
|
| |
- Source3: nodepool.yaml
|
| |
- Source4: logging.conf
|
| |
- Source5: launcher-logging.yaml
|
| |
- Source6: builder-logging.yaml
|
| |
- Source7: nodepool.logrotate
|
| |
+ Source10: nodepool.yaml
|
| |
+ Source11: secure.conf
|
| |
+ Source12: launcher-logging.yaml
|
| |
+ Source13: builder-logging.yaml
|
| |
+ Source14: sudoer
|
| |
+
|
| |
+ Patch0: 0001-Remove-uneeded-shebang-and-exec-bit-on-some-files.patch
|
| |
|
| |
BuildArch: noarch
|
| |
|
| |
- Requires: python3
|
| |
+ Requires: ansible
|
| |
Requires: python3-pbr
|
| |
- Requires: python3-PyYAML
|
| |
+ Requires: python3-pyyaml
|
| |
+ Requires: python3-paramiko
|
| |
Requires: python3-daemon
|
| |
Requires: python3-extras
|
| |
Requires: python3-statsd
|
| |
- Requires: python3-sqlalchemy
|
| |
Requires: python3-prettytable
|
| |
Requires: python3-six
|
| |
+ Requires: python3-os-client-config
|
| |
+ Requires: python3-openstacksdk
|
| |
+ Requires: diskimage-builder
|
| |
Requires: python3-voluptuous
|
| |
Requires: python3-kazoo
|
| |
Requires: python3-paste
|
| |
Requires: python3-webob
|
| |
+ Requires: python3-kubernetes
|
| |
+ Requires: python3-openshift
|
| |
+ Requires: python3-boto3
|
| |
|
| |
BuildRequires: python3-devel
|
| |
BuildRequires: python3-pbr
|
| |
BuildRequires: python3-setuptools
|
| |
-
|
| |
- # Doc building requirements
|
| |
- BuildRequires: python3-sphinxcontrib-programoutput
|
| |
- BuildRequires: python3-sphinxcontrib-httpdomain
|
| |
- BuildRequires: python3-kazoo
|
| |
- BuildRequires: python3-daemon
|
| |
- BuildRequires: python3-extras
|
| |
- BuildRequires: python3-PyYAML
|
| |
- BuildRequires: python3-statsd
|
| |
- BuildRequires: python3-paste
|
| |
- BuildRequires: python3-webob
|
| |
- BuildRequires: python3-prettytable
|
| |
- BuildRequires: python3-voluptuous
|
| |
- BuildRequires: help2man
|
| |
-
|
| |
- %{?systemd_requires}
|
| |
BuildRequires: systemd
|
| |
|
| |
+
|
| |
%description
|
| |
Nodepool is a service used by the OpenStack CI team to deploy and manage a pool
|
| |
of devstack images on a cloud server for use in OpenStack project testing.
|
| |
|
| |
|
| |
- %package driver-openstack
|
| |
- Summary: Nodepool OpenStack driver
|
| |
- Requires: nodepool-launcher
|
| |
- Requires: python3-os-client-config
|
| |
- Requires: python3-shade
|
| |
- Requires: python3-paramiko
|
| |
-
|
| |
- %description driver-openstack
|
| |
- Nodepool OpenStack driver
|
| |
-
|
| |
-
|
| |
- %package driver-static
|
| |
- Summary: Nodepool OpenStack driver
|
| |
- Requires: nodepool-launcher
|
| |
-
|
| |
- %description driver-static
|
| |
- Nodepool Static driver
|
| |
-
|
| |
-
|
| |
%package launcher
|
| |
Summary: Nodepool launcher service
|
| |
Requires: nodepool
|
| |
|
| |
%description launcher
|
| |
- Nodepool launcher service
|
| |
+ Nodepool launcher service.
|
| |
|
| |
|
| |
%package builder
|
| |
Summary: Nodepool builder service
|
| |
Requires: nodepool
|
| |
- Requires: dnf-utils
|
| |
+ Requires: yum-utils
|
| |
Requires: sudo
|
| |
Requires: qemu-img
|
| |
|
| |
%description builder
|
| |
- Nodepool builder service
|
| |
+ Nodepool builder service.
|
| |
|
| |
|
| |
%package doc
|
| |
- Summary: The Nodepool documentation
|
| |
-
|
| |
+ Summary: Nodepool documentation
|
| |
+ BuildRequires: python3-zuul-sphinx
|
| |
+ BuildRequires: python3-sphinx
|
| |
+ BuildRequires: python3-voluptuous
|
| |
+ BuildRequires: python3-kazoo
|
| |
+ BuildRequires: python3-zuul-sphinx
|
| |
+ BuildRequires: python3-snowballstemmer
|
| |
+ BuildRequires: python3-sphinxcontrib-programoutput
|
| |
+ BuildRequires: python3-sphinxcontrib-httpdomain
|
| |
+ BuildRequires: python3-reno
|
| |
+ #
|
| |
%description doc
|
| |
- The Nodepool documentation
|
| |
+ Nodepool documentation.
|
| |
|
| |
|
| |
%prep
|
| |
- %autosetup -n nodepool-%{version}
|
| |
- rm -Rf *requirements.txt *.egg-info
|
| |
-
|
| |
- # Remove test files
|
| |
- rm -Rf nodepool/tests nodepool/driver/fake
|
| |
-
|
| |
- # Remove interpreter
|
| |
- find nodepool/ -type f -exec sed -i -e '/#!\/usr\/bin\/.*python.*/{1D}' {} \;
|
| |
+ %autosetup -n nodepool -p1
|
| |
+ rm requirements.txt test-requirements.txt
|
| |
+ rm -Rf nodepool/tests
|
| |
|
| |
|
| |
%build
|
| |
- PBR_VERSION=%{version} %py3_build
|
| |
- PBR_VERSION=%{version} SPHINX_DEBUG=1 sphinx-build -b html doc/source build/html
|
| |
-
|
| |
- rm -Rf build/html/.buildinfo
|
| |
-
|
| |
- # Generate man pages
|
| |
- mkdir man
|
| |
- pushd man
|
| |
- echo -e "#!/usr/bin/python3\nimport sys\nfrom nodepool.cmd.nodepoolcmd import main\nmain()" > nodepool
|
| |
- echo -e "#!/usr/bin/python3\nimport sys\nfrom nodepool.cmd.launcher import main\nmain()" > nodepool-launcher
|
| |
- echo -e "#!/usr/bin/python3\nimport sys\nfrom nodepool.cmd.builder import main\nmain()" > nodepool-builder
|
| |
- chmod +x nodepool*
|
| |
- # Test the command first to output missing BuildRequirements
|
| |
- PYTHONPATH=../ ./nodepool-builder --help
|
| |
- PYTHONPATH=../ ./nodepool-launcher --help
|
| |
- PYTHONPATH=../ ./nodepool --help
|
| |
- PYTHONPATH=../ help2man --no-info -o nodepool-builder.man ./nodepool-builder
|
| |
- PYTHONPATH=../ help2man --no-info -o nodepool-launcher.man ./nodepool-launcher
|
| |
- PYTHONPATH=../ help2man --no-info -o nodepool.man ./nodepool
|
| |
+ PBR_VERSION=%{version} %{__python3} setup.py build
|
| |
+ # Make the Nodepool directory a repo to satisfy python-reno
|
| |
+ git init /builddir/build/BUILD/nodepool
|
| |
+ pushd /builddir/build/BUILD/nodepool
|
| |
+ git config user.email "you@example.com"
|
| |
+ git config user.name "Your Name"
|
| |
+ git add -A .
|
| |
+ git commit -m"Initial commit"
|
| |
popd
|
| |
+ PBR_VERSION=%{version} SPHINX_DEBUG=1 sphinx-build-3 -b html doc/source build/html
|
| |
+ rm -Rf /builddir/build/BUILD/nodepool/.git
|
| |
|
| |
|
| |
%install
|
| |
- PBR_VERSION=%{version} %py3_install
|
| |
+ PBR_VERSION=%{version} %{__python3} setup.py install --skip-build --root %{buildroot}
|
| |
|
| |
- # Remove executable bit from libraries
|
| |
- find %{buildroot}%{python3_sitelib}/nodepool -type f -exec chmod -x {} \;
|
| |
-
|
| |
- # Man pages
|
| |
- install -p -D -m 0644 man/nodepool-builder.man %{buildroot}%{_mandir}/man1/nodepool-builder.1
|
| |
- install -p -D -m 0644 man/nodepool-launcher.man %{buildroot}%{_mandir}/man1/nodepool-launcher.1
|
| |
- install -p -D -m 0644 man/nodepool.man %{buildroot}%{_mandir}/man1/nodepool.1
|
| |
-
|
| |
- # Service unit
|
| |
+ # Copy non python modules over
|
| |
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/nodepool-launcher.service
|
| |
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/nodepool-builder.service
|
| |
-
|
| |
- # Basic configuration
|
| |
- install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/nodepool/nodepool.yaml
|
| |
+ install -p -D -m 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/nodepool/nodepool.yaml
|
| |
+ install -p -D -m 0640 %{SOURCE11} %{buildroot}%{_sysconfdir}/nodepool/secure.conf
|
| |
+ install -p -D -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/nodepool/launcher-logging.yaml
|
| |
+ install -p -D -m 0644 %{SOURCE13} %{buildroot}%{_sysconfdir}/nodepool/builder-logging.yaml
|
| |
+ install -p -D -m 0644 %{SOURCE14} %{buildroot}%{_sysconfdir}/sudoers.d/nodepool
|
| |
+ install -p -d -m 0755 %{buildroot}%{_sysconfdir}/nodepool/scripts
|
| |
install -p -d -m 0755 %{buildroot}%{_sysconfdir}/nodepool/elements
|
| |
- touch %{buildroot}%{_sysconfdir}/nodepool/secure.conf
|
| |
- install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/nodepool/logging.conf
|
| |
- install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/nodepool/launcher-logging.yaml
|
| |
- install -p -D -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/nodepool/builder-logging.yaml
|
| |
- install -p -D -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/nodepool
|
| |
-
|
| |
- # Service base directories
|
| |
- install -p -d -m 0700 %{buildroot}%{_sharedstatedir}/nodepool
|
| |
- install -p -d -m 0700 %{buildroot}%{_sharedstatedir}/nodepool/dib
|
| |
- install -p -d -m 0700 %{buildroot}%{_sharedstatedir}/nodepool/.config/openstack
|
| |
- install -p -d -m 0700 %{buildroot}%{_localstatedir}/log/nodepool
|
| |
+ install -p -d -m 0750 %{buildroot}%{_sharedstatedir}/nodepool
|
| |
+ install -p -d -m 0750 %{buildroot}%{_sharedstatedir}/nodepool/dib
|
| |
+ install -p -d -m 0750 %{buildroot}%{_sharedstatedir}/nodepool/.config/openstack
|
| |
+ install -p -d -m 0750 %{buildroot}%{_localstatedir}/log/nodepool
|
| |
install -p -d -m 0755 %{buildroot}%{_localstatedir}/cache/nodepool/dib_cache
|
| |
install -p -d -m 0755 %{buildroot}%{_localstatedir}/cache/nodepool/dib_tmp
|
| |
|
| |
@@ -193,50 +156,36 @@
|
| |
|
| |
|
| |
%files
|
| |
- %license LICENSE
|
| |
- %{_mandir}/man1/nodepool.1*
|
| |
%{_bindir}/nodepool
|
| |
- %exclude %{python3_sitelib}/nodepool/driver/openstack
|
| |
+ %config(noreplace) %attr(0644, root, root) %{_sysconfdir}/nodepool/nodepool.yaml
|
| |
+ %config(noreplace) %attr(0644, root, nodepool) %{_sysconfdir}/nodepool/secure.conf
|
| |
+ %dir %{_sysconfdir}/nodepool/scripts
|
| |
+ %dir %{_sysconfdir}/nodepool/elements
|
| |
+ %dir %attr(0755, nodepool, nodepool) %{_localstatedir}/log/nodepool
|
| |
+ %attr(0755, nodepool, nodepool) %{_sharedstatedir}/nodepool
|
| |
%{python3_sitelib}/nodepool
|
| |
%{python3_sitelib}/nodepool-*.egg-info
|
| |
- %dir %{_sysconfdir}/nodepool/elements
|
| |
- %dir %{_sysconfdir}/nodepool/
|
| |
- %config(noreplace) %{_sysconfdir}/nodepool/nodepool.yaml
|
| |
- %config(noreplace) %{_sysconfdir}/nodepool/logging.conf
|
| |
- %config(noreplace) %{_sysconfdir}/logrotate.d/nodepool
|
| |
- %config(noreplace) %attr(0640, root, nodepool) %{_sysconfdir}/nodepool/secure.conf
|
| |
- %attr(0750, nodepool, nodepool) %{_sharedstatedir}/nodepool
|
| |
- %dir %attr(0750, nodepool, nodepool) %{_localstatedir}/log/nodepool
|
| |
-
|
| |
- %files driver-openstack
|
| |
- %license LICENSE
|
| |
- %{python3_sitelib}/nodepool/driver/openstack
|
| |
-
|
| |
- %files driver-static
|
| |
- %license LICENSE
|
| |
- %{python3_sitelib}/nodepool/driver/static
|
| |
|
| |
%files launcher
|
| |
- %license LICENSE
|
| |
- %{_mandir}/man1/nodepool-launcher.1*
|
| |
%{_bindir}/nodepool-launcher
|
| |
- %config(noreplace) %attr(0644, root, root) %{_sysconfdir}/nodepool/launcher-logging.yaml
|
| |
%{_unitdir}/nodepool-launcher.service
|
| |
+ %config(noreplace) %attr(0644, root, root) %{_sysconfdir}/nodepool/launcher-logging.yaml
|
| |
|
| |
%files builder
|
| |
- %license LICENSE
|
| |
- %{_mandir}/man1/nodepool-builder.1*
|
| |
%{_bindir}/nodepool-builder
|
| |
- %config(noreplace) %{_sysconfdir}/nodepool/builder-logging.yaml
|
| |
%{_unitdir}/nodepool-builder.service
|
| |
+ %{_sysconfdir}/sudoers.d/nodepool
|
| |
+ %config(noreplace) %attr(0644, root, root) %{_sysconfdir}/nodepool/builder-logging.yaml
|
| |
%attr(0755, nodepool, nodepool) %{_localstatedir}/cache/nodepool
|
| |
|
| |
%files doc
|
| |
- %license LICENSE
|
| |
- %doc build/html
|
| |
+ %doc LICENSE build/html
|
| |
|
| |
|
| |
%changelog
|
| |
+ * Fri Oct 11 2019 Fabien Boucher <fboucher@redhat.com> - 3.9.0-1
|
| |
+ - Import 3.9.0 packaging from Software Factory
|
| |
+
|
| |
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.0-7
|
| |
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
| |
|
| |
Here are the changes I'm proposing to bump Nodepool on master. This PR also adds functional tests that should valid the packaging by testing if the service start and run as expected. I'll appreciate your review. Thanks.