]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Adding F17 JEOS tdl
authorChris Alfonso <calfonso@redhat.com>
Wed, 28 Mar 2012 16:43:54 +0000 (12:43 -0400)
committerChris Alfonso <calfonso@redhat.com>
Wed, 28 Mar 2012 16:43:54 +0000 (12:43 -0400)
Issue #25

MANIFEST.in
heat.spec
heat/jeos/F17-x86_64-gold-jeos.tdl [new file with mode: 0644]

index 28273a743d105d3a704b0e1c26bdf1b244143ced..a082199a46a89c311fa40d25f46b879aa58817e9 100644 (file)
@@ -6,6 +6,7 @@ include openstack-common.conf
 include babel.cfg
 graft templates
 include heat/jeos/F16-x86_64-gold-jeos.tdl
+include heat/jeos/F17-x86_64-gold-jeos.tdl
 graft etc
 graft docs
 graft var
index bda26c8ecbaf73763b04f1253ed3de86a38db6ae..fc65f60c5a15302509633c389b4c24c6ef2d0b28 100644 (file)
--- a/heat.spec
+++ b/heat.spec
@@ -26,10 +26,12 @@ 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/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
 
@@ -125,19 +127,21 @@ This package contains the OpenStack integration for the Heat project
 %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,-)
diff --git a/heat/jeos/F17-x86_64-gold-jeos.tdl b/heat/jeos/F17-x86_64-gold-jeos.tdl
new file mode 100644 (file)
index 0000000..095093e
--- /dev/null
@@ -0,0 +1,57 @@
+<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 &lt;&lt; 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>