!17 Add Ironic 17.0.3 for OpenStack Wallaby support
From: @sean-lau Reviewed-by: @huangtianhua Signed-off-by: @huangtianhua
This commit is contained in:
commit
d7f05e85fc
BIN
ironic-17.0.3.tar.gz
Normal file
BIN
ironic-17.0.3.tar.gz
Normal file
Binary file not shown.
4
ironic-dist.conf
Normal file
4
ironic-dist.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
log_dir = /var/log/ironic
|
||||||
|
state_path = /var/lib/ironic
|
||||||
|
use_stderr = False
|
||||||
@ -1,2 +1,2 @@
|
|||||||
Defaults:ironic syslog_goodpri=none, !pam_session
|
Defaults:ironic !requiretty
|
||||||
ironic ALL = (root) NOPASSWD: /usr/bin/ironic-rootwrap /etc/ironic/rootwrap.conf *
|
ironic ALL = (root) NOPASSWD: /usr/bin/ironic-rootwrap /etc/ironic/rootwrap.conf *
|
||||||
Binary file not shown.
7
ironic.logrotate
Normal file
7
ironic.logrotate
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/var/log/ironic/*.log {
|
||||||
|
rotate 14
|
||||||
|
size 10M
|
||||||
|
missingok
|
||||||
|
compress
|
||||||
|
copytruncate
|
||||||
|
}
|
||||||
@ -1,17 +1,13 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=OpenStack Ironic - API
|
Description=OpenStack Ironic API service
|
||||||
After=syslog.target network.target
|
After=syslog.target network.target
|
||||||
After=mariadb.service postgresql.service rabbitmq-server.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=notify
|
Type=simple
|
||||||
User=ironic
|
User=ironic
|
||||||
Group=ironic
|
|
||||||
WorkingDirectory=/var/lib/ironic
|
|
||||||
PrivateTmp=yes
|
|
||||||
ExecStartPre=-/usr/bin/ironic-dbsync
|
|
||||||
ExecStart=/usr/bin/ironic-api
|
ExecStart=/usr/bin/ironic-api
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,13 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=OpenStack Ironic - Conductor
|
Description=OpenStack Ironic Conductor service
|
||||||
After=syslog.target network.target
|
After=syslog.target network.target
|
||||||
After=mariadb.service postgresql.service rabbitmq-server.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=notify
|
Type=simple
|
||||||
User=ironic
|
User=ironic
|
||||||
Group=ironic
|
|
||||||
WorkingDirectory=/var/lib/ironic
|
|
||||||
PrivateTmp=yes
|
|
||||||
ExecStart=/usr/bin/ironic-conductor
|
ExecStart=/usr/bin/ironic-conductor
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|||||||
@ -1,30 +0,0 @@
|
|||||||
The main service configuration (/etc/$project/$project.conf) can still be used
|
|
||||||
for configuration but the preferred way is to add config file snippets into
|
|
||||||
/etc/$project/$project.conf.d/ instead.
|
|
||||||
|
|
||||||
As part of the packaging, the package itself installs a config snippet at
|
|
||||||
/etc/$project/$project.conf.d/010-$project.conf with basic configuration. This
|
|
||||||
file should not be modified. In case there is a need to overwrite or add
|
|
||||||
settings, a XXX-$project.conf (XXX being a 3 digit number) should be created
|
|
||||||
instead.
|
|
||||||
|
|
||||||
Config directory file snippet naming should follow these conventions:
|
|
||||||
- snippets should start with "XXX-" where "X" is a number
|
|
||||||
- snippets must end with ".conf"
|
|
||||||
- config management systems (Crowbar, Salt, ...) should use numbers
|
|
||||||
between 100 and 499
|
|
||||||
- users should use numbers starting from 500
|
|
||||||
|
|
||||||
Configuring just a single $program (eg for Nova, $project is "nova" and
|
|
||||||
$program is "nova-api", "nova-compute", "nova-scheduler", ...) can be done
|
|
||||||
in a similar way. The config snippets should be placed in
|
|
||||||
/etc/$project/$program.conf.d/ . The same snippets rules apply here, too.
|
|
||||||
|
|
||||||
$program reads the configuration files in the following order:
|
|
||||||
- /etc/$project/$project.conf
|
|
||||||
- /etc/$project/$project.conf.d/*.conf (lexically sorted)
|
|
||||||
- /etc/$project/$program.conf.d/*.conf (lexically sorted)
|
|
||||||
|
|
||||||
The last configured key overwrites all previous ones. In particular, settings
|
|
||||||
in /etc/$project/$project.conf are overwritten by config values from any file
|
|
||||||
in /etc/$project/$project.conf.d/XXX-$project.conf .
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
[DEFAULT]
|
|
||||||
log_dir = /var/log/ironic
|
|
||||||
rootwrap_config = /etc/ironic/rootwrap.conf
|
|
||||||
state_path = /var/lib/ironic
|
|
||||||
|
|
||||||
[oslo_concurrency]
|
|
||||||
lock_path = /run/ironic
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
/var/log/ironic/*.log {
|
|
||||||
compress
|
|
||||||
rotate 15
|
|
||||||
size 1M
|
|
||||||
dateext
|
|
||||||
missingok
|
|
||||||
notifempty
|
|
||||||
su ironic ironic
|
|
||||||
sharedscripts
|
|
||||||
}
|
|
||||||
@ -1,42 +1,50 @@
|
|||||||
%global with_doc 1
|
%global full_release ironic-%{version}
|
||||||
|
|
||||||
|
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||||
|
|
||||||
Name: openstack-ironic
|
Name: openstack-ironic
|
||||||
Epoch: 0
|
# Liberty semver reset
|
||||||
Version: 16.0.4
|
# https://review.openstack.org/#/q/I1a161b2c1d1e27268065b6b4be24c8f7a5315afb,n,z
|
||||||
Release: 0.2.dev3
|
Summary: OpenStack Baremetal Hypervisor API (ironic)
|
||||||
Summary: Openstack Provisioning of Bare Metal Servers
|
Version: 17.0.3
|
||||||
|
Release: 1
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://launchpad.net/ironic
|
URL: http://www.openstack.org
|
||||||
Source0: ironic-stable-victoria.tar.gz
|
Source0: https://tarballs.openstack.org/ironic/ironic-%{version}.tar.gz
|
||||||
Source1: openstack-ironic.sudoers
|
|
||||||
Source2: openstack-ironic.logrotate
|
Source1: openstack-ironic-api.service
|
||||||
Source3: openstack-ironic.tmpfiles
|
Source2: openstack-ironic-conductor.service
|
||||||
Source4: openstack-ironic.defaultconf
|
Source3: ironic-rootwrap-sudoers
|
||||||
Source5: openstack-ironic.README.config
|
Source4: ironic-dist.conf
|
||||||
# systemd service files
|
Source5: ironic.logrotate
|
||||||
Source6: openstack-ironic-api.service
|
|
||||||
Source7: openstack-ironic-conductor.service
|
BuildArch: noarch
|
||||||
BuildRequires: openstack-macros
|
BuildRequires: openstack-macros
|
||||||
BuildRequires: python3-jinja2
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-sqlalchemy
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-wsme
|
BuildRequires: python3-pbr
|
||||||
BuildRequires: python3-webob
|
BuildRequires: openssl-devel
|
||||||
|
BuildRequires: libxml2-devel
|
||||||
|
BuildRequires: libxslt-devel
|
||||||
|
BuildRequires: gmp-devel
|
||||||
|
BuildRequires: python3-sphinx
|
||||||
|
BuildRequires: systemd
|
||||||
|
# Required to run unit tests
|
||||||
BuildRequires: python3-alembic
|
BuildRequires: python3-alembic
|
||||||
BuildRequires: python3-automaton
|
BuildRequires: python3-automaton
|
||||||
BuildRequires: python3-cinderclient
|
BuildRequires: python3-cinderclient
|
||||||
BuildRequires: python3-ddt
|
BuildRequires: python3-ddt
|
||||||
BuildRequires: python3-eventlet
|
BuildRequires: python3-eventlet
|
||||||
BuildRequires: python3-fixtures
|
|
||||||
BuildRequires: python3-futurist
|
BuildRequires: python3-futurist
|
||||||
BuildRequires: python3-glanceclient
|
BuildRequires: python3-glanceclient
|
||||||
BuildRequires: python3-ironic-lib
|
BuildRequires: python3-jinja2
|
||||||
BuildRequires: python3-iso8601
|
|
||||||
BuildRequires: python3-jsonpatch
|
BuildRequires: python3-jsonpatch
|
||||||
BuildRequires: python3-jsonschema
|
BuildRequires: python3-jsonschema
|
||||||
BuildRequires: python3-keystoneauth1
|
BuildRequires: python3-keystoneauth1
|
||||||
BuildRequires: python3-keystonemiddleware
|
BuildRequires: python3-keystonemiddleware
|
||||||
BuildRequires: python3-mock
|
BuildRequires: python3-mock
|
||||||
BuildRequires: python3-neutronclient
|
BuildRequires: python3-neutronclient
|
||||||
BuildRequires: python3-os-traits
|
BuildRequires: python3-openstacksdk
|
||||||
BuildRequires: python3-oslo-concurrency
|
BuildRequires: python3-oslo-concurrency
|
||||||
BuildRequires: python3-oslo-config
|
BuildRequires: python3-oslo-config
|
||||||
BuildRequires: python3-oslo-context
|
BuildRequires: python3-oslo-context
|
||||||
@ -55,266 +63,233 @@ BuildRequires: python3-oslo-utils
|
|||||||
BuildRequires: python3-oslo-versionedobjects
|
BuildRequires: python3-oslo-versionedobjects
|
||||||
BuildRequires: python3-oslotest
|
BuildRequires: python3-oslotest
|
||||||
BuildRequires: python3-osprofiler
|
BuildRequires: python3-osprofiler
|
||||||
|
BuildRequires: python3-os-traits
|
||||||
BuildRequires: python3-pbr
|
BuildRequires: python3-pbr
|
||||||
BuildRequires: python3-pecan
|
BuildRequires: python3-pecan
|
||||||
BuildRequires: python3-psutil
|
BuildRequires: python3-psutil
|
||||||
BuildRequires: python3-pysendfile
|
|
||||||
BuildRequires: python3-pysnmp
|
BuildRequires: python3-pysnmp
|
||||||
BuildRequires: python3-pytz
|
BuildRequires: python3-pytz
|
||||||
BuildRequires: python3-requests
|
BuildRequires: python3-requests
|
||||||
BuildRequires: python3-retrying
|
BuildRequires: python3-scciclient
|
||||||
BuildRequires: python3-rfc3986
|
BuildRequires: python3-sqlalchemy
|
||||||
BuildRequires: python3-stestr
|
BuildRequires: python3-stestr
|
||||||
BuildRequires: python3-stevedore
|
BuildRequires: python3-stevedore
|
||||||
|
BuildRequires: python3-sushy
|
||||||
BuildRequires: python3-swiftclient
|
BuildRequires: python3-swiftclient
|
||||||
|
BuildRequires: python3-testresources
|
||||||
|
BuildRequires: python3-testscenarios
|
||||||
BuildRequires: python3-testtools
|
BuildRequires: python3-testtools
|
||||||
BuildRequires: python3-tooz
|
BuildRequires: python3-tooz
|
||||||
BuildRequires: sudo
|
BuildRequires: python3-dracclient
|
||||||
Requires: logrotate
|
BuildRequires: python3-ironic-lib
|
||||||
Requires: python3-ironic = %{epoch}:%{version}-%{release}
|
BuildRequires: python3-proliantutils
|
||||||
BuildArch: noarch
|
BuildRequires: python3-tenacity
|
||||||
%if 0%{?suse_version}
|
BuildRequires: python3-webob
|
||||||
BuildRequires: systemd-rpm-macros
|
|
||||||
%{?systemd_requires}
|
Requires: %{name}-api = %{version}-%{release}
|
||||||
%else
|
Requires: %{name}-conductor = %{version}-%{release}
|
||||||
BuildRequires: systemd
|
|
||||||
Requires(post): systemd
|
|
||||||
Requires(postun): systemd
|
|
||||||
Requires(pre): shadow-utils
|
|
||||||
Requires(preun): systemd
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Ironic is an Incubated OpenStack project which aims to provision bare metal
|
Ironic provides an API for management and provisioning of physical machines
|
||||||
machines instead of virtual machines, forked from the Nova Baremetal driver.
|
|
||||||
It is best thought of as a bare metal hypervisor API and a set of plugins
|
|
||||||
which interact with the bare metal hypervisors. By default, it will use
|
|
||||||
PXE and IPMI in concert to provision and turn on/off machines, but Ironic
|
|
||||||
also supports vendor-specific plugins which may implement additional functionality.
|
|
||||||
|
|
||||||
%package -n python3-ironic
|
%package -n python3-ironic
|
||||||
Summary: OpenStack shared file system service (ironic) - Python module
|
Summary: OpenStack shared file system service (ironic) - Python module
|
||||||
Group: Development/Languages/Python
|
|
||||||
Requires: python3-jinja2
|
Requires: python3-alembic >= 1.4.2
|
||||||
Requires: python3-sqlalchemy
|
Requires: python3-automaton >= 1.9.0
|
||||||
Requires: python3-wsme
|
Requires: python3-cinderclient >= 3.3.0
|
||||||
Requires: python3-webob
|
Requires: python3-eventlet >= 0.18.2
|
||||||
Requires: python3-alembic
|
Requires: python3-futurist >= 1.2.0
|
||||||
Requires: python3-automaton
|
Requires: python3-glanceclient >= 2.8.0
|
||||||
Requires: python3-cinderclient
|
Requires: python3-ironic-lib >= 4.3.0
|
||||||
Requires: python3-eventlet
|
Requires: python3-jinja2 >= 2.10
|
||||||
Requires: python3-futurist
|
Requires: python3-jsonpatch >= 1.16
|
||||||
Requires: python3-glanceclient
|
Requires: python3-jsonschema >= 3.2.0
|
||||||
Requires: python3-ironic-lib
|
Requires: python3-keystoneauth1 >= 4.2.0
|
||||||
Requires: python3-jsonpatch
|
Requires: python3-keystonemiddleware >= 4.17.0
|
||||||
Requires: python3-jsonschema
|
Requires: python3-openstacksdk >= 0.48.0
|
||||||
Requires: python3-keystoneauth1
|
Requires: python3-oslo-concurrency >= 4.2.0
|
||||||
Requires: python3-keystonemiddleware
|
Requires: python3-oslo-config >= 6.8.0
|
||||||
Requires: python3-neutronclient
|
Requires: python3-oslo-context >= 2.19.2
|
||||||
Requires: python3-os-traits
|
Requires: python3-oslo-db >= 6.0.0
|
||||||
Requires: python3-oslo-concurrency
|
Requires: python3-oslo-log >= 4.3.0
|
||||||
Requires: python3-oslo-config
|
Requires: python3-oslo-messaging >= 5.29.0
|
||||||
Requires: python3-oslo-context
|
Requires: python3-oslo-middleware >= 3.31.0
|
||||||
Requires: python3-oslo-db
|
Requires: python3-oslo-policy >= 3.6.2
|
||||||
Requires: python3-oslo-i18n
|
Requires: python3-oslo-rootwrap >= 5.8.0
|
||||||
Requires: python3-oslo-log
|
Requires: python3-oslo-serialization >= 2.18.0
|
||||||
Requires: python3-oslo-messaging
|
Requires: python3-oslo-service >= 1.24.0
|
||||||
Requires: python3-oslo-middleware
|
Requires: python3-oslo-upgradecheck >= 1.3.0
|
||||||
Requires: python3-oslo-policy
|
Requires: python3-oslo-utils >= 4.5.0
|
||||||
Requires: python3-oslo-reports
|
Requires: python3-oslo-versionedobjects >= 1.31.2
|
||||||
Requires: python3-oslo-rootwrap
|
Requires: python3-osprofiler >= 1.5.0
|
||||||
Requires: python3-oslo-serialization
|
Requires: python3-os-traits >= 0.4.0
|
||||||
Requires: python3-oslo-service
|
Requires: python3-pbr >= 2.0.0
|
||||||
Requires: python3-oslo-upgradecheck
|
Requires: python3-pecan >= 1.0.0
|
||||||
Requires: python3-oslo-utils
|
Requires: python3-psutil >= 3.2.2
|
||||||
Requires: python3-oslo-versionedobjects
|
Requires: python3-pytz >= 2013.6
|
||||||
Requires: python3-osprofiler
|
Requires: python3-requests >= 2.14.2
|
||||||
Requires: python3-pbr
|
Requires: python3-rfc3986 >= 0.3.1
|
||||||
Requires: python3-pecan
|
Requires: python3-sqlalchemy >= 1.2.19
|
||||||
Requires: python3-psutil
|
Requires: python3-stevedore >= 1.20.0
|
||||||
Requires: python3-pysendfile
|
Requires: python3-swiftclient >= 3.2.0
|
||||||
Requires: python3-pysnmp
|
Requires: python3-tenacity >= 6.2.0
|
||||||
Requires: python3-pytz
|
Requires: python3-tooz >= 2.7.0
|
||||||
Requires: python3-requests
|
Requires: python3-webob >= 1.7.1
|
||||||
Requires: python3-retrying
|
Requires(pre): shadow-utils
|
||||||
Requires: python3-rfc3986
|
|
||||||
Requires: python3-stevedore
|
|
||||||
Requires: python3-swiftclient
|
|
||||||
Requires: python3-tooz
|
|
||||||
Requires: sudo
|
|
||||||
|
|
||||||
%description -n python3-ironic
|
%description -n python3-ironic
|
||||||
This package contains the core code of OpenStack Ironic.
|
This package contains the core code of OpenStack Ironic.
|
||||||
|
|
||||||
%if 0%{?with_doc}
|
%package common
|
||||||
%package doc
|
Summary: Ironic common
|
||||||
Summary: OpenStack bare metal provisioning service (ironic) - Documentation
|
Requires: python3-ironic = %{version}-%{release}
|
||||||
Group: Documentation/HTML
|
|
||||||
BuildRequires: python3-sphinx
|
|
||||||
BuildRequires: python3-openstackdocstheme
|
|
||||||
BuildRequires: python3-sphinxcontrib-apidoc
|
|
||||||
BuildRequires: python3-sphinxcontrib-httpdomain
|
|
||||||
BuildRequires: python3-sphinxcontrib-pecanwsme
|
|
||||||
BuildRequires: python3-sphinxcontrib-seqdiag
|
|
||||||
BuildRequires: python3-sphinxcontrib-svg2pdfconverter
|
|
||||||
|
|
||||||
%description doc
|
%description common
|
||||||
OpenStack bare metal provisioning service.
|
Components common to all OpenStack Ironic services
|
||||||
This package contains the Documentation.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package api
|
%package api
|
||||||
Summary: OpenStack Ironic - API
|
Summary: OpenStack Ironic - API
|
||||||
Group: System/Management
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
Requires: openstack-ironic = %{epoch}:%{version}-%{release}
|
|
||||||
|
|
||||||
%description api
|
%description api
|
||||||
This package contains the OpenStack Ironic API Daemon.
|
This package contains the OpenStack Ironic API Daemon.
|
||||||
|
|
||||||
%package conductor
|
%package conductor
|
||||||
Summary: OpenStack Ironic - Conductor
|
Summary: OpenStack Ironic - Conductor
|
||||||
Group: System/Management
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
Requires: openstack-ironic = %{epoch}:%{version}-%{release}
|
|
||||||
|
|
||||||
%description conductor
|
%description conductor
|
||||||
This package contains the OpenStack Ironic Conductor Manager Daemon.
|
This package contains the OpenStack Ironic Conductor Manager Daemon.
|
||||||
|
|
||||||
%prep
|
%package -n python3-ironic-tests
|
||||||
%autosetup -p1 -n ironic-16.0.4.dev3
|
Summary: Ironic unit tests
|
||||||
%py_req_cleanup
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
Requires: python3-mock
|
||||||
|
Requires: python3-oslotest
|
||||||
|
Requires: python3-stestr
|
||||||
|
Requires: python3-testresources
|
||||||
|
Requires: python3-testscenarios
|
||||||
|
Requires: python3-testtools
|
||||||
|
|
||||||
|
|
||||||
|
%description -n python3-ironic-tests
|
||||||
|
This package contains the Ironic test files.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
# Required for tarball sources verification
|
||||||
|
%setup -q -n ironic-%{upstream_version}
|
||||||
|
# Let RPM handle the requirements
|
||||||
|
%py_req_cleanup
|
||||||
|
# Remove tempest plugin entrypoint as a workaround
|
||||||
|
sed -i '/tempest/d' setup.cfg
|
||||||
|
rm -rf ironic_tempest_plugin
|
||||||
%build
|
%build
|
||||||
%{py3_build}
|
%{py3_build}
|
||||||
|
|
||||||
%if 0%{?with_doc}
|
|
||||||
PYTHONPATH=. PBR_VERSION=16.0.4.dev3 sphinx-build --keep-going -b html doc/source doc/build/html
|
|
||||||
PYTHONPATH=. PBR_VERSION=16.0.4.dev3 sphinx-build --keep-going -b man doc/source doc/build/man
|
|
||||||
# remove the Sphinx-build leftovers
|
|
||||||
rm -rf doc/build/html/.{doctrees,buildinfo}
|
|
||||||
rm -rf doc/build/man/.{doctrees,buildinfo}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{py3_install}
|
%{py3_install}
|
||||||
|
|
||||||
### Setup directories
|
install -p -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-ironic
|
||||||
install -d -m 750 %{buildroot}%{_localstatedir}/{lib,log,cache}/ironic
|
|
||||||
install -d -m 755 %{buildroot}%{_sysconfdir}/ironic
|
|
||||||
install -d -m 755 %{buildroot}%{_sysconfdir}/ironic/ironic.conf.d/
|
|
||||||
install -d -m 700 %{buildroot}%{_localstatedir}/run/ironic
|
|
||||||
|
|
||||||
### Install configuration files
|
# install systemd scripts
|
||||||
install -D -m 644 %{SOURCE3} %{buildroot}/%_tmpfilesdir/ironic.conf
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -p -D -m 640 %{SOURCE4} %{buildroot}%{_sysconfdir}/ironic/ironic.conf.d/010-ironic.conf
|
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
|
||||||
mv %{buildroot}%{_prefix}%{_sysconfdir}/ironic/* %{buildroot}%{_sysconfdir}/ironic/
|
install -p -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
|
||||||
cp -a etc/ironic/rootwrap.d/ %{buildroot}%{_sysconfdir}/ironic/
|
|
||||||
install -p -D -m 640 %{SOURCE5} %{buildroot}%{_sysconfdir}/ironic/README.config
|
|
||||||
|
|
||||||
### Install systemd service files
|
# install sudoers file
|
||||||
install -p -D -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/%{name}-api.service
|
mkdir -p %{buildroot}%{_sysconfdir}/sudoers.d
|
||||||
install -p -D -m 644 %{SOURCE7} %{buildroot}%{_unitdir}/%{name}-conductor.service
|
install -p -D -m 440 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers.d/ironic
|
||||||
|
|
||||||
### install symlinks on SUSE
|
mkdir -p %{buildroot}%{_sharedstatedir}/ironic/
|
||||||
%if 0%{?suse_version}
|
mkdir -p %{buildroot}%{_localstatedir}/log/ironic/
|
||||||
mkdir -p %{buildroot}%{_sbindir}
|
mkdir -p %{buildroot}%{_sysconfdir}/ironic/rootwrap.d
|
||||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-api
|
|
||||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-conductor
|
|
||||||
%endif
|
|
||||||
|
|
||||||
### sudoers configuration for ironic-rootwrap:
|
#Populate the conf dir
|
||||||
install -D -m 440 %{SOURCE1} %{buildroot}%{_sysconfdir}/sudoers.d/openstack-ironic
|
export PYTHONPATH=.
|
||||||
|
oslo-config-generator --config-file tools/config/ironic-config-generator.conf --output-file %{buildroot}/%{_sysconfdir}/ironic/ironic.conf
|
||||||
|
oslopolicy-sample-generator --config-file tools/policy/ironic-policy-generator.conf
|
||||||
|
mv %{buildroot}%{_prefix}/etc/ironic/rootwrap.conf %{buildroot}/%{_sysconfdir}/ironic/rootwrap.conf
|
||||||
|
mv %{buildroot}%{_prefix}/etc/ironic/rootwrap.d/* %{buildroot}/%{_sysconfdir}/ironic/rootwrap.d/
|
||||||
|
# Remove duplicate config files under /usr/etc/ironic
|
||||||
|
rmdir %{buildroot}%{_prefix}/etc/ironic/rootwrap.d
|
||||||
|
rmdir %{buildroot}%{_prefix}/etc/ironic
|
||||||
|
|
||||||
### Install logrotate
|
# Install distribution config
|
||||||
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-ironic
|
install -p -D -m 640 %{SOURCE4} %{buildroot}/%{_datadir}/ironic/ironic-dist.conf
|
||||||
|
|
||||||
### man pages
|
|
||||||
%if 0%{?with_doc}
|
|
||||||
mkdir -p %{buildroot}%{_mandir}/man1
|
|
||||||
install -p -D -m 644 doc/build/man/*.1 %{buildroot}%{_mandir}/man1/
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export LC_ALL=en_US.UTF-8
|
PYTHON=%{__python3} stestr run
|
||||||
python3 -m stestr.cli run
|
|
||||||
|
|
||||||
%pre
|
|
||||||
%openstack_pre_user_group_create ironic ironic /sbin/nologin
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%post
|
|
||||||
%tmpfiles_create %{_tmpfilesdir}/ironic.conf
|
|
||||||
|
|
||||||
%post api
|
|
||||||
%systemd_post %{name}-api.service
|
|
||||||
|
|
||||||
%preun api
|
|
||||||
%systemd_preun %{name}-api.service
|
|
||||||
|
|
||||||
%postun api
|
|
||||||
%systemd_postun %{name}-api.service
|
|
||||||
|
|
||||||
%post conductor
|
|
||||||
%systemd_post %{name}-conductor.service
|
|
||||||
|
|
||||||
%preun conductor
|
|
||||||
%systemd_preun %{name}-conductor.service
|
|
||||||
|
|
||||||
%postun conductor
|
|
||||||
%systemd_postun %{name}-conductor.service
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.rst
|
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%dir %attr(0750, ironic, ironic) %{_localstatedir}/lib/ironic
|
|
||||||
%dir %attr(0750, ironic, ironic) %{_localstatedir}/cache/ironic
|
|
||||||
%dir %attr(0750, ironic, ironic) %{_localstatedir}/log/ironic
|
|
||||||
%_tmpfilesdir/ironic.conf
|
|
||||||
%dir %{_sysconfdir}/ironic
|
|
||||||
%dir %{_sysconfdir}/ironic/ironic.conf.d/
|
|
||||||
%{_sysconfdir}/ironic/README.config
|
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-ironic
|
|
||||||
%config(noreplace) %{_sysconfdir}/sudoers.d/openstack-ironic
|
|
||||||
%config(noreplace) %attr(0640, root, ironic) %{_sysconfdir}/ironic/ironic.conf.d/010-ironic.conf
|
|
||||||
%config %{_sysconfdir}/ironic/rootwrap.conf
|
|
||||||
%dir %{_sysconfdir}/ironic/rootwrap.d
|
|
||||||
%config(noreplace) %{_sysconfdir}/ironic/rootwrap.d/ironic-utils.filters
|
|
||||||
%{_bindir}/ironic-status
|
|
||||||
%{_bindir}/ironic-rootwrap
|
|
||||||
%{_bindir}/ironic-dbsync
|
|
||||||
%if 0%{?with_doc}
|
|
||||||
%{_mandir}/man1/ironic.1.gz
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n python3-ironic
|
%files -n python3-ironic
|
||||||
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python3_sitelib}/ironic/
|
%{python3_sitelib}/ironic
|
||||||
%{python3_sitelib}/ironic-*.egg-info
|
%{python3_sitelib}/ironic-*.egg-info
|
||||||
|
%exclude %{python3_sitelib}/ironic/tests
|
||||||
|
|
||||||
%if 0%{?with_doc}
|
%files common
|
||||||
%files doc
|
%doc README.rst
|
||||||
|
%doc etc/ironic/policy.yaml.sample
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc doc/build/html
|
%{_bindir}/ironic-dbsync
|
||||||
%endif
|
%{_bindir}/ironic-rootwrap
|
||||||
|
%{_bindir}/ironic-status
|
||||||
|
%{_sysconfdir}/sudoers.d/ironic
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-ironic
|
||||||
|
%config(noreplace) %attr(-,root,ironic) %{_sysconfdir}/ironic
|
||||||
|
%attr(-,ironic,ironic) %{_sharedstatedir}/ironic
|
||||||
|
%attr(0750,ironic,ironic) %{_localstatedir}/log/ironic
|
||||||
|
%attr(-, root, ironic) %{_datadir}/ironic/ironic-dist.conf
|
||||||
|
|
||||||
|
%pre common
|
||||||
|
getent group ironic >/dev/null || groupadd -r ironic
|
||||||
|
getent passwd ironic >/dev/null || \
|
||||||
|
useradd -r -g ironic -d %{_sharedstatedir}/ironic -s /sbin/nologin \
|
||||||
|
-c "OpenStack Ironic Daemons" ironic
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
||||||
%files api
|
%files api
|
||||||
%license LICENSE
|
|
||||||
%{_unitdir}/%{name}-api.service
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
%{_sbindir}/rc%{name}-api
|
|
||||||
%endif
|
|
||||||
%{_bindir}/ironic-api
|
%{_bindir}/ironic-api
|
||||||
%{_bindir}/ironic-api-wsgi
|
%{_bindir}/ironic-api-wsgi
|
||||||
|
%{_unitdir}/openstack-ironic-api.service
|
||||||
|
|
||||||
|
%post api
|
||||||
|
%systemd_post openstack-ironic-api.service
|
||||||
|
|
||||||
|
%preun api
|
||||||
|
%systemd_preun openstack-ironic-api.service
|
||||||
|
|
||||||
|
%postun api
|
||||||
|
%systemd_postun_with_restart openstack-ironic-api.service
|
||||||
|
|
||||||
%files conductor
|
%files conductor
|
||||||
%license LICENSE
|
|
||||||
%{_unitdir}/%{name}-conductor.service
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
%{_sbindir}/rc%{name}-conductor
|
|
||||||
%endif
|
|
||||||
%{_bindir}/ironic-conductor
|
%{_bindir}/ironic-conductor
|
||||||
|
%{_unitdir}/openstack-ironic-conductor.service
|
||||||
|
|
||||||
|
%post conductor
|
||||||
|
%systemd_post openstack-ironic-conductor.service
|
||||||
|
|
||||||
|
%preun conductor
|
||||||
|
%systemd_preun openstack-ironic-conductor.service
|
||||||
|
|
||||||
|
%postun conductor
|
||||||
|
%systemd_postun_with_restart openstack-ironic-conductor.service
|
||||||
|
|
||||||
|
%files -n python3-ironic-tests
|
||||||
|
%{python3_sitelib}/ironic/tests
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 12 2021 liusheng <liusheng2048@gmail.com> 17.0.3-1
|
||||||
|
- Upgrade to version 17.0.3 (OpenStack Wallaby)
|
||||||
|
|
||||||
* Tue Feb 09 2021 huangtianhua <huangtianhua223@gmail.com>
|
* Tue Feb 09 2021 huangtianhua <huangtianhua223@gmail.com>
|
||||||
- Enable with_doc to generate docs
|
- Enable with_doc to generate docs
|
||||||
|
|
||||||
* Mon Feb 08 2021 OpenStack rpm-packaging <huangtianhua223@gmail.com>
|
* Mon Feb 08 2021 OpenStack rpm-packaging <huangtianhua223@gmail.com>
|
||||||
- Package Spec generated
|
- Package Spec generated
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
d /run/ironic 0700 ironic ironic -
|
|
||||||
Loading…
x
Reference in New Issue
Block a user