Merge "Add initial spec for murano"
This commit is contained in:
commit
d84c13c5ff
296
openstack/murano/murano.spec.j2
Normal file
296
openstack/murano/murano.spec.j2
Normal file
@ -0,0 +1,296 @@
|
||||
{% set pypi_name = 'murano' %}
|
||||
{% set source = fetch_source('https://tarballs.openstack.org/murano/murano-master.tar.gz') %}
|
||||
{% set upstream_version = upstream_version() %}
|
||||
{% set rpm_release = '1' %}
|
||||
%global with_doc 1
|
||||
%if 0%{?rhel} || 0%{?fedora}
|
||||
%global rdo 1
|
||||
%endif
|
||||
Name: {{ py2name() }}
|
||||
Epoch: {{ epoch('murano') }}
|
||||
Version: {{ py2rpmversion() }}
|
||||
Release: {{ py2rpmrelease() }}
|
||||
Summary: OpenStack Application Catalog (murano)
|
||||
License: {{ license('Apache-2.0') }}
|
||||
Group: System/Management
|
||||
URL: https://launchpad.net/murano
|
||||
Source0: {{ source | basename }}
|
||||
Source1: openstack-murano.logrotate
|
||||
Source2: openstack-murano.tmpfiles
|
||||
Source3: openstack-murano.defaultconf
|
||||
Source4: openstack-murano.README.config
|
||||
# systemd service files
|
||||
Source5: openstack-murano-api.service
|
||||
Source6: openstack-murano-engine.service
|
||||
BuildRequires: openstack-macros
|
||||
BuildRequires: {{ py3('Babel') }}
|
||||
BuildRequires: {{ py3('WebOb') }}
|
||||
BuildRequires: {{ py3('castellan') }}
|
||||
BuildRequires: {{ py3('python-congressclient') }}
|
||||
BuildRequires: {{ py3('fixtures') }}
|
||||
BuildRequires: {{ py3('python-heatclient') }}
|
||||
BuildRequires: {{ py3('jsonschema') }}
|
||||
BuildRequires: {{ py3('keystonemiddleware') }}
|
||||
BuildRequires: {{ py3('python-mistralclient') }}
|
||||
BuildRequires: {{ py3('mock') }}
|
||||
BuildRequires: {{ py3('python-muranoclient') }}
|
||||
BuildRequires: {{ py3('python-neutronclient') }}
|
||||
BuildRequires: {{ py3('oslo.concurrency') }}
|
||||
BuildRequires: {{ py3('oslo.config') }}
|
||||
BuildRequires: {{ py3('oslo.db') }}
|
||||
BuildRequires: {{ py3('oslo.i18n') }}
|
||||
BuildRequires: {{ py3('oslo.log') }}
|
||||
BuildRequires: {{ py3('oslo.messaging') }}
|
||||
BuildRequires: {{ py3('oslo.policy') }}
|
||||
BuildRequires: {{ py3('oslo.upgradecheck') }}
|
||||
BuildRequires: {{ py3('oslo.utils') }}
|
||||
BuildRequires: {{ py3('oslotest') }}
|
||||
BuildRequires: {{ py3('pbr') }}
|
||||
BuildRequires: {{ py3('psutil') }}
|
||||
BuildRequires: {{ py3('requests') }}
|
||||
BuildRequires: {{ py3('semantic_version') }}
|
||||
BuildRequires: {{ py3('six') }}
|
||||
BuildRequires: {{ py3('stestr') }}
|
||||
BuildRequires: {{ py3('tenacity') }}
|
||||
BuildRequires: {{ py3('yaql') }}
|
||||
Requires: logrotate
|
||||
Requires: python3-{{ pypi_name }} = %{epoch}:%{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: systemd-rpm-macros
|
||||
Requires: pwdutils
|
||||
%{?systemd_requires}
|
||||
%else
|
||||
BuildRequires: systemd
|
||||
Requires(post): systemd
|
||||
Requires(postun): systemd
|
||||
Requires(pre): shadow-utils
|
||||
Requires(preun): systemd
|
||||
%endif
|
||||
|
||||
%description
|
||||
OpenStack Application Catalog.
|
||||
|
||||
%package -n python3-murano
|
||||
Summary: OpenStack Application Catalog (murano) - Python module
|
||||
Group: Development/Languages/Python
|
||||
Requires: {{ py3('Babel') }}
|
||||
Requires: {{ py3('Paste') }}
|
||||
Requires: {{ py3('PasteDeploy') }}
|
||||
Requires: {{ py3('PyYAML') }}
|
||||
Requires: {{ py3('Routes') }}
|
||||
Requires: {{ py3('SQLAlchemy') }}
|
||||
Requires: {{ py3('WebOb') }}
|
||||
Requires: {{ py3('alembic') }}
|
||||
Requires: {{ py3('castellan') }}
|
||||
Requires: {{ py3('python-congressclient') }}
|
||||
Requires: {{ py3('debtcollector') }}
|
||||
Requires: {{ py3('eventlet') }}
|
||||
Requires: {{ py3('python-heatclient') }}
|
||||
Requires: {{ py3('jsonpatch') }}
|
||||
Requires: {{ py3('jsonschema') }}
|
||||
Requires: {{ py3('keystoneauth1') }}
|
||||
Requires: {{ py3('python-keystoneclient') }}
|
||||
Requires: {{ py3('keystonemiddleware') }}
|
||||
Requires: {{ py3('kombu') }}
|
||||
Requires: {{ py3('python-mistralclient') }}
|
||||
Requires: {{ py3('python-muranoclient') }}
|
||||
Requires: {{ py3('netaddr') }}
|
||||
Requires: {{ py3('python-neutronclient') }}
|
||||
Requires: {{ py3('oslo.concurrency') }}
|
||||
Requires: {{ py3('oslo.config') }}
|
||||
Requires: {{ py3('oslo.context') }}
|
||||
Requires: {{ py3('oslo.db') }}
|
||||
Requires: {{ py3('oslo.i18n') }}
|
||||
Requires: {{ py3('oslo.log') }}
|
||||
Requires: {{ py3('oslo.messaging') }}
|
||||
Requires: {{ py3('oslo.middleware') }}
|
||||
Requires: {{ py3('oslo.policy') }}
|
||||
Requires: {{ py3('oslo.serialization') }}
|
||||
Requires: {{ py3('oslo.service') }}
|
||||
Requires: {{ py3('oslo.utils') }}
|
||||
Requires: {{ py3('pbr') }}
|
||||
Requires: {{ py3('psutil') }}
|
||||
Requires: {{ py3('semantic_version') }}
|
||||
Requires: {{ py3('six') }}
|
||||
Requires: {{ py3('stevedore') }}
|
||||
Requires: {{ py3('tenacity') }}
|
||||
Requires: {{ py3('testtools') }}
|
||||
Requires: {{ py3('yaql') }}
|
||||
|
||||
%description -n python3-murano
|
||||
OpenStack Application Catalog.
|
||||
|
||||
This package contains the core Python module of OpenStack murano.
|
||||
|
||||
%package api
|
||||
Summary: OpenStack Application Catalog (murano) - API
|
||||
Group: Development/Languages/Python
|
||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description api
|
||||
OpenStack Application Catalog.
|
||||
|
||||
This package contains the OpenStack murano API.
|
||||
|
||||
%package engine
|
||||
Summary: OpenStack Application Catalog (murano) - API
|
||||
Group: Development/Languages/Python
|
||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description engine
|
||||
OpenStack Application Catalog.
|
||||
|
||||
This package contains the OpenStack murano Engine.
|
||||
|
||||
%if 0%{?with_doc}
|
||||
%package doc
|
||||
Summary: Openstack Application Catalog (murano) - Documentation
|
||||
Group: Documentation/HTML
|
||||
BuildRequires: {{ py3('Sphinx') }}
|
||||
BuildRequires: {{ py3('openstackdocstheme') }}
|
||||
BuildRequires: {{ py3('reno') }}
|
||||
BuildRequires: {{ py3('sphinxcontrib-httpdomain') }}
|
||||
|
||||
%description doc
|
||||
This package contains the documentation for OpenStack Murano.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }}
|
||||
%py_req_cleanup
|
||||
|
||||
%build
|
||||
%{py3_build}
|
||||
|
||||
# documentation
|
||||
%if 0%{?with_doc}
|
||||
PYTHONPATH=. PBR_VERSION={{ upstream_version }} %sphinx_build -b html doc/source doc/build/html
|
||||
PYTHONPATH=. PBR_VERSION={{ upstream_version }} %sphinx_build -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
|
||||
%{py3_install}
|
||||
|
||||
### directories
|
||||
install -d -m 750 %{buildroot}%{_localstatedir}/{lib,log,cache}/murano
|
||||
install -D -m 644 %{SOURCE2} %{buildroot}/%{_tmpfilesdir}/%name.conf
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/murano
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/murano/murano.conf.d/
|
||||
|
||||
# sample config files
|
||||
PYTHONPATH=. oslo-config-generator --config-file etc/oslo-config-generator/murano.conf --output-file %{buildroot}%{_sysconfdir}/murano/murano.conf
|
||||
PYTHONPATH=. oslo-config-generator --config-file etc/oslo-config-generator/murano-cfapi.conf --output-file %{buildroot}%{_sysconfdir}/murano/murano-cfapi.conf
|
||||
|
||||
### configuration files
|
||||
install -p -D -m 640 %{SOURCE4} %{buildroot}%{_sysconfdir}/murano/README.config
|
||||
install -p -D -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/murano/murano.conf.d/010-murano.conf
|
||||
mv %{buildroot}%{_prefix}%{_sysconfdir}/murano/* %{buildroot}%{_sysconfdir}/murano/
|
||||
|
||||
# bash-completion/logrotate/etc.
|
||||
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
|
||||
### systemd service files
|
||||
install -p -D -m 444 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}-api.service
|
||||
install -p -D -m 444 %{SOURCE6} %{buildroot}%{_unitdir}/%{name}-engine.service
|
||||
|
||||
# install symlinks on SUSE systems
|
||||
%if 0%{?suse_version}
|
||||
mkdir -p %{buildroot}%{_sbindir} %{buildroot}%{_unitdir}
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-api
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-engine
|
||||
%endif
|
||||
|
||||
# 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
|
||||
# don't want to depend on hacking for package building
|
||||
rm murano/tests/unit/test_hacking.py
|
||||
%{__python3} -m stestr.cli run
|
||||
|
||||
%pre
|
||||
%openstack_pre_user_group_create murano murano /sbin/nologin
|
||||
|
||||
%post
|
||||
%tmpfiles_create %{_tmpfilesdir}/murano.conf
|
||||
|
||||
%post api
|
||||
%systemd_post %{name}-api.service
|
||||
|
||||
%preun api
|
||||
%systemd_preun %{name}-api.service
|
||||
|
||||
%postun api
|
||||
%systemd_postun_with_restart %{name}-api.service
|
||||
|
||||
%post engine
|
||||
%systemd_post %{name}-engine.service
|
||||
|
||||
%preun engine
|
||||
%systemd_preun %{name}-engine.service
|
||||
|
||||
%postun engine
|
||||
%systemd_postun_with_restart %{name}-engine.service
|
||||
|
||||
%files
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%dir %attr(0750, murano, murano) %{_localstatedir}/lib/murano
|
||||
%dir %attr(0750, murano, murano) %{_localstatedir}/cache/murano
|
||||
%dir %attr(0750, murano, murano) %{_localstatedir}/log/murano
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%dir %{_sysconfdir}/murano
|
||||
%dir %{_sysconfdir}/murano/murano.conf.d/
|
||||
%{_sysconfdir}/murano/README.config
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
%config(noreplace) %attr(0640, root, murano) %{_sysconfdir}/murano/murano.conf
|
||||
%config(noreplace) %attr(0640, root, murano) %{_sysconfdir}/murano/murano.conf.d/010-murano.conf
|
||||
%config(noreplace) %attr(0640, root, murano) %{_sysconfdir}/murano/murano-cfapi.conf
|
||||
%config %{_sysconfdir}/murano/murano-paste.ini
|
||||
%config %{_sysconfdir}/murano/murano-cfapi-paste.ini
|
||||
%{_bindir}/murano-manage
|
||||
%{_bindir}/murano-db-manage
|
||||
%{_bindir}/murano-status
|
||||
%{_bindir}/murano-test-runner
|
||||
%if 0%{?with_doc}
|
||||
%{_mandir}/man1/murano.1.gz
|
||||
%endif
|
||||
|
||||
%files -n python3-murano
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/murano/
|
||||
%{python3_sitelib}/murano-*.egg-info
|
||||
|
||||
%if 0%{?with_doc}
|
||||
%files doc
|
||||
%license LICENSE
|
||||
%doc doc/build/html
|
||||
%endif
|
||||
|
||||
%files api
|
||||
%license LICENSE
|
||||
%{_unitdir}/%{name}-api.service
|
||||
%if 0%{?suse_version}
|
||||
%{_sbindir}/rc%{name}-api
|
||||
%endif
|
||||
%{_bindir}/murano-api
|
||||
%{_bindir}/murano-cfapi
|
||||
%{_bindir}/murano-cfapi-db-manage
|
||||
%{_bindir}/murano-wsgi-api
|
||||
|
||||
%files engine
|
||||
%license LICENSE
|
||||
%{_unitdir}/%{name}-engine.service
|
||||
%if 0%{?suse_version}
|
||||
%{_sbindir}/rc%{name}-engine
|
||||
%endif
|
||||
%{_bindir}/murano-engine
|
||||
|
||||
%changelog
|
17
openstack/murano/openstack-murano-api.service
Normal file
17
openstack/murano/openstack-murano-api.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=OpenStack Murano API
|
||||
After=syslog.target network.target
|
||||
After=mariadb.service postgresql.service rabbitmq-server.service
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
User=murano
|
||||
Group=murano
|
||||
WorkingDirectory=/var/lib/murano
|
||||
PrivateTmp=yes
|
||||
ExecStartPre=-/usr/bin/murano-db-manage upgrade
|
||||
ExecStart=/usr/bin/murano-api
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
16
openstack/murano/openstack-murano-engine.service
Normal file
16
openstack/murano/openstack-murano-engine.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=OpenStack Murano Engine
|
||||
After=syslog.target network.target
|
||||
After=mariadb.service postgresql.service rabbitmq-server.service
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
User=murano
|
||||
Group=murano
|
||||
WorkingDirectory=/var/lib/murano
|
||||
PrivateTmp=yes
|
||||
ExecStart=/usr/bin/murano-engine
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
30
openstack/murano/openstack-murano.README.config
Normal file
30
openstack/murano/openstack-murano.README.config
Normal file
@ -0,0 +1,30 @@
|
||||
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 .
|
6
openstack/murano/openstack-murano.defaultconf
Normal file
6
openstack/murano/openstack-murano.defaultconf
Normal file
@ -0,0 +1,6 @@
|
||||
[DEFAULT]
|
||||
log_dir=/var/log/murano
|
||||
state_path=/var/lib/murano
|
||||
|
||||
[oslo_concurrency]
|
||||
lock_path=/run/murano
|
11
openstack/murano/openstack-murano.logrotate
Normal file
11
openstack/murano/openstack-murano.logrotate
Normal file
@ -0,0 +1,11 @@
|
||||
/var/log/murano/*.log {
|
||||
compress
|
||||
rotate 15
|
||||
size 1M
|
||||
dateext
|
||||
missingok
|
||||
notifempty
|
||||
su murano murano
|
||||
copytruncate
|
||||
sharedscripts
|
||||
}
|
1
openstack/murano/openstack-murano.tmpfiles
Normal file
1
openstack/murano/openstack-murano.tmpfiles
Normal file
@ -0,0 +1 @@
|
||||
d /run/murano 0700 murano murano -
|
Loading…
Reference in New Issue
Block a user