%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/var/lib/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/var/lib/heat/.dummy
rm -rf $RPM_BUILD_ROOT/%{python_sitelib}/heat/tests
rm -rf $RPM_BUILD_ROOT/%{python_sitelib}/heat-0.0.1-py2.7.egg-info
%files engine
%defattr(-,root,root,-)
%{_bindir}/heat-engine
-%{python_sitelib}/heat/engine/capelistener.*
%{python_sitelib}/heat/engine/client.*
+%{python_sitelib}/heat/engine/parser.*
+%{python_sitelib}/heat/engine/resources.*
+%{python_sitelib}/heat/engine/simpledb.*
%{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.*
+%{python_sitelib}/heat/engine/api/v1/events.*
%{_localstatedir}/log/heat/engine.log
%files jeos
%defattr(-,root,root,-)
%{python_sitelib}/heat/jeos/F16-x86_64-gold-jeos.tdl
+%{python_sitelib}/heat/jeos/F17-x86_64-gold-jeos.tdl
%files openstack
%defattr(-,root,root,-)
--- /dev/null
+<template>
+ <name>F17-x86_64-gold-jeos</name>
+ <os>
+ <name>Fedora</name>
+ <version>17</version>
+ <arch>x86_64</arch>
+ <install type='iso'>
+ <iso>file:/var/lib/libvirt/images/Fedora-17-x86_64-DVD.iso</iso>
+ </install>
+ <rootpw>password</rootpw>
+ </os>
+ <description>Fedora 17</description>
+ <commands>
+ <command name='commands'>
+yum -y update;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local
+#!/bin/bash
+setenforce 0
+while true; do
+gdbus introspect --system --dest org.freedesktop.NetworkManager --object-path /org/freedesktop/NetworkManager/Devices/0 | grep "State = 100"
+if [ \$? -eq 0 ]
+then
+break
+fi
+sleep 1
+done
+systemctl start matahari-host.service
+systemctl start matahari-service.service
+
+if [ ! -d /root/.ssh ]; then
+ mkdir -p /root/.ssh
+ chmod 700 /root/.ssh
+fi
+
+# Fetch public key using HTTP
+ATTEMPTS=10
+while [ ! -f /root/.ssh/authorized_keys ]; do
+ curl -f http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key > /tmp/aws-key 2>/dev/null
+ if [ \$? -eq 0 ]; then
+ cat /tmp/aws-key >> /root/.ssh/authorized_keys
+ chmod 0600 /root/.ssh/authorized_keys
+ restorecon /root/.ssh/authorized_keys
+ rm -f /tmp/aws-key
+ echo "Successfully retrieved AWS public key from instance metadata"
+ else
+ FAILED=\$((\$FAILED + 1))
+ if [ \$FAILED -ge \$ATTEMPTS ]; then
+ echo "Failed to retrieve AWS public key after \$FAILED attempts, quitting"
+ break
+ fi
+ echo "Could not retrieve AWS public key (attempt #\$FAILED/\$ATTEMPTS), retrying in 5 seconds..."
+ sleep 5
+ fi
+done
+EOF
+ </command>
+ </commands>
+</template>