update to 5.0.1
This commit is contained in:
parent
3e5cf4fd97
commit
4ce6a478aa
Binary file not shown.
BIN
openstack-placement-5.0.1.tar.gz
Normal file
BIN
openstack-placement-5.0.1.tar.gz
Normal file
Binary file not shown.
@ -1,26 +0,0 @@
|
||||
# OpenStack placement-api Apache2 configuration
|
||||
Listen 8778
|
||||
|
||||
<VirtualHost *:8778>
|
||||
WSGIDaemonProcess openstack-placement-api processes=2 threads=1 user=placement group=placement
|
||||
WSGIProcessGroup openstack-placement-api
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIScriptAlias / /usr/bin/placement-api
|
||||
WSGIPassAuthorization On
|
||||
LimitRequestBody 114688
|
||||
<IfVersion >= 2.4>
|
||||
ErrorLogFormat "%{cu}t %M"
|
||||
</IfVersion>
|
||||
ErrorLog /var/log/placement/placement-api.log
|
||||
CustomLog /var/log/placement/placement-api.log combined
|
||||
|
||||
<Directory /usr/bin>
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.4>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
@ -1,13 +0,0 @@
|
||||
/var/log/placement/*.log {
|
||||
compress
|
||||
copytruncate
|
||||
dateext
|
||||
minsize 100k
|
||||
missingok
|
||||
notifempty
|
||||
rotate 10
|
||||
sharedscripts
|
||||
size 1M
|
||||
su placement placement
|
||||
weekly
|
||||
}
|
||||
@ -1,180 +1,257 @@
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
%global with_doc 1
|
||||
|
||||
%global common_desc \
|
||||
OpenStack Placement provides an HTTP service for managing, selecting, and \
|
||||
claiming providers of classes of inventory representing available resources \
|
||||
in a cloud.
|
||||
|
||||
Name: openstack-placement
|
||||
Version: 4.0.0
|
||||
Release: 2
|
||||
Version: 5.0.1
|
||||
Release: 1
|
||||
Summary: OpenStack Placement
|
||||
|
||||
License: ASL 2.0
|
||||
Group: System/Management
|
||||
URL: https://docs.openstack.org/placement/
|
||||
Source0: openstack-placement-%{upstream_version}.tar.gz
|
||||
Source1: openstack-placement.logrotate
|
||||
Source2: openstack-placement-api.conf
|
||||
URL: http://git.openstack.org/cgit/openstack/placement/
|
||||
Source0: https://tarballs.openstack.org/placement/%{name}-%{upstream_version}.tar.gz
|
||||
Source1: placement-dist.conf
|
||||
Source2: placement.logrotate
|
||||
Source3: placement-api.conf
|
||||
Source4: policy.json
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: openstack-macros
|
||||
BuildRequires: python3-routes
|
||||
BuildRequires: python3-webob
|
||||
BuildRequires: python3-jsonschema
|
||||
BuildRequires: python3-keystonemiddleware
|
||||
BuildRequires: python3-microversion-parse
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-os-resource-classes
|
||||
BuildRequires: intltool
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: git-core
|
||||
BuildRequires: python3-os-traits
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: python3-oslo-policy
|
||||
BuildRequires: python3-ddt
|
||||
BuildRequires: python3-oslo-rootwrap
|
||||
BuildRequires: python3-oslo-log
|
||||
BuildRequires: python3-oslo-concurrency
|
||||
BuildRequires: python3-oslo-config
|
||||
BuildRequires: python3-oslo-context
|
||||
BuildRequires: python3-oslo-db
|
||||
BuildRequires: python3-oslo-log
|
||||
BuildRequires: python3-oslo-middleware
|
||||
BuildRequires: python3-oslo-serialization
|
||||
BuildRequires: python3-oslo-policy
|
||||
BuildRequires: python3-oslo-upgradecheck
|
||||
BuildRequires: python3-oslo-utils
|
||||
BuildRequires: python3-oslotest
|
||||
BuildRequires: python3-paramiko
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-osprofiler
|
||||
BuildRequires: python3-subunit
|
||||
BuildRequires: python3-tooz
|
||||
BuildRequires: python3-oslo-vmware
|
||||
BuildRequires: python3-cursive
|
||||
BuildRequires: python3-os-service-types
|
||||
BuildRequires: python3-os-resource-classes
|
||||
BuildRequires: python3-microversion-parse
|
||||
BuildRequires: python3-jsonschema
|
||||
BuildRequires: python3-sqlalchemy
|
||||
BuildRequires: python3-routes
|
||||
BuildRequires: python3-webob
|
||||
BuildRequires: python3-keystonemiddleware
|
||||
BuildRequires: python3-requests
|
||||
BuildRequires: python3-stestr
|
||||
|
||||
Requires: logrotate
|
||||
Requires: python3-openstack-placement = %{version}-%{release}
|
||||
|
||||
BuildRequires: systemd
|
||||
Requires(post): systemd
|
||||
Requires(postun): systemd
|
||||
Requires(pre): shadow-utils
|
||||
Requires(preun): systemd
|
||||
|
||||
|
||||
Requires: openstack-placement-api
|
||||
%description
|
||||
OpenStack Placement provides an HTTP service for managing, selecting,
|
||||
and claiming providers of classes of inventory representing available
|
||||
resources in a cloud.
|
||||
%{common_desc}
|
||||
|
||||
%package -n python3-openstack-placement
|
||||
Summary: OpenStack Placement - Python module
|
||||
Group: Development/Languages/Python
|
||||
Requires: python3-routes
|
||||
Requires: python3-sqlalchemy
|
||||
Requires: python3-webob
|
||||
Requires: python3-jsonschema
|
||||
Requires: python3-keystonemiddleware
|
||||
Requires: python3-microversion-parse
|
||||
Requires: python3-os-resource-classes
|
||||
Requires: python3-os-traits
|
||||
Requires: python3-oslo-concurrency
|
||||
Requires: python3-oslo-config
|
||||
Requires: python3-oslo-context
|
||||
Requires: python3-oslo-db
|
||||
Requires: python3-oslo-log
|
||||
Requires: python3-oslo-middleware
|
||||
Requires: python3-oslo-policy
|
||||
Requires: python3-oslo-serialization
|
||||
Requires: python3-oslo-upgradecheck
|
||||
Requires: python3-oslo-utils
|
||||
Requires: python3-pbr
|
||||
Requires: python3-requests
|
||||
Requires: python3-six
|
||||
Requires: python3-sqlalchemy
|
||||
Requires: python3-wsgi_intercept
|
||||
%package common
|
||||
Summary: Components common to all OpenStack Placement services
|
||||
Requires: python3-placement = %{version}-%{release}
|
||||
|
||||
%description -n python3-openstack-placement
|
||||
This package contains the core Python module of OpenStack Placement.
|
||||
%description common
|
||||
%{common_desc}
|
||||
|
||||
This package contains scripts, config and dependencies shared
|
||||
between all the OpenStack Placement services.
|
||||
|
||||
%package api
|
||||
Summary: OpenStack Compute (Placement) - API
|
||||
# prereq for creating the right openstack-placement user/group
|
||||
Group: System/Management
|
||||
Requires: %{name} = %{version}
|
||||
Requires(pre): %{name} = %{version}
|
||||
BuildRequires: python3-mod_wsgi
|
||||
Summary: OpenStack Placement API service
|
||||
|
||||
Requires: openstack-placement-common = %{version}-%{release}
|
||||
Requires: httpd
|
||||
Requires: python3-mod_wsgi
|
||||
|
||||
%description api
|
||||
This package contains the OpenStack Placement API.
|
||||
%{common_desc}
|
||||
|
||||
This package contains the Placement service, which will initially
|
||||
allow for the management of resource providers.
|
||||
|
||||
%package -n python3-placement
|
||||
Summary: Placement Python libraries
|
||||
%{?python_provide:%python_provide python3-placement}
|
||||
|
||||
Requires: python3-sqlalchemy >= 1.2.19
|
||||
Requires: python3-routes >= 2.3.1
|
||||
Requires: python3-webob >= 1.8.2
|
||||
Requires: python3-keystonemiddleware >= 4.18.0
|
||||
Requires: python3-jsonschema >= 3.2.0
|
||||
Requires: python3-microversion-parse >= 0.2.1
|
||||
Requires: python3-os-traits >= 2.5.0
|
||||
Requires: python3-os-resource-classes >= 0.5.0
|
||||
Requires: python3-oslo-concurrency >= 3.26.0
|
||||
Requires: python3-oslo-config >= 6.7.0
|
||||
Requires: python3-oslo-context >= 2.22.0
|
||||
Requires: python3-oslo-db >= 4.40.0
|
||||
Requires: python3-oslo-log >= 4.3.0
|
||||
Requires: python3-oslo-middleware >= 3.31.0
|
||||
Requires: python3-oslo-serialization >= 2.25.0
|
||||
Requires: python3-oslo-upgradecheck >= 1.3.0
|
||||
Requires: python3-oslo-utils >= 4.5.0
|
||||
Requires: python3-oslo-policy >= 3.6.0
|
||||
Requires: python3-pbr >= 3.1.1
|
||||
Requires: python3-requests >= 2.25.0
|
||||
|
||||
%description -n python3-placement
|
||||
%{common_desc}
|
||||
|
||||
This package contains the Placement Python library.
|
||||
|
||||
%package -n python3-placement-tests
|
||||
Summary: Placement tests
|
||||
%{?python_provide:%python_provide python3-placement-tests}
|
||||
Requires: openstack-placement-common = %{version}-%{release}
|
||||
Requires: python3-hacking >= 0.12.0
|
||||
Requires: python3-coverage >= 4.0
|
||||
Requires: python3-fixtures >= 3.0.0
|
||||
Requires: python3-mock >= 2.0.0
|
||||
Requires: python3-PyMySQL >= 0.7.6
|
||||
Requires: python3-oslotest >= 3.4.0
|
||||
Requires: python3-stestr >= 1.0.0
|
||||
Requires: python3-testtools >= 1.8.0
|
||||
Requires: python3-gabbi >= 1.35.0
|
||||
Requires: python3-wsgi_intercept >= 1.2.2
|
||||
|
||||
%description -n python3-placement-tests
|
||||
%{common_desc}
|
||||
|
||||
This package contains the Placement Python library tests.
|
||||
|
||||
%if 0%{?with_doc}
|
||||
%package doc
|
||||
Summary: Documentation for OpenStack Placement
|
||||
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: python3-openstackdocstheme
|
||||
BuildRequires: python3-oslo-config
|
||||
BuildRequires: python3-oslo-log
|
||||
BuildRequires: python3-oslo-messaging
|
||||
BuildRequires: python3-oslo-utils
|
||||
BuildRequires: python3-routes
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: python3-sphinxcontrib-actdiag
|
||||
BuildRequires: python3-sphinxcontrib-seqdiag
|
||||
BuildRequires: python3-sphinx-feature-classification
|
||||
BuildRequires: python3-sqlalchemy
|
||||
BuildRequires: python3-webob
|
||||
|
||||
%description doc
|
||||
%{common_desc}
|
||||
|
||||
This package contains documentation files for Placement.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n openstack-placement-%{upstream_version}
|
||||
# "-S git" is necessary to run build
|
||||
%autosetup -n openstack-placement-%{upstream_version} -S git
|
||||
|
||||
find . \( -name .gitignore -o -name .placeholder \) -delete
|
||||
|
||||
find placement -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
|
||||
|
||||
%py_req_cleanup
|
||||
|
||||
%build
|
||||
python3 setup.py build
|
||||
|
||||
# sample config
|
||||
PYTHONPATH=. oslo-config-generator --config-file=etc/placement/config-generator.conf
|
||||
# sample policy
|
||||
PYTHONPATH=. oslopolicy-sample-generator --config-file=etc/placement/policy-generator.conf
|
||||
|
||||
%{py3_build}
|
||||
|
||||
%install
|
||||
python3 setup.py install --root %{buildroot} --prefix %{_prefix}
|
||||
%{py3_install}
|
||||
|
||||
export PYTHONPATH=.
|
||||
%if 0%{?with_doc}
|
||||
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
||||
rm -rf doc/build/html/.{doctrees,buildinfo}
|
||||
%endif
|
||||
|
||||
### directories
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/placement
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/placement/images
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/placement/instances
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/placement/keys
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/placement/networks
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/placement/tmp
|
||||
install -d -m 750 %{buildroot}%{_localstatedir}/log/placement
|
||||
install -d -m 700 %{buildroot}%{_rundir}/placement
|
||||
install -d -m 700 %{buildroot}%{_localstatedir}/cache/placement
|
||||
install -d %{buildroot}%apache_site_dir
|
||||
|
||||
# apache vhost sample configs
|
||||
install -p -D -m 644 %{SOURCE2} %{buildroot}%apache_site_dir
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/placement
|
||||
install -p -D -m 640 etc/placement/placement.conf.sample %{buildroot}%{_sysconfdir}/placement/placement.conf
|
||||
install -p -D -m 640 %{SOURCE1} %{buildroot}%{_datarootdir}/placement/placement-dist.conf
|
||||
install -p -D -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/00-placement-api.conf
|
||||
install -p -D -m 640 %{SOURCE4} %{buildroot}%{_sysconfdir}/placement/policy.json
|
||||
|
||||
### configuration files
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/placement/
|
||||
#mv %{buildroot}/usr/etc/placement/* %{buildroot}%{_sysconfdir}/placement/
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/placement/placement.conf.d
|
||||
install -p -D -m 640 etc/placement/placement.conf.sample %{buildroot}%{_sysconfdir}/placement/placement.conf
|
||||
install -p -D -m 640 etc/placement/policy.yaml.sample %{buildroot}%{_sysconfdir}/placement/policy.yaml
|
||||
# bash-completion/logrotate/etc.
|
||||
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-placement
|
||||
|
||||
%pre
|
||||
%openstack_pre_user_group_create placement placement
|
||||
install -d -m 755 %{buildroot}%{_datarootdir}/placement
|
||||
install -p -D -m 755 tools/mysql-migrate-db.sh %{buildroot}%{_datarootdir}/placement/mysql-migrate-db.sh
|
||||
install -p -D -m 755 tools/postgresql-migrate-db.sh %{buildroot}%{_datarootdir}/placement/postgresql-migrate-db.sh
|
||||
|
||||
%post api
|
||||
%systemd_post openstack-placement-api.service
|
||||
%check
|
||||
export PYTHON=%{__python3}
|
||||
OS_TEST_PATH=./placement/tests/unit stestr run
|
||||
|
||||
%preun api
|
||||
%systemd_preun openstack-placement-api.service
|
||||
|
||||
%postun api
|
||||
%systemd_postun_with_restart openstack-placement-api.service
|
||||
%pre common
|
||||
getent group placement >/dev/null || groupadd -r placement
|
||||
getent passwd placement >/dev/null || \
|
||||
useradd -r -g placement -d / -s /bin/bash -c "OpenStack Placement" placement
|
||||
exit 0
|
||||
|
||||
%files
|
||||
%files common
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
%dir %{_sysconfdir}/placement
|
||||
%dir %{_sysconfdir}/placement/placement.conf.d/
|
||||
%dir %attr(0750, placement, placement) %{_localstatedir}/cache/placement
|
||||
%config(noreplace) %attr(0640, root, placement) %{_sysconfdir}/placement/placement.conf
|
||||
%config %attr(0640, root, placement) %{_sysconfdir}/placement/policy.yaml
|
||||
%dir %attr(0755, placement, placement) %{_localstatedir}/lib/placement
|
||||
%dir %attr(0750, placement, placement) %{_localstatedir}/log/placement
|
||||
%doc etc/placement/policy.yaml.sample
|
||||
%{_bindir}/placement-manage
|
||||
%{_bindir}/placement-status
|
||||
%dir %attr(0755, root, root) %{_localstatedir}/lib/placement/images
|
||||
%dir %attr(0755, placement, root) %{_localstatedir}/lib/placement/instances
|
||||
%dir %attr(0755, root, root) %{_localstatedir}/lib/placement/keys
|
||||
%dir %attr(0755, root, root) %{_localstatedir}/lib/placement/networks
|
||||
%dir %attr(0755, root, root) %{_localstatedir}/lib/placement/tmp
|
||||
|
||||
%files -n python3-openstack-placement
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/placement/
|
||||
%{python3_sitelib}/placement_db_tools/
|
||||
%{python3_sitelib}/openstack_placement*egg-info
|
||||
%dir %{_datarootdir}/placement
|
||||
%attr(-, root, placement) %{_datarootdir}/placement/placement-dist.conf
|
||||
%{_datarootdir}/placement/mysql-migrate-db.sh
|
||||
%{_datarootdir}/placement/postgresql-migrate-db.sh
|
||||
%dir %{_sysconfdir}/placement
|
||||
%config(noreplace) %attr(-, root, placement) %{_sysconfdir}/placement/placement.conf
|
||||
%config(noreplace) %attr(-, root, placement) %{_sysconfdir}/placement/policy.json
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-placement
|
||||
%dir %attr(0750, placement, root) %{_localstatedir}/log/placement
|
||||
|
||||
%files api
|
||||
%license LICENSE
|
||||
%config(noreplace) %{_sysconfdir}/httpd/conf.d/00-placement-api.conf
|
||||
%{_bindir}/placement-api
|
||||
%{apache_site_dir}/openstack-placement-api.conf
|
||||
|
||||
%files -n python3-placement
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/placement
|
||||
%{python3_sitelib}/placement_db_tools
|
||||
%{python3_sitelib}/openstack_placement-*.egg-info
|
||||
%exclude %{python3_sitelib}/placement/tests
|
||||
|
||||
%files -n python3-placement-tests
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/placement/tests
|
||||
|
||||
%if 0%{?with_doc}
|
||||
%files doc
|
||||
%license LICENSE
|
||||
%doc doc/build/html
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Aug 11 2021 openstack-sig <openstack@openeuler.org>
|
||||
- Update to 5.0.1
|
||||
|
||||
* Thu Feb 25 2021 wangxiyuan <wangxiyuan1007@gmail.com>
|
||||
- Fix httpd config error and remove useless files
|
||||
|
||||
* Wed Feb 03 2021 ZhengZhenyu <zheng.zhenyu@outlook.com>
|
||||
- Update init
|
||||
|
||||
|
||||
25
placement-api.conf
Normal file
25
placement-api.conf
Normal file
@ -0,0 +1,25 @@
|
||||
Listen 8778
|
||||
|
||||
<VirtualHost *:8778>
|
||||
WSGIProcessGroup placement-api
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIPassAuthorization On
|
||||
WSGIDaemonProcess placement-api processes=3 threads=1 user=placement group=placement
|
||||
WSGIScriptAlias / /usr/bin/placement-api
|
||||
<IfVersion >= 2.4>
|
||||
ErrorLogFormat "%M"
|
||||
</IfVersion>
|
||||
ErrorLog /var/log/placement/placement-api.log
|
||||
#SSLEngine On
|
||||
#SSLCertificateFile ...
|
||||
#SSLCertificateKeyFile ...
|
||||
</VirtualHost>
|
||||
|
||||
Alias /placement-api /usr/bin/placement-api
|
||||
<Location /placement-api>
|
||||
SetHandler wsgi-script
|
||||
Options +ExecCGI
|
||||
WSGIProcessGroup placement-api
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIPassAuthorization On
|
||||
</Location>
|
||||
10
placement-dist.conf
Normal file
10
placement-dist.conf
Normal file
@ -0,0 +1,10 @@
|
||||
[DEFAULT]
|
||||
|
||||
[database]
|
||||
connection = mysql://placement:placement@localhost/placement
|
||||
max_retries = -1
|
||||
|
||||
[keystone_authtoken]
|
||||
auth_host = 127.0.0.1
|
||||
auth_port = 35357
|
||||
auth_protocol = http
|
||||
7
placement.logrotate
Normal file
7
placement.logrotate
Normal file
@ -0,0 +1,7 @@
|
||||
/var/log/placement/*.log {
|
||||
rotate 14
|
||||
size 10M
|
||||
missingok
|
||||
compress
|
||||
copytruncate
|
||||
}
|
||||
2
policy.json
Normal file
2
policy.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user