Capabilities

  • Setting a default locale
  • Setting an instance hostname
  • Generating instance SSH private keys
  • Adding SSH keys to a user’s .ssh/authorized_keys so they can log in
  • Setting up ephemeral mount points
  • Configuring network devices

User configurability

Cloud-init ‘s behavior can be configured via user-data.

User-data can be given by the user at instance launch time.

This is done via the --user-data or --user-data-file argument to ec2-run-instances for example.

  • Check your local clients documentation for how to provide a user-data string or user-data file for usage by cloud-init on instance creation.

Feature detection

Newer versions of cloud-init may have a list of additional features that they support. This allows other applications to detect what features the installed cloud-init supports without having to parse its version number. If present, this list of features will be located at cloudinit.version.FEATURES.

Currently defined feature names include:

CLI Interface :

cloud-init features will print out each feature supported. If cloud-init does not have the features subcommand, it also does not support any features described in this document.

% cloud-init --help
usage: cloud-init [-h] [--version] [--file FILES] [--debug] [--force]
                  {init,modules,query,single,dhclient-hook,features} ...

positional arguments:
  {init,modules,query,single,dhclient-hook,features}
    init                initializes cloud-init and performs initial modules
    modules             activates modules using a given configuration key
    query               query information stored in cloud-init
    single              run a single module
    dhclient-hook       run the dhclient hookto record network info
    features            list defined features

optional arguments:
  -h, --help            show this help message and exit
  --version, -v         show program's version number and exit
  --file FILES, -f FILES
                        additional yaml configuration files to use
  --debug, -d           show additional pre-action logging (default: False)
  --force               force running even if no datasource is found (use at
                        your own risk)


% cloud-init features
NETWORK_CONFIG_V1
NETWORK_CONFIG_V2