summaryrefslogtreecommitdiff
path: root/cloudinit/config
AgeCommit message (Collapse)Author
2013-02-21Split Debian and Ubuntu APT sourcesVlastimil Holer
2013-01-30Adding package versioning logic to package installation.Joshua Harlow
This change adds the ability to provide specific package versions to Distro.install_packages and subsequently Distro.package_command. In order to effectively use Distro.install_packages, one is now able to pass a variety of formats in order to easily manage package requirements. These are examples of what can be passed: - "package" - ["package1","package2"] - ("package",) - ("package", "version") - [("package1",)("package2",)] - [("package1", "version1"),("package2","version2")] This change also adds the option to install a specific version for the puppet configuration module. This is especially important here as successful puppet deployments are highly reliant on specific puppet versions.
2013-01-29Fix broken cc_update_etc_hostsharlowja
Right now, all distros but ubuntu will fail to manage /etc/hosts. This is due to the fact that the templates are named: - hosts.ubuntu.tmpl - hosts.redhat.tmpl The config handler is specifically looking for a template with the given distro name. This change addresses this issue.
2013-01-28config/cc_resolv_conf: run PER_INSTANCE rather than PER_ONCEScott Moser
Quick chat with ctracy indicated that this is just as well run PER_INSTANCE, and it is more consistent with other things that way.
2013-01-27Adding package versioning logic to package_commandCraig Tracey
This change adds the ability to provide specific package versions to Distro.install_packages and subsequently Distro.package_command. In order to effectively use Distro.install_packages, one is now able to pass a variety of formats in order to easily manage package requirements. These are examples of what can be passed: - "package" - ["package1","package2"] - ("package",) - ("package", "version") - [("package1",)("package2",)] - [("package1", "version1"),("package2","version2")] This change also adds the option to install a specific version for the puppet configuration module. This is especially important here as successful puppet deployments are highly reliant on specific puppet versions.
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-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-15Fix broken cc_update_etc_hosts (LP: #1100036)ctracey
Right now, all distros but ubuntu will fail to manage /etc/hosts. This is due to the fact that the templates are named: - hosts.ubuntu.tmpl - hosts.redhat.tmpl The config handler is specifically looking for a template with the given distro name. This change addresses this issue and is contingent upon support of 'osfamilies' as implemented in LP: #1100029 (lp:~craigtracey/cloud-init/osfamilies)
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-03Support for sr[0-9]+ short device names.Vlastimil Holer
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-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-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-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-13make migrator walk the "cloud" path alsoScott Moser
the migrator was not renaming items in the "cloud" semaphore path. Those were items that would run once only. Now we just check both ipath('sem') and cpath('sem')
2012-11-13support 'power_state' cloud-config for specifying shutdownScott Moser
this adds 'power-state-change' config module that allows the user to specify in cloud-config syntax that a system reboot or shutdown should occur after cloud-init is done.
2012-11-13use os.devnull [trivial]Scott Moser
2012-11-13add sleep, allow errno '3' (ESRCH) on the open of /proc/pid/cmdlineScott Moser
The sleep is added here simply to not completely spin cpu on waiting for the parent pid to die. the allowing of errno 3 is because I was getting this. I dont have a perfect explanation, but I suspect that the 'open' was actually getting this back from the /proc filesystem after the pid had died. Possibly in the window between when the 'open' was done and the 'read()' was done.
2012-11-13clean up exit to single function callScott Moser
2012-11-13fix read of /proc/cmdlineScott Moser
2012-11-13implement power_state with tests.Scott Moser
2012-11-13pep8 and pylintScott Moser
2012-11-13rename module 'finalcmd' to power-state-changeScott Moser
2012-11-12pass execmd a list, not tuple or stringScott Moser
2012-11-12add 'finalcmd' module for running code after cloud-init-finalScott Moser
This allows the user to easily run stuff even after cloud-init-final has finished. The initial reason for it is to be able to run /sbin/poweroff and not have cloud-init complain loudly that it is being killed. LP: #1064665
2012-11-10sync with trunkScott Moser
2012-11-10Add 'migrator' for handling config name changes and consistencyJoshua Harlow
This migrator module does a few things * fixes filename markers that were written with a '-' in them to have an '_' instead * support renaming modules. Explicitly this handles the name change of 'apt-update-upgrade' to 'apt-configure' and 'package-update-upgrade-install' Also, just be more consistent everywhere where writing semaphore/marker files and use '_' instead of '-' (canon_sem_name).
2012-11-08Fix the case where on a redhat based systemJoshua Harlow
the fully qualified domain name should end up in /etc/sysconfig/network by passing the fqdn to the update and set hostname methods and using it accordingly. LP: #1076759
2012-11-071. Ensure that the sem_path exists andharlowja
is actually a valid value returned. 2. Adjust variable naming
2012-11-071. Check the name and not the full pathharlowja
when applying the canon routine. 2. Add in a function to migrate legacy semaphores to new semaphores.
2012-11-07Start adding a 'migrator' moduleJoshua Harlow
that can be used to aid in the moving of older versions of cloud-inits data to newer versions of cloud-inits data. 1. Move the semaphores for the current instance to there canonicalized names and use the canonicalized in the file 'locking' code
2012-11-071. Rebased with trunkJoshua Harlow
2. Added example cloud-config 3. Added functioning test for yum config
2012-11-07test and path cleanups.Joshua Harlow
1. Remove the usage of the path.join function now that all code should be going through the util file methods (and they can be mocked out as needed). 2. Adjust all occurences of the above join function to either not use it or replace it with the standard os.path.join (which can also be mocked out as needed) 3. Fix pylint from complaining about the tests folder 'helpers.py' not being found. 4. Add a pylintrc file that is used instead of the options hidden in the 'run_pylint' tool.
2012-11-07merge from trunkScott Moser
2012-10-27Helpful cleanups.harlowja
1. Remove the usage of the path.join function now that all code should be going through the util file methods (and they can be mocked out as needed). 2. Adjust all occurences of the above join function to either not use it or replace it with the standard os.path.join (which can also be mocked out as needed) 3. Fix pylint from complaining about the tests folder 'helpers.py' not being found 4. Add a pylintrc file that is used instead of the options hidden in the 'run_pylint' tool.
2012-10-23Restart landscape at the end of the configurationThomas Hervé
2012-10-17More cleanups, fix header function.Joshua Harlow
2012-10-17Make the yum value 'string' translation a function.Joshua Harlow
2012-10-16Add in a created by cloud-init header.Joshua Harlow
2012-10-16Move the recursive flushing to the log module.Joshua Harlow
2012-10-16Add a more generic package install mechansimJoshua Harlow
that removes some of the code in apt_update_upgrade to do upgrades and installs and places it in a generic package module and adjusts some of the reboot backoffs and log flushing/sleeping that was happening there.
2012-10-16Update comments as to why format is the way it is.Joshua Harlow
2012-10-16Fix copyright.Joshua Harlow
2012-10-16Remove some pylint buggies.Joshua Harlow
2012-10-16Add in a configuration module that canJoshua Harlow
write out the yum.repo format for those that want to hook into different repos for installing.
2012-10-15Skip install when there is not configuration, and install the package to be ↵Thomas Hervé
setup properly.
2012-09-28Make byobu more tolerant of the user not beingJoshua Harlow
located and warn when it is not found + only run the shell command when actual contents exist to run.
2012-09-28Add a comment as to why distros can't beJoshua Harlow
imported without being renamed due to previous usage of the attribute 'distros'