summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-08-03add get_hostname_fqdn method to 'util' and use it for getting hostnameScott Moser
This adds a method 'get_hostname_fqdn' to cloudinit.util, and then uses this method for getting the hostname and fqdn in places that get hostname. The single place for getting it right will help.
2011-08-03improve update_etc_hosts method in cc_update_etc_hostsScott Moser
This fixes a couple issues with the updating of /etc/hosts by the update-etc-hosts cloud-config module. * if hostname changed in the life of the instance, an additional "header" line would be added. * any comment lines like '#mycomment' would be deleted because they did not have 2 fields
2011-08-03add example part-handler implementing the version 2 part-handlerScott Moser
2011-08-02This fixes LP: #819507, to make consume_userdata run 'always'Scott Moser
consume_userdata should really run always, rather than once per instance. The documentation says that boothooks were on their own for per-instance but since this routine was only being called once, they would only get called once. This modifies the behavior to be: user_script: per_always cloud_config : per_always upstart_job : per_instance cloud_boothook: per_always In order to not break part handlers that are existing, and expect to only be called once per instance, this adds a 'handler_version' item in a handler that can indicate the version (currently 1 or 2). If it is 2, then the hander will be passed the frequency (per-instance or per-always) that this is being run. That way the handler can differenciate between them. This also makes 'bootcmd' run every boot. That should be changable in cloud-config though, so users who dont like the behavior can modify it. LP: #819507
2011-08-01avoid a race condition if there were multiple networking devicesScott Moser
LP: #810044
2011-07-26add support for 'include-once' and public and private keys to mcollectiveScott Moser
the new 'include-once' type will include a URL only once, and cache its results. This way you can use expiring URLs or one-time use urls to pass sensitive data to the instance. The instance will cache the result in a local root only file for subsequent boots. Additionally, add support for specifying public and private keys for mcollective via cloud-config. Both these features come via Marc Cluet.
2011-07-26use md5sum as the unique identifier rather than base64Scott Moser
base64 encode will grow with the size of the url, possibly resulting in silly-long filenames. md5sum will keep it to a constant length.
2011-07-26include-once: fixups found in testingScott Moser
at this point, the following user-data file in /var/lib/cloud/seed/nocloud-net/user-data will do what you would expect: $ cat > /var/lib/cloud/seed/nocloud-net/user-data <<EOF #include-once http://169.254.169.254/2011-01-01/user-data EOF $ python -c \ 'import boto.utils, pprint; pprint.pprint(boto.utils.get_instance_metadata())' | sudo tee /var/lib/cloud/seed/nocloud-net/meta-data Then, $ sudo sh -c 'for i in /var/lib/cloud/*; do [ ${i##*/} = "seed" ] && continue; rm -Rf "$i"; done' $ sudo reboot You will then find a file in /var/lib/cloud/instance/data/urlcache/ that has the contents of user-data from the metadata service. It will not be downloaded again as long as that file is present.
2011-07-26use util.write_file in cc_mcollective.pyScott Moser
2011-07-26make 'include-once' really "download source once per-instance"Scott Moser
Marc's implementation would only ever process the include-once urls a single time. This changes that to process them every time, with the second time coming from a file on disk rather than the url. You can then do expiring or one time use URLs in the include-once and have all function of if the content was there every time. The cached file is readable by root-only.
2011-07-26cc_mcollective: use util.write_file, change perms of private key file to 0600Scott Moser
2011-07-26clarify warning text in mcollective config exampleScott Moser
2011-07-25Added ssl cert support to mcollectiveMarc Cluet
2011-07-25Added new feature include-onceMarc Cluet
2011-07-21add bug number for chef bug to ChangelogScott Moser
2011-07-21add chef module to cloud.cfg so it runs as cloud-configScott Moser
2011-07-21fix syntax error in cc_chef.pyScott Moser
2011-07-19update changelogScott Moser
2011-07-19special case handling of mapping for ephemeral0Scott Moser
t1.micro do not have a ephemeral0 disk, but the metadata service will have an entry there. i386 t1.micro: 'block-device-mapping': {'ami': '/dev/sda1', 'ephemeral0': '/dev/sda2', 'root': '/dev/sda1'}, amd64 t1.micro: 'block-device-mapping': {'ami': '/dev/sda1', 'ephemeral0': '/dev/sdb', 'root': '/dev/sda1'}, LP: #744019
2011-07-19increase timeout on read_seed when a seedfrom was explicitly givenScott Moser
In the case where a seedfrom value was given on the command line or in the config file, we were timing out in 2 seconds on the connection. That timeout was put in place to support "probing" for sources, but seedfrom is explictly given. So, in that case, do a urllib.open without a timeout value. Looking at source code, default timeout is 'socket._GLOBAL_DEFAULT_TIMEOUT', but rather than importing that and using it, I will call without a timeout value. LP: #812646
2011-07-19improve the updating of /etc/hosts with correct fqdn when possibleScott Moser
Thanks to Adam Gandalman and Marc Cluet for this fix. LP: #812539
2011-07-19do not complain if attempt to resizefs in an lxc container failsScott Moser
it is expected / understood that mknod would fail inside an lxc container. So, if thats the case, just log a debug message saying so. LP: #800856
2011-07-18add chef [Avishai Ish-Shalom]Scott Moser
2011-06-30[Marc Cluet] sanitize hosts file for system hostname (LP: #802637)Scott Moser
LP: #802637
2011-06-30* cloudinit/CloudConfig/cc_update_etc_hosts.pyMarc Cluet
- Added new functionality to sanitise /etc/hosts
2011-06-28fix cloud-init in ubuntu lxc containers (LP: #800824) [Clint Byrum]Scott Moser
LP: #800824
2011-06-17read authorized_keys location from sshd_config (LP: #731849)Scott Moser
LP: #785542
2011-06-17make the default "fill in" mount entries configurable. (LP: #785542)Scott Moser
The primary motivation for this is so that 'nobootwait' is not hard coded to appear in the fs_opts field. LP: #785542
2011-06-17make the "cloud-config ready" command configurable (LP: #785551)Scott Moser
Previously, when cloud-config was ready, cloud-init would emit an upstart event with: initctl emit cloud-config Now, that command is configurable via the 'cc_ready_cmd' value in cloud.cfg or user data. The default behavior is not changed. LP: #785551
2011-06-17mention previous commit in ChangeLogScott Moser
2011-06-17change, and make configurable the prefix for entries in root authorized_keysScott Moser
This makes the prefix for entries added to root's authorized keys configurable. Previously, the value was: command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".\';echo;sleep 10\"" Now, at is configurable in cloud.cfg or user data by setting 'root_disabled_opts'. Additionally, the default has been changed to include 'no-port-forwarding,no-agent-forwarding,no-X11-forwarding' See LP: #798505 for more information on that. Note, that 'no-pty' was *not* added to this list as adding it means the user who simply does 'ssh root@host' gets a "cannot allocate pty" message rather than seeing warning about using root. LP: #798505
2011-06-17fix broken ec2 metadata service (incorrect variable name)Scott Moser
2011-06-14run cc_ssh as a cloud-init module so it is guaranteed to run beforeScott Moser
ssh starts (LP: #781101) LP: #781101
2011-06-14Support disabling of byobu.Scott Moser
LP: #797336
2011-06-01support configurable urls for metadata serviceScott Moser
Now, if a Eucalyptus install is in STATIC or SYSTEM mode, the metadata service can still be used. In order to do that, the user must configure their DNS so that 'instance-data' will resolve to the cloud controller. Thanks to Kieran Evans. LP: #761847
2011-06-01revert some white space changes versus trunkScott Moser
just to avoid unnecessary changes (and confusion in 'annotate')
2011-05-28changed config key namekeyz182
2011-05-28log.warn to log.warningkeyz182
removed extra args from string format
2011-05-28Removed unnecessary newlinekeyz182
2011-05-28Added support for loading metadata urls from config files.keyz182
2011-05-26Another silly typo.keyz182
2011-05-26Remove any unresolveable addresses before attempting to access metadata.keyz182
2011-05-25Fixed silly mistake self.metadata_address instead of metadata_address. D'oh.keyz182
2011-05-25Fix for default metadata_address valuekeyz182
2011-05-25Modified to reflect changes suggested by Scott Moserkeyz182
2011-05-24Modified cloudinit/DataSourceEc2.py and cloudinit/boto_utils.py to check ↵keyz182
both http://169.254.169.254 and http://instance-data:8773 for meta data service. LP: #761847
2011-05-24Modified cloudinit/DataSourceEc2.py and cloudinit/boto_utils.py to check ↵keyz182
both http://169.254.169.254 and http://instance-data:8773 for meta data service. LP: #761847
2011-04-30Added missing write-mime-multipart.pyAvishai Ish-Shalom
2011-04-29Seperated chef gems install to another functionAvishai Ish-Shalom
2011-04-24updated ruby packages listAvishai Ish-Shalom