summaryrefslogtreecommitdiff
path: root/cloud-init-cfg.py
AgeCommit message (Collapse)Author
2011-12-19fix missing import for use of close_stdinScott Moser
revision 490 missed some required imports.
2011-12-19make stdin read from /dev/null for all cloud-init programs (LP: #903993)Scott Moser
the cloud-init programs are never intended to run interactively. Some programs were being run via subprocess, and would notice that their input was attached to a terminal (/dev/console). As a result, they they would try to prompt the user for input (apt-add-repository) This change simply re-opens standard input as /dev/null so any subprocesses will not end up blocking on input.
2011-02-18handle no datasource better cloud-init-cfgScott Moser
previously, cloud-init-cfg would call CloudConfig with no cloud specified. Then, CloudConfig would get a new cloudinit instance and specify no ds_deps (which means network and local). If no cache was found, it would wait again for the Ec2 metadata service (even if it wasn't supposed to). Now, we get the cloud instance in the main program and attempt to get the data source, but only from [], which will get only cached. Then, if its not found, exit silently.
2011-01-26remove debug statementScott Moser
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-24move cloud-run-user-script.conf to cloud-final, use cloud-cfg for invokingScott Moser
This moves what was done as cloud-run-user-script.conf to 'cloud-final' and makes that re-use the cloud-init-cfg code, but simply with a different set of default configs. Also, adds keys_to_console and final_message cloud-config modules LP: #653271
2011-01-24make the module list that cloud-config selects specified via cmdlineScott Moser
instead of hard-coding in cloud-init-cfg the module list that should be read, read it from the second command line argument. Basically, instead of reading 'cloud_config_modules', specify 'cloud_config' when cloud-init-cfg is run. change the upstart job to invoke cloud-init-cfg with: exec cloud-init-cfg all cloud_config rather than exec cloud-init-cfg all
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-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'
2010-08-09cloud-init-cfg: log warning with traceback on failure of a config moduleScott Moser
Previously, all you would get was a warning to the console on config module failure. This changes to get a stack trace of the failure to the console, which is much easier for debugging.
2010-06-18change syntax of cloud-init-cfg to allow for specifying freq for moduleScott Moser
The previous syntax was either cloud-init-cfg all or cloud-init-cfg <name> args Ie, you could not specify the frequency if you gave a name. Now, you can. Something like: sudo cloud-init-cfg ssh always
2010-06-18add debug log message for 'running' config moduleScott Moser
2010-06-17make cloud-config modules configurable by cloud-configScott Moser
The list of cloud-config modules is now kept in cloud config itself. There is a builtin list in cloudinit, which is overrideable by /etc/cloud/cloud.cfg or user data cloud-config. This should make the modules more easily added or removed (as no code needs to be edited now) Basic summary of changes: - move CloudConfig.py -> cloudinit/CloudConfig/__init__.py - split cloud-config modules into their own files named cloudinit/CloudConfig/cc_<name>.py - remove all the upstart/cloud-config-* scripts, replacing them with upstart/cloud-config.conf
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-02-04add copyright informationScott Moser
2010-02-03globally remove ec2init and rename to cloudinitScott Moser
2010-01-11refactor the config class and jobs to run through cloud-init-cfgScott Moser
At this point, the following should be functional: cloud-init-cfg apt-update-upgrade