summaryrefslogtreecommitdiff
path: root/cloudinit/DataSourceEc2.py
AgeCommit message (Collapse)Author
2011-01-25use timestamp.gmtime() for timestamps rather than time() or datetimeScott Moser
2011-01-19convert 'cachedir' to 'seeddir', move cloud_config, scripts to instanceScott Moser
- cloud_config and scripts now live in instance directory - cachedir is now more correctly named 'seeddir'
2011-01-18remove 'get_locale' from DataSourceEc2.Scott Moser
Previously the 'get_locale()' method of DataSourceEc2 would select a default locale based on the availability zone that the instance was running on. I generally don't like that as a.) there are loads of other locales than en_US and en_GB (that were being used) b.) either one is almost certainly not really the users preferred locale. Just because I launch an instance in eu-west-1 doesn't mean I perfer en_GB.
2010-09-16If instance is in EC2 VPC, then do not use ec2 ubuntu archive (LP: #615545)Scott Moser
VPC instances cannot reach other hosts in EC2 (such as the archives). In this case, use the default mirror instead. LP: #615545
2010-09-10improve warning message in DataSourceEc2Scott Moser
2010-09-09device_name_to_device: return the md's device string even if no deviceScott Moser
The logic behind returning a device even if it is not present is that it *could* be present later, or after a stop and restart. Additionally this gives the caller more information to differenciate itself between "device did not exist" and "device was not present in metadata service".
2010-08-12use read_optional_seed, change 'parse_cmdline_data' to return booleanScott Moser
using read_optional_seed in DataSourceEc2 and DataSourceNoCloud. change parse_cmdline_data to fill a dictionary that is supplied by caller. It then returns strictly true or false based on whether or not it was specified in cmdline
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-08-09DataSourceEc2.py: remap dev names when metadata service disagress with kernelScott Moser
device names presented in the metadata service may not be what the kernel has named them. This can be for more than 1 reason. But some examples: - device is virtio, metadata named 'sd' - device is xvdX, metadata named sd Those are the two situations that are covered here. More complex, but not covered are possibly: - metadata service named device 'sda1', but it should actually be 'vdb1' LP: #611137
2010-07-01fix invalid log string when reading from preseeded ec2 cacheScott Moser
2010-06-18change debug messages in DataSourceEc2Scott Moser
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-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-02-04add copyright informationScott Moser
2010-02-03globally remove ec2init and rename to cloudinitScott Moser