diff --git a/MANIFEST.in b/MANIFEST.in index cf1405064a..28273a743d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,8 +1,11 @@ include HACKING.rst include LICENSE +include README.rst include MANIFEST.in pylintrc include openstack-common.conf include babel.cfg graft templates include heat/jeos/F16-x86_64-gold-jeos.tdl graft etc +graft docs +graft var diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..0a24d7e27c --- /dev/null +++ b/Makefile @@ -0,0 +1,84 @@ +#!/usr/bin/make + +NAME = "heat" +ASCII2MAN = a2x -D $(dir $@) -d manpage -f manpage $< +ASCII2HTMLMAN = a2x -D docs/html/man/ -d manpage -f xhtml +MANPAGES := docs/man/man1/heat.1 +SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") +RPMVERSION := $(shell awk '/Version/{print $$2; exit}' < heat.spec | cut -d "%" -f1) +RPMRELEASE := $(shell awk '/Release/{print $$2; exit}' < heat.spec | cut -d "%" -f1) +RPMNVR = "$(NAME)-$(RPMVERSION)-$(RPMRELEASE)" + +all: clean python + +docs: $(MANPAGES) + +%.1: %.1.asciidoc + $(ASCII2MAN) + +%.5: %.5.asciidoc + $(ASCII2MAN) + +pep8: + @echo "#############################################" + @echo "# Running PEP8 Compliance Tests" + @echo "#############################################" + pep8 -r --ignore=E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E225 lib/ bin/ + +clean: + @echo "Cleaning up distutils stuff" + -rm -rf build + -rm -rf dist + @echo "Cleaning up byte compiled python stuff" + find . -regex ".*\.py[co]$$" -delete + @echo "Cleaning up editor backup files" + find . -type f \( -name "*~" -or -name "#*" \) -delete + find . -type f \( -name "*.swp" \) -delete + @echo "Cleaning up asciidoc to man transformations and results" + find ./docs/man -type f -name "*.xml" -delete + @echo "Cleaning up output from test runs" + -rm -rf test/test_data + @echo "Cleaning up RPM building stuff" + -rm -rf MANIFEST rpm-build + +python: + python setup.py build + +install: + python setup.py install + +sdist: clean + python ./setup.py sdist + +rpmcommon: sdist + @mkdir -p rpm-build + @cp dist/*.gz rpm-build/ + +srpm: rpmcommon + @rpmbuild --define "_topdir %(pwd)/rpm-build" \ + --define "_builddir %{_topdir}" \ + --define "_rpmdir %{_topdir}" \ + --define "_srcrpmdir %{_topdir}" \ + --define "_specdir %{_topdir}" \ + --define "_sourcedir %{_topdir}" \ + -bs heat.spec + @echo "#############################################" + @echo "heat SRPM is built:" + @echo " rpm-build/$(RPMNVR).src.rpm" + @echo "#############################################" + +rpm: rpmcommon + @rpmbuild --define "_topdir %(pwd)/rpm-build" \ + --define "_builddir %{_topdir}" \ + --define "_rpmdir %{_topdir}" \ + --define "_srcrpmdir %{_topdir}" \ + --define "_specdir %{_topdir}" \ + --define "_sourcedir %{_topdir}" \ + -ba heat.spec + @echo "#############################################" + @echo "heat RPM is built:" + @echo " rpm-build/noarch/$(RPMNVR).noarch.rpm" + @echo "#############################################" + +.PHONEY: docs manual clean pep8 +vpath %.asciidoc docs/man/man1 diff --git a/docs/man/man1/heat.1 b/docs/man/man1/heat.1 new file mode 100644 index 0000000000..5b99e4549b --- /dev/null +++ b/docs/man/man1/heat.1 @@ -0,0 +1,58 @@ +'\" t +.\" Title: heat +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 03/31/2012 +.\" Manual: System administration commands +.\" Source: Heat 0.0.1 +.\" Language: English +.\" +.TH "HEAT" "1" "03/31/2012" "HEAT 0\&.0\&.1" "System administration commands" +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +heat \- run a command somewhere else +.SH "SYNOPSIS" +.sp +heat +.SH "DESCRIPTION" +.sp +\fBHeat\fR is a tool to orchestrate the setup of multiple cloud applications\&. +.SH "ARGUMENTS" +.PP +\fBcommand\fR +.RS 4 +heat command\&. +.RE +.SH "OPTIONS" +.PP +\fB\-t\fR, \fB\-\-template\fR +.RS 4 +The template to use set up a stack\&. +.RE +.PP +\fB\-f\fR, \fB\-\-forks\fR +.RS 4 +Level of parallelism\&. Specify as an integer, the default is 5\&. +.RE +.SH "INVENTORY" +.sp +Heat orchestrates the setup of multiple cloud applications\&. +.SH "AUTHOR" +.sp +Heat was originally written by Angus Salkeld\&. See the AUTHORS file for a complete list of contributors\&. +.SH "COPYRIGHT" +.sp +Copyright \(co 2012, Red Hat Inc +.sp +Ansible is released under the terms of the ASL 2 License\&. +.sp +Extensive documentation as well as IRC and mailing list info is available on the heat home page: https://heat\&-project\&.org/ diff --git a/heat.spec b/heat.spec new file mode 100644 index 0000000000..bda26c8ecb --- /dev/null +++ b/heat.spec @@ -0,0 +1,146 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} + +Name: heat +Summary: The Heat project +Version: 0.0.1 +Release: 1 +License: ASL 2.0 +Prefix: %{_prefix} +Group: System Environment/Base +URL: http://www.heat-project.org +Source0: http://heat-project.org/downloads/%{name}-%{version}/%{name}-%{version}.tar.gz + +Requires: pacemaker-cloud + +BuildArch: noarch +BuildRequires: python-glance + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot + +%prep +%setup -q -n %{name}-%{version} + +%build +python setup.py build + +%install +python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES +mkdir -p $RPM_BUILD_ROOT/var/log/heat/ +mkdir -p $RPM_BUILD_ROOT/etc/heat/ +cp etc/* $RPM_BUILD_ROOT/etc/heat/ +mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/ +cp -v docs/man/man1/heat.1 $RPM_BUILD_ROOT/%{_mandir}/man1/ +rm -rf $RPM_BUILD_ROOT/%{python_sitelib}/heat/tests +rm -rf $RPM_BUILD_ROOT/%{python_sitelib}/heat-0.0.1-py2.7.egg-info + +%clean +rm -rf $RPM_BUILD_ROOT + +%description +Heat provides a programmable interface to orchestrate the setup of multiple cloud applications + +%package api +License: ASL 2.0 +Summary: External API for the Heat project +Group: System Environment/Base +Requires: %{name} = %{version}-%{release} + +%description api +This package contains the external api for the Heat project + +%package common +License: ASL 2.0 +Summary: Common utilities for the Heat project +Group: System Environment/Base +Requires: %{name} = %{version}-%{release} + +%description common +This package contains the common utilities for the Heat project + +%package engine +License: ASL 2.0 +Summary: Engine for the Heat project +Group: System Environment/Base +Requires: %{name} = %{version}-%{release} + +%description engine +This package contains the engine and internal API for the Heat project + +%package jeos +License: ASL 2.0 +Summary: JEOS configuration files for the Heat project +Group: System Environment/Base +Requires: %{name} = %{version}-%{release} + +%description jeos +This package contains the Just Enough OS configuration files supported by the Heat project + +%package openstack +License: ASL 2.0 +Summary: OpenStack integration for the Heat project +Group: System Environment/Base +Requires: %{name} = %{version}-%{release} + +%description openstack +This package contains the OpenStack integration for the Heat project + + +%files +%doc README.rst PKG-INFO +%defattr(-,root,root,-) +%{_mandir}/man1/*.gz +%{_bindir}/heat +%{python_sitelib}/heat/__init__.* +%{python_sitelib}/heat/client.* +%{python_sitelib}/heat/cloudformations.* +%{python_sitelib}/heat/vcsversion.* +%{python_sitelib}/heat/version.* +%config(noreplace) /etc/heat + +%files api +%defattr(-,root,root,-) +%{_bindir}/heat-api +%{python_sitelib}/heat/api/__init__.* +%{python_sitelib}/heat/api/versions.* +%{python_sitelib}/heat/api/middleware/__init__.* +%{python_sitelib}/heat/api/middleware/version_negotiation.* +%{python_sitelib}/heat/api/middleware/context.* +%{python_sitelib}/heat/api/v1/__init__.* +%{python_sitelib}/heat/api/v1/stacks.* +%{_localstatedir}/log/heat/api.log + +%files common +%defattr(-,root,root,-) +%{python_sitelib}/heat/common/auth.* +%{python_sitelib}/heat/common/client.* +%{python_sitelib}/heat/common/config.* +%{python_sitelib}/heat/common/context.* +%{python_sitelib}/heat/common/crypt.* +%{python_sitelib}/heat/common/exception.* +%{python_sitelib}/heat/common/__init__.* +%{python_sitelib}/heat/common/policy.* +%{python_sitelib}/heat/common/utils.* +%{python_sitelib}/heat/common/wsgi.* + +%files engine +%defattr(-,root,root,-) +%{_bindir}/heat-engine +%{python_sitelib}/heat/engine/capelistener.* +%{python_sitelib}/heat/engine/client.* +%{python_sitelib}/heat/engine/__init__.* +%{python_sitelib}/heat/engine/json2capexml.* +%{python_sitelib}/heat/engine/systemctl.* +%{python_sitelib}/heat/engine/api/__init__.* +%{python_sitelib}/heat/engine/api/v1/__init__.* +%{python_sitelib}/heat/engine/api/v1/stacks.* +%{_localstatedir}/log/heat/engine.log + +%files jeos +%defattr(-,root,root,-) +%{python_sitelib}/heat/jeos/F16-x86_64-gold-jeos.tdl + +%files openstack +%defattr(-,root,root,-) +%{python_sitelib}/heat/openstack/__init__.* +%{python_sitelib}/heat/openstack/common/cfg.* +%{python_sitelib}/heat/openstack/common/__init__.* diff --git a/heat/version.py b/heat/version.py index e94d045052..5b6b577390 100644 --- a/heat/version.py +++ b/heat/version.py @@ -20,8 +20,8 @@ except ImportError: 'revision_id': 'LOCALREVISION', 'revno': 0} -GLANCE_VERSION = ['2012', '1', None] -YEAR, COUNT, REVSISION = GLANCE_VERSION +GLANCE_VERSION = ['0.0', '1'] +COUNT, REVSISION = GLANCE_VERSION FINAL = False # This becomes true at Release Candidate time diff --git a/setup.py b/setup.py index a3447c9d87..835f3bacc8 100755 --- a/setup.py +++ b/setup.py @@ -93,5 +93,7 @@ setup( data_files=[('/etc/heat', ['etc/heat-api.conf', 'etc/heat-api-paste.ini', 'etc/heat-engine.conf', - 'etc/heat-engine-paste.ini'])], + 'etc/heat-engine-paste.ini']), + ('/var/log/heat', ['var/log/heat/api.log', + 'var/log/heat/engine.log'])], py_modules=[])