~harlowja/cloud-init/fix-auto-bool

« back to all changes in this revision

Viewing changes to doc/rtd/topics/datasources.rst

  • Committer: harlowja
  • Date: 2013-02-05 07:10:36 UTC
  • mto: This revision was merged to the branch mainline in revision 780.
  • Revision ID: harlowja@virtualbox.rhel-20130205071036-2tbfe1urzjyfg08a
Add initial docs about datasources.

Start moving the current README for
datasources to a RST format and include
those files in the rtd site.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _datasources:
 
2
 
 
3
=========
 
4
Datasources
 
5
=========
 
6
----------
 
7
 What is a datasource?
 
8
----------
 
9
 
 
10
Datasources are sources of configuration data for cloud-init that typically come
 
11
from the user (aka userdata) or come from the stack that created the configuration
 
12
drive (aka metadata). Typical userdata would include files, yaml, and shell scripts
 
13
while typical metadata would include server name, instance id, display name and other
 
14
cloud specific details. Since there are multiple ways to provide this data (each cloud
 
15
solution seems to prefer its own way) internally a datasource abstract class was
 
16
created to allow for a single way to access the different cloud systems methods 
 
17
to provide this data through the typical usage of subclasses.
 
18
 
 
19
The current interface that a datasource object must provide is the following:
 
20
 
 
21
.. sourcecode:: python
 
22
    
 
23
    def get_userdata(self, apply_filter=False)
 
24
    
 
25
    @property
 
26
    def launch_index(self)
 
27
    
 
28
    @property
 
29
    def is_disconnected(self)
 
30
    
 
31
    def get_userdata_raw(self)
 
32
    
 
33
    # the data sources' config_obj is a cloud-config formated
 
34
    # object that came to it from ways other than cloud-config
 
35
    # because cloud-config content would be handled elsewhere
 
36
    def get_config_obj(self)
 
37
    
 
38
    def get_public_ssh_keys(self)
 
39
    
 
40
    def device_name_to_device(self, name)
 
41
    
 
42
    def get_locale(self)
 
43
    
 
44
    @property
 
45
    def availability_zone(self)
 
46
    
 
47
    def get_instance_id(self)
 
48
    
 
49
    def get_hostname(self, fqdn=False)
 
50
    
 
51
    def get_package_mirror_info(self)
 
52
 
 
53
---------------------------
 
54
EC2
 
55
---------------------------
 
56
 
 
57
TBD
 
58
 
 
59
---------------------------
 
60
Config Drive
 
61
---------------------------
 
62
 
 
63
.. include:: ../../sources/configdrive/README.rst
 
64
 
 
65
---------------------------
 
66
Alt cloud
 
67
---------------------------
 
68
 
 
69
.. include:: ../../sources/altcloud/README.rst
 
70
 
 
71
---------------------------
 
72
No cloud
 
73
---------------------------
 
74
 
 
75
.. include:: ../../sources/nocloud/README.rst
 
76
 
 
77
---------------------------
 
78
MAAS
 
79
---------------------------
 
80
 
 
81
TBD
 
82
 
 
83
---------------------------
 
84
CloudStack
 
85
---------------------------
 
86
 
 
87
TBD
 
88
 
 
89
---------------------------
 
90
OVF
 
91
---------------------------
 
92
 
 
93
See: https://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/doc/sources/ovf/
 
94
 
 
95
---------------------------
 
96
Fallback/None
 
97
---------------------------
 
98
 
 
99
TBD