Commit Graph

249 Commits

Author SHA1 Message Date
Stephen Finucane 868096bb52 Retire cloud-init
This appears to be an unmaintained fork of the original code, which
lives elsewhere [1]. Kill it.

[1] https://github.com/cloud-init/cloud-init

Change-Id: I1f57197f1f67aa6adce152b5e4acc63a72277c6a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2019-04-01 16:48:35 +01:00
Daniel Watkins 2557d66fa4 Clean up stale auto-generated autodoc files.
This avoid modules that have been moved/removed from continuing to have
documentation generated for them.  We use git clean to allow us to have
other files in there.

Possibly not an issue on the build hosts, but definitely irritating
locally.

Change-Id: I3403e8227913904a25b6a0866adfcc628d60419e
2015-06-25 15:22:43 +00:00
Daniel Watkins 16e1ee3b51 Add doc8 checks to docs tox target.
And fix the one error that it throws up.

Change-Id: I51fb24562b5779fc40b9e8fcd3a62c5ea5478faf
2015-06-12 18:42:17 +01:00
Daniel Watkins 6f039df741 Include auto-generated API documentation in Sphinx documentation.
Change-Id: Ic2f0e4bcb315cc3f94e5077dc209431ee3e80d77
2015-06-05 16:41:22 +01:00
Scott Moser 2b4e90d8ed LICENSE: license / header redux
- put a brief description of license in LICENSE file
- put full license versions in LICENSE-GPLv3 and LICENSE-Apache2.0
- simplify the per-file header to reference LICENSE

- also, tox.ini: work around httpretty issue

Change-Id: I259ed23767472047da823c1a67085e47afc561d8
2015-05-13 21:26:05 -04:00
Scott Moser cbb95af940 change license header in from GPL to Apache
This adds a standard Apache 2.0 license header where
previously was a GPLv3 license header.

As Noted in License.txt, code is still available under GPLv3.

Change-Id: I4d4f4678e014c6bfb663519c444c0d94ae96d81f
2015-04-16 10:02:04 -04:00
Joshua Harlow 154a2ee413 Fix all the current brokeness
Add missing files and tweaks so that the automated
CI/flake8/pep8/docs/... and such work correctly.

Change-Id: I838b02bf0037569065b7c7914f4a68b92d7ebd6a
2015-04-01 11:54:46 -07:00
Scott Moser f49104b153 tox doc functional 2015-01-21 16:38:50 -05:00
Scott Moser c81466ce76 initial tree for 2.0 work 2015-01-21 10:00:26 -05:00
Joshua Harlow ccec873f68 Ensure the cc_chef doc links to the cc_chef code 2014-11-21 17:44:32 -08:00
Joshua Harlow e67cfc3a37 Show the handle method for the cc_ubuntu_init_switch module 2014-10-23 18:01:06 -07:00
Joshua Harlow 45cab1d498 Use bold for the internal name 2014-10-23 17:59:02 -07:00
Joshua Harlow f915316060 Add a link to the module code 2014-10-23 17:57:10 -07:00
Joshua Harlow d77185baf4 Add the beginnings of module documentation 2014-10-23 17:47:19 -07:00
Neal Shrader 09e2762387 Add documentation for DigitalOcean datasource 2014-10-17 16:28:09 -04:00
Scott Moser 457d941d61 update url in config drive documentation 2014-10-10 10:04:12 -04:00
Scott Moser d73c7495fa add doc 2014-09-30 16:24:38 -04:00
Thomas Bechtold dfce9af13f Fix link for config_drive doc
The current link does no longer work.
2014-09-27 11:05:24 +02:00
Scott Moser efe103f1d9 docs: fix disk-setup to reference 'table_type' 2014-08-22 10:43:02 -04:00
Scott Moser 8bb103d817 doc: fix user-groups doc to reference plural ssh-authorized-keys 2014-06-09 20:38:09 -04:00
Kiril Vladimiroff 6bd99682a6 CloudSigma: support user-data being base64 encoded
This adds the ability to read a 'base64_fields' entry in the metadata,
and if cloud-init-userdata is listed in that, then content will be
base64 decoded first.
2014-03-04 12:11:10 -05:00
Scott Moser ffcf9adf94 write status to /run/cloud-init/ for external consumption
This populates and maintains status.json and result.json with
json formated data about cloud-init's errors and datasource.

