2009-06-11 02:31:27 |
Eric Hammond |
description |
The startup code in /etc/init.d/ec2-init should only run on the first boot.
If the user performs actions like the following, they should not be overriden simply by rebooting the instance:
- Change the locale
- Remove /home/ubuntu/.ssh/authorized_keys
- Set up a different host name.
- Add entries to /etc/hosts
- Remove /etc/apt/sources.list
All these user changes are discarded on reboot on an image like
ami-5d59be34
canonical-cloud-us/ubuntu-hardy-20090422-i386.manifest.xml
The /usr/sbin/ec2-run-user-data program has code in it which checks the correct way for whether or not a process has been run on the current instance. It is important to use the AMI id so that if the current instance is rebundled as a new AMI and new instances of that are run, the process executes on the first boot of those instances. |
The startup code in /etc/init.d/ec2-init should only run on the first boot.
If the user performs actions like the following, they should not be overriden simply by rebooting the instance:
- Change the locale
- Remove /home/ubuntu/.ssh/authorized_keys
- Set up a different host name.
- Add entries to /etc/hosts
- Remove /etc/apt/sources.list
All these user changes are discarded on reboot on an image like
ami-5d59be34
canonical-cloud-us/ubuntu-hardy-20090422-i386.manifest.xml
Some of these startup processes should only run once ever, and some should run on the first boot of each instance (based on the AMI id). See below for more notes on this. |
|