From 7a2591027fef52190ef16383a2ababb65b9732a7 Mon Sep 17 00:00:00 2001 From: dtrishkin Date: Mon, 2 Nov 2015 19:26:52 +0300 Subject: [PATCH] Move heat to 8.0 branch Change-Id: I91f264caec01a6fb1a9a6daf1e44975f04c48509 --- centos7/rpm/SOURCES/heat-dist.conf | 40 + {rpm => centos7/rpm}/SOURCES/heat.logrotate | 5 +- .../SOURCES/openstack-heat-api-cfn.service | 11 + .../openstack-heat-api-cloudwatch.service | 11 + .../rpm/SOURCES/openstack-heat-api.service | 11 + .../rpm/SOURCES/openstack-heat-engine.service | 11 + centos7/rpm/SOURCES/sources | 0 .../rpm}/SPECS/openstack-heat.spec | 385 +++-- rpm/SOURCES/heat.conf.sample | 1319 ----------------- rpm/SOURCES/openstack-heat-api-cfn.init | 105 -- .../openstack-heat-api-cloudwatch.init | 103 -- rpm/SOURCES/openstack-heat-api.init | 105 -- rpm/SOURCES/openstack-heat-engine.init | 103 -- tests/runtests.sh | 252 +++- 14 files changed, 471 insertions(+), 1990 deletions(-) create mode 100644 centos7/rpm/SOURCES/heat-dist.conf rename {rpm => centos7/rpm}/SOURCES/heat.logrotate (55%) create mode 100644 centos7/rpm/SOURCES/openstack-heat-api-cfn.service create mode 100644 centos7/rpm/SOURCES/openstack-heat-api-cloudwatch.service create mode 100644 centos7/rpm/SOURCES/openstack-heat-api.service create mode 100644 centos7/rpm/SOURCES/openstack-heat-engine.service create mode 100644 centos7/rpm/SOURCES/sources rename {rpm => centos7/rpm}/SPECS/openstack-heat.spec (64%) delete mode 100644 rpm/SOURCES/heat.conf.sample delete mode 100644 rpm/SOURCES/openstack-heat-api-cfn.init delete mode 100644 rpm/SOURCES/openstack-heat-api-cloudwatch.init delete mode 100644 rpm/SOURCES/openstack-heat-api.init delete mode 100644 rpm/SOURCES/openstack-heat-engine.init diff --git a/centos7/rpm/SOURCES/heat-dist.conf b/centos7/rpm/SOURCES/heat-dist.conf new file mode 100644 index 00000000..634c5082 --- /dev/null +++ b/centos7/rpm/SOURCES/heat-dist.conf @@ -0,0 +1,40 @@ +[DEFAULT] +sql_connection = mysql://heat:heat@localhost/heat +heat_metadata_server_url = http://127.0.0.1:8000 +heat_waitcondition_server_url = http://127.0.0.1:8000/v1/waitcondition +heat_watch_server_url = http://127.0.0.1:8003 +db_backend = heat.db.sqlalchemy.api +log_dir = /var/log/heat +rpc_backend = heat.openstack.common.rpc.impl_qpid +use_stderr = False +qpid_topology_version = 2 + +[keystone_authtoken] +auth_host = 127.0.0.1 +auth_port = 35357 +auth_protocol = http +auth_uri = http://127.0.0.1:5000/v2.0 +signing_dir = /tmp/keystone-signing-heat + +[ssl] + +[database] + +[paste_deploy] +api_paste_config = /usr/share/heat/api-paste-dist.ini + +[rpc_notifier2] + +[ec2authtoken] + +[heat_api_cloudwatch] + +[heat_api] + +[heat_api_cfn] + +[auth_password] + +[matchmaker_ring] + +[matchmaker_redis] diff --git a/rpm/SOURCES/heat.logrotate b/centos7/rpm/SOURCES/heat.logrotate similarity index 55% rename from rpm/SOURCES/heat.logrotate rename to centos7/rpm/SOURCES/heat.logrotate index 9ba4cf69..22e6d5e7 100644 --- a/rpm/SOURCES/heat.logrotate +++ b/centos7/rpm/SOURCES/heat.logrotate @@ -1,7 +1,6 @@ /var/log/heat/*.log { - weekly - rotate 4 + rotate 14 + size 10M missingok compress - minsize 100k } diff --git a/centos7/rpm/SOURCES/openstack-heat-api-cfn.service b/centos7/rpm/SOURCES/openstack-heat-api-cfn.service new file mode 100644 index 00000000..fa2b19b8 --- /dev/null +++ b/centos7/rpm/SOURCES/openstack-heat-api-cfn.service @@ -0,0 +1,11 @@ +[Unit] +Description=Openstack Heat CFN-compatible API Service +After=syslog.target network.target + +[Service] +Type=simple +User=heat +ExecStart=/usr/bin/heat-api-cfn + +[Install] +WantedBy=multi-user.target diff --git a/centos7/rpm/SOURCES/openstack-heat-api-cloudwatch.service b/centos7/rpm/SOURCES/openstack-heat-api-cloudwatch.service new file mode 100644 index 00000000..ba831dc8 --- /dev/null +++ b/centos7/rpm/SOURCES/openstack-heat-api-cloudwatch.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Heat CloudWatch API Service +After=syslog.target network.target + +[Service] +Type=simple +User=heat +ExecStart=/usr/bin/heat-api-cloudwatch + +[Install] +WantedBy=multi-user.target diff --git a/centos7/rpm/SOURCES/openstack-heat-api.service b/centos7/rpm/SOURCES/openstack-heat-api.service new file mode 100644 index 00000000..3769a462 --- /dev/null +++ b/centos7/rpm/SOURCES/openstack-heat-api.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Heat API Service +After=syslog.target network.target + +[Service] +Type=simple +User=heat +ExecStart=/usr/bin/heat-api + +[Install] +WantedBy=multi-user.target diff --git a/centos7/rpm/SOURCES/openstack-heat-engine.service b/centos7/rpm/SOURCES/openstack-heat-engine.service new file mode 100644 index 00000000..31a78c6b --- /dev/null +++ b/centos7/rpm/SOURCES/openstack-heat-engine.service @@ -0,0 +1,11 @@ +[Unit] +Description=Openstack Heat Engine Service +After=syslog.target network.target qpidd.service mysqld.service openstack-keystone.service tgtd.service openstack-glance-api.service openstack-glance-registry.service openstack-nova-api.service openstack-nova-objectstore.service openstack-nova.compute.service openstack-nova-network.service openstack-nova-volume.service openstack-nova-scheduler.service openstack-nova-cert.service openstack-cinder-volume.service + +[Service] +Type=simple +User=heat +ExecStart=/usr/bin/heat-engine + +[Install] +WantedBy=multi-user.target diff --git a/centos7/rpm/SOURCES/sources b/centos7/rpm/SOURCES/sources new file mode 100644 index 00000000..e69de29b diff --git a/rpm/SPECS/openstack-heat.spec b/centos7/rpm/SPECS/openstack-heat.spec similarity index 64% rename from rpm/SPECS/openstack-heat.spec rename to centos7/rpm/SPECS/openstack-heat.spec index bebf4d05..1da70fa7 100644 --- a/rpm/SPECS/openstack-heat.spec +++ b/centos7/rpm/SPECS/openstack-heat.spec @@ -1,39 +1,42 @@ -%global release_name juno-3 -%global release_letter rc -%global milestone 3 -%global full_release heat-%{version} - %global with_doc %{!?_without_doc:1}%{?_without_doc:0} Name: openstack-heat Summary: OpenStack Orchestration (heat) -Version: 2014.2.1 -Release: 2.1%{?dist} +# Liberty semver reset +# https://review.openstack.org/#/q/I6a35fa0dda798fad93b804d00a46af80f08d475c,n,z +Epoch: 1 +Version: 5.0.0.0rc1 +Release: 1%{?dist}~mos8.0.2 License: ASL 2.0 -Group: System Environment/Base URL: http://www.openstack.org -Source0: https://launchpad.net/heat/%{release_name}/%{version}/+download/heat-%{version}.tar.gz +Source0: http://tarballs.openstack.org/heat/heat-master.tar.gz Obsoletes: heat < 7-9 Provides: heat -Source1: heat.conf.sample -Source2: heat.logrotate -Source3: openstack-heat-api.init -Source4: openstack-heat-api-cfn.init -Source5: openstack-heat-engine.init -Source6: openstack-heat-api-cloudwatch.init +Source1: heat.logrotate +Source2: openstack-heat-api.service +Source3: openstack-heat-api-cfn.service +Source4: openstack-heat-engine.service +Source5: openstack-heat-api-cloudwatch.service -# -# patches_base=2014.2.b1 -# +Source20: heat-dist.conf BuildArch: noarch BuildRequires: git BuildRequires: python2-devel +BuildRequires: python-stevedore +BuildRequires: python-oslo-cache +BuildRequires: python-oslo-context +BuildRequires: python-oslo-middleware +BuildRequires: python-oslo-policy +BuildRequires: python-oslo-messaging BuildRequires: python-setuptools -BuildRequires: python-babel >= 1.3 -BuildRequires: python-stevedore >= 1.0.0 BuildRequires: python-oslo-sphinx +BuildRequires: python-oslo-i18n +BuildRequires: python-oslo-db +BuildRequires: python-oslo-utils +BuildRequires: python-oslo-log +BuildRequires: python-oslo-versionedobjects BuildRequires: python-argparse BuildRequires: python-eventlet BuildRequires: python-greenlet @@ -44,34 +47,32 @@ BuildRequires: python-lxml BuildRequires: python-netaddr BuildRequires: python-memcached BuildRequires: python-migrate +BuildRequires: python-osprofiler BuildRequires: python-qpid BuildRequires: python-six BuildRequires: PyYAML +BuildRequires: python-sphinx BuildRequires: m2crypto BuildRequires: python-paramiko -BuildRequires: python-sphinx >= 1.2.1, python-sphinx < 1.3 # These are required to build due to the requirements check added -BuildRequires: python-paste-deploy >= 1.5.0 -BuildRequires: python-routes >= 1.12.3, python-routes < 2.0 -BuildRequires: python-sqlalchemy >= 0.8.4, python-sqlalchemy <= 0.9.99 -BuildRequires: python-webob >= 1.2.3 -BuildRequires: python-osprofiler -BuildRequires: python-oslo-middleware +BuildRequires: python-paste-deploy +BuildRequires: python-routes +BuildRequires: python-sqlalchemy +BuildRequires: python-webob BuildRequires: python-pbr BuildRequires: python-d2to1 -BuildRequires: python-oslo-context >= 0.1.0 +BuildRequires: python-cryptography +# These are required to build the config file +BuildRequires: python-oslo-config + +BuildRequires: systemd-units %if 0%{?with_doc} -BuildRequires: python-oslo-i18n >= 1.0.0 -BuildRequires: python-oslo-config >= 1.4.0 -BuildRequires: python-oslo-messaging >= 1.4.0 -BuildRequires: python-oslo-db >= 1.0.0 -BuildRequires: python-saharaclient BuildRequires: python-cinderclient BuildRequires: python-keystoneclient BuildRequires: python-novaclient -BuildRequires: python-neutronclient BuildRequires: python-saharaclient +BuildRequires: python-neutronclient BuildRequires: python-swiftclient BuildRequires: python-heatclient BuildRequires: python-ceilometerclient @@ -79,17 +80,14 @@ BuildRequires: python-glanceclient BuildRequires: python-troveclient %endif -Requires: %{name}-common = %{version}-%{release} -Requires: %{name}-engine = %{version}-%{release} -Requires: %{name}-api = %{version}-%{release} -Requires: %{name}-api-cfn = %{version}-%{release} -Requires: %{name}-api-cloudwatch = %{version}-%{release} +Requires: %{name}-common = %{epoch}:%{version}-%{release} +Requires: %{name}-engine = %{epoch}:%{version}-%{release} +Requires: %{name}-api = %{epoch}:%{version}-%{release} +Requires: %{name}-api-cfn = %{epoch}:%{version}-%{release} +Requires: %{name}-api-cloudwatch = %{epoch}:%{version}-%{release} %prep -%setup -q -n %{full_release} - -sed -i s/REDHATHEATVERSION/%{version}/ heat/version.py -sed -i s/REDHATHEATRELEASE/%{release}/ heat/version.py +%setup -q -n heat-%{version} # Remove the requirements file so that pbr hooks don't add it # to distutils requires_dist config @@ -98,40 +96,30 @@ rm -rf {test-,}requirements.txt tools/{pip,test}-requires # Remove tests in contrib find contrib -name tests -type d | xargs rm -r -# Programmatically update defaults in sample config -# which is installed at /etc/heat/heat.conf - -install -p -D -m 640 %{SOURCE1} etc/heat/heat.conf.sample - -# First we ensure all values are commented in appropriate format. -# Since icehouse, there was an uncommented keystone_authtoken section -# at the end of the file which mimics but also conflicted with our -# distro editing that had been done for many releases. -sed -i '/^[^#[]/{s/^/#/; s/ //g}; /^#[^ ]/s/ = /=/' etc/heat/heat.conf.sample - -# TODO: Make this more robust -# Note it only edits the first occurance, so assumes a section ordering in sample -# and also doesn't support multi-valued variables. -while read name eq value; do - test "$name" && test "$value" || continue - sed -i "0,/^# *$name=/{s!^# *$name=.*!#$name=$value!}" etc/heat/heat.conf.sample -done < %{SOURCE20} - %build %{__python} setup.py build +# 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 %{__python} setup.py install -O1 --skip-build --root=%{buildroot} sed -i -e '/^#!/,1 d' %{buildroot}/%{python_sitelib}/heat/db/sqlalchemy/migrate_repo/manage.py mkdir -p %{buildroot}/var/log/heat/ mkdir -p %{buildroot}/var/run/heat/ -install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-heat +install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-heat -# install init scripts -install -p -D -m 755 %{SOURCE3} %{buildroot}%{_initrddir}/openstack-heat-api -install -p -D -m 755 %{SOURCE4} %{buildroot}%{_initrddir}/openstack-heat-api-cfn -install -p -D -m 755 %{SOURCE5} %{buildroot}%{_initrddir}/openstack-heat-engine -install -p -D -m 755 %{SOURCE6} %{buildroot}%{_initrddir}/openstack-heat-api-cloudwatch +# install systemd unit files +install -p -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/openstack-heat-api.service +install -p -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/openstack-heat-api-cfn.service +install -p -D -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/openstack-heat-engine.service +install -p -D -m 644 %{SOURCE5} %{buildroot}%{_unitdir}/openstack-heat-api-cloudwatch.service + +#docker resource +mkdir -p %{buildroot}/usr/lib/heat/docker +cp -vr contrib/heat_docker/heat_docker/* %{buildroot}/usr/lib/heat/docker/ +find %{buildroot}/usr/lib/heat/docker/ -type f -name "*.py[co]" -delete mkdir -p %{buildroot}/var/lib/heat/ mkdir -p %{buildroot}/etc/heat/ @@ -153,8 +141,10 @@ rm -rf %{buildroot}/var/lib/heat/.dummy rm -f %{buildroot}/usr/bin/cinder-keystone-setup rm -rf %{buildroot}/%{python_sitelib}/heat/tests -install -p -D -m 640 %{_builddir}/%{full_release}/etc/heat/heat.conf.sample %{buildroot}/%{_sysconfdir}/heat/heat.conf -install -p -D -m 640 %{_builddir}/%{full_release}/etc/heat/api-paste.ini %{buildroot}/%{_sysconfdir}/heat/api-paste.ini +install -p -D -m 640 etc/heat/heat.conf.sample %{buildroot}/%{_sysconfdir}/heat/heat.conf +install -p -D -m 640 etc/heat/api-paste.ini %{buildroot}/%{_sysconfdir}/heat/api-paste.ini +install -p -D -m 640 %{SOURCE20} %{buildroot}%{_datadir}/heat/heat-dist.conf +install -p -D -m 640 etc/heat/api-paste.ini %{buildroot}/%{_datadir}/heat/api-paste-dist.ini install -p -D -m 640 etc/heat/policy.json %{buildroot}/%{_sysconfdir}/heat # TODO: move this to setup.cfg @@ -168,55 +158,71 @@ Heat provides AWS CloudFormation and CloudWatch functionality for OpenStack. %package common Summary: Heat common Group: System Environment/Base + +Requires: python-pbr >= 1.6 Requires: python-argparse -Requires: python-babel >= 1.3 -Requires: python-eventlet >= 0.15.2 +Requires: python-eventlet >= 0.17.4 +Requires: python-stevedore >= 1.5.0 Requires: python-greenlet >= 0.3.2 Requires: python-httplib2 >= 0.7.5 Requires: python-iso8601 >= 0.1.9 -Requires: python-keystonemiddleware >= 1.0.0 -Requires: python-kombu >= 2.5.0 +Requires: python-kombu >= 3.0.7 Requires: python-lxml >= 2.3 Requires: python-netaddr >= 0.7.12 -Requires: python-oslo-config >= 1.4.0 -Requires: python-oslo-messaging >= 1.4.0 -Requires: python-oslo-db >= 1.1.0 -Requires: python-oslo-i18n >= 1.0.0 -Requires: python-oslo-middleware >= 0.1.0 -Requires: python-oslo-serialization >= 1.0.0 -Requires: python-oslo-utils >= 1.0.0 Requires: python-osprofiler >= 0.3.0 Requires: python-paste-deploy >= 1.5.0 -Requires: python-pbr >= 0.6, python-pbr < 0.7, python-pbr > 0.7, python-pbr < 1.0 Requires: python-posix_ipc -Requires: python-crypto >= 2.6 -Requires: python-ceilometerclient >= 1.0.6 -Requires: python-cinderclient >= 1.1.0 -Requires: python-glanceclient >= 0.14.0 -Requires: python-heatclient >= 0.2.9 -Requires: python-keystoneclient >= 1:0.11.1 -Requires: python-neutronclient >= 2.3.6, python-neutronclient < 3 -Requires: python-novaclient >= 1:2.18.0 -Requires: python-saharaclient >= 0.7.6 -Requires: python-swiftclient >= 2.2.0 -Requires: python-troveclient >= 1.0.7 -Requires: PyYAML >= 3.1.0 +Requires: python-memcached >= 1.56 +Requires: python-requests >= 2.5.2 +Requires: python-routes >= 1.12.3 +Requires: python-sqlalchemy >= 0.9.9 +Requires: python-migrate >= 0.9.6 Requires: python-qpid -Requires: python-requests >= 2.2.0, python-requests < 2.4.0, python-requests > 2.4.0 -Requires: python-routes >= 1.12.3, python-routes < 2.0, python-routes > 2.0 -Requires: python-six >= 1.7.0 -Requires: python-sqlalchemy >= 0.8.4, python-sqlalchemy <= 0.8.99, python-sqlalchemy >= 0.9.7, python-sqlalchemy <= 0.9.99 -Requires: python-migrate >= 0.9.1, python-migrate < 0.9.2, python-migrate > 0.9.2 -Requires: python-stevedore >= 1.1.0 Requires: python-webob >= 1.2.3 -Requires: python-oslo-context >= 0.1.0 - - -Requires: python-memcached -Requires: m2crypto -Requires: python-anyjson +Requires: python-six >= 1.9.0 +Requires: PyYAML >= 3.1.0 +Requires: python-anyjson >= 0.3.3 Requires: python-paramiko >= 1.13.0 +Requires: python-babel >= 1.3 Requires: MySQL-python +Requires: python-cryptography >= 1.0 + +Requires: python-oslo-cache >= 0.4.0 +Requires: python-oslo-concurrency >= 2.3.0 +Requires: python-oslo-config >= 2:2.3.0 +Requires: python-oslo-context >= 0.2.0 +Requires: python-oslo-utils >= 2.0.0 +Requires: python-oslo-db >= 2.4.1 +Requires: python-oslo-i18n >= 1.5.0 +Requires: python-oslo-middleware >= 2.8.0 +Requires: python-oslo-messaging >= 1.16.0 +Requires: python-oslo-policy >= 0.5.0 +Requires: python-oslo-reports >= 0.1.0 +Requires: python-oslo-serialization >= 1.4.0 +Requires: python-oslo-service >= 0.7.0 +Requires: python-oslo-log >= 1.8.0 +Requires: python-oslo-versionedobjects >= 0.9.0 + +Requires: python-ceilometerclient >= 1.5.0 +Requires: python-cinderclient >= 1.3.1 +Requires: python-glanceclient >= 1:0.18.0 +Requires: python-heatclient >= 0.3.0 +Requires: python-keystoneclient >= 1:1.6.0 +Requires: python-keystonemiddleware >= 2.0.0 +Requires: python-neutronclient >= 2.6.0 +Requires: python-novaclient >= 1:2.28.1 +Requires: python-saharaclient >= 0.10.0 +Requires: python-swiftclient >= 2.2.0 +Requires: python-troveclient >= 1.2.0 + +Requires: python-zaqarclient >= 0.1.1 +Requires: python-mistralclient >= 1.0.0 +Requires: python-manilaclient >= 1.3.0 +Requires: python-magnumclient >= 0.2.1 +Requires: python-barbicanclient >= 3.3.0 +Requires: python-designateclient >= 1.0.0 +Requires: python-croniter >= 0.3.4 + Requires(pre): shadow-utils %description common @@ -228,6 +234,8 @@ Components common to all OpenStack Heat services %{_bindir}/heat-keystone-setup %{_bindir}/heat-keystone-setup-domain %{python_sitelib}/heat* +%attr(-, root, heat) %{_datadir}/heat/heat-dist.conf +%attr(-, root, heat) %{_datadir}/heat/api-paste-dist.ini %dir %attr(0755,heat,root) %{_localstatedir}/log/heat %dir %attr(0755,heat,root) %{_localstatedir}/run/heat %dir %attr(0755,heat,root) %{_sharedstatedir}/heat @@ -238,11 +246,6 @@ Components common to all OpenStack Heat services %config(noreplace) %attr(-, root, heat) %{_sysconfdir}/heat/policy.json %config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/environment.d/* %config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/templates/* -%if 0%{?with_doc} -%{_mandir}/man1/heat-keystone-setup.1.gz -%{_mandir}/man1/heat-keystone-setup-domain.1.gz -%{_mandir}/man1/heat-manage.1.gz -%endif %pre common # 187:187 for heat - rhbz#845078 @@ -252,166 +255,152 @@ useradd --uid 187 -r -g heat -d %{_sharedstatedir}/heat -s /sbin/nologin \ -c "OpenStack Heat Daemons" heat exit 0 +%if 0%{?with_doc} +%package doc +Summary: Documentation for Heat +Group: Documentation + +%description doc +Heat provides AWS CloudFormation and CloudWatch functionality for OpenStack +. +This package contains documentation for Heat. +%endif + +# docker resource +%package docker +Summary: The Heat Docker resource +Group: System Environment/Base +Requires: python-docker-py >= 1.3 +Requires: %{name}-engine = %{epoch}:%{version}-%{release} + +%description docker +OpenStack HEAT docker resource for managing docker instances on OpenStack + +%files docker +/usr/lib/heat/docker + %package engine Summary: The Heat engine -Group: System Environment/Base -Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-common = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts -Requires(postun): initscripts +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %description engine OpenStack API for starting CloudFormation templates on OpenStack %files engine %doc README.rst LICENSE -%if 0%{?with_doc} -%doc doc/build/html/man/heat-engine.html -%endif %{_bindir}/heat-engine -%{_initrddir}/openstack-heat-engine -%if 0%{?with_doc} -%{_mandir}/man1/heat-engine.1.gz -%endif +%{_unitdir}/openstack-heat-engine.service %post engine -/sbin/chkconfig --add openstack-heat-engine +%systemd_post openstack-heat-engine.service %preun engine -if [ $1 -eq 0 ]; then - /sbin/service openstack-heat-engine stop >/dev/null 2>&1 - /sbin/chkconfig --del openstack-heat-engine -fi +%systemd_preun openstack-heat-engine.service %postun engine -if [ $1 -ge 1 ]; then - /sbin/service openstack-heat-engine condrestart >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart openstack-heat-engine.service %package api Summary: The Heat API -Group: System Environment/Base -Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-common = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts -Requires(postun): initscripts +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %description api OpenStack-native ReST API to the Heat Engine %files api %doc README.rst LICENSE -%if 0%{?with_doc} -%doc doc/build/html/man/heat-api.html -%endif %{_bindir}/heat-api -%{_initrddir}/openstack-heat-api -%if 0%{?with_doc} -%{_mandir}/man1/heat-api.1.gz -%endif +%{_unitdir}/openstack-heat-api.service %post api -/sbin/chkconfig --add openstack-heat-api +%systemd_post openstack-heat-api.service %preun api -if [ $1 -eq 0 ]; then - /sbin/service openstack-heat-api stop >/dev/null 2>&1 - /sbin/chkconfig --del openstack-heat-api -fi +%systemd_preun openstack-heat-api.service %postun api -if [ $1 -ge 1 ]; then - /sbin/service openstack-heat-api condrestart >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart openstack-heat-api.service %package api-cfn Summary: Heat CloudFormation API -Group: System Environment/Base -Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-common = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts -Requires(postun): initscripts +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %description api-cfn AWS CloudFormation-compatible API to the Heat Engine %files api-cfn %doc README.rst LICENSE -%if 0%{?with_doc} -%doc doc/build/html/man/heat-api-cfn.html -%endif %{_bindir}/heat-api-cfn -%{_initrddir}/openstack-heat-api-cfn -%if 0%{?with_doc} -%{_mandir}/man1/heat-api-cfn.1.gz -%endif +%{_unitdir}/openstack-heat-api-cfn.service %post api-cfn -/sbin/chkconfig --add openstack-heat-api-cfn +%systemd_post openstack-heat-api-cloudwatch.service %preun api-cfn -if [ $1 -eq 0 ]; then - /sbin/service openstack-heat-api-cfn stop >/dev/null 2>&1 - /sbin/chkconfig --del openstack-heat-api-cfn -fi +%systemd_preun openstack-heat-api-cloudwatch.service %postun api-cfn -if [ $1 -ge 1 ]; then - /sbin/service openstack-heat-api-cfn condrestart >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart openstack-heat-api-cloudwatch.service + %package api-cloudwatch Summary: Heat CloudWatch API -Group: System Environment/Base -Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-common = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts -Requires(postun): initscripts +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %description api-cloudwatch AWS CloudWatch-compatible API to the Heat Engine %files api-cloudwatch %doc README.rst LICENSE -%if 0%{?with_doc} -%doc doc/build/html/man/heat-api-cloudwatch.html -%endif %{_bindir}/heat-api-cloudwatch -%{_initrddir}/openstack-heat-api-cloudwatch -%if 0%{?with_doc} -%{_mandir}/man1/heat-api-cloudwatch.1.gz -%endif +%{_unitdir}/openstack-heat-api-cloudwatch.service + +%files doc +%{_mandir}/man1/* +%doc LICENSE doc/build/html %post api-cloudwatch -/sbin/chkconfig --add openstack-heat-api-cloudwatch +%systemd_post openstack-heat-api-cfn.service %preun api-cloudwatch -if [ $1 -eq 0 ]; then - /sbin/service openstack-heat-api-cloudwatch stop >/dev/null 2>&1 - /sbin/chkconfig --del openstack-heat-api-cloudwatch -fi +%systemd_preun openstack-heat-api-cfn.service %postun api-cloudwatch -if [ $1 -ge 1 ]; then - /sbin/service openstack-heat-api-cloudwatch condrestart >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart openstack-heat-api-cfn.service %changelog +* Thu Oct 8 2015 Daniil Trishkin - 1:5.0.0.0rc1-1%{?dist}~mos8.0.2 +- Add doc package and move all documentation to it + +* Thu Sep 17 2015 Daniil Trishkin - 1:5.0.0.0rc1-1%{?dist}~mos8.0.1 +- Update to 5.0.0 +- .spec is from https://raw.githubusercontent.com/openstack-packages/heat/rpm-master/openstack-heat.spec +- Update requirements according to global requirements of Liberty +- Up epoch to 1 + * Mon Dec 8 2014 Denis Egorenko - 2014.2.1 - Update from global requirements @@ -419,7 +408,7 @@ fi - update for global requirements - fix init script (explicitly setting config file) -* Wed Jul 1 2014 Igor Yozhikov - 2014.2 +* Tue Jul 1 2014 Igor Yozhikov - 2014.2 - updated for LP BP * Fri Jun 13 2014 Jeff Peeler - 2014.1.1-2.1 @@ -604,7 +593,7 @@ fi - added LICENSE to docs - added dist tag - added heat directory to files section -- removed unnecessary defattr +- removed unnecessary defattr * Tue Jul 24 2012 Jeff Peeler - 4-4 - remove pycrypto requires @@ -632,4 +621,4 @@ fi - fixed most rpmlint warnings/errors * Mon Apr 16 2012 Chris Alfonso - 3-1 -- initial openstack package log \ No newline at end of file +- initial openstack package log diff --git a/rpm/SOURCES/heat.conf.sample b/rpm/SOURCES/heat.conf.sample deleted file mode 100644 index a52df266..00000000 --- a/rpm/SOURCES/heat.conf.sample +++ /dev/null @@ -1,1319 +0,0 @@ -[DEFAULT] - -# -# Options defined in heat.common.config -# - -# Name of the engine node. This can be an opaque identifier. -# It is not necessarily a hostname, FQDN, or IP address. -# (string value) -#host=heat - - -# -# Options defined in heat.common.config -# - -# The default user for new instances. This option is -# deprecated and will be removed in the Juno release. If it's -# empty, Heat will use the default user set up with your cloud -# image (for OS::Nova::Server) or 'ec2-user' (for -# AWS::EC2::Instance). (string value) -#instance_user=ec2-user - -# Driver to use for controlling instances. (string value) -#instance_driver=heat.engine.nova - -# List of directories to search for plug-ins. (list value) -#plugin_dirs=/usr/lib64/heat,/usr/lib/heat - -# The directory to search for environment files. (string -# value) -#environment_dir=/etc/heat/environment.d - -# Select deferred auth method, stored password or trusts. -# (string value) -#deferred_auth_method=password - -# Subset of trustor roles to be delegated to heat. If left -# unset, all roles of a user will be delegated to heat when -# creating a stack. (list value) -#trusts_delegated_roles= - -# Maximum resources allowed per top-level stack. (integer -# value) -#max_resources_per_stack=1000 - -# Maximum number of stacks any one tenant may have active at -# one time. (integer value) -#max_stacks_per_tenant=100 - -# Number of times to retry to bring a resource to a non-error -# state. Set to 0 to disable retries. (integer value) -#action_retry_limit=5 - -# Controls how many events will be pruned whenever a stack's -# events exceed max_events_per_stack. Set this lower to keep -# more events at the expense of more frequent purges. (integer -# value) -#event_purge_batch_size=10 - -# Maximum events that will be available per stack. Older -# events will be deleted when this is reached. Set to 0 for -# unlimited events per stack. (integer value) -#max_events_per_stack=1000 - -# Timeout in seconds for stack action (ie. create or update). -# (integer value) -#stack_action_timeout=3600 - -# Error wait time in seconds for stack action (ie. create or -# update). (integer value) -#error_wait_time=240 - -# RPC timeout for the engine liveness check that is used for -# stack locking. (integer value) -#engine_life_check_timeout=2 - -# Enable the legacy OS::Heat::CWLiteAlarm resource. (boolean -# value) -#enable_cloud_watch_lite=true - -# Enable the preview Stack Abandon feature. (boolean value) -#enable_stack_abandon=false - -# Enable the preview Stack Adopt feature. (boolean value) -#enable_stack_adopt=false - -# Deprecated. (string value) -#onready= - - -# -# Options defined in heat.common.config -# - -# Seconds between running periodic tasks. (integer value) -#periodic_interval=60 - -# URL of the Heat metadata server. (string value) -#heat_metadata_server_url= - -# URL of the Heat waitcondition server. (string value) -#heat_waitcondition_server_url= - -# URL of the Heat CloudWatch server. (string value) -#heat_watch_server_url= - -# Instance connection to CFN/CW API via https. (string value) -#instance_connection_is_secure=0 - -# Instance connection to CFN/CW API validate certs if SSL is -# used. (string value) -#instance_connection_https_validate_certificates=1 - -# Default region name used to get services endpoints. (string -# value) -#region_name_for_services= - -# Keystone role for heat template-defined users. (string -# value) -#heat_stack_user_role=heat_stack_user - -# Keystone domain ID which contains heat template-defined -# users. If this option is set, stack_user_domain_name option -# will be ignored. (string value) -# Deprecated group/name - [DEFAULT]/stack_user_domain -#stack_user_domain_id= - -# Keystone domain name which contains heat template-defined -# users. If `stack_user_domain_id` option is set, this option -# is ignored. (string value) -#stack_user_domain_name= - -# Keystone username, a user with roles sufficient to manage -# users and projects in the stack_user_domain. (string value) -#stack_domain_admin= - -# Keystone password for stack_domain_admin user. (string -# value) -#stack_domain_admin_password= - -# Maximum raw byte size of any template. (integer value) -#max_template_size=524288 - -# Maximum depth allowed when using nested stacks. (integer -# value) -#max_nested_stack_depth=3 - -# Number of heat-engine processes to fork and run. (integer -# value) -#num_engine_workers=1 - - -# -# Options defined in heat.common.wsgi -# - -# Maximum raw byte size of JSON request body. Should be larger -# than max_template_size. (integer value) -#max_json_body_size=1048576 - - -# -# Options defined in oslo.messaging -# - -# Use durable queues in amqp. (boolean value) -# Deprecated group/name - [DEFAULT]/rabbit_durable_queues -#amqp_durable_queues=false - -# Auto-delete queues in amqp. (boolean value) -#amqp_auto_delete=false - -# Size of RPC connection pool. (integer value) -#rpc_conn_pool_size=30 - -# Qpid broker hostname. (string value) -#qpid_hostname=localhost - -# Qpid broker port. (integer value) -#qpid_port=5672 - -# Qpid HA cluster host:port pairs. (list value) -#qpid_hosts=$qpid_hostname:$qpid_port - -# Username for Qpid connection. (string value) -#qpid_username= - -# Password for Qpid connection. (string value) -#qpid_password= - -# Space separated list of SASL mechanisms to use for auth. -# (string value) -#qpid_sasl_mechanisms= - -# Seconds between connection keepalive heartbeats. (integer -# value) -#qpid_heartbeat=60 - -# Transport to use, either 'tcp' or 'ssl'. (string value) -#qpid_protocol=tcp - -# Whether to disable the Nagle algorithm. (boolean value) -#qpid_tcp_nodelay=true - -# The number of prefetched messages held by receiver. (integer -# value) -#qpid_receiver_capacity=1 - -# The qpid topology version to use. Version 1 is what was -# originally used by impl_qpid. Version 2 includes some -# backwards-incompatible changes that allow broker federation -# to work. Users should update to version 2 when they are -# able to take everything down, as it requires a clean break. -# (integer value) -#qpid_topology_version=1 - -# SSL version to use (valid only if SSL enabled). valid values -# are TLSv1, SSLv23 and SSLv3. SSLv2 may be available on some -# distributions. (string value) -#kombu_ssl_version= - -# SSL key file (valid only if SSL enabled). (string value) -#kombu_ssl_keyfile= - -# SSL cert file (valid only if SSL enabled). (string value) -#kombu_ssl_certfile= - -# SSL certification authority file (valid only if SSL -# enabled). (string value) -#kombu_ssl_ca_certs= - -# How long to wait before reconnecting in response to an AMQP -# consumer cancel notification. (floating point value) -#kombu_reconnect_delay=1.0 - -# The RabbitMQ broker address where a single node is used. -# (string value) -#rabbit_host=localhost - -# The RabbitMQ broker port where a single node is used. -# (integer value) -#rabbit_port=5672 - -# RabbitMQ HA cluster host:port pairs. (list value) -#rabbit_hosts=$rabbit_host:$rabbit_port - -# Connect over SSL for RabbitMQ. (boolean value) -#rabbit_use_ssl=false - -# The RabbitMQ userid. (string value) -#rabbit_userid=guest - -# The RabbitMQ password. (string value) -#rabbit_password=guest - -# the RabbitMQ login method (string value) -#rabbit_login_method=AMQPLAIN - -# The RabbitMQ virtual host. (string value) -#rabbit_virtual_host=/ - -# How frequently to retry connecting with RabbitMQ. (integer -# value) -#rabbit_retry_interval=1 - -# How long to backoff for between retries when connecting to -# RabbitMQ. (integer value) -#rabbit_retry_backoff=2 - -# Maximum number of RabbitMQ connection retries. Default is 0 -# (infinite retry count). (integer value) -#rabbit_max_retries=0 - -# Use HA queues in RabbitMQ (x-ha-policy: all). If you change -# this option, you must wipe the RabbitMQ database. (boolean -# value) -#rabbit_ha_queues=false - -# If passed, use a fake RabbitMQ provider. (boolean value) -#fake_rabbit=false - -# ZeroMQ bind address. Should be a wildcard (*), an ethernet -# interface, or IP. The "host" option should point or resolve -# to this address. (string value) -#rpc_zmq_bind_address=* - -# MatchMaker driver. (string value) -#rpc_zmq_matchmaker=oslo.messaging._drivers.matchmaker.MatchMakerLocalhost - -# ZeroMQ receiver listening port. (integer value) -#rpc_zmq_port=9501 - -# Number of ZeroMQ contexts, defaults to 1. (integer value) -#rpc_zmq_contexts=1 - -# Maximum number of ingress messages to locally buffer per -# topic. Default is unlimited. (integer value) -#rpc_zmq_topic_backlog= - -# Directory for holding IPC sockets. (string value) -#rpc_zmq_ipc_dir=/var/run/openstack - -# Name of this node. Must be a valid hostname, FQDN, or IP -# address. Must match "host" option, if running Nova. (string -# value) -#rpc_zmq_host=heat - -# Seconds to wait before a cast expires (TTL). Only supported -# by impl_zmq. (integer value) -#rpc_cast_timeout=30 - -# Heartbeat frequency. (integer value) -#matchmaker_heartbeat_freq=300 - -# Heartbeat time-to-live. (integer value) -#matchmaker_heartbeat_ttl=600 - -# Size of RPC greenthread pool. (integer value) -#rpc_thread_pool_size=64 - -# Driver or drivers to handle sending notifications. (multi -# valued) -#notification_driver= - -# AMQP topic used for OpenStack notifications. (list value) -# Deprecated group/name - [rpc_notifier2]/topics -#notification_topics=notifications - -# Seconds to wait for a response from a call. (integer value) -#rpc_response_timeout=60 - -# A URL representing the messaging driver to use and its full -# configuration. If not set, we fall back to the rpc_backend -# option and driver specific configuration. (string value) -#transport_url= - -# The messaging driver to use, defaults to rabbit. Other -# drivers include qpid and zmq. (string value) -#rpc_backend=rabbit - -# The default exchange under which topics are scoped. May be -# overridden by an exchange name specified in the -# transport_url option. (string value) -#control_exchange=openstack - - -# -# Options defined in heat.api.middleware.ssl -# - -# The HTTP Header that will be used to determine which the -# original request protocol scheme was, even if it was removed -# by an SSL terminator proxy. (string value) -#secure_proxy_ssl_header=X-Forwarded-Proto - - -# -# Options defined in heat.common.crypt -# - -# Encryption key used for authentication info in database. -# (string value) -#auth_encryption_key=notgood but just long enough i think - - -# -# Options defined in heat.common.heat_keystoneclient -# - -# Fully qualified class name to use as a keystone backend. -# (string value) -#keystone_backend=heat.common.heat_keystoneclient.KeystoneClientV3 - - -# -# Options defined in heat.engine.clients -# - -# Fully qualified class name to use as a client backend. -# (string value) -#cloud_backend=heat.engine.clients.OpenStackClients - - -# -# Options defined in heat.engine.notification -# - -# Default notification level for outgoing notifications. -# (string value) -#default_notification_level=INFO - -# Default publisher_id for outgoing notifications. (string -# value) -#default_publisher_id= - -# List of drivers to send notifications (DEPRECATED). (multi -# valued) -#list_notifier_drivers= - - -# -# Options defined in heat.engine.resources.loadbalancer -# - -# Custom template for the built-in loadbalancer nested stack. -# (string value) -#loadbalancer_template= - - -# -# Options defined in heat.openstack.common.eventlet_backdoor -# - -# Enable eventlet backdoor. Acceptable values are 0, , -# and :, where 0 results in listening on a random -# tcp port number; results in listening on the -# specified port number (and not enabling backdoor if that -# port is in use); and : results in listening on -# the smallest unused port number within the specified range -# of port numbers. The chosen port is displayed in the -# service's log file. (string value) -#backdoor_port= - - -# -# Options defined in heat.openstack.common.log -# - -# Print debugging output (set logging level to DEBUG instead -# of default WARNING level). (boolean value) -#debug=false - -# Print more verbose output (set logging level to INFO instead -# of default WARNING level). (boolean value) -#verbose=false - -# Log output to standard error. (boolean value) -#use_stderr=true - -# Format string to use for log messages with context. (string -# value) -#logging_context_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s - -# Format string to use for log messages without context. -# (string value) -#logging_default_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s - -# Data to append to log format when level is DEBUG. (string -# value) -#logging_debug_format_suffix=%(funcName)s %(pathname)s:%(lineno)d - -# Prefix each line of exception output with this format. -# (string value) -#logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s - -# List of logger=LEVEL pairs. (list value) -#default_log_levels=amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN - -# Enables or disables publication of error events. (boolean -# value) -#publish_errors=false - -# Enables or disables fatal status of deprecations. (boolean -# value) -#fatal_deprecations=false - -# The format for an instance that is passed with the log -# message. (string value) -#instance_format="[instance: %(uuid)s] " - -# The format for an instance UUID that is passed with the log -# message. (string value) -#instance_uuid_format="[instance: %(uuid)s] " - -# The name of a logging configuration file. This file is -# appended to any existing logging configuration files. For -# details about logging configuration files, see the Python -# logging module documentation. (string value) -# Deprecated group/name - [DEFAULT]/log_config -#log_config_append= - -# DEPRECATED. A logging.Formatter log message format string -# which may use any of the available logging.LogRecord -# attributes. This option is deprecated. Please use -# logging_context_format_string and -# logging_default_format_string instead. (string value) -#log_format= - -# Format string for %%(asctime)s in log records. Default: -# %(default)s . (string value) -#log_date_format=%Y-%m-%d %H:%M:%S - -# (Optional) Name of log file to output to. If no default is -# set, logging will go to stdout. (string value) -# Deprecated group/name - [DEFAULT]/logfile -#log_file= - -# (Optional) The base directory used for relative --log-file -# paths. (string value) -# Deprecated group/name - [DEFAULT]/logdir -#log_dir= - -# Use syslog for logging. Existing syslog format is DEPRECATED -# during I, and will change in J to honor RFC5424. (boolean -# value) -#use_syslog=false - -# (Optional) Enables or disables syslog rfc5424 format for -# logging. If enabled, prefixes the MSG part of the syslog -# message with APP-NAME (RFC5424). The format without the APP- -# NAME is deprecated in I, and will be removed in J. (boolean -# value) -#use_syslog_rfc_format=false - -# Syslog facility to receive log lines. (string value) -#syslog_log_facility=LOG_USER - - -# -# Options defined in heat.openstack.common.policy -# - -# The JSON file that defines policies. (string value) -#policy_file=policy.json - -# Default rule. Enforced when a requested rule is not found. -# (string value) -#policy_default_rule=default - - -[auth_password] - -# -# Options defined in heat.common.config -# - -# Allow orchestration of multiple clouds. (boolean value) -#multi_cloud=false - -# Allowed keystone endpoints for auth_uri when multi_cloud is -# enabled. At least one endpoint needs to be specified. (list -# value) -#allowed_auth_uris= - - -[clients] - -# -# Options defined in heat.common.config -# - -# Type of endpoint in Identity service catalog to use for -# communication with the OpenStack service. (string value) -#endpoint_type=publicURL - -# Optional CA cert file to use in SSL connections. (string -# value) -#ca_file= - -# Optional PEM-formatted certificate chain file. (string -# value) -#cert_file= - -# Optional PEM-formatted file that contains the private key. -# (string value) -#key_file= - -# If set, then the server's certificate will not be verified. -# (boolean value) -#insecure=false - - -[clients_ceilometer] - -# -# Options defined in heat.common.config -# - -# Type of endpoint in Identity service catalog to use for -# communication with the OpenStack service. (string value) -#endpoint_type= - -# Optional CA cert file to use in SSL connections. (string -# value) -#ca_file= - -# Optional PEM-formatted certificate chain file. (string -# value) -#cert_file= - -# Optional PEM-formatted file that contains the private key. -# (string value) -#key_file= - -# If set, then the server's certificate will not be verified. -# (boolean value) -#insecure= - - -[clients_cinder] - -# -# Options defined in heat.common.config -# - -# Type of endpoint in Identity service catalog to use for -# communication with the OpenStack service. (string value) -#endpoint_type= - -# Optional CA cert file to use in SSL connections. (string -# value) -#ca_file= - -# Optional PEM-formatted certificate chain file. (string -# value) -#cert_file= - -# Optional PEM-formatted file that contains the private key. -# (string value) -#key_file= - -# If set, then the server's certificate will not be verified. -# (boolean value) -#insecure= - - -# -# Options defined in heat.common.config -# - -# Allow client's debug log output. (boolean value) -#http_log_debug=false - - -[clients_glance] - -# -# Options defined in heat.common.config -# - -# Type of endpoint in Identity service catalog to use for -# communication with the OpenStack service. (string value) -#endpoint_type= - -# Optional CA cert file to use in SSL connections. (string -# value) -#ca_file= - -# Optional PEM-formatted certificate chain file. (string -# value) -#cert_file= - -# Optional PEM-formatted file that contains the private key. -# (string value) -#key_file= - -# If set, then the server's certificate will not be verified. -# (boolean value) -#insecure= - - -[clients_heat] - -# -# Options defined in heat.common.config -# - -# Type of endpoint in Identity service catalog to use for -# communication with the OpenStack service. (string value) -#endpoint_type= - -# Optional CA cert file to use in SSL connections. (string -# value) -#ca_file= - -# Optional PEM-formatted certificate chain file. (string -# value) -#cert_file= - -# Optional PEM-formatted file that contains the private key. -# (string value) -#key_file= - -# If set, then the server's certificate will not be verified. -# (boolean value) -#insecure= - - -# -# Options defined in heat.common.config -# - -# Optional heat url in format like -# http://0.0.0.0:8004/v1/%(tenant_id)s. (string value) -#url= - - -[clients_keystone] - -# -# Options defined in heat.common.config -# - -# Type of endpoint in Identity service catalog to use for -# communication with the OpenStack service. (string value) -#endpoint_type= - -# Optional CA cert file to use in SSL connections. (string -# value) -#ca_file= - -# Optional PEM-formatted certificate chain file. (string -# value) -#cert_file= - -# Optional PEM-formatted file that contains the private key. -# (string value) -#key_file= - -# If set, then the server's certificate will not be verified. -# (boolean value) -#insecure= - - -[clients_neutron] - -# -# Options defined in heat.common.config -# - -# Type of endpoint in Identity service catalog to use for -# communication with the OpenStack service. (string value) -#endpoint_type= - -# Optional CA cert file to use in SSL connections. (string -# value) -#ca_file= - -# Optional PEM-formatted certificate chain file. (string -# value) -#cert_file= - -# Optional PEM-formatted file that contains the private key. -# (string value) -#key_file= - -# If set, then the server's certificate will not be verified. -# (boolean value) -#insecure= - - -[clients_nova] - -# -# Options defined in heat.common.config -# - -# Type of endpoint in Identity service catalog to use for -# communication with the OpenStack service. (string value) -#endpoint_type= - -# Optional CA cert file to use in SSL connections. (string -# value) -#ca_file= - -# Optional PEM-formatted certificate chain file. (string -# value) -#cert_file= - -# Optional PEM-formatted file that contains the private key. -# (string value) -#key_file= - -# If set, then the server's certificate will not be verified. -# (boolean value) -#insecure= - - -# -# Options defined in heat.common.config -# - -# Allow client's debug log output. (boolean value) -#http_log_debug=false - - -[clients_swift] - -# -# Options defined in heat.common.config -# - -# Type of endpoint in Identity service catalog to use for -# communication with the OpenStack service. (string value) -#endpoint_type= - -# Optional CA cert file to use in SSL connections. (string -# value) -#ca_file= - -# Optional PEM-formatted certificate chain file. (string -# value) -#cert_file= - -# Optional PEM-formatted file that contains the private key. -# (string value) -#key_file= - -# If set, then the server's certificate will not be verified. -# (boolean value) -#insecure= - - -[clients_trove] - -# -# Options defined in heat.common.config -# - -# Type of endpoint in Identity service catalog to use for -# communication with the OpenStack service. (string value) -#endpoint_type= - -# Optional CA cert file to use in SSL connections. (string -# value) -#ca_file= - -# Optional PEM-formatted certificate chain file. (string -# value) -#cert_file= - -# Optional PEM-formatted file that contains the private key. -# (string value) -#key_file= - -# If set, then the server's certificate will not be verified. -# (boolean value) -#insecure= - - -[database] - -# -# Options defined in oslo.db -# - -# The file name to use with SQLite. (string value) -#sqlite_db=oslo.sqlite - -# If True, SQLite uses synchronous mode. (boolean value) -#sqlite_synchronous=true - -# The back end to use for the database. (string value) -# Deprecated group/name - [DEFAULT]/db_backend -#backend=sqlalchemy - -# The SQLAlchemy connection string to use to connect to the -# database. (string value) -# Deprecated group/name - [DEFAULT]/sql_connection -# Deprecated group/name - [DATABASE]/sql_connection -# Deprecated group/name - [sql]/connection -#connection= - -# The SQLAlchemy connection string to use to connect to the -# slave database. (string value) -#slave_connection= - -# The SQL mode to be used for MySQL sessions. This option, -# including the default, overrides any server-set SQL mode. To -# use whatever SQL mode is set by the server configuration, -# set this to no value. Example: mysql_sql_mode= (string -# value) -#mysql_sql_mode=TRADITIONAL - -# Timeout before idle SQL connections are reaped. (integer -# value) -# Deprecated group/name - [DEFAULT]/sql_idle_timeout -# Deprecated group/name - [DATABASE]/sql_idle_timeout -# Deprecated group/name - [sql]/idle_timeout -#idle_timeout=3600 - -# Minimum number of SQL connections to keep open in a pool. -# (integer value) -# Deprecated group/name - [DEFAULT]/sql_min_pool_size -# Deprecated group/name - [DATABASE]/sql_min_pool_size -#min_pool_size=1 - -# Maximum number of SQL connections to keep open in a pool. -# (integer value) -# Deprecated group/name - [DEFAULT]/sql_max_pool_size -# Deprecated group/name - [DATABASE]/sql_max_pool_size -#max_pool_size= - -# Maximum number of database connection retries during -# startup. Set to -1 to specify an infinite retry count. -# (integer value) -# Deprecated group/name - [DEFAULT]/sql_max_retries -# Deprecated group/name - [DATABASE]/sql_max_retries -#max_retries=10 - -# Interval between retries of opening a SQL connection. -# (integer value) -# Deprecated group/name - [DEFAULT]/sql_retry_interval -# Deprecated group/name - [DATABASE]/reconnect_interval -#retry_interval=10 - -# If set, use this value for max_overflow with SQLAlchemy. -# (integer value) -# Deprecated group/name - [DEFAULT]/sql_max_overflow -# Deprecated group/name - [DATABASE]/sqlalchemy_max_overflow -#max_overflow= - -# Verbosity of SQL debugging information: 0=None, -# 100=Everything. (integer value) -# Deprecated group/name - [DEFAULT]/sql_connection_debug -#connection_debug=0 - -# Add Python stack traces to SQL as comment strings. (boolean -# value) -# Deprecated group/name - [DEFAULT]/sql_connection_trace -#connection_trace=false - -# If set, use this value for pool_timeout with SQLAlchemy. -# (integer value) -# Deprecated group/name - [DATABASE]/sqlalchemy_pool_timeout -#pool_timeout= - -# Enable the experimental use of database reconnect on -# connection lost. (boolean value) -#use_db_reconnect=false - -# Seconds between database connection retries. (integer value) -#db_retry_interval=1 - -# If True, increases the interval between database connection -# retries up to db_max_retry_interval. (boolean value) -#db_inc_retry_interval=true - -# If db_inc_retry_interval is set, the maximum seconds between -# database connection retries. (integer value) -#db_max_retry_interval=10 - -# Maximum database connection retries before error is raised. -# Set to -1 to specify an infinite retry count. (integer -# value) -#db_max_retries=20 - - -[ec2authtoken] - -# -# Options defined in heat.api.aws.ec2token -# - -# Authentication Endpoint URI. (string value) -#auth_uri= - -# Allow orchestration of multiple clouds. (boolean value) -#multi_cloud=false - -# Allowed keystone endpoints for auth_uri when multi_cloud is -# enabled. At least one endpoint needs to be specified. (list -# value) -#allowed_auth_uris= - - -[heat_api] - -# -# Options defined in heat.common.wsgi -# - -# Address to bind the server. Useful when selecting a -# particular network interface. (string value) -#bind_host=0.0.0.0 - -# The port on which the server will listen. (integer value) -#bind_port=8004 - -# Number of backlog requests to configure the socket with. -# (integer value) -#backlog=4096 - -# Location of the SSL certificate file to use for SSL mode. -# (string value) -#cert_file= - -# Location of the SSL key file to use for enabling SSL mode. -# (string value) -#key_file= - -# Number of workers for Heat service. (integer value) -#workers=0 - -# Maximum line size of message headers to be accepted. -# max_header_line may need to be increased when using large -# tokens (typically those generated by the Keystone v3 API -# with big service catalogs). (integer value) -#max_header_line=16384 - - -[heat_api_cfn] - -# -# Options defined in heat.common.wsgi -# - -# Address to bind the server. Useful when selecting a -# particular network interface. (string value) -#bind_host=0.0.0.0 - -# The port on which the server will listen. (integer value) -#bind_port=8000 - -# Number of backlog requests to configure the socket with. -# (integer value) -#backlog=4096 - -# Location of the SSL certificate file to use for SSL mode. -# (string value) -#cert_file= - -# Location of the SSL key file to use for enabling SSL mode. -# (string value) -#key_file= - -# Number of workers for Heat service. (integer value) -#workers=0 - -# Maximum line size of message headers to be accepted. -# max_header_line may need to be increased when using large -# tokens (typically those generated by the Keystone v3 API -# with big service catalogs). (integer value) -#max_header_line=16384 - - -[heat_api_cloudwatch] - -# -# Options defined in heat.common.wsgi -# - -# Address to bind the server. Useful when selecting a -# particular network interface. (string value) -#bind_host=0.0.0.0 - -# The port on which the server will listen. (integer value) -#bind_port=8003 - -# Number of backlog requests to configure the socket with. -# (integer value) -#backlog=4096 - -# Location of the SSL certificate file to use for SSL mode. -# (string value) -#cert_file= - -# Location of the SSL key file to use for enabling SSL mode. -# (string value) -#key_file= - -# Number of workers for Heat service. (integer value) -#workers=0 - -# Maximum line size of message headers to be accepted. -# max_header_line may need to be increased when using large -# tokens (typically those generated by the Keystone v3 API -# with big service catalogs.) (integer value) -#max_header_line=16384 - - -[keystone_authtoken] - -# -# Options defined in keystonemiddleware.auth_token -# - -# Prefix to prepend at the beginning of the path. Deprecated, -# use identity_uri. (string value) -#auth_admin_prefix= - -# Host providing the admin Identity API endpoint. Deprecated, -# use identity_uri. (string value) -#auth_host=127.0.0.1 - -# Port of the admin Identity API endpoint. Deprecated, use -# identity_uri. (integer value) -#auth_port=35357 - -# Protocol of the admin Identity API endpoint (http or https). -# Deprecated, use identity_uri. (string value) -#auth_protocol=https - -# Complete public Identity API endpoint (string value) -#auth_uri= - -# Complete admin Identity API endpoint. This should specify -# the unversioned root endpoint e.g. https://localhost:35357/ -# (string value) -#identity_uri= - -# API version of the admin Identity API endpoint (string -# value) -#auth_version= - -# Do not handle authorization requests within the middleware, -# but delegate the authorization decision to downstream WSGI -# components (boolean value) -#delay_auth_decision=false - -# Request timeout value for communicating with Identity API -# server. (boolean value) -#http_connect_timeout= - -# How many times are we trying to reconnect when communicating -# with Identity API Server. (integer value) -#http_request_max_retries=3 - -# This option is deprecated and may be removed in a future -# release. Single shared secret with the Keystone -# configuration used for bootstrapping a Keystone -# installation, or otherwise bypassing the normal -# authentication process. This option should not be used, use -# `admin_user` and `admin_password` instead. (string value) -#admin_token= - -# Keystone account username (string value) -#admin_user= - -# Keystone account password (string value) -#admin_password= - -# Keystone service account tenant name to validate user tokens -# (string value) -#admin_tenant_name=admin - -# Env key for the swift cache (string value) -#cache= - -# Required if Keystone server requires client certificate -# (string value) -#certfile= - -# Required if Keystone server requires client certificate -# (string value) -#keyfile= - -# A PEM encoded Certificate Authority to use when verifying -# HTTPs connections. Defaults to system CAs. (string value) -#cafile= - -# Verify HTTPS connections. (boolean value) -#insecure=false - -# Directory used to cache files related to PKI tokens (string -# value) -#signing_dir= - -# Optionally specify a list of memcached server(s) to use for -# caching. If left undefined, tokens will instead be cached -# in-process. (list value) -# Deprecated group/name - [DEFAULT]/memcache_servers -#memcached_servers= - -# In order to prevent excessive effort spent validating -# tokens, the middleware caches previously-seen tokens for a -# configurable duration (in seconds). Set to -1 to disable -# caching completely. (integer value) -#token_cache_time=300 - -# Determines the frequency at which the list of revoked tokens -# is retrieved from the Identity service (in seconds). A high -# number of revocation events combined with a low cache -# duration may significantly reduce performance. (integer -# value) -#revocation_cache_time=10 - -# (optional) if defined, indicate whether token data should be -# authenticated or authenticated and encrypted. Acceptable -# values are MAC or ENCRYPT. If MAC, token data is -# authenticated (with HMAC) in the cache. If ENCRYPT, token -# data is encrypted and authenticated in the cache. If the -# value is not one of these options or empty, auth_token will -# raise an exception on initialization. (string value) -#memcache_security_strategy= - -# (optional, mandatory if memcache_security_strategy is -# defined) this string is used for key derivation. (string -# value) -#memcache_secret_key= - -# (optional) number of seconds memcached server is considered -# dead before it is tried again. (integer value) -#memcache_pool_dead_retry=300 - -# (optional) max total number of open connections to every -# memcached server. (integer value) -#memcache_pool_maxsize=10 - -# (optional) socket timeout in seconds for communicating with -# a memcache server. (integer value) -#memcache_pool_socket_timeout=3 - -# (optional) number of seconds a connection to memcached is -# held unused in the pool before it is closed. (integer value) -#memcache_pool_unused_timeout=60 - -# (optional) number of seconds that an operation will wait to -# get a memcache client connection from the pool. (integer -# value) -#memcache_pool_conn_get_timeout=10 - -# (optional) use the advanced (eventlet safe) memcache client -# pool. The advanced pool will only work under python 2.x. -# (boolean value) -#memcache_use_advanced_pool=false - -# (optional) indicate whether to set the X-Service-Catalog -# header. If False, middleware will not ask for service -# catalog on token validation and will not set the X-Service- -# Catalog header. (boolean value) -#include_service_catalog=true - -# Used to control the use and type of token binding. Can be -# set to: "disabled" to not check token binding. "permissive" -# (default) to validate binding information if the bind type -# is of a form known to the server and ignore it if not. -# "strict" like "permissive" but if the bind type is unknown -# the token will be rejected. "required" any form of token -# binding is needed to be allowed. Finally the name of a -# binding method that must be present in tokens. (string -# value) -#enforce_token_bind=permissive - -# If true, the revocation list will be checked for cached -# tokens. This requires that PKI tokens are configured on the -# Keystone server. (boolean value) -#check_revocations_for_cached=false - -# Hash algorithms to use for hashing PKI tokens. This may be a -# single algorithm or multiple. The algorithms are those -# supported by Python standard hashlib.new(). The hashes will -# be tried in the order given, so put the preferred one first -# for performance. The result of the first hash will be stored -# in the cache. This will typically be set to multiple values -# only while migrating from a less secure algorithm to a more -# secure one. Once all the old tokens are expired this option -# should be set to a single value for better performance. -# (list value) -#hash_algorithms=md5 - - -[matchmaker_redis] - -# -# Options defined in oslo.messaging -# - -# Host to locate redis. (string value) -#host=127.0.0.1 - -# Use this port to connect to redis host. (integer value) -#port=6379 - -# Password for Redis server (optional). (string value) -#password= - - -[matchmaker_ring] - -# -# Options defined in oslo.messaging -# - -# Matchmaker ring file (JSON). (string value) -# Deprecated group/name - [DEFAULT]/matchmaker_ringfile -#ringfile=/etc/oslo/matchmaker_ring.json - - -[paste_deploy] - -# -# Options defined in heat.common.config -# - -# The flavor to use. (string value) -#flavor= - -# The API paste config file to use. (string value) -#api_paste_config=api-paste.ini - - -[profiler] - -# -# Options defined in heat.common.config -# - -# If False fully disable profiling feature. (boolean value) -#profiler_enabled=false - -# If False do not trace SQL requests. (boolean value) -#trace_sqlalchemy=false - - -[revision] - -# -# Options defined in heat.common.config -# - -# Heat build revision. If you would prefer to manage your -# build revision separately, you can move this section to a -# different file and add it as another config option. (string -# value) -#heat_revision=unknown - - diff --git a/rpm/SOURCES/openstack-heat-api-cfn.init b/rpm/SOURCES/openstack-heat-api-cfn.init deleted file mode 100644 index 29f34eef..00000000 --- a/rpm/SOURCES/openstack-heat-api-cfn.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -# -# openstack-heat-api-cfn - Openstack Heat CFN-compatible API Service -# -# chkconfig: - 98 02 -# description: Provides an AWS CloudFormation-compatible interface to the Heat -# Engine for starting AWS CloudFormation templates on OpenStack. -# - -### BEGIN INIT INFO -# Provides: -# Required-Start: $remote_fs $network $syslog -# Required-Stop: $remote_fs $syslog -# Default-Stop: 0 1 6 -# Short-Description: OpenStack Heat CFN-compatible API Server -# Description: The Heat API provides an OpenStack-native -# ReST API to the Heat Engine for starting -# AWS CloudFormation templates on OpenStack. -### END INIT INFO - -. /etc/rc.d/init.d/functions - -prog=openstack-heat-api-cfn -exec="/usr/bin/heat-api-cfn" -config="/etc/heat/heat.conf" -args="--config-file ${config}" -pidfile="/var/run/heat/$prog.pid" - -[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog - -lockfile=/var/lock/subsys/openstack-heat-api-cfn - -start() { - [ -x $exec ] || exit 5 - [ -f $config ] || exit 6 - echo -n $"Starting $prog: " - daemon --user heat --pidfile $pidfile "$exec $args &>/dev/null & echo \$! > $pidfile" - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - echo -n $"Stopping $prog: " - killproc -p $pidfile $prog - retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - status -p $pidfile $prog -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac -exit $? diff --git a/rpm/SOURCES/openstack-heat-api-cloudwatch.init b/rpm/SOURCES/openstack-heat-api-cloudwatch.init deleted file mode 100644 index ffbf0148..00000000 --- a/rpm/SOURCES/openstack-heat-api-cloudwatch.init +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh -# -# openstack-heat-api-cloudwatch - OpenStack Heat CloudWatch API Service -# -# chkconfig: - 98 02 -# description: The Heat CloudWatch API provides an AWS CloudWatch-compatible -# interface to the Heat Engine. -# -### BEGIN INIT INFO -# Provides: -# Required-Start: $remote_fs $network $syslog -# Required-Stop: $remote_fs $syslog -# Default-Stop: 0 1 6 -# Short-Description: OpenStack Heat CloudWatch API Server -# Description: The Heat CloudWatch API provides an AWS CloudWatch-comptabile -# interface to the Heat Engine. -### END INIT INFO - -. /etc/rc.d/init.d/functions - -prog=openstack-heat-api-cloudwatch -exec="/usr/bin/heat-api-cloudwatch" -config="/etc/heat/heat.conf" -args="--config-file ${config}" -pidfile="/var/run/heat/$prog.pid" - -[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog - -lockfile=/var/lock/subsys/openstack-heat-api-cloudwatch - -start() { - [ -x $exec ] || exit 5 - [ -f $config ] || exit 6 - echo -n $"Starting $prog: " - daemon --user heat --pidfile $pidfile "$exec $args &>/dev/null & echo \$! > $pidfile" - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - echo -n $"Stopping $prog: " - killproc -p $pidfile $prog - retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - status -p $pidfile $prog -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac -exit $? diff --git a/rpm/SOURCES/openstack-heat-api.init b/rpm/SOURCES/openstack-heat-api.init deleted file mode 100644 index 74b641bf..00000000 --- a/rpm/SOURCES/openstack-heat-api.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -# -# openstack-heat-api - OpenStack Heat API Service -# -# chkconfig: - 98 02 -# description: The Heat API provides an OpenStack-native -# ReST API to the Heat Engine for starting -# AWS CloudFormation templates on OpenStack. - -### BEGIN INIT INFO -# Provides: -# Required-Start: $remote_fs $network $syslog -# Required-Stop: $remote_fs $syslog -# Default-Stop: 0 1 6 -# Short-Description: OpenStack Heat API Server -# Description: The Heat API provides an OpenStack-native -# ReST API to the Heat Engine for starting -# AWS CloudFormation templates on OpenStack. -### END INIT INFO - -. /etc/rc.d/init.d/functions - -prog=openstack-heat-api -exec="/usr/bin/heat-api" -config="/etc/heat/heat.conf" -args="--config-file ${config}" -pidfile="/var/run/heat/$prog.pid" - -[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog - -lockfile=/var/lock/subsys/openstack-heat-api - -start() { - [ -x $exec ] || exit 5 - [ -f $config ] || exit 6 - echo -n $"Starting $prog: " - daemon --user heat --pidfile $pidfile "$exec $args &>/dev/null & echo \$! > $pidfile" - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - echo -n $"Stopping $prog: " - killproc -p $pidfile $prog - retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - status -p $pidfile $prog -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac -exit $? diff --git a/rpm/SOURCES/openstack-heat-engine.init b/rpm/SOURCES/openstack-heat-engine.init deleted file mode 100644 index 98c75ad3..00000000 --- a/rpm/SOURCES/openstack-heat-engine.init +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh -# -# openstack-heat-engine - Openstack Heat Engine Service -# -# chkconfig: - 98 02 -# description: The Heat Engine provides an OpenStack API for starting AWS -# CloudFormation templates on OpenStack. -# -### BEGIN INIT INFO -# Provides: -# Required-Start: $remote_fs $network $syslog -# Required-Stop: $remote_fs $syslog -# Default-Stop: 0 1 6 -# Short-Description: OpenStack Heat Engine Server -# Description: The Heat Engine provides an OpenStack API for starting AWS -# CloudFormation templates on OpenStack. -### END INIT INFO - -. /etc/rc.d/init.d/functions - -prog=openstack-heat-engine -exec="/usr/bin/heat-engine" -config="/etc/heat/heat.conf" -args="--config-file ${config}" -pidfile="/var/run/heat/$prog.pid" - -[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog - -lockfile=/var/lock/subsys/openstack-heat-engine - -start() { - [ -x $exec ] || exit 5 - [ -f $config ] || exit 6 - echo -n $"Starting $prog: " - daemon --user heat --pidfile $pidfile "$exec $args &>/dev/null & echo \$! > $pidfile" - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - echo -n $"Stopping $prog: " - killproc -p $pidfile $prog - retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - status -p $pidfile $prog -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac -exit $? diff --git a/tests/runtests.sh b/tests/runtests.sh index 3a388e08..bb6a896f 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -1,24 +1,108 @@ #!/bin/bash -x RES=0 package=$1 -MYSQL_PASSWORD="heat" +ROOT_MYSQL_PASSWORD="heat" conf_file=/etc/heat/heat.conf +# ini_has_option config-file section option +function ini_has_option { + local xtrace=$(set +o | grep xtrace) + set +o xtrace + local file=$1 + local section=$2 + local option=$3 + local line + + line=$(sed -ne "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ p; }" "$file") + $xtrace + [ -n "$line" ] +} + +# Set an option in an INI file +# iniset config-file section option value +function iniset { + local xtrace=$(set +o | grep xtrace) + set +o xtrace + local file=$1 + local section=$2 + local option=$3 + local value=$4 + + [[ -z $section || -z $option ]] && return + + if ! grep -q "^\[$section\]" "$file" 2>/dev/null; then + # Add section at the end + echo -e "\n[$section]" >>"$file" + fi + if ! ini_has_option "$file" "$section" "$option"; then + # Add it + sed -i -e "/^\[$section\]/ a\\ +$option = $value +" "$file" + else + local sep=$(echo -ne "\x01") + # Replace it + sed -i -e '/^\['${section}'\]/,/^\[.*\]/ s'${sep}'^\('${option}'[ \t]*=[ \t]*\).*$'${sep}'\1'"${value}"${sep} "$file" + fi + $xtrace +} + +# Normalize config values to True or False +# Accepts as False: 0 no No NO false False FALSE +# Accepts as True: 1 yes Yes YES true True TRUE +# VAR=$(trueorfalse default-value test-value) +function trueorfalse { + local xtrace=$(set +o | grep xtrace) + set +o xtrace + local default=$1 + local testval=$2 + + [[ -z "$testval" ]] && { echo "$default"; return; } + [[ "0 no No NO false False FALSE" =~ $testval ]] && { echo "False"; return; } + [[ "1 yes Yes YES true True TRUE" =~ $testval ]] && { echo "True"; return; } + echo "$default" + $xtrace +} + +OS_ID="" prepare_vm() { if [[ `cat /etc/*-release | head -n 1 | awk '{print $1}'` =~ Ubuntu ]] then - echo "mysql-server mysql-server/root_password select $MYSQL_PASSWORD" | sudo debconf-set-selections - echo "mysql-server mysql-server/root_password_again select $MYSQL_PASSWORD" | sudo debconf-set-selections + OS_ID="Ubuntu" + echo "mysql-server mysql-server/root_password select $ROOT_MYSQL_PASSWORD" | sudo debconf-set-selections + echo "mysql-server mysql-server/root_password_again select $ROOT_MYSQL_PASSWORD" | sudo debconf-set-selections apt-get install -y mysql-server mysql-client python-mysqldb rabbitmq-server screen curl else - yum install screen mysql-server MySQL-python MySQL-client rabbitmq-server -y - service $(chkconfig | grep -oE '^mysql.?\s') start - /usr/bin/mysqladmin -u root password $MYSQL_PASSWORD + OS_ID="Centos" + setenforce 0 |: + service firewalld stop + yum install screen curl mysql-client mysql-server mysql-libs MySQL-python rabbitmq-server -y + systemctl enable rabbitmq-server + MYSQL_PASSWORD=$(cat /root/.mysql_secret | head -1 | awk -F': ' '{print $2}') fi - service rabbitmq-server start - mysql -uroot -p$MYSQL_PASSWORD -Bse "create database heat" - sed -i "/^\[database\]/a connection=mysql://root:$MYSQL_PASSWORD@localhost/heat" $conf_file - heat-manage -d db_sync + mycnf=/etc/my.cnf + cat $mycnf + service mysql start + sleep 10 + mysqladmin -u root -p$MYSQL_PASSWORD password $ROOT_MYSQL_PASSWORD + service rabbitmq-server restart +# MySQL DB + _mysql_db_name="heat_db" + _mysql_db_user="heatUser" + _mysql_db_pass="${ROOT_MYSQL_PASSWORD}" + _mysql_root_pass="${ROOT_MYSQL_PASSWORD}" + _mysql_cmd="CREATE DATABASE IF NOT EXISTS $_mysql_db_name DEFAULT CHARACTER SET=utf8; \ + GRANT ALL PRIVILEGES ON $_mysql_db_name.* TO '$_mysql_db_user'@'localhost' IDENTIFIED BY '$_mysql_db_pass'; \ + GRANT ALL PRIVILEGES ON $_mysql_db_name.* TO '$_mysql_db_user'@'%' IDENTIFIED BY '$_mysql_db_pass';" + mysql -uroot -p$_mysql_root_pass -e "$_mysql_cmd" |: + DAEMON_DB_CONSTR="mysql://$_mysql_db_user:$_mysql_db_pass@127.0.0.1:3306/$_mysql_db_name" + iniset $conf_file database connection ${DAEMON_DB_CONSTR} + iniset $conf_file DEFAULT debug 'True' + iniset $conf_file DEFAULT verbose 'True' + iniset $conf_file DEFAULT use_syslog 'False' + iniset $conf_file DEFAULT log_dir /var/log/heat + + heat-manage -d --config-file $conf_file db_sync if [ "$?" != "0" ] then echo "Couldn't execute 'heat-manage db_sync'" @@ -37,7 +121,7 @@ case $package in echo -e "User 'heat' doesn't exist" RES=1 fi - files="policy.json api-paste.ini heat.conf" + config_files="policy.json heat.conf" for i in $config_files; do if [ ! -f "/etc/heat/$i" ]; then RES=1 @@ -57,7 +141,7 @@ case $package in echo -e "User 'heat' doesn't exist" RES=1 fi - files="policy.json api-paste.ini heat.conf" + config_files="policy.json heat.conf" for i in $config_files; do if [ ! -f "/etc/heat/$i" ]; then RES=1 @@ -67,38 +151,60 @@ case $package in ;; heat-api|openstack-heat-api) prepare_vm - screen -dmS heat-api - sleep 3 - echo "Starting Heat API..." - screen -S heat-api -p 0 -X stuff "heat-api --config-file $conf_file -d --log-file /tmp/heat-api.log 2>>/tmp/heat-api.log - " + log_file='/var/log/heat/heat-api.log' + case ${OS_ID} in + 'Ubuntu') + screen -dmS heat-api + sleep 3 + echo "Starting Heat API..." + screen -S heat-api -p 0 -X stuff "heat-api --config-file $conf_file -d --log-file $log_file 2>>$log_file + " + ;; + 'Centos') + systemctl enable openstack-heat-api + systemctl start openstack-heat-api + sleep 5 + systemctl status openstack-heat-api + ;; + esac sleep 7 curl_req=`curl http://localhost:8004/v1/tenant/stacks` - cat /tmp/heat-api.log - if [ `netstat -nat | grep 8004 | wc -l` != 0 ] && [[ $curl_req =~ Auth ]] + cat $log_file + if [ "$(netstat -nat | grep 8004 | wc -l)" != 0 ] && [[ $curl_req =~ Auth ]] then echo "Heat API successfully started" else echo "Heat API didn't start" RES=1 fi + systemctl stop openstack-heat-api ;; heat-engine|openstack-heat-engine) prepare_vm - screen -dmS heat-engine - sleep 3 - echo "Starting Heat Engine..." - screen -S heat-engine -p 0 -X stuff "heat-engine --config-file $conf_file -d --log-file /tmp/heat-engine.log 2>>/tmp/heat-engine.log - " - sleep 7 - cat /tmp/heat-engine.log - trace_count=`cat /tmp/heat-engine.log | grep -i Traceback | wc -l` + log_file='/var/log/heat/heat-engine.log' + case ${OS_ID} in + 'Ubuntu') + screen -dmS heat-engine + sleep 3 + echo "Starting Heat Engine..." + screen -S heat-engine -p 0 -X stuff "heat-engine --config-file $conf_file -d --log-file $log_file 2>>$log_file + " + ;; + 'Centos') + systemctl enable openstack-heat-engine + systemctl start openstack-heat-engine + sleep 5 + systemctl status openstack-heat-engine + ;; + esac + sleep 4 + trace_count=`cat $log_file | grep -i Traceback | wc -l` if [ "$trace_count" -ne "0" ] then echo "Something went wrong! Log file have trace errors! Check logs" RES=1 else - rabbit_connections=`cat /tmp/heat-engine.log | grep 'Connected to AMQP server on' | wc -l` + rabbit_connections=`cat $log_file | grep 'Connected to AMQP server on' | wc -l` if [ "$rabbit_connections" -eq "0" ] then echo "Heat Engine: Can't connected to RabbitMQ" @@ -107,23 +213,34 @@ case $package in echo "Heat Engine successfully started" fi fi + systemctl stop openstack-heat-engine ;; heat-docker|openstack-heat-docker) prepare_vm - screen -dmS heat-engine - sleep 3 - echo "Starting Heat Engine with docker resource..." - screen -S heat-engine -p 0 -X stuff "heat-engine --config-file $conf_file -d --log-file /tmp/heat-engine.log 2>>/tmp/heat-engine.log - " - sleep 7 - cat /tmp/heat-engine.log - trace_count=$(grep -ic Traceback /tmp/heat-engine.log) + log_file='/var/log/heat/heat-engine.log' + case ${OS_ID} in + 'Ubuntu') + screen -dmS heat-engine + sleep 3 + echo "Starting Heat Engine..." + screen -S heat-engine -p 0 -X stuff "heat-engine --config-file $conf_file -d --log-file $log_file 2>>$log_file + " + ;; + 'Centos') + systemctl enable openstack-heat-engine + systemctl start openstack-heat-engine + sleep 5 + systemctl status openstack-heat-engine + ;; + esac + sleep 4 + trace_count=$(grep -ic Traceback $log_file) if [ "$trace_count" -ne "0" ] then echo "Something went wrong! Log file have trace errors! Check logs" RES=1 else - docker_regitered=$(grep -c 'DockerInc::Docker::Container' /tmp/heat-engine.log) + docker_regitered=$(grep -c 'DockerInc::Docker::Container' $log_file) if [ "$docker_regitered" -eq "0" ] then echo "Heat Docker: engine can't load docker resource" @@ -132,17 +249,28 @@ case $package in echo "Heat Docker: engine loaded docker resource successfully" fi fi + systemctl stop openstack-heat-engine ;; heat-api-cfn|openstack-heat-api-cfn) prepare_vm - screen -dmS heat-api-cfn - sleep 3 - echo "Starting Heat API CFN..." - screen -S heat-api-cfn -p 0 -X stuff "heat-api-cfn --config-file $conf_file -d --log-file /tmp/heat-api-cfn.log 2>>/tmp/heat-api-cfn.log - " - sleep 7 - cat /tmp/heat-api-cfn.log - check_start_cfn=`cat /tmp/heat-api-cfn.log | grep 'Starting Heat API on' | wc -l` + log_file='/var/log/heat/heat-api-cfn.log' + case ${OS_ID} in + 'Ubuntu') + screen -dmS heat-api-cfn + sleep 3 + echo "Starting Heat API CFN..." + screen -S heat-api-cfn -p 0 -X stuff "heat-api-cfn --config-file $conf_file -d --log-file $log_file 2>>$log_file + " + ;; + 'Centos') + systemctl enable openstack-heat-api-cfn + systemctl start openstack-heat-api-cfn + sleep 5 + systemctl status openstack-heat-api-cfn + ;; + esac + sleep 4 + check_start_cfn=`cat $log_file | grep 'Starting Heat API on' | wc -l` if [ "$check_start_cfn" -ne "0" ] then echo "Heat API CFN successfully started" @@ -150,17 +278,28 @@ case $package in RES=1 echo "Heat API CFN didn't start" fi + systemctl stop openstack-heat-api-cfn ;; heat-api-cloudwatch|openstack-heat-api-cloudwatch) prepare_vm - screen -dmS heat-api-clw - sleep 3 - echo "Starting Heat API Cloudwatch..." - screen -S heat-api-clw -p 0 -X stuff "heat-api-cloudwatch --config-file $conf_file -d --log-file /tmp/heat-api-clw.log 2>>/tmp/heat-api-clw.log - " - sleep 7 - cat /tmp/heat-api-clw.log - check_start_clw=`cat /tmp/heat-api-clw.log | grep 'Starting Heat CloudWatch API on' | wc -l` + log_file='/var/log/heat/heat-api-cloudwatch.log' + case ${OS_ID} in + 'Ubuntu') + screen -dmS heat-api-cloudwatch + sleep 3 + echo "Starting Heat API Cloudwatch..." + screen -S heat-api-cloudwatch -p 0 -X stuff "heat-api-cloudwatch --config-file $conf_file -d --log-file $log_file 2>>$log_file + " + ;; + 'Centos') + systemctl enable openstack-heat-api-cloudwatch + systemctl start openstack-heat-api-cloudwatch + sleep 5 + systemctl status openstack-heat-api-cloudwatch + ;; + esac + sleep 4 + check_start_clw=`cat $log_file | grep 'Starting Heat CloudWatch API on' | wc -l` if [ "$check_start_clw" -ne "0" ] then echo "Heat API Cloudwatch successfully started" @@ -168,10 +307,15 @@ case $package in RES=1 echo "Heat API Cloudwatch didn't start" fi + systemctl stop openstack-heat-api-cloudwatch ;; *) echo "test not defined, skipping..." ;; esac -killall -15 screen +case ${OS_ID} in + 'Ubuntu') + killall -15 screen + ;; +esac exit $RES -- 2.45.2