cloud-init:ubuntu/cosmic

Last commit made on 2018-10-11
Get this branch:
git clone -b ubuntu/cosmic https://git.launchpad.net/cloud-init
Members of cloud-init commiters can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
ubuntu/cosmic
Repository:
lp:cloud-init

Recent commits

52aff7c... by Chad Smith on 2018-10-11

releasing cloud-init version 18.4-7-g4652b196-0ubuntu1

6a502da... by Chad Smith on 2018-10-11

update changelog (New upstream snapshot 18.4-7-g4652b196).

f0ec967... by Chad Smith on 2018-10-11

merge from origin/master at 18.4-7-g4652b196

4652b19... by Chad Smith on 2018-10-10

tests: meta_data key changed to meta-data in ec2 instance-data.json

LP: #1797231

9f88125... by Chad Smith on 2018-10-10

tests: fix kvm integration test to assert flexible config-disk path

Make integration test for flexible using regexp in case disk changes.

LP: #1797199

f70a09f... by Chad Smith on 2018-10-09

releasing cloud-init version 18.4-5-g6ee8a2c5-0ubuntu1

1c9ce31... by Chad Smith on 2018-10-09

update changelog (New upstream snapshot 18.4-5-g6ee8a2c5).

4438849... by Chad Smith on 2018-10-09

merge from master at 18.4-5-g6ee8a2c5

6ee8a2c... by Chad Smith on 2018-10-09

tools: Add cloud-id command line utility

Add a quick cloud lookup utility in order to more easily determine
the cloud on which an instance is running.

The utility parses standardized attributes from
/run/cloud-init/instance-data.json to print the canonical cloud-id
for the instance. It uses known region maps if necessary to determine
on which specific cloud the instance is running.

Examples:
aws, aws-gov, aws-china, rackspace, azure-china, lxd, openstack, unknown

f0bc02d... by Chad Smith on 2018-10-09

instance-data: Add standard keys platform and subplatform. Refactor ec2.

Add the following instance-data.json standardized keys:
* v1._beta_keys: List any v1 keys in beta development,
  e.g. ['subplatform'].
* v1.public_ssh_keys: List of any cloud-provided ssh keys for the
  instance.
* v1.platform: String representing the cloud platform api supporting the
  datasource. For example: 'ec2' for aws, aliyun and brightbox cloud
  names.
* v1.subplatform: String with more details about the source of the
  metadata consumed. For example, metadata uri, config drive device path
  or seed directory.

To support the new platform and subplatform standardized instance-data,
DataSource and its subclasses grew platform and subplatform attributes.
The platform attribute defaults to the lowercase string datasource name at
self.dsname. This method is overridden in NoCloud, Ec2 and ConfigDrive
datasources.

The subplatform attribute calls a _get_subplatform method which will
return a string containing a simple slug for subplatform type such as
metadata, seed-dir or config-drive followed by a detailed uri, device or
directory path where the datasource consumed its configuration.

As part of this work, DatasourceEC2 methods _get_data and _crawl_metadata
have been refactored for a few reasons:
- crawl_metadata is now a read-only operation, persisting no attributes on
  the datasource instance and returns a dictionary of consumed metadata.
- crawl_metadata now closely represents the raw stucture of the ec2
  metadata consumed, so that end-users can leverage public ec2 metadata
  documentation where possible.
- crawl_metadata adds a '_metadata_api_version' key to the crawled
  ds.metadata to advertise what version of EC2's api was consumed by
  cloud-init.
- _get_data now does all the processing of crawl_metadata and saves
  datasource instance attributes userdata_raw, metadata etc.

Additional drive-bys:
* unit test rework for test_altcloud and test_azure to simplify mocks
  and make use of existing util and test_helpers functions.