summaryrefslogtreecommitdiff
path: root/cloudinit/__init__.py
AgeCommit message (Collapse)Author
2010-06-18improve the cloud-init-run-module code a bit, fix LP:#568139Scott Moser
568139 was fixed because the test for "always" was using "is" instead of "==" LP: #568139
2010-06-18add the instance-id to the environment as INSTANCE_ID for boothooksScott Moser
passing the instance-id of this instance to a boothook will give it the unique id that is needed to implement run-once-per-instance.
2010-06-18add 'cloud-boothook' typeScott Moser
if user data is of type text/cloud-boothook, or begins with #cloud-boothook, then assume it to be code to be executed. Boothooks are a very simple format. Basically, its a one line header ('#cloud-config\n') and then executable payload. The executable payload is written to a file, then that file is executed at the time it is read. The file is left in /var/lib/cloud/data/boothooks There is no "first-time-only" protection. If running only once is desired, the boothook must handle that itself.
2010-06-17make cloud-config modules configurable by cloud-configScott Moser
The list of cloud-config modules is now kept in cloud config itself. There is a builtin list in cloudinit, which is overrideable by /etc/cloud/cloud.cfg or user data cloud-config. This should make the modules more easily added or removed (as no code needs to be edited now) Basic summary of changes: - move CloudConfig.py -> cloudinit/CloudConfig/__init__.py - split cloud-config modules into their own files named cloudinit/CloudConfig/cc_<name>.py - remove all the upstart/cloud-config-* scripts, replacing them with upstart/cloud-config.conf
2010-06-17remove use of cloudinit constants from util.py in get_base_cfg Scott Moser
use get_base_cfg from CloudInit:read_cfg
2010-06-17remove debug printfs from __init__Scott Moser
2010-06-17add initial logging supportScott Moser
This logging infrastructure in cloudinit: - uses python logging - allows user supplied config of logging.config.fileConfig format to be supplied in /etc/cloud/cloud.cfg or in cloud_config by user data. - by default, tries to use syslog, if that is not available, writes directly to /var/log/cloud-init.log (syslog will not be available yet when cloud-init runs) - when using syslog, the doc/21-cloudinit.conf file provides a rsyslogd file to be placed in /etc/rsyslog.d/ that will file [CLOUDINIT] messages to /var/log/cloud-init.log
2010-06-15add vi modelines to python filesScott Moser
2010-03-02purge cache in cloud-init so it doesn't end up persisting across instancesScott Moser
The cache file location is not instance specific. As such, if it is not cleaned from the image, a re-bundle would get the old data. To avoid that, clear the cache in cloud-init.
2010-02-24ensure that cache dir is present if not created, and tighten permissionsScott Moser
on object cache stored there.
2010-02-11rename EC2Init class to CloudInitScott Moser
2010-02-03globally remove ec2init and rename to cloudinitScott Moser