]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Add MANIFEST.in and add a oz tdl for a F16 jeos
authorSteven Dake <sdake@redhat.com>
Mon, 19 Mar 2012 03:20:41 +0000 (20:20 -0700)
committerSteven Dake <sdake@redhat.com>
Mon, 19 Mar 2012 03:20:41 +0000 (20:20 -0700)
Signed-off-by: Steven Dake <sdake@redhat.com>
MANIFEST.in [new file with mode: 0644]
heat/jeos/F16-x86_64-gold-jeos.tdl [new file with mode: 0644]

diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644 (file)
index 0000000..51529cd
--- /dev/null
@@ -0,0 +1,7 @@
+include HACKING.rst
+include LICENSE
+include MANIFEST.in pylintrc
+include openstack-common.conf
+include babel.cfg
+graft templates
+include heat/jeos/F16-x86_64-gold-jeos.tdl
diff --git a/heat/jeos/F16-x86_64-gold-jeos.tdl b/heat/jeos/F16-x86_64-gold-jeos.tdl
new file mode 100644 (file)
index 0000000..0cfe88e
--- /dev/null
@@ -0,0 +1,57 @@
+<template>
+  <name>F16-x86_64-gold-jeos</name>
+  <os>
+    <name>Fedora</name>
+    <version>16</version>
+    <arch>x86_64</arch>
+    <install type='iso'>
+      <iso>file:/var/lib/libvirt/images/Fedora-16-x86_64-DVD.iso</iso>
+    </install>
+    <rootpw>password</rootpw>
+  </os>
+  <description>Fedora 16</description>
+  <commands>
+    <command name='commands'>
+yum -y update;yum -y install matahari-core matahari-host matahari-service;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>