Add F17 cftools TDL
Signed-off-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
parent
d6cce8198d
commit
f4d4f60f8f
@ -8,6 +8,7 @@ graft templates
|
||||
include heat/jeos/F16-x86_64-gold-jeos.tdl
|
||||
include heat/jeos/F17-x86_64-gold-jeos.tdl
|
||||
include heat/jeos/F16-x86_64-cftools-jeos.tdl
|
||||
include heat/jeos/F17-x86_64-cftools-jeos.tdl
|
||||
include heat/db/sqlalchemy/migrate_repo/migrate.cfg
|
||||
graft etc
|
||||
graft docs
|
||||
|
68
heat/jeos/F17-x86_64-cftools-jeos.tdl
Normal file
68
heat/jeos/F17-x86_64-cftools-jeos.tdl
Normal file
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<name>F17-x86_64-cftools-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'>
|
||||
rm -f /etc/yum.repos.d/fedora-updates*;yum -y install cloud-init;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
|
||||
|
||||
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
|
||||
while [ ! -f /var/lib/cloud/instance/user-data.txt ]; do
|
||||
sleep 1
|
||||
done
|
||||
base64 -d /var/lib/cloud/instance/user-data.txt > /tmp/startup
|
||||
chmod +x /tmp/startup
|
||||
chmod +x /opt/aws/bin/cfn-*
|
||||
/tmp/startup
|
||||
EOF
|
||||
</command>
|
||||
</commands>
|
||||
<files>
|
||||
<file name='/opt/aws/bin/cfn-init' type='base64'></file>
|
||||
<file name='/opt/aws/bin/cfn-hup' type='base64'></file>
|
||||
<file name='/opt/aws/bin/cfn-signal' type='base64'></file>
|
||||
</files>
|
||||
|
||||
</template>
|
Loading…
Reference in New Issue
Block a user