blob: 2c8770bd140cdb96a23e7c37730c233c9b465945 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
************
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``.
When checking if cloud-init supports a feature, in order to not break the
detection script on older versions of cloud-init without the features list, a
script similar to the following should be used. Note that this will exit 0 if
the feature is supported and 1 otherwise::
import sys
from cloudinit import version
sys.exit('<FEATURE_NAME>' not in getattr(version, 'FEATURES', []))
Currently defined feature names include:
- ``NETWORK_CONFIG_V1`` support for v1 networking configuration, see curtin
documentation for examples.
.. _Cloud-init: https://launchpad.net/cloud-init
.. vi: textwidth=78
|