summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-01-25Integreate HACKING into the rtd site.Joshua Harlow
2013-01-25Adding a resolv.conf configuration module (LP: #1100434)Joshua Harlow
Managing resolv.conf can be quite handy when running in an environment where you would like to control DNS resolution, despite being provided DNS server information by DHCP. This module will allow one to define the structure of their resolv.conf and write it PER_ONCE. Right now this makes the most sense on RedHat, and therefore, has defined 'distros' as such. Note that when a config drive is used, and dhcp is not used that this module may not be applicable since in the RedHat based distros the config drive typically contains a ubuntu style network configuration which contains nameservers that can be used in /etc/resolv.conf, but for other types of datasources it is useful to have a module which can be specifically configured to write out /etc/resolv.conf
2013-01-25Add a HACKING file (in rst format).Joshua Harlow
Adding a HACKING file based upon a message from smoser on the mailing list from 12/12/2012.
2013-01-25Adding a doc example for resolv_conf handler.ctracey
As per harlowja's suggestion addding an example to the doc directory for cc_resolv_conf.py
2013-01-25Moving HACKING to restructured textctracey
As per harlowja's suggestion, moving this HACKING file to restructured text format.
2013-01-24Remove the release for now.harlowja
2013-01-24Fix the release variable.harlowja
2013-01-24Make the logo better.harlowja
2013-01-24Merge the old user style with the distro provided config.harlowja
When the old user: style entry is found, don't forget that we need to use the distro settings that are provided but override the name with the new name, this is now accomplished by merging them together in the correct order (using the standard cloud-init merging algo).
2013-01-24Add docs which can be used on readthedocs.orgJoshua Harlow
Include a new set of docs that can be used to create a readthedocs.org site, which includes examples, directory layout, capabilities and such. This in-code documentation then allows for readthedocs.org to create a website directly from the cloud-init codebase.
2013-01-24Add in a tool to help make mime multipart messages.Joshua Harlow
2013-01-21Add in a tool to help make mime multipart messages.Joshua Harlow
2013-01-21Add support for operating system familiesJoshua Harlow
Often it is convenient to classify a distro as being part of an operating system family. for instance, file templates may be identical for both debian and ubuntu, but to support this under the current templating code, one would need multiple templates for the same code. Similarly, configuration handlers often fall into the same bucket: the configuraton is known to work/has been tested on a particular family of operating systems. right now this is handled with a declaration like: distros = ['fedora', 'rhel'] This fix seeks to address both of these issues. it allows for the simplification of the above line to: osfamilies = ['redhat'] It also provides a mechanism for operating system family templates.
2013-01-19Merge the old user style with the distro provided config.harlowja
When the old user: style entry is found, don't forget that we need to use the distro settings that are provided but override the name with the new name, this is now accomplished by merging them together in the correct order (using the standard cloud-init merging algo).
2013-01-18Adjust how the legacy user: XYZ config alters the normalized user listJoshua Harlow
Previously if a legacy user: XYZ entry was found, XYZ would not automatically be promoted to the default user but would instead just be added on as a new entry to the normalized user list. It appears the behavior that is wanted is for the XYZ entry to be added on as the default user (thus overriding a distro provided default user), which better matches how the code previous worked. LP: #1100920
2013-01-17Fixing missing argument to get_cfg_option_boolCraig Tracey
Forgot to pass cfg to this function, and thus this would have never worked.
2013-01-17Adding a resolv.conf configuration module (LP: #1100434)Craig Tracey
Managing resolv.conf can be quite handy when running in an environment where you would like to control DNS resolution, despite being provided DNS server information by DHCP. This module will allow one to define the structure of their resolv.conf and write it PER_ONCE. Right now this makes the most sense on RedHat, and therefore, has defined 'distros' as such.
2013-01-16DataSourceConfigDrive: consider CD rom as valid config-drive source.Scott Moser
previously, there was an attempt in the config drive source to limit the source device to a "full block device" rather than a partition. This was done by a simplistic approach of checking that the last character of the name was not a number. That was filtering out CD-rom devices (sr0). Now, we have a bit more sophisticated approach to that same problem. We filter out block devices that have a 'partition' entry in /sys/class/block/DEVICE_NAME/partition . LP: #1100545
2013-01-15cleanup a pep8 failurectracey
accidentally removed a line between two functions.
2013-01-15add support for operating system familiesctracey
often it is convenient to classify a distro as being part of an operating system family. for instance, file templates may be identical for both debian and ubuntu, but to support this under the current templating code, one would need multiple templates for the same code. similarly, configuration handlers often fall into the same bucket: the configuraton is known to work/has been tested on a particular family of operating systems. right now this is handled with a declaration like: distros = ['fedora', 'rhel'] this fix seeks to address both of these issues. it allows for the simplification of the above line to: osfamilies = ['redhat'] and provides a mechanism for operating system family templates.
2013-01-15Add a HACKING filectracey
Adding a HACKING file based upon a message from smoser on the mailing list from 12/12/2012.
2013-01-14tests: Add a context manager function in test helpers.Joshua Harlow
This function can be used to ensure that mocker objects are restored and verified during usage if exceptions are thrown while the mock object is being used. Ensure it is used in the config drive test when multiple mock objects are being created and restored. LP: #1098430
2013-01-10Add a context manager function in test helpers.harlowja
This function can be used to ensure that mocker objects are restored and verified during usage if exceptions are thrown while the mock object is being used. Ensure it is used in the config drive test when multiple mock objects are being created and restored. LP: #1098430
2013-01-07Allow 'sr0' to be specified as a device for mountsVlastimil Holer
Previously cloud-config to get a '/dev/sr0' entry written to /etc/fstab would have had to have the full /dev/sr0. This change allows cloud-config to reference it without the '/dev/' prefix. Like: | mounts: | - [ sr0, /media/sr0 ]
2013-01-07DataSourceCloudStack: fallback to default route if no virtual router foundGerard Dethier
Changes in revision 753 broke cloud-init on ubuntu, as it has a different dhclient directory than Fedora where the change was developed and tested. This change does 2 things: * searches multiple directories (including /var/lib/dhcp) for the lease files. * adds a fallback to the old code path of choosing the default route as the virtual router if there were no virtual routers found in the lease files. LP: #1089989
2013-01-07fix 'lock_password' for cloud-config user setupScott Moser
This simiplifies the logic, by just making it independent of 'system'. LP: #1096423
2013-01-07fix redaction of password field in log (LP: #1096417)Joshua Harlow
We were trying to avoid the user's password being written to the log, but that was looking for the wrong option. LP: #1096417
2013-01-05Fix the password locking logic.Joshua Harlow
Instead of only not locking when system is present the logic should handle the correct case when lock password is set and system is not present. LP: #1096423
2013-01-05Make which fields are redacted come from a field array.Joshua Harlow
LP: #1096417
2013-01-03Support for sr[0-9]+ short device names.Vlastimil Holer
2012-12-19add ChangeLog entry for previous commitScott Moser
2012-12-19DataSourceCloudStack: use virtual router rather than default routeGerard Dethier
In CloudStack's documentation, it is stated that meta/user-data can be retrieved from CloudStack's Virtual Router [1]. However, cloud-init retrieves these information from default gateway. VR and default gateway may be the same machine (i.e. have the same address) in some cases, but that is not be always true (actually, in my case, it is not). This change searches the lease files in /var/lib/dhclient to pick out the dhcp-server-identifier. It admittedly does make this specific to dhclient. -- [1] http://incubator.apache.org/cloudstack/docs/en-US/Apache_CloudStack/4.0.0-incubating/html/Admin_Guide/user-data-and-meta-data.html). LP: #1089989
2012-12-19cloudinit/handlers/upstart_job.py: pep8 / trailing whitespaceScott Moser
2012-12-17tell upstart to reload configuration after writing an upstart jobScott Moser
Invoking 'initctl reload-configuration' is only required if inotify does not work. overlayroot does not support inotify. So, we just call initctl always, which wont hurt anything. LP: #1080841
2012-12-17ensure a datasource's 'distro' and sys_cfg are updatedJoshua Harlow
After parsing and merging datasource's config, the changes in were not making it into the datasource's 'distro. The end result was that the when a config module was called, it's 'cloud' argument would be updated in 'cloud.distro', but not in 'cloud.datasource.distro'. This path was required for getting mirror settings to take affect, because they include information from the datasource. Ie: cc_apt_configure had mirror_info = cloud.datasource.get_package_mirror_info() the datasource then used *its* copy of sys_cfg to call self.distro.get_package_mirror_info and *that* distro's sys_cfg had not been updated. LP: #1090482
2012-12-15Add 'omnibus' install mode for chefScott Moser
This adds 'omnibus' to the values supported for chef's "omnibus_url" config option. It also: * makes 'omnibus_url' configurable in cloud-config. * adds a 'force_install' flag, to allow the install code to act even if /usr/bin/chef-client is already present.
2012-12-14Provide a mechanism for puppet to be conditionally installed.Craig Tracey
Instead of always installing puppet give users the ability to opt-out. LP: #1090205
2012-12-13Provide a mechanism for puppet to be conditionally installed.Craig Tracey
2012-12-12add 'omnibus' as an install type for chef.Scott Moser
Thanks to Anatoliy Dobrosynets
2012-12-06cloudinit/stages.py: separate _read_base_cfg() into static functionScott Moser
The Init._read_base_cfg() was really a static function, this just moves it to its own static function. Its not used anywhere else at the moment.
2012-12-04write-ssh-key-fingerprints: use logger -s rather than --stderrJoshua Harlow
--stderr would be preferred for readability, but older versions of logger do not support the long form. Use the short form for compatibility. LP: #1083715
2012-12-04replace if..else based on presense of /etc/redhat-release with use of -sScott Moser
instead of using '--stderr' on non-rhel based on the presense of /etc/redhat-release, just use the short form '-s' everywhere.
2012-12-04merge from trunkScott Moser
2012-12-03ChangeLog: mention fix of lp:1079002Scott Moser
2012-12-01make sure no blank lines before cloud-init entry in ca-certificates.confScott Moser
when /etc/ca-certificates.conf is read by update-ca-certificates lines after a blank line get ignored. Here, ensure that there are no blank lines, and no duplicate entries for cloud-init are added. LP: #1077020
2012-11-28Check for running inside RHEL and adjust the logging options.Joshua Harlow
It seems like at least RHEL does not have the "--stderr" option but instead only supports the short version "-s" so add a check that will switch from the long version to the short version when RHEL is detected. LP: #1083715
2012-11-20fix "resize_root: noblock"Scott Moser
resize_root: noblock has been broken in the 0.7.0 series. Using it would disable resizing. LP: #1080985
2012-11-20pep8 and pylintScott Moser
2012-11-19add 'sudo' entry for default user in default config/cloud.cfgScott Moser
LP: #1080717
2012-11-15Strings are iterable...Joshua Harlow
Using collections.iterable means that strings get iterated over which is not the desired effect when writing a string sudoers rule.