Age | Commit message (Collapse) | Author |
|
LP: #645458
|
|
rework of DataSource loading.
The DataSources that are loaded are now controlled entirely via
configuration file of 'datasource_list', like:
datasource_list: [ "NoCloud", "OVF", "Ec2" ]
Each item in that list is a "DataSourceCollection". for each item
in the list, cloudinit will attempt to load:
cloudinit.DataSource<item>
and, failing that,
DataSource<item>
The module is required to have a method named 'get_datasource_list'
in it that takes a single list of "dependencies" and returns
a list of python classes inside the collection that can run needing
only those dependencies.
The dependencies are defines in DataSource.py. Currently:
DEP_FILESYSTEM = "FILESYSTEM"
DEP_NETWORK = "NETWORK"
When 'get_datasource_list' is called for the DataSourceOVF module with
[DEP_FILESYSTEM], then DataSourceOVF returns a single item list with a
reference to the 'DataSourceOVF' class.
When 'get_datasource_list' is called for the DataSourceOVF module with
[DEP_FILESYSTEM, DEP_NETWORK], it will return a single item list
with a reference to 'DataSourceOVFNet'.
cloudinit will then instanciate the class and call its 'get_data' method.
if the get_data method returns 'True', then it selects this class as the
selected Datasource.
|
|
The DataSources that are loaded are now controlled entirely via
configuration file of 'datasource_list', like:
datasource_list: [ "NoCloud", "OVF", "Ec2" ]
Each item in that list is a "DataSourceCollection". for each item
in the list, cloudinit will attempt to load:
cloudinit.DataSource<item>
and, failing that,
DataSource<item>
The module is required to have a method named 'get_datasource_list'
in it that takes a single list of "dependencies" and returns
a list of python classes inside the collection that can run needing
only those dependencies.
The dependencies are defines in DataSource.py. Currently:
DEP_FILESYSTEM = "FILESYSTEM"
DEP_NETWORK = "NETWORK"
When 'get_datasource_list' is called for the DataSourceOVF module with
[DEP_FILESYSTEM], then DataSourceOVF returns a single item list with a
reference to the 'DataSourceOVF' class.
When 'get_datasource_list' is called for the DataSourceOVF module with
[DEP_FILESYSTEM, DEP_NETWORK], it will return a single item list
with a reference to 'DataSourceOVFNet'.
cloudinit will then instanciate the class and call its 'get_data' method.
if the get_data method returns 'True', then it selects this class as the
selected Datasource.
|
|
|
|
|
|
Everywhere that there occurred:
except Exception, e:
changed to
except Exception as e:
|
|
|
|
|
|
|
|
|
|
|
|
This will allow for a DataSource to provide its own config
that will then be utilized as part of CloudConfig.
[to be used in OVF]
|
|
base64 encoding should be enough for the likely use case of this
Product Section property.
|
|
- add ubuntu-server.ovf that passes validation via:
xmllint --nonet --path open-ovf/mainline/schemas/ \
--noout --schema open-ovf/mainline/schemas/ovf-envelope.xsd \
doc/ovf/ubuntu-server.ovf
and via
ovftool --schemaValidate doc/ovf/ubuntu-server.ovf
where ovftool is 'VMware ovftool 2.0.1 (build-260188)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
There is no default configured. Nothing is done by default.
|
|
|
|
|
|
LP: #668400
|
|
minor change to timestamps to all use gmtime()
|
|
|
|
|
|
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
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
Now, in addition to running instance specific scripts (in runcmd or
user-data scripts), cloud-run-user-script will run other directories
also. All under /var/lib/cloud, and in the following order:
scripts/per-once [once ever]
scripts/per-boot [every boot]
scripts/per-instance [once per instance]
instance/scripts [once per instance]
At the moment, the marker is on the entire directory, so changes to that
directory. Changes to the contents of the directory will not be noticed.
|
|
add 'hostname' cloud-config option for setting hostname
make rsyslog and resizefs run at cloud-init time
|
|
|
|
|
|
|
|
LP: #653220
|
|
|
|
since user names and group names wont' be the same on all images,
allow configuration of what ownership to put on 'default_log_file'.
|
|
add caching of the parsed config, this will allow re-use in cloudinit
so that we don't have to load the default config more than once in
a program.
|
|
|
|
cloud-config-archive is a yaml formated document where the top
level should contain an array. Each entry in the array can be one of
- dict { 'filename' : 'value' , 'content' : 'value', 'type' : 'value' }
filename and type may not be present
- scalar(content)
if filename and type are not present, they are attempted to be guessed.
LP: #641504
|