diff --git a/heat-dist.conf b/heat-dist.conf deleted file mode 100644 index 04603a9..0000000 --- a/heat-dist.conf +++ /dev/null @@ -1,31 +0,0 @@ -[DEFAULT] -sql_connection = mysql://heat:heat@localhost/heat -log_dir = /var/log/heat -use_stderr = False - -[keystone_authtoken] -auth_host = 127.0.0.1 -auth_port = 35357 -auth_protocol = http - -[ssl] - -[database] -backend = heat.db.sqlalchemy.api - -[paste_deploy] -api_paste_config = /usr/share/heat/api-paste-dist.ini - -[rpc_notifier2] - -[ec2authtoken] - -[heat_api] - -[heat_api_cfn] - -[auth_password] - -[matchmaker_ring] - -[matchmaker_redis] diff --git a/openstack-heat.spec b/openstack-heat.spec index c82633f..ba82452 100644 --- a/openstack-heat.spec +++ b/openstack-heat.spec @@ -9,7 +9,7 @@ declarative template format through an OpenStack-native REST API. Name: openstack-%{service} Summary: OpenStack Orchestration (%{service}) Version: 13.1.0 -Release: 2 +Release: 3 License: ASL 2.0 URL: http://www.openstack.org Source0: https://tarballs.openstack.org/%{service}/%{name}-%{version}.tar.gz @@ -20,8 +20,6 @@ Source3: openstack-%{service}-api-cfn.service Source4: openstack-%{service}-engine.service Source6: openstack-%{service}-all.service -Source20: %{service}-dist.conf - BuildArch: noarch BuildRequires: git BuildRequires: openstack-macros @@ -92,8 +90,7 @@ BuildRequires: python3-gabbi BuildRequires: python3-testscenarios BuildRequires: python3-tempest BuildRequires: python3-gabbi -# NOTE(ykarel) zunclient are not packaged yet. -#BuildRequires: python3-zunclient +BuildRequires: python3-zunclient %endif Requires: %{name}-common = %{version}-%{release} @@ -101,6 +98,143 @@ Requires: %{name}-engine = %{version}-%{release} Requires: %{name}-api = %{version}-%{release} Requires: %{name}-api-cfn = %{version}-%{release} +%description +%{common_desc} + +%package common +Summary: Heat common +Group: System Environment/Base +Requires: python3-heat = %{version}-%{release} + +%description common +%{common_desc} +This package contains scripts, config and dependencies shared between all the ${name} services + +%package api +Summary: The Heat API + +Requires: %{name}-common = %{version}-%{release} + +%{?systemd_ordering} + +%description api +%{common_desc} + +The %{service}-api component provides an OpenStack-native REST API that processes API +requests by sending them to the %{service}-engine over RPC. + +%package api-cfn +Summary: Heat CloudFormation API + +Requires: %{name}-common = %{version}-%{release} + +%{?systemd_ordering} + +%description api-cfn +%{common_desc} + +The %{service}-api-cfn component provides an AWS Query API that is compatible with +AWS CloudFormation and processes API requests by sending them to the +%{service}-engine over RPC. + +%package engine +Summary: The Heat engine +Requires: %{name}-common = %{version}-%{release} +%{?systemd_ordering} + +%description engine +%{common_desc} + +The %{service}-engine's main responsibility is to orchestrate the launching of +templates and provide events back to the API consumer. + +%package monolith +Summary: The combined Heat engine/API + +Requires: %{name}-common = %{version}-%{release} + +%{?systemd_ordering} + +%description monolith +%{common_desc} + +The %{service}-all process bundles together any (or all) of %{service}-engine, +%{service}-api, and %{service}-cfn-api into a single process. This can be used +to bootstrap a minimal TripleO deployment, but is not the recommended way of +running the Heat service in general. + +%package -n python3-%{service} +Summary: OpenStack Heat Python libraries + +Requires: python3-pbr +Requires: python3-croniter +Requires: python3-eventlet +Requires: python3-stevedore +Requires: python3-netaddr +Requires: python3-neutron-lib +Requires: python3-osprofiler +Requires: python3-requests +Requires: python3-routes +Requires: python3-sqlalchemy +Requires: python3-six +Requires: python3-paramiko +Requires: python3-babel +# FIXME: system version is stuck to 1.7.2 for cryptography +Requires: python3-cryptography +Requires: python3-yaql +Requires: python3-oslo-cache +Requires: python3-oslo-concurrency +Requires: python3-oslo-config +Requires: python3-oslo-context +Requires: python3-oslo-upgradecheck +Requires: python3-oslo-utils +Requires: python3-oslo-db +Requires: python3-oslo-i18n +Requires: python3-oslo-middleware +Requires: python3-oslo-messaging +Requires: python3-oslo-policy +Requires: python3-oslo-reports +Requires: python3-oslo-serialization +Requires: python3-oslo-service +Requires: python3-oslo-log +Requires: python3-oslo-versionedobjects +Requires: python3-cinderclient +Requires: python3-glanceclient +Requires: python3-heatclient +Requires: python3-keystoneclient +Requires: python3-keystonemiddleware +Requires: python3-neutronclient +Requires: python3-novaclient +Requires: python3-saharaclient +Requires: python3-swiftclient +Requires: python3-troveclient +Requires: python3-keystoneauth1 +Requires: python3-barbicanclient +Requires: python3-designateclient +Requires: python3-manilaclient +Requires: python3-mistralclient +Requires: python3-openstackclient +Requires: python3-zaqarclient +Requires: python3-aodhclient +Requires: python3-magnumclient +Requires: python3-octaviaclient +Requires: python3-monascaclient +Requires: python3-blazarclient +Requires: python3-zunclient +Requires: python3-openstacksdk +Requires: python3-tenacity +Requires: python3-PyYAML +Requires: python3-lxml +Requires: python3-sqlalchemy-migrate +Requires: python3-paste-deploy +Requires: python3-webob +Requires: python3-pytz +Requires(pre): shadow-utils + +%description -n python3-%{service} +%{common_desc} +This package contains the %{service} Python library. + %package -n python3-%{service}-tests %{?python_provide:%python_provide python3-%{service}-tests} Summary: Heat tests @@ -127,7 +261,6 @@ Requires: python3-six Requires: python3-gabbi Requires: python3-PyYAML - %description -n python3-%{service}-tests %{common_desc} This package contains the Heat test files. @@ -148,10 +281,6 @@ find contrib -name tests -type d | xargs rm -r # Generate i18n files %{__python3} setup.py compile_catalog -d build/lib/%{service}/locale -# Generate sample config and add the current directory to PYTHONPATH so -# oslo-config-generator doesn't skip heat's entry points. -PYTHONPATH=. oslo-config-generator --config-file=config-generator.conf - %install %{py3_install} sed -i -e '/^#!/,1 d' %{buildroot}/%{python3_sitelib}/%{service}/db/sqlalchemy/migrate_repo/manage.py @@ -160,6 +289,13 @@ mkdir -p %{buildroot}/%{_localstatedir}/log/%{service}/ mkdir -p %{buildroot}/%{_localstatedir}/run/%{service}/ install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-%{service} +install -d -m 755 %{buildroot}%{_sysconfdir}/heat +# Generate sample config +mv %{buildroot}/%{_prefix}/%{_sysconfdir}/heat/* %{buildroot}%{_sysconfdir}/heat/ +PYTHONPATH=. oslo-config-generator --config-file=config-generator.conf --output %{buildroot}%{_sysconfdir}/heat/heat.conf +PYTHONPATH=. oslopolicy-sample-generator --config-file=etc/heat/heat-policy-generator.conf --output %{buildroot}%{_sysconfdir}/heat/policy.json +rm etc/heat/heat-policy-generator.conf + # install systemd unit files install -p -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/openstack-%{service}-api.service install -p -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/openstack-%{service}-api-cfn.service @@ -181,16 +317,8 @@ rm -f %{buildroot}/%{_mandir}/man1/%{service}-db-setup.* rm -rf %{buildroot}/var/lib/%{service}/.dummy rm -f %{buildroot}/usr/bin/cinder-keystone-setup -install -p -D -m 640 etc/%{service}/%{service}.conf.sample %{buildroot}/%{_sysconfdir}/%{service}/%{service}.conf -install -p -D -m 640 %{SOURCE20} %{buildroot}%{_datadir}/%{service}/%{service}-dist.conf -echo '[revision]' >> %{buildroot}%{_datadir}/%{service}/%{service}-dist.conf -echo '%{service}_revision=%{version}' >> %{buildroot}%{_datadir}/%{service}/%{service}-dist.conf -mv %{buildroot}%{_prefix}/etc/%{service}/api-paste.ini %{buildroot}/%{_datadir}/%{service}/api-paste-dist.ini -mv %{buildroot}%{_prefix}/etc/%{service}/environment.d %{buildroot}/%{_sysconfdir}/%{service} -mv %{buildroot}%{_prefix}/etc/%{service}/templates %{buildroot}/%{_sysconfdir}/%{service} -# Remove duplicate config files under /usr/etc/heat -rmdir %{buildroot}%{_prefix}/etc/%{service} - +#install -p -D -m 640 etc/%{service}/%{service}.conf.sample %{buildroot}/%{_sysconfdir}/%{service}/%{service}.conf +#mv %{buildroot}/%{_prefix}/%{_sysconfdir}/heat/* %{buildroot}%{_sysconfdir}/heat # Install i18n .mo files (.po and .pot are not required) install -d -m 755 %{buildroot}%{_datadir} rm -f %{buildroot}%{python3_sitelib}/%{service}/locale/*/LC_*/%{service}*po @@ -200,92 +328,47 @@ mv %{buildroot}%{python3_sitelib}/%{service}/locale %{buildroot}%{_datadir}/loca # Find language files %find_lang %{service} --all-name -%description -%{common_desc} +%pre common +%openstack_pre_user_group_create %{service} %{service} /sbin/nologin +exit 0 -%package common -Summary: Heat common -Group: System Environment/Base +%post api +%systemd_post openstack-%{service}-api.service -Requires: python3-pbr -Requires: python3-croniter -Requires: python3-eventlet -Requires: python3-stevedore -Requires: python3-netaddr -Requires: python3-neutron-lib -Requires: python3-osprofiler -Requires: python3-requests -Requires: python3-routes -Requires: python3-sqlalchemy -Requires: python3-six -Requires: python3-paramiko -Requires: python3-babel -# FIXME: system version is stuck to 1.7.2 for cryptography -Requires: python3-cryptography -Requires: python3-yaql +%post api-cfn +%systemd_post openstack-%{service}-api-cfn.service -Requires: python3-oslo-cache -Requires: python3-oslo-concurrency -Requires: python3-oslo-config -Requires: python3-oslo-context -Requires: python3-oslo-upgradecheck -Requires: python3-oslo-utils -Requires: python3-oslo-db -Requires: python3-oslo-i18n -Requires: python3-oslo-middleware -Requires: python3-oslo-messaging -Requires: python3-oslo-policy -Requires: python3-oslo-reports -Requires: python3-oslo-serialization -Requires: python3-oslo-service -Requires: python3-oslo-log -Requires: python3-oslo-versionedobjects +%post engine +%systemd_post openstack-%{service}-engine.service -Requires: python3-cinderclient -Requires: python3-glanceclient -Requires: python3-heatclient -Requires: python3-keystoneclient -Requires: python3-keystonemiddleware -Requires: python3-neutronclient -Requires: python3-novaclient -Requires: python3-saharaclient -Requires: python3-swiftclient -Requires: python3-troveclient +%post monolith +%systemd_post openstack-%{service}-all.service -Requires: python3-keystoneauth1 -Requires: python3-barbicanclient -Requires: python3-designateclient -Requires: python3-manilaclient -Requires: python3-mistralclient -Requires: python3-openstackclient -Requires: python3-zaqarclient -Requires: python3-aodhclient -Requires: python3-magnumclient -Requires: python3-octaviaclient -Requires: python3-monascaclient -Requires: python3-openstacksdk -Requires: python3-tenacity +%preun api +%systemd_preun openstack-%{service}-api.service -%if 3 == 2 -Requires: PyYAML -Requires: python-lxml -Requires: python3-sqlalchemy-migrate -Requires: python-paste-deploy -Requires: python-webob -Requires: pytz -%else -Requires: python3-PyYAML -Requires: python3-lxml -Requires: python3-sqlalchemy-migrate -Requires: python3-paste-deploy -Requires: python3-webob -Requires: python3-pytz -%endif +%preun api-cfn +%systemd_preun openstack-%{service}-api-cfn.service -Requires(pre): shadow-utils +%preun engine +%systemd_preun openstack-%{service}-engine.service -%description common -Components common to all OpenStack Heat services +%preun monolith +%systemd_preun openstack-%{service}-all.service + +%postun engine +%systemd_postun_with_restart openstack-%{service}-engine.service + +%postun api +%systemd_postun_with_restart openstack-%{service}-api.service + +%postun api-cfn +%systemd_postun_with_restart openstack-%{service}-api-cfn.service + +%postun monolith +%systemd_postun_with_restart openstack-%{service}-all.service + +%files %files common -f %{service}.lang %doc LICENSE @@ -296,16 +379,16 @@ Components common to all OpenStack Heat services %{python3_sitelib}/%{service} %{python3_sitelib}/openstack_%{service}-%{version}-*.egg-info %exclude %{python3_sitelib}/%{service}/tests -%attr(-, root, %{service}) %{_datadir}/%{service}/%{service}-dist.conf -%attr(-, root, %{service}) %{_datadir}/%{service}/api-paste-dist.ini %dir %attr(0755,%{service},root) %{_localstatedir}/log/%{service} %dir %attr(0755,%{service},root) %{_localstatedir}/run/%{service} %dir %attr(0755,%{service},root) %{_sharedstatedir}/%{service} %dir %attr(0755,%{service},root) %{_sysconfdir}/%{service} %config(noreplace) %{_sysconfdir}/logrotate.d/openstack-%{service} -%config(noreplace) %attr(-, root, %{service}) %{_sysconfdir}/%{service}/%{service}.conf -%config(noreplace) %attr(-,root,%{service}) %{_sysconfdir}/%{service}/environment.d/* -%config(noreplace) %attr(-,root,%{service}) %{_sysconfdir}/%{service}/templates/* +%config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/%{service}.conf +%config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/environment.d/* +%config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/templates/* +%config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/api-paste.ini +%config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/policy.json %if 0%{?with_doc} %{_mandir}/man1/%{service}-keystone-setup.1.gz %{_mandir}/man1/%{service}-keystone-setup-domain.1.gz @@ -313,66 +396,6 @@ Components common to all OpenStack Heat services %{_mandir}/man1/%{service}-status.1.gz %endif -%files -n python3-%{service}-tests -%license LICENSE -%{python3_sitelib}/%{service}/tests -%{python3_sitelib}/%{service}_integrationtests - -%pre common -# 187:187 for heat - rhbz#845078 -getent group %{service} >/dev/null || groupadd -r --gid 187 %{service} -getent passwd %{service} >/dev/null || \ -useradd --uid 187 -r -g %{service} -d %{_sharedstatedir}/%{service} -s /sbin/nologin \ --c "OpenStack Heat Daemons" %{service} -exit 0 - -%package engine -Summary: The Heat engine - -Requires: %{name}-common = %{version}-%{release} - -%{?systemd_ordering} - -%description engine -%{common_desc} - -The %{service}-engine's main responsibility is to orchestrate the launching of -templates and provide events back to the API consumer. - -%files engine -%doc README.rst LICENSE -%if 0%{?with_doc} -%doc doc/build/html/man/%{service}-engine.html -%endif -%{_bindir}/%{service}-engine -%{_unitdir}/openstack-%{service}-engine.service -%if 0%{?with_doc} -%{_mandir}/man1/%{service}-engine.1.gz -%endif - -%post engine -%systemd_post openstack-%{service}-engine.service - -%preun engine -%systemd_preun openstack-%{service}-engine.service - -%postun engine -%systemd_postun_with_restart openstack-%{service}-engine.service - - -%package api -Summary: The Heat API - -Requires: %{name}-common = %{version}-%{release} - -%{?systemd_ordering} - -%description api -%{common_desc} - -The %{service}-api component provides an OpenStack-native REST API that processes API -requests by sending them to the %{service}-engine over RPC. - %files api %doc README.rst LICENSE %if 0%{?with_doc} @@ -385,30 +408,6 @@ requests by sending them to the %{service}-engine over RPC. %{_mandir}/man1/%{service}-api.1.gz %endif -%post api -%systemd_post openstack-%{service}-api.service - -%preun api -%systemd_preun openstack-%{service}-api.service - -%postun api -%systemd_postun_with_restart openstack-%{service}-api.service - - -%package api-cfn -Summary: Heat CloudFormation API - -Requires: %{name}-common = %{version}-%{release} - -%{?systemd_ordering} - -%description api-cfn -%{common_desc} - -The %{service}-api-cfn component provides an AWS Query API that is compatible with -AWS CloudFormation and processes API requests by sending them to the -%{service}-engine over RPC. - %files api-cfn %doc README.rst LICENSE %if 0%{?with_doc} @@ -421,47 +420,43 @@ AWS CloudFormation and processes API requests by sending them to the %{_mandir}/man1/%{service}-api-cfn.1.gz %endif -%post api-cfn -%systemd_post openstack-%{service}-api-cfn.service - -%preun api-cfn -%systemd_preun openstack-%{service}-api-cfn.service - -%postun api-cfn -%systemd_postun_with_restart openstack-%{service}-api-cfn.service - - -%package monolith -Summary: The combined Heat engine/API - -Requires: %{name}-common = %{version}-%{release} - -%{?systemd_ordering} - -%description monolith -%{common_desc} - -The %{service}-all process bundles together any (or all) of %{service}-engine, -%{service}-api, and %{service}-cfn-api into a single process. This can be used -to bootstrap a minimal TripleO deployment, but is not the recommended way of -running the Heat service in general. +%files engine +%doc README.rst LICENSE +%if 0%{?with_doc} +%doc doc/build/html/man/%{service}-engine.html +%endif +%{_bindir}/%{service}-engine +%{_unitdir}/openstack-%{service}-engine.service +%if 0%{?with_doc} +%{_mandir}/man1/%{service}-engine.1.gz +%endif %files monolith %doc README.rst LICENSE %{_bindir}/%{service}-all %{_unitdir}/openstack-%{service}-all.service -%post monolith -%systemd_post openstack-%{service}-all.service +%files -n python3-%{service} +%license LICENSE +%{python3_sitelib}/%{service}/ +%{python3_sitelib}/openstack_heat-*.egg-info +%exclude %{python3_sitelib}/%{service}/tests -%preun monolith -%systemd_preun openstack-%{service}-all.service - -%postun monolith -%systemd_postun_with_restart openstack-%{service}-all.service +%if 0%{?with_doc} +%files doc +%license LICENSE +%doc doc/build/html +%endif +%files -n python3-%{service}-tests +%license LICENSE +%{python3_sitelib}/%{service}/tests +%{python3_sitelib}/%{service}_integrationtests %changelog +* Tue Nov 30 2021 huangtiahua - 13.1.0-3 +- Reorganize to satisfy OpenStack SIG architecture rule + * Fri Nov 12 2021 wangxiyuan - 13.1.0-2 - Fix build issue