From 969cbd1b5daa98a6e4d0d87750bde348fcf267e6 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 11 Jan 2010 23:29:18 -0500 Subject: refactor the config class and jobs to run through cloud-init-cfg At this point, the following should be functional: cloud-init-cfg apt-update-upgrade --- upstart/cloud-apt-update-upgrade.conf | 12 ++++++++++++ upstart/cloud-config-ssh.conf | 13 +++++++++++++ upstart/cloud-ebs-mounts.conf | 12 ++++++++++++ upstart/cloud-raid.conf | 12 ++++++++++++ upstart/cloud-run-user-script.conf | 2 +- upstart/cloud-runurl.conf | 13 +++++++++++++ upstart/ec2-apt-update.conf | 13 ------------- upstart/ec2-ebs-mounts.conf | 12 ------------ upstart/ec2-preconf-ssh-keys.conf | 13 ------------- upstart/ec2-raid.conf | 12 ------------ upstart/ec2-runurl.conf | 13 ------------- upstart/ec2-update-software.conf | 12 ------------ 12 files changed, 63 insertions(+), 76 deletions(-) create mode 100644 upstart/cloud-apt-update-upgrade.conf create mode 100644 upstart/cloud-config-ssh.conf create mode 100644 upstart/cloud-ebs-mounts.conf create mode 100644 upstart/cloud-raid.conf create mode 100644 upstart/cloud-runurl.conf delete mode 100644 upstart/ec2-apt-update.conf delete mode 100644 upstart/ec2-ebs-mounts.conf delete mode 100644 upstart/ec2-preconf-ssh-keys.conf delete mode 100644 upstart/ec2-raid.conf delete mode 100644 upstart/ec2-runurl.conf delete mode 100644 upstart/ec2-update-software.conf (limited to 'upstart') diff --git a/upstart/cloud-apt-update-upgrade.conf b/upstart/cloud-apt-update-upgrade.conf new file mode 100644 index 00000000..a5060f69 --- /dev/null +++ b/upstart/cloud-apt-update-upgrade.conf @@ -0,0 +1,12 @@ +# ec2-software-update - Update software at boot +# +# Update software at boot + +description "Update software at boot" + +start on (cloud-config + and local-filesystem + and net-device-up IFACE=eth0) +console output + +exec cloud-init-cfg apt-update-upgrade diff --git a/upstart/cloud-config-ssh.conf b/upstart/cloud-config-ssh.conf new file mode 100644 index 00000000..65d29941 --- /dev/null +++ b/upstart/cloud-config-ssh.conf @@ -0,0 +1,13 @@ +# ec2-preconf-ssh-keys +# +# Download preconfigured ssh-keys for EC2. + +description "Download preconfigured ssh keys" + +start on (cloud-config + and local-filesystem + and net-device-ifup IFACE=eth0 and starting ssh) +console output +task + +exec cloud-init-cfg config-ssh diff --git a/upstart/cloud-ebs-mounts.conf b/upstart/cloud-ebs-mounts.conf new file mode 100644 index 00000000..03ddfa40 --- /dev/null +++ b/upstart/cloud-ebs-mounts.conf @@ -0,0 +1,12 @@ +# ec2-ebs-mounts +# +# Mount EC2 EBS mount points + +description "Populate EBS mountpoints" + +start on cloud-config + +console output +task + +exec cloud-init-cfg ec2-ebs-mounts diff --git a/upstart/cloud-raid.conf b/upstart/cloud-raid.conf new file mode 100644 index 00000000..d4644c89 --- /dev/null +++ b/upstart/cloud-raid.conf @@ -0,0 +1,12 @@ +# ec2-raid - Setup ephemeral storage RAID and mount points +# +# Setup ephemeral storage RAID and mount points + +description "Setup RAID storage and moint points" + +start on (cloud-config + and local-filesystem) +console output +task + +exec cloud-init-cfg setup-raid diff --git a/upstart/cloud-run-user-script.conf b/upstart/cloud-run-user-script.conf index cf76fe32..272bc409 100644 --- a/upstart/cloud-run-user-script.conf +++ b/upstart/cloud-run-user-script.conf @@ -3,7 +3,7 @@ description "execute cloud user scripts" -start on (stopped rc RUNLEVEL=[2345] and cloud-config) +start on (stopped ec2init and stopped rc RUNLEVEL=[2345]) console output task diff --git a/upstart/cloud-runurl.conf b/upstart/cloud-runurl.conf new file mode 100644 index 00000000..f2140c32 --- /dev/null +++ b/upstart/cloud-runurl.conf @@ -0,0 +1,13 @@ +# ec2-runurl - Run runurl at boot +# +# Runurl at boot + +description "Run runurl" + +start on (cloud-config + and local-filesystem + and net-device-ifup IFACE=eth0) +console output +task + +exec cloud-init-cfg runurl diff --git a/upstart/ec2-apt-update.conf b/upstart/ec2-apt-update.conf deleted file mode 100644 index b280801b..00000000 --- a/upstart/ec2-apt-update.conf +++ /dev/null @@ -1,13 +0,0 @@ -# ec2-apt-update - Update archive at boot time -# -# Update archive at boot - -description "Update archive at boot" - -start on (cloud-config - and local-filesystems - and net-device-up IFACE=eth0) -console output -task -# exec /usr/sbin/cloud-init-run --once ec2-apt-update ec2-apt-update -exec /usr/sbin/ec2-apt-update diff --git a/upstart/ec2-ebs-mounts.conf b/upstart/ec2-ebs-mounts.conf deleted file mode 100644 index a1457f6a..00000000 --- a/upstart/ec2-ebs-mounts.conf +++ /dev/null @@ -1,12 +0,0 @@ -# ec2-ebs-mounts -# -# Mount EC2 EBS mount points - -description "Populate EBS mountpoints" - -start on cloud-config - -console output -task - -exec /usr/sbin/ec2-ebs-mount diff --git a/upstart/ec2-preconf-ssh-keys.conf b/upstart/ec2-preconf-ssh-keys.conf deleted file mode 100644 index 383b5bbc..00000000 --- a/upstart/ec2-preconf-ssh-keys.conf +++ /dev/null @@ -1,13 +0,0 @@ -# ec2-preconf-ssh-keys -# -# Download preconfigured ssh-keys for EC2. - -description "Download preconfigured ssh keys" - -start on (cloud-config - and local-filesystem - and net-device-ifup IFACE=eth0) -console out -task - -exec /usr/sbin/ec2-preconf-ssh-keys diff --git a/upstart/ec2-raid.conf b/upstart/ec2-raid.conf deleted file mode 100644 index e4364373..00000000 --- a/upstart/ec2-raid.conf +++ /dev/null @@ -1,12 +0,0 @@ -# ec2-raid - Setup ephemeral storage RAID and mount points -# -# Setup ephemeral storage RAID and mount points - -description "Setup RAID storage and moint points" - -start on (cloud-config - and local-filesystem) -console output -task - -exec /usr/sbin/ec2-setup-raid diff --git a/upstart/ec2-runurl.conf b/upstart/ec2-runurl.conf deleted file mode 100644 index 28249f8d..00000000 --- a/upstart/ec2-runurl.conf +++ /dev/null @@ -1,13 +0,0 @@ -# ec2-runurl - Run runurl at boot -# -# Runurl at boot - -description "Run runurl" - -start on (cloud-config - and local-filesystem - and net-device-ifup IFACE=eth0) -console output -task - -exec /usr/sbin/ec2-runurl diff --git a/upstart/ec2-update-software.conf b/upstart/ec2-update-software.conf deleted file mode 100644 index ee3131d1..00000000 --- a/upstart/ec2-update-software.conf +++ /dev/null @@ -1,12 +0,0 @@ -# ec2-software-update - Update software at boot -# -# Update software at boot - -description "Update software at boot" - -start on (cloud-config - and local-filesystem - and net-device-iup IFACE=eth0) -console output - -exec /usr/sbin/ec2-update-software -- cgit v1.2.3