blob: bb543ffa0e8716c3fbd73e842d678d4b66d7ff1e [file] [log] [blame]
Filip Pytloun923d8692015-10-06 16:28:32 +02001
OlgaGusarenko769c8192018-07-30 18:16:44 +03002=====
3Usage
4=====
Filip Pytloun923d8692015-10-06 16:28:32 +02005
Jakub Pavlik3bed97a2016-05-20 11:16:08 +02006Heat is the main project in the OpenStack Orchestration program. It implements
7an orchestration engine to launch multiple composite cloud applications based
8on templates in the form of text files that can be treated like code. A native
9Heat template format is evolving, but Heat also endeavours to provide
10compatibility with the AWS CloudFormation template format, so that many
11existing CloudFormation templates can be launched on OpenStack. Heat provides
12both an OpenStack-native ReST API and a CloudFormation-compatible Query API.
Filip Pytloun923d8692015-10-06 16:28:32 +020013
Aleš Komárekd13365c2017-04-11 13:13:37 +020014Sample Pillars
Filip Pytloun923d8692015-10-06 16:28:32 +020015==============
16
OlgaGusarenko769c8192018-07-30 18:16:44 +030017Single Heat services on the controller node:
Filip Pytloun923d8692015-10-06 16:28:32 +020018
19.. code-block:: yaml
20
21 heat:
22 server:
23 enabled: true
24 version: icehouse
Jakub Pavlik51e15e02016-03-12 13:32:26 +010025 region: RegionOne
Filip Pytloun923d8692015-10-06 16:28:32 +020026 bind:
27 metadata:
28 address: 10.0.106.10
29 port: 8000
Oleksii Chupryncd1be6f2017-04-07 09:30:26 +030030 protocol: http
Filip Pytloun923d8692015-10-06 16:28:32 +020031 waitcondition:
32 address: 10.0.106.10
33 port: 8000
Oleksii Chupryncd1be6f2017-04-07 09:30:26 +030034 protocol: http
Filip Pytloun923d8692015-10-06 16:28:32 +020035 watch:
36 address: 10.0.106.10
37 port: 8003
Oleksii Chupryncd1be6f2017-04-07 09:30:26 +030038 protocol: http
Filip Pytloun923d8692015-10-06 16:28:32 +020039 cloudwatch:
40 host: 10.0.106.20
41 api:
42 host: 10.0.106.20
43 api_cfn:
44 host: 10.0.106.20
45 database:
46 engine: mysql
47 host: 10.0.106.20
48 port: 3306
49 name: heat
50 user: heat
51 password: password
52 identity:
53 engine: keystone
54 host: 10.0.106.20
55 port: 35357
56 tenant: service
57 user: heat
58 password: password
Dennis Dmitriev09650272017-03-09 17:51:00 +020059 endpoint_type_default: internalURL
60 endpoint_type_heat: publicURL
Filip Pytloun923d8692015-10-06 16:28:32 +020061 message_queue:
62 engine: rabbitmq
63 host: 10.0.106.20
64 port: 5672
65 user: openstack
66 password: password
67 virtual_host: '/openstack'
68 ha_queues: True
Dmitry Stremkouskib3d83a92017-11-08 16:01:18 +030069 max_stacks_per_tenant: 150
Dmitry Stremkouski9cacd162017-11-08 16:39:38 +030070 max_nested_stack_depth: 10
Daniel Cech43224642018-11-13 16:27:23 +010071 stack_action_timeout: 7200
Filip Pytloun923d8692015-10-06 16:28:32 +020072
OlgaGusarenko769c8192018-07-30 18:16:44 +030073Define server clients Keystone parameter:
Ondrej Smola24ae6a82017-07-18 10:53:14 +020074
75.. code-block:: yaml
76
77 heat:
78 server:
79 clients:
80 keystone:
81 protocol: https
82 host: 10.0.106.10
83 port: 5000
84 insecure: false
85
Martin Polreichb24076f2018-08-27 10:42:45 +020086Server with auth_encryption_key defined:
87
88.. code-block:: yaml
89
90 heat:
91 server:
92 ....
Martin Polreich4d7af432018-08-28 10:43:40 +020093 auth_encryption_key: "KeyToEncrypt-hasToBeExact32Chars"
Martin Polreichb24076f2018-08-27 10:42:45 +020094 ....
95
OlgaGusarenko769c8192018-07-30 18:16:44 +030096Enable CORS parameters:
Ondrej Smola70f29342017-04-28 12:58:06 +020097
98.. code-block:: yaml
99
100 heat:
101 server:
102 cors:
103 allowed_origin: https:localhost.local,http:localhost.local
104 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
105 allow_methods: GET,PUT,POST,DELETE,PATCH
106 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
107 allow_credentials: True
108 max_age: 86400
109
OlgaGusarenko769c8192018-07-30 18:16:44 +0300110Heat client with specified git templates:
Filip Pytloun923d8692015-10-06 16:28:32 +0200111
112.. code-block:: yaml
113
114 heat:
115 client:
116 enabled: true
Jiri Broulikb2ef3282017-02-07 22:33:30 +0100117 template:
118 admin:
119 domain: default
120 source:
121 engine: git
122 address: git@repo.domain.com/admin-templates.git
123 revision: master
124 default:
125 domain: default
126 source:
127 engine: git
128 address: git@repo.domain.com/default-templates.git
129 revision: master
130
OlgaGusarenko769c8192018-07-30 18:16:44 +0300131Ceilometer notification:
Filip Pytloun923d8692015-10-06 16:28:32 +0200132
133.. code-block:: yaml
134
135 heat:
136 server:
137 enabled: true
138 version: icehouse
139 notification: true
140
OlgaGusarenko769c8192018-07-30 18:16:44 +0300141Configuration of ``policy.json`` file:
Dmitry Ukovf3f33a82017-05-05 11:56:46 +0400142
143.. code-block:: yaml
144
145 heat:
146 server:
147 ....
148 policy:
149 deny_stack_user: 'not role:heat_stack_user'
150 'cloudformation:ValidateTemplate': 'rule:deny_stack_user'
151 # Add key without value to remove line from policy.json
152 'cloudformation:DescribeStackResource':
153
OlgaGusarenko769c8192018-07-30 18:16:44 +0300154Client-side RabbitMQ HA setup:
Jiri Konecnyf94dd922016-04-20 12:09:22 +0200155
156.. code-block:: yaml
157
158 heat:
159 server:
160 ....
161 message_queue:
162 engine: rabbitmq
163 members:
164 - host: 10.0.16.1
165 - host: 10.0.16.2
166 - host: 10.0.16.3
167 user: openstack
168 password: pwd
169 virtual_host: '/openstack'
170 ....
171
Kirill Bespalov00da2512017-11-21 13:21:21 +0300172Configuring TLS communications
173-------------------------------
Kirill Bespalov27d20ca2017-08-06 15:43:28 +0300174
OlgaGusarenko769c8192018-07-30 18:16:44 +0300175.. note:: By default, system-wide installed CA certs are used, so the
176 ``cacert_file`` param is optional, as well as ``cacert``.
Kirill Bespalov27d20ca2017-08-06 15:43:28 +0300177
OlgaGusarenko769c8192018-07-30 18:16:44 +0300178- **RabbitMQ TLS**
Kirill Bespalov27d20ca2017-08-06 15:43:28 +0300179
OlgaGusarenko769c8192018-07-30 18:16:44 +0300180 .. code-block:: yaml
Kirill Bespalov27d20ca2017-08-06 15:43:28 +0300181
OlgaGusarenko769c8192018-07-30 18:16:44 +0300182 heat:
Kirill Bespalov00da2512017-11-21 13:21:21 +0300183 server:
OlgaGusarenko769c8192018-07-30 18:16:44 +0300184 message_queue:
185 port: 5671
186 ssl:
187 enabled: True
188 (optional) cacert: cert body if the cacert_file does not exists
189 (optional) cacert_file: /etc/openstack/rabbitmq-ca.pem
190 (optional) version: TLSv1_2
Kirill Bespalov27d20ca2017-08-06 15:43:28 +0300191
OlgaGusarenko769c8192018-07-30 18:16:44 +0300192- **MySQL TLS**
Kirill Bespalov27d20ca2017-08-06 15:43:28 +0300193
OlgaGusarenko769c8192018-07-30 18:16:44 +0300194 .. code-block:: yaml
Kirill Bespalov27d20ca2017-08-06 15:43:28 +0300195
OlgaGusarenko769c8192018-07-30 18:16:44 +0300196 heat:
197 server:
198 database:
199 ssl:
200 enabled: True
201 (optional) cacert: cert body if the cacert_file does not exists
202 (optional) cacert_file: /etc/openstack/mysql-ca.pem
Kirill Bespalov27d20ca2017-08-06 15:43:28 +0300203
OlgaGusarenko769c8192018-07-30 18:16:44 +0300204- **Openstack HTTPS API**
205
206 .. code-block:: yaml
207
208 heat:
Kirill Bespalov00da2512017-11-21 13:21:21 +0300209 server:
OlgaGusarenko769c8192018-07-30 18:16:44 +0300210 identity:
211 protocol: https
212 (optional) cacert_file: /etc/openstack/proxy.pem
213 clients:
214 keystone:
215 protocol: https
216 (optional) cacert_file: /etc/openstack/proxy.pem
Kirill Bespalov27d20ca2017-08-06 15:43:28 +0300217
Dmitry Kalashnik1c26ac02017-12-06 13:37:19 +0400218Enhanced logging with logging.conf
219----------------------------------
220
221By default logging.conf is disabled.
222
223That is possible to enable per-binary logging.conf with new variables:
Dmitry Kalashnik1c26ac02017-12-06 13:37:19 +0400224
OlgaGusarenko769c8192018-07-30 18:16:44 +0300225* ``openstack_log_appender``
226 Set to true to enable ``log_config_append`` for all OpenStack services
Dmitry Kalashnik1c26ac02017-12-06 13:37:19 +0400227
OlgaGusarenko769c8192018-07-30 18:16:44 +0300228* ``openstack_fluentd_handler_enabled``
229 Set to true to enable ``FluentHandler`` for all Openstack services
230
231* ``openstack_ossyslog_handler_enabled``
232 Set to true to enable ``OSSysLogHandler`` for all Openstack services
233
234Only `WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler`` are
235available.
236
237Also, it is possible to configure this with pillar:
Dmitry Kalashnik1c26ac02017-12-06 13:37:19 +0400238
239.. code-block:: yaml
240
241 heat:
242 server:
243 logging:
244 log_appender: true
245 log_handlers:
246 watchedfile:
247 enabled: true
248 fluentd:
249 enabled: true
Oleksii Chupryn99a3e1b2018-02-07 09:40:30 +0200250 ossyslog:
251 enabled: true
Jiri Konecnyf94dd922016-04-20 12:09:22 +0200252
Oleksandr Shyshko60a2b872018-08-30 17:23:24 +0300253Enable x509 and ssl communication between Heat and Galera cluster.
254---------------------
255By default communication between Heat and Galera is unsecure.
256
Oleksandr Shyshko17b3e8e2018-09-07 13:55:28 +0300257heat:
258 server:
259 database:
260 x509:
261 enabled: True
262
Oleksandr Shyshko60a2b872018-08-30 17:23:24 +0300263You able to set custom certificates in pillar:
Oleksandr Shyshko60a2b872018-08-30 17:23:24 +0300264
265heat:
266 server:
267 database:
268 x509:
Oleksandr Shyshko17b3e8e2018-09-07 13:55:28 +0300269 cacert: (certificate content)
270 cert: (certificate content)
271 key: (certificate content)
Oleksandr Shyshko60a2b872018-08-30 17:23:24 +0300272
273You can read more about it here:
274 https://docs.openstack.org/security-guide/databases/database-access-control.html
275
Oleksandr Bryndziicfd9f8b2018-10-04 11:56:54 +0300276Heat services with memcached caching and security strategy:
277
278.. code-block:: yaml
279
280 heat:
281 server:
282 enabled: true
283 ...
284 cache:
285 engine: memcached
286 members:
287 - host: 127.0.0.1
288 port: 11211
289 - host: 127.0.0.1
290 port: 11211
291 security:
292 enabled: true
293 strategy: ENCRYPT
294 secret_key: secret
Vasyl Saienkoa08bd592018-09-10 10:47:25 +0000295Upgrades
296========
297
298Each openstack formula provide set of phases (logical bloks) that will help to
299build flexible upgrade orchestration logic for particular components. The list
300of phases and theirs descriptions are listed in table below:
301
302+-------------------------------+------------------------------------------------------+
303| State | Description |
304+===============================+======================================================+
305| <app>.upgrade.service_running | Ensure that all services for particular application |
306| | are enabled for autostart and running |
307+-------------------------------+------------------------------------------------------+
308| <app>.upgrade.service_stopped | Ensure that all services for particular application |
309| | disabled for autostart and dead |
310+-------------------------------+------------------------------------------------------+
311| <app>.upgrade.pkgs_latest | Ensure that packages used by particular application |
312| | are installed to latest available version. |
313| | This will not upgrade data plane packages like qemu |
314| | and openvswitch as usually minimal required version |
315| | in openstack services is really old. The data plane |
316| | packages should be upgraded separately by `apt-get |
317| | upgrade` or `apt-get dist-upgrade` |
318| | Applying this state will not autostart service. |
319+-------------------------------+------------------------------------------------------+
320| <app>.upgrade.render_config | Ensure configuration is rendered actual version. +
321+-------------------------------+------------------------------------------------------+
322| <app>.upgrade.pre | We assume this state is applied on all nodes in the |
323| | cloud before running upgrade. |
324| | Only non destructive actions will be applied during |
325| | this phase. Perform service built in service check |
326| | like (keystone-manage doctor and nova-status upgrade)|
327+-------------------------------+------------------------------------------------------+
328| <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this |
329| | phase resources will be gracefully removed from |
330| | current node if it is allowed. Services for upgraded |
331| | application will be set to admin disabled state to |
332| | make sure node will not participate in resources |
333| | scheduling. For example on gtw nodes this will set |
334| | all agents to admin disable state and will move all |
335| | routers to other agents. |
336+-------------------------------+------------------------------------------------------+
337| <app>.upgrade.upgrade | This state will basically upgrade application on |
338| | particular target. Stop services, render |
339| | configuration, install new packages, run offline |
340| | dbsync (for ctl), start services. Data plane should |
341| | not be affected, only OpenStack python services. |
342+-------------------------------+------------------------------------------------------+
343| <app>.upgrade.upgrade.post | Add services back to scheduling. |
344+-------------------------------+------------------------------------------------------+
345| <app>.upgrade.post | This phase should be launched only when upgrade of |
346| | the cloud is completed. Cleanup temporary files, |
347| | perform other post upgrade tasks. |
348+-------------------------------+------------------------------------------------------+
349| <app>.upgrade.verify | Here we will do basic health checks (API CRUD |
350| | operations, verify do not have dead network |
351| | agents/compute services) |
352+-------------------------------+------------------------------------------------------+
353
Filip Pytloundc94d872017-02-02 13:02:03 +0100354Documentation and Bugs
355======================
356
OlgaGusarenko769c8192018-07-30 18:16:44 +0300357* http://salt-formulas.readthedocs.io/
358 Learn how to install and update salt-formulas
Filip Pytloundc94d872017-02-02 13:02:03 +0100359
OlgaGusarenko769c8192018-07-30 18:16:44 +0300360* https://github.com/salt-formulas/salt-formula-heat/issues
361 In the unfortunate event that bugs are discovered, report the issue to the
362 appropriate issue tracker. Use the Github issue tracker for a specific salt
363 formula
Filip Pytloundc94d872017-02-02 13:02:03 +0100364
OlgaGusarenko769c8192018-07-30 18:16:44 +0300365* https://launchpad.net/salt-formulas
366 For feature requests, bug reports, or blueprints affecting the entire
367 ecosystem, use the Launchpad salt-formulas project
Filip Pytloundc94d872017-02-02 13:02:03 +0100368
OlgaGusarenko769c8192018-07-30 18:16:44 +0300369* https://launchpad.net/~salt-formulas-users
370 Join the salt-formulas-users team and subscribe to mailing list if required
Filip Pytloundc94d872017-02-02 13:02:03 +0100371
OlgaGusarenko769c8192018-07-30 18:16:44 +0300372* https://github.com/salt-formulas/salt-formula-heat
373 Develop the salt-formulas projects in the master branch and then submit pull
374 requests against a specific formula
Filip Pytloundc94d872017-02-02 13:02:03 +0100375
OlgaGusarenko769c8192018-07-30 18:16:44 +0300376* #salt-formulas @ irc.freenode.net
377 Use this IRC channel in case of any questions or feedback which is always
378 welcome
Filip Pytloundc94d872017-02-02 13:02:03 +0100379