system-config/modules/orchestra/files/openstack_cloud_init
James E. Blair 67bcce274f Updates from new baremetal configuration.
Add orchestra configuration.

Remove tarmac dependency from jenkins slaves.

Add devstack repo to jenkins slave checkout.

Use jenkins public key in cloud-init.

Remove wheel group (not defined in base oneiric).

Clean up sudoers.

Git rid of wheel group dependency.
Git rid of editor link (which may be dangling) and doesn't
really have anything to do with sudo anyway.

Write localrc for devstack with passwords for mysql and rabbitmq.

Install devstack apt depends on install so they make it into the LVM
snapshot.

Add mysql password to a snippet file for the preseed.

Add python-unittest2 to jenkins slaves.
Add more passwords to localrc.

Update syslog config on server.
Fix subscribed exec for cobbler sync.

Update syslog permissions.
Don't log local messages to the orchestra dir.
Add rsyslog sudo perms for jenkins.

Make jenkins ignore known_hosts.

Remove known_hosts file, add .ssh/config file that ignores known_hosts.

Change-Id: Ic1842e5ea6778e8c52857f3441872459bfc05b2c
2011-10-19 20:53:23 -04:00

40 lines
1.8 KiB
Plaintext

#set http_server=$getVar('$http_server', 'true')
<%
import orchestra.utils.cloudinit
import base64
cfg = """#cloud-config
apt_update: false
apt_upgrade: false
disable_root: false
output: {all: '| tee -a /var/log/cloud-init-output.log'}
runcmd:
- echo "cloud init waiting"
- sleep 60
- sudo apt-get -y install kexec-tools
- sudo sed -i /etc/default/kexec -e s/LOAD_KEXEC=false/LOAD_KEXEC=true/
- sudo mkdir /var/spool/rsyslog
- sudo chown syslog.syslog /var/spool/rsyslog
- echo "\$ModLoad imuxsock" > /tmp/rsyslog.conf
- echo "\$WorkDirectory /var/spool/rsyslog" >> /tmp/rsyslog.conf
- echo "\$MaxMessageSize 32k" >> /tmp/rsyslog.conf
- echo "\$ActionQueueType LinkedList" >> /tmp/rsyslog.conf
- echo "\$ActionQueueFileName srvrfwd" >> /tmp/rsyslog.conf
- echo "\$ActionResumeRetryCount -1" >> /tmp/rsyslog.conf
- echo "\$ActionQueueSaveOnShutdown on" >> /tmp/rsyslog.conf
- echo "*.* @@%s:10514" >> /tmp/rsyslog.conf
- sudo mv /tmp/rsyslog.conf /etc/rsyslog.d/10-remote.conf
- sudo chown root.root /etc/rsyslog.d/10-remote.conf
- sudo lvrename /dev/main/root orig_root
- sudo lvcreate -L20G -s -n root /dev/main/orig_root
- reboot
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtioTW2wh3mBRuj+R0Jyb/mLt5sjJ8dEvYyA8zfur1dnqEt5uQNLacW4fHBDFWJoLHfhdfbvray5wWMAcIuGEiAA2WEH23YzgIbyArCSI+z7gB3SET8zgff25ukXlN+1mBSrKWxIza+tB3NU62WbtO6hmelwvSkZ3d7SDfHxrc4zEpmHDuMhxALl8e1idqYzNA+1EhZpbcaf720mX+KD3oszmY2lqD1OkKMquRSD0USXPGlH3HK11MTeCArKRHMgTdIlVeqvYH0v0Wd1w/8mbXgHxfGzMYS1Ej0fzzJ0PC5z5rOqsMqY1X2aC1KlHIFLAeSf4Cx0JNlSpYSrlZ/RoiQ== hudson@hudson
""" % http_server
user_data = orchestra.utils.cloudinit.get_user_data_late_command(base64.b64encode(cfg))
%> \
$orchestra.utils.cloudinit.get_meta_data_late_command($getVar('$uid', 'true'), $getVar('$hostname', 'true')) \ && \
$user_data \