It is intended to be consumed by other programs that want to
wait until cloud-init is done, or know its success.
2014-03-03 16:53:39 -05:00
Scott Moser b5063f2c28 fix end/start in doc 2014-02-24 20:27:03 -05:00
Scott Moser 39bd6fc2a4 add doc/status.txt 2014-02-24 20:23:59 -05:00
Kiril Vladimiroff f385a85879 Read encoded with base64 user data
This allows users of CloudSigma's VM to encode their user data with base64.
In order to do that thet have to add the ``cloudinit-user-data`` field to
the ``base64_fields``. The latter is a comma-separated field with
all the meta fields whit base64 encoded values.
2014-02-19 10:45:53 +02:00
Scott Moser 18140a7787 cloudsigma: change default dsmode to 'net'
Previously this had 'local' as the default datasource mode, meaning
that user-data code such as boot hooks and such would not be guaranteed to have
network access.  That would be out of sync with the expectation on other
platforms where the default is 'network up'.

The user can still specify 'dsmode' as local if necessary and the
local datasource will claim itself found.
2014-02-13 10:39:39 -05:00
Scott Moser 0a08c80dc4 merge from trunk 2014-02-12 16:06:45 -05:00
Scott Moser b55d7a9881 Add 'unverified_modules' config option and skip unverified modules
Config modules are able to declare distros that they were verified
to run on by setting 'distros' as a list in the config module.

Previously, if a module was configured to run and the running distro was not
listed as supported, it would run anyway, and a warning would be written.

Now, we change the behavior to skip those modules.

The distro (or user) can specify that a given list of modules should run anyway
by declaring the 'unverified_modules' config variable.

run_once modules will be run without this filter (ie, expecting that the user
explicitly wanted to run it).
2014-02-12 16:05:35 -05:00
Kiril Vladimiroff 934bdb52d1 Add CloudSigma data source 2014-02-12 12:14:49 +02:00
David Britton 76aeb356cd oops 2014-02-10 15:32:46 -07:00
David Britton 1ffd2d3166 properlly format the landscape example 2014-02-10 15:28:01 -07:00
Ben Howard c8d4265b08 Rebasing on trunk 2014-01-24 14:20:54 -07:00
Scott Moser b9fa90b977 pep8/pylint fixes
tools/run-pep8 wasn't checking all python files.
tools/run-pylint wasnt checking bin/cloud-init

fixed resultant pep8 issues after finding them.
2014-01-24 14:47:28 -05:00
Ben Howard 78a9656906 Fixes for SmartOS datasource (LP: #1272115):
1. fixed conflation of user-data and cloud-init user-data. Cloud-init
   user-data is now namespaced as 'cloud-init:user-data'.
2. user-scripts are now fetched from the meta-data service each boot and
   executed as in the scripts directory
3. datacenter name is now namespaced as sdc:datacenter
4. user-scripts should be shebanged if there is no file magic
2014-01-24 12:29:04 -07:00
Scott Moser 123cffbade cloud-config-landscape.txt: improve documentation 2014-01-21 16:49:44 -05:00
Scott Moser d70c190622 more boto removal. move httpretty from 'Requires'
the Requires would get that string rendered into the package's
Depends/Requires (rather than BuildDepends/BuildRequires).
We should have BuildDepends/BuildRequires too, but since
trunk's package builds do not run 'make test', this isn't a big deal.

This also adds 'test-requires' for httpretty.
2014-01-17 17:08:58 -05:00
Scott Moser 9c6465abcd merge from trunk 2014-01-17 15:12:57 -05:00
Scott Moser adabfc3c50 doc improvements 2014-01-17 13:09:31 -05:00
Scott Moser 7bef107216 remove support for resizing via 'parted resizepart'
This was previously broken anyway.  It doesn't seem like there
was an easy way to actually support it, so for now I'm removing
it entirely.  growpart works well enough.
2014-01-17 11:16:56 -05:00
Ben Howard 38320ca757 pep8 and pylint fixes; typo fix for documentation 2014-01-17 08:27:09 -07:00
Ben Howard 0d9f85fdec Merge with upstream sources 2014-01-09 08:17:41 -07:00
Ben Howard 161d6ab3eb Significant re-working of the userdata handling and introduction of
vendordata.

Vendordata is a datasource provided userdata-like blob that is parsed
similiarly to userdata, execept at the user's pleasure.


cloudinit/config/cc_scripts_vendor.py: added vendor script cloud config

cloudinit/config/cc_vendor_scripts_per_boot.py: added vendor per boot
    cloud config

cloudinit/config/cc_vendor_scripts_per_instance.py: added vendor per
    instance vendor cloud config

cloudinit/config/cc_vendor_scripts_per_once.py: added per once vendor
    cloud config script

doc/examples/cloud-config-vendor-data.txt: documentation of vendor-data
    examples

doc/vendordata.txt: documentation of vendordata for vendors

(RENAMED) tests/unittests/test_userdata.py => tests/unittests/test_userdata.py
      TO: tests/unittests/test_userdata.py => tests/unittests/test_data.py:
    userdata test cases are not expanded to confirm superiority over vendor
    data.

bin/cloud-init: change instances of 'consume_userdata' to 'consume_data'

cloudinit/handlers/cloud_config.py: Added vendor script handling to default
    cloud-config modules

cloudinit/handlers/shell_script.py: Added ability to change the path key to
    support vendor provided 'vendor-scripts'. Defaults to 'script'.

cloudinit/helpers.py:
    - Changed ConfigMerger to include handling of vendordata.
    - Changed helpers to include paths for vendordata.

cloudinit/sources/__init__.py: Added functions for helping vendordata
    - get_vendordata_raw(): returns vendordata unprocessed
    - get_vendordata(): returns vendordata through userdata processor
    - has_vendordata(): indicator if vendordata is present
    - consume_vendordata(): datasource directive for indicating explict
        user approval of vendordata consumption. Defaults to 'false'

cloudinit/stages.py: Re-jiggered for handling of vendordata
    - _initial_subdirs(): added vendor script definition
    - update(): added self._store_vendordata()
    - [ADDED] _store_vendordata(): store vendordata
    - _get_default_handlers(): modified to allow for filtering
        which handlers will run against vendordata
    - [ADDED] _do_handlers(): moved logic from consume_userdata
        to _do_handlers(). This allows _consume_vendordata() and
        _consume_userdata() to use the same code path.
    - [RENAMED] consume_userdata() to _consume_userdata()
    - [ADDED] _consume_vendordata() for handling vendordata
        - run after userdata to get user cloud-config
        - uses ConfigMerger to get the configuration from the
            instance perspective about whether or not to use
            vendordata
    - [ADDED] consume_data() to call _consume_{user,vendor}data

cloudinit/util.py:
    - [ADDED] get_nested_option_as_list() used by cc_vendor* for
        getting a nested value from a dict and returned as a list
    - runparts(): added 'exe_prefix' for running exe with a prefix,
        used by cc_vendor*

config/cloud.cfg: Added vendor script execution as default

tests/unittests/test_runs/test_merge_run.py: changed consume_userdata() to
    consume_data()

tests/unittests/test_runs/test_simple_run.py: changed consume_userdata() to
    consume_data()
2014-01-08 17:16:24 -07:00
Scott Moser 8568816e61 support calling apt with eatmydata, enable by default if available.
This allows a general config option to prefix apt-get commands via
'apt_get_wrapper'.  By default, the command is set to 'eatmydata', and the
mode set to 'auto'.  That means if eatmydata is available (via which), it
will use it.

The 'command' can be either a array or a string.
2013-12-14 14:17:31 -05:00
Scott Moser cc04a21b7c fix 'make yaml'. 2013-12-12 14:22:14 -05:00
Robie Basak 2c063a7a4e Documentation: fix name of "cloud-init-per" command 2013-10-31 00:03:32 +00:00
Scott Moser da5ca64a71 mention in doc 2013-10-24 13:19:38 -07:00
Scott Moser b3b8de6f9c power_state_change: convert an int input for delay to string, improve doc
this adds 'timeout' to the documentation for power_state_change, and
supports delay being an integer or a string.  This is so that yaml
can contain:
 delay: 30
rather than
 delay: "+30"
or
 dealy: "30"
2013-10-09 10:03:03 -04:00
Ben Howard 64c0b1f508 Added support for 'ephmeral0.<auto|any|0>' for device mappings in disk
formating support.
2013-10-03 17:30:57 -06:00
Scott Moser f994f4285b merge from trunk 2013-10-03 07:45:02 -04:00
Ben Howard 738a3472f1 Added ability to define disks via 'ephemeralX.Y'.
Modified cc_mounts to identify whether ephermalX is partitioned.
Changed datasources for Azure and SmartOS to use 'ephemeralX.Y' format.
Added disk remove functionally
2013-10-02 15:05:15 -06:00