blob: 9d2c9896b8fa7d2690831e7c4b3df07805acda9d (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
****************
Directory layout
****************
Cloud-init's directory structure is somewhat different from a regular
application::
/var/lib/cloud/
- data/
- instance-id
- previous-instance-id
- datasource
- previous-datasource
- previous-hostname
- handlers/
- instance
- instances/
i-00000XYZ/
- boot-finished
- cloud-config.txt
- datasource
- handlers/
- obj.pkl
- scripts/
- sem/
- user-data.txt
- user-data.txt.i
- scripts/
- per-boot/
- per-instance/
- per-once/
- seed/
- sem/
``/var/lib/cloud``
The main directory containing the cloud-init specific subdirectories.
It is typically located at ``/var/lib`` but there are certain configuration
scenarios where this can be altered.
TBD, describe this overriding more.
``data/``
Contains information related to instance ids, datasources and hostnames of
the previous and current instance if they are different. These can be
examined as needed to determine any information related to a previous boot
(if applicable).
``handlers/``
Custom ``part-handlers`` code is written out here. Files that end up here are
written out with in the scheme of ``part-handler-XYZ`` where ``XYZ`` is the
handler number (the first handler found starts at 0).
``instance``
A symlink to the current ``instances/`` subdirectory that points to the
currently active instance (which is active is dependent on the datasource
loaded).
``instances/``
All instances that were created using this image end up with instance
identifier subdirectories (and corresponding data for each instance). The
currently active instance will be symlinked the ``instance`` symlink file
defined previously.
``scripts/``
Scripts that are downloaded/created by the corresponding ``part-handler``
will end up in one of these subdirectories.
``seed/``
TBD
``sem/``
Cloud-init has a concept of a module semaphore, which basically consists
of the module name and its frequency. These files are used to ensure a module
is only ran `per-once`, `per-instance`, `per-always`. This folder contains
semaphore `files` which are only supposed to run `per-once` (not tied to the
instance id).
.. vi: textwidth=79
|