Merge "Add support for nova live/cold-migration with containers"
[apex-tripleo-heat-templates.git] / roles / README.rst
1 Roles
2 =====
3
4 The yaml files in this directory can be combined into a single roles_data.yaml
5 and be used with TripleO to create custom deployments.
6
7 Use tripleoclient to build your own custom roles_data.yaml for your
8 environment.
9
10 roles_data.yaml
11 ---------------
12
13 The roles_data.yaml specifies which roles (groups of nodes) will be deployed.
14 Note this file is used as an input the the various \*.j2.yaml jinja2 templates,
15 so that they are converted into \*.yaml during the plan creation. This occurs
16 via a mistral action/workflow. The file format of this file is a yaml list.
17
18 Role YAML files
19 ===============
20
21 Each role yaml file should contain only a single role. The filename should
22 match the role name. The name of the role is  mandatory and must be unique.
23
24 The role files in this folder should contain at least a role name and the
25 default list of services for the role.
26
27 Role Options
28 ------------
29
30 * CountDefault: (number) optional, default number of nodes, defaults to 0
31   sets the default for the {{role.name}}Count parameter in overcloud.yaml
32
33 * HostnameFormatDefault: (string) optional default format string for hostname
34   defaults to '%stackname%-{{role.name.lower()}}-%index%'
35   sets the default for {{role.name}}HostnameFormat parameter in overcloud.yaml
36
37 * disable_constraints: (boolean) optional, whether to disable Nova and Glance
38   constraints for each role specified in the templates.
39
40 * disable_upgrade_deployment: (boolean) optional, whether to run the
41   ansible upgrade steps for all services that are deployed on the role. If set
42   to True, the operator will drive the upgrade for this role's nodes.
43
44 * upgrade_batch_size: (number): batch size for upgrades where tasks are
45   specified by services to run in batches vs all nodes at once.
46   This defaults to 1, but larger batches may be specified here.
47
48 * ServicesDefault: (list) optional default list of services to be deployed
49   on the role, defaults to an empty list. Sets the default for the
50   {{role.name}}Services parameter in overcloud.yaml
51
52 * tags: (list) list of tags used by other parts of the deployment process to
53   find the role for a specific type of functionality. Currently a role
54   with both 'primary' and 'controller' is used as the primary role for the
55   deployment process. If no roles have have 'primary' and 'controller', the
56   first role in this file is used as the primary role.
57
58 * description: (string) as few sentences describing the role and information
59   pertaining to the usage of the role.
60
61  * networks: (list), optional list of networks which the role will have
62    access to when network isolation is enabled. The names should match
63    those defined in network_data.yaml.
64
65 Working with Roles
66 ==================
67 The tripleoclient provides a series of commands that can be used to view
68 roles and generate a roles_data.yaml file for deployment.
69
70 Listing Available Roles
71 -----------------------
72 The ``openstack overcloud role list`` command can be used to view the list
73 of roles provided by tripleo-heat-templates.
74
75 Usage
76 ^^^^^
77 .. code-block::
78
79   usage: openstack overcloud role list [-h] [--roles-path <roles directory>]
80
81   List availables roles
82
83   optional arguments:
84     -h, --help            show this help message and exit
85     --roles-path <roles directory>
86                           Filesystem path containing the role yaml files. By
87                           default this is /usr/share/openstack-tripleo-heat-
88                           templates/roles
89
90 Example
91 ^^^^^^^
92 .. code-block::
93
94   [user@host ~]$ openstack overcloud role list
95   BlockStorage
96   CephStorage
97   Compute
98   ComputeOvsDpdk
99   Controller
100   ControllerOpenstack
101   Database
102   Messaging
103   Networker
104   ObjectStorage
105   Telemetry
106   Undercloud
107
108 Viewing Role Details
109 --------------------
110 The ``openstack overcloud role show`` command can be used as a quick way to
111 view some of the information about a role.
112
113 Usage
114 ^^^^^
115 .. code-block::
116
117   usage: openstack overcloud role show [-h] [--roles-path <roles directory>]
118                                        <role>
119
120   Show information about a given role
121
122   positional arguments:
123     <role>                Role to display more information about.
124
125   optional arguments:
126     -h, --help            show this help message and exit
127     --roles-path <roles directory>
128                           Filesystem path containing the role yaml files. By
129                           default this is /usr/share/openstack-tripleo-heat-
130                           templates/roles
131
132 Example
133 ^^^^^^^
134 .. code-block::
135
136   [user@host ~]$ openstack overcloud role show Compute
137   ###############################################################################
138   # Role Data for 'Compute'
139   ###############################################################################
140   HostnameFormatDefault: '%stackname%-novacompute-%index%'
141   ServicesDefault:
142    * OS::TripleO::Services::AuditD
143    * OS::TripleO::Services::CACerts
144    * OS::TripleO::Services::CephClient
145    * OS::TripleO::Services::CephExternal
146    * OS::TripleO::Services::CertmongerUser
147    * OS::TripleO::Services::Collectd
148    * OS::TripleO::Services::ComputeCeilometerAgent
149    * OS::TripleO::Services::ComputeNeutronCorePlugin
150    * OS::TripleO::Services::ComputeNeutronL3Agent
151    * OS::TripleO::Services::ComputeNeutronMetadataAgent
152    * OS::TripleO::Services::ComputeNeutronOvsAgent
153    * OS::TripleO::Services::Docker
154    * OS::TripleO::Services::FluentdClient
155    * OS::TripleO::Services::Iscsid
156    * OS::TripleO::Services::Kernel
157    * OS::TripleO::Services::MySQLClient
158    * OS::TripleO::Services::NeutronSriovAgent
159    * OS::TripleO::Services::NeutronVppAgent
160    * OS::TripleO::Services::NovaCompute
161    * OS::TripleO::Services::NovaLibvirt
162    * OS::TripleO::Services::NovaMigrationTarget
163    * OS::TripleO::Services::Ntp
164    * OS::TripleO::Services::OpenDaylightOvs
165    * OS::TripleO::Services::Securetty
166    * OS::TripleO::Services::SensuClient
167    * OS::TripleO::Services::Snmp
168    * OS::TripleO::Services::Sshd
169    * OS::TripleO::Services::Timezone
170    * OS::TripleO::Services::TripleoFirewall
171    * OS::TripleO::Services::TripleoPackages
172    * OS::TripleO::Services::Vpp
173   name: 'Compute'
174
175 Generate roles_data.yaml
176 ------------------------
177 The ``openstack overcloud roles generate`` command can be used to generate
178 a roles_data.yaml file for deployments.
179
180 Usage
181 ^^^^^
182 .. code-block::
183
184   usage: openstack overcloud roles generate [-h]
185                                             [--roles-path <roles directory>]
186                                             [-o <output file>]
187                                             <role> [<role> ...]
188
189   Generate roles_data.yaml file
190
191   positional arguments:
192     <role>                List of roles to use to generate the roles_data.yaml
193                           file for the deployment. NOTE: Ordering is important
194                           if no role has the "primary" and "controller" tags. If
195                           no role is tagged then the first role listed will be
196                           considered the primary role. This usually is the
197                           controller role.
198
199   optional arguments:
200     -h, --help            show this help message and exit
201     --roles-path <roles directory>
202                           Filesystem path containing the role yaml files. By
203                           default this is /usr/share/openstack-tripleo-heat-
204                           templates/roles
205     -o <output file>, --output-file <output file>
206                           File to capture all output to. For example,
207                           roles_data.yaml
208
209 Example
210 ^^^^^^^
211 .. code-block::
212
213   [user@host ~]$ openstack overcloud roles generate -o roles_data.yaml Controller Compute BlockStorage ObjectStorage CephStorage