Compare commits
10 Commits
30f3d53cfb
...
9b48435552
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b48435552 | ||
|
|
f04616dc66 | ||
|
|
7af7772dd4 | ||
|
|
27cafd4751 | ||
|
|
0111b18f34 | ||
|
|
4ce6a478aa | ||
|
|
3e5cf4fd97 | ||
|
|
08c28a8d16 | ||
|
|
d8843b3961 | ||
|
|
90b3387210 |
BIN
openstack-placement-2.0.1.tar.gz
Normal file
BIN
openstack-placement-2.0.1.tar.gz
Normal file
Binary file not shown.
251
openstack-placement.spec
Normal file
251
openstack-placement.spec
Normal file
@ -0,0 +1,251 @@
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
%global with_doc 0
|
||||
|
||||
%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: 2.0.1
|
||||
Release: 1
|
||||
Summary: OpenStack Placement
|
||||
License: ASL 2.0
|
||||
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: 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-middleware
|
||||
BuildRequires: python3-oslo-serialization
|
||||
BuildRequires: python3-oslo-policy
|
||||
BuildRequires: python3-oslo-upgradecheck
|
||||
BuildRequires: python3-oslo-utils
|
||||
BuildRequires: python3-oslotest
|
||||
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: openstack-placement-api
|
||||
%description
|
||||
%{common_desc}
|
||||
|
||||
%package common
|
||||
Summary: Components common to all OpenStack Placement services
|
||||
Requires: python3-placement = %{version}-%{release}
|
||||
|
||||
%description common
|
||||
%{common_desc}
|
||||
|
||||
This package contains scripts, config and dependencies shared
|
||||
between all the OpenStack Placement services.
|
||||
|
||||
%package api
|
||||
Summary: OpenStack Placement API service
|
||||
|
||||
Requires: openstack-placement-common = %{version}-%{release}
|
||||
Requires: httpd
|
||||
Requires: python3-mod_wsgi
|
||||
|
||||
%description 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
|
||||
Requires: python3-routes
|
||||
Requires: python3-webob
|
||||
Requires: python3-keystonemiddleware
|
||||
Requires: python3-jsonschema
|
||||
Requires: python3-microversion-parse
|
||||
Requires: python3-os-traits
|
||||
Requires: python3-os-resource-classes
|
||||
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-serialization
|
||||
Requires: python3-oslo-upgradecheck
|
||||
Requires: python3-oslo-utils
|
||||
Requires: python3-oslo-policy
|
||||
Requires: python3-pbr
|
||||
Requires: python3-requests
|
||||
|
||||
%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
|
||||
Requires: python3-coverage
|
||||
Requires: python3-fixtures
|
||||
Requires: python3-mock
|
||||
Requires: python3-PyMySQL
|
||||
Requires: python3-oslotest
|
||||
Requires: python3-stestr
|
||||
Requires: python3-testtools
|
||||
Requires: python3-gabbi
|
||||
Requires: python3-wsgi_intercept
|
||||
|
||||
%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
|
||||
# "-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
|
||||
PYTHONPATH=. oslo-config-generator --config-file=etc/placement/config-generator.conf
|
||||
PYTHONPATH=. oslopolicy-sample-generator --config-file=etc/placement/policy-generator.conf
|
||||
|
||||
%{py3_build}
|
||||
|
||||
%install
|
||||
%{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
|
||||
|
||||
install -d -m 750 %{buildroot}%{_localstatedir}/log/placement
|
||||
|
||||
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
|
||||
|
||||
install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-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
|
||||
|
||||
%check
|
||||
export PYTHON=%{__python3}
|
||||
OS_TEST_PATH=./placement/tests/unit stestr run
|
||||
|
||||
%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 etc/placement/policy.yaml.sample
|
||||
%{_bindir}/placement-manage
|
||||
%{_bindir}/placement-status
|
||||
%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
|
||||
|
||||
%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
|
||||
* Fri Nov 05 2021 wangxiyuan <wangxiyuan1007@gmail.com> - 2.0.1-1
|
||||
- Support OpenStack Train release
|
||||
|
||||
34
placement-api.conf
Normal file
34
placement-api.conf
Normal file
@ -0,0 +1,34 @@
|
||||
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 ...
|
||||
<Directory /usr/bin>
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.4>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
</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