summaryrefslogtreecommitdiff
path: root/cloud-init.py
AgeCommit message (Collapse)Author
2011-03-02fix bug preventing early exit of cloud-init on 'no-net' pathScott Moser
2011-02-18improve startup if no eth0 is available (LP: #714807)Scott Moser
LP: #714807
2011-02-07add config option 'manual_cache_clean'.Scott Moser
This option allows user to specify manual cleaning of the /var/lib/cloud/instance/ link, for a data source that might not be present on every boot.
2011-01-26make cloud-init's warning more obviously a warning (prepend WARN)Scott Moser
2011-01-26rework of DataSource loading.Scott Moser
The DataSources that are loaded are now controlled entirely via configuration file of 'datasource_list', like: datasource_list: [ "NoCloud", "OVF", "Ec2" ] Each item in that list is a "DataSourceCollection". for each item in the list, cloudinit will attempt to load: cloudinit.DataSource<item> and, failing that, DataSource<item> The module is required to have a method named 'get_datasource_list' in it that takes a single list of "dependencies" and returns a list of python classes inside the collection that can run needing only those dependencies. The dependencies are defines in DataSource.py. Currently: DEP_FILESYSTEM = "FILESYSTEM" DEP_NETWORK = "NETWORK" When 'get_datasource_list' is called for the DataSourceOVF module with [DEP_FILESYSTEM], then DataSourceOVF returns a single item list with a reference to the 'DataSourceOVF' class. When 'get_datasource_list' is called for the DataSourceOVF module with [DEP_FILESYSTEM, DEP_NETWORK], it will return a single item list with a reference to 'DataSourceOVFNet'. cloudinit will then instanciate the class and call its 'get_data' method. if the get_data method returns 'True', then it selects this class as the selected Datasource.
2011-01-26change 'except' syntax to python 3 style.Scott Moser
Everywhere that there occurred: except Exception, e: changed to except Exception as e:
2011-01-25add support for redirecting output of cloud-init, cloud-config and cloud-finalScott Moser
2011-01-24cloud-init.py: fix bad variable nameScott Moser
2011-01-24cloud-init.py: add trailing carriage return to messageScott Moser
2011-01-21add function to cloud-init to run cloud-config style modulesScott Moser
add 'hostname' cloud-config option for setting hostname make rsyslog and resizefs run at cloud-init time
2011-01-19write the previous-hostname file to persistent cloud/dataScott Moser
This change just uses a different facility for coming up with the path. But, by design I'm chosing to put 'previous-hostname' in /var/lib/cloud/data/ rather than in /var/lib/cloud/instance/data/ The idea is that if the user: - started an instance - modified /etc/hostname - bundled instance (or create-image from it) - started new instance They would expect their modified /etc/hostname to persist. As such, the previous-hostname file should be cross-instance data. Bugs in this area include LP: #596993 and LP: #514492
2011-01-19improve log message on failure of initfs. run on both start-local and startScott Moser
2011-01-19cloud-init.py: log exception on failure to set hostnameScott Moser
2011-01-19initial /var/lib rework still lots to do. includes a fix for LP: #704509Scott Moser
LP: #704509
2011-01-18move setting of default locale out of cloud-init, into cloud-configScott Moser
Now, instead of setting a default value in cloud-init based only on the DataSource, this supports using 'locale' in the cloud-config.
2010-08-12initial dump of "sans-cloud" code (DataSourceNoCloud)Scott Moser
The new classes 'DataSourceNoCloud' and 'DataSourceNoCloudNet' implement a way to get data from the filesystem, or (very minimal) data from the kernel command line. This allows the user to seed data to these sources. There are now 2 "cloud-init" jobs, cloud-init-local that runs on mounted MOUNTPOINT=/ and 'cloud-init' that runs on start on (mounted MOUNTPOINT=/ and net-device-up IFACE=eth0 and stopped cloud-init-local ) The idea is that cloud-init-local can actually function without network. The last thing in this commit is "uncloud-init". This tool can be invoked as 'init=/usr/lib/cloud-init/uncloud-init' It will "uncloudify" things in the image, generally making it easier to use for a simpler environment, and then it will exec /sbin/init.
2010-07-07manage hostname setting better (LP: #596993)Scott Moser
On EBS instances, a shutdown and later start would end up with a different IP address. In the case where the user has not modified /etc/hostname from its original value (seeded by metadata's 'local-hostname'), then cloud-init will again set the hostname and update /etc/hostname. In the case where the user *has* modified /etc/hostname, it will remain user managed. Additionally, if /etc/cloud/cloud.cfg contains 'preserve_hostname' value set to a True value, then /etc/hostname will not ever be touched. LP: #596993
2010-06-17cloud-init: remove additional new line in log messageScott 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-05-05wait considerably longer (1050 seconds) for metadata service to come upScott Moser
Also - adds some debugging information when its waiting - add 'uptime' printout on initial cloud-init invocation
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-11rename EC2Init class to CloudInitScott Moser
2010-02-10only set hostname once per instance. (LP: #514492)Scott Moser
LP: #514492
2010-02-04add copyright informationScott Moser
2010-02-04more removal of 'ec2init' string, replacement with cloud-initScott Moser