blob: 05ec88a06659e24aa15106371bc22e60cf812d71 [file] [log] [blame]
Filip Pytloun4a72d792015-10-06 16:28:32 +02001
Aleš Komárek72152852017-04-11 13:48:48 +02002============
3Nova Formula
4============
Filip Pytloun4a72d792015-10-06 16:28:32 +02005
Jakub Pavlikfcf34f82016-05-20 09:35:51 +02006OpenStack Nova provides a cloud computing fabric controller, supporting a wide
7variety of virtualization technologies, including KVM, Xen, LXC, VMware, and
8more. In addition to its native API, it includes compatibility with the
9commonly encountered Amazon EC2 and S3 APIs.
Filip Pytloun4a72d792015-10-06 16:28:32 +020010
Aleš Komárek72152852017-04-11 13:48:48 +020011Sample Pillars
Filip Pytloun4a72d792015-10-06 16:28:32 +020012==============
13
14Controller nodes
15----------------
16
17Nova services on the controller node
18
19.. code-block:: yaml
20
21 nova:
22 controller:
23 version: juno
24 enabled: true
25 security_group: true
Lachlan Evensonb72de502016-01-20 15:34:04 -080026 cpu_allocation_ratio: 8.0
27 ram_allocation_ratio: 1.0
Jiri Konecny9344a372016-03-21 19:25:48 +010028 disk_allocation_ratio: 1.0
Jiri Konecnyb5a80e42016-03-22 11:51:01 +010029 workers: 8
Jakub Pavlik617a8962016-09-04 18:50:06 +020030 report_interval: 60
Filip Pytloun4a72d792015-10-06 16:28:32 +020031 bind:
32 public_address: 10.0.0.122
33 public_name: openstack.domain.com
34 novncproxy_port: 6080
35 database:
36 engine: mysql
37 host: 127.0.0.1
38 port: 3306
39 name: nova
40 user: nova
41 password: pwd
42 identity:
43 engine: keystone
44 host: 127.0.0.1
45 port: 35357
46 user: nova
47 password: pwd
48 tenant: service
49 message_queue:
50 engine: rabbitmq
51 host: 127.0.0.1
52 port: 5672
53 user: openstack
54 password: pwd
55 virtual_host: '/openstack'
56 network:
57 engine: neutron
58 host: 127.0.0.1
59 port: 9696
Jakub Pavlik617a8962016-09-04 18:50:06 +020060 extension_sync_interval: 600
Filip Pytloun4a72d792015-10-06 16:28:32 +020061 identity:
62 engine: keystone
63 host: 127.0.0.1
64 port: 35357
65 user: neutron
66 password: pwd
67 tenant: service
68 metadata:
69 password: password
Petr Michalecaa23dc02016-11-29 16:30:25 +010070 audit:
71 enabled: false
Simon Pasquier8683b7a2017-02-03 16:00:16 +010072 osapi_max_limit: 500
Filip Pytloun4a72d792015-10-06 16:28:32 +020073
Jiri Konecnye31f2c52016-04-14 17:16:02 +020074
Filip Pytloun4a72d792015-10-06 16:28:32 +020075Nova services from custom package repository
76
77.. code-block:: yaml
78
79 nova:
80 controller:
81 version: juno
82 source:
83 engine: pkg
84 address: http://...
85 ....
86
Jiri Konecnye31f2c52016-04-14 17:16:02 +020087
88Client-side RabbitMQ HA setup
89
90.. code-block:: yaml
91
92 nova:
93 controller:
94 ....
95 message_queue:
96 engine: rabbitmq
97 members:
98 - host: 10.0.16.1
99 - host: 10.0.16.2
100 - host: 10.0.16.3
101 user: openstack
102 password: pwd
103 virtual_host: '/openstack'
104 ....
105
106
Petr Michalecaa23dc02016-11-29 16:30:25 +0100107Enable auditing filter, ie: CADF
108
109.. code-block:: yaml
110
111 nova:
112 controller:
Simon Pasquier6a3c8f72016-12-19 15:37:24 +0100113 audit:
Petr Michalecaa23dc02016-11-29 16:30:25 +0100114 enabled: true
115 ....
116 filter_factory: 'keystonemiddleware.audit:filter_factory'
117 map_file: '/etc/pycadf/nova_api_audit_map.conf'
118 ....
119
120
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200121Enable CORS parameters
122
123.. code-block:: yaml
124
125 nova:
126 controller:
127 cors:
128 allowed_origin: https:localhost.local,http:localhost.local
129 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
130 allow_methods: GET,PUT,POST,DELETE,PATCH
131 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
132 allow_credentials: True
133 max_age: 86400
134
Dmitry Ukov3562a082017-05-04 00:00:48 +0400135Configuration of policy.json file
136
137.. code-block:: yaml
138
139 nova:
140 controller:
141 ....
142 policy:
143 context_is_admin: 'role:admin or role:administrator'
144 'compute:create': 'rule:admin_or_owner'
145 # Add key without value to remove line from policy.json
146 'compute:create:attach_network':
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200147
Kirill Bespalov64617172017-07-11 14:43:14 +0300148
149Client-side RabbitMQ TLS configuration:
150---------------------------------------
151
152To enable TLS for oslo.messaging you need to provide the CA certificate.
153
154By default system-wide CA certs is used. Nothing should be specified except `ssl.enabled`.
155
156.. code-block:: yaml
157
158 nova:
159 controller:
160 ....
161 message_queue:
162 ssl:
163 enabled: True
164
165
166
167Use `cacert_file` option to specify the CA-cert file path explicitly:
168
169.. code-block:: yaml
170
171 nova:
172 controller:
173 ....
174 message_queue:
175 ssl:
176 enabled: True
177 cacert_file: /etc/ssl/rabbitmq-ca.pem
178
179To manage content of the `cacert_file` use the `cacert` option:
180
181.. code-block:: yaml
182
183 nova:
184 controller:
185 ....
186 message_queue:
187 ssl:
188 enabled: True
189 cacert: |
190
191 -----BEGIN CERTIFICATE-----
192 ...
193 -----END CERTIFICATE-------
194
195 cacert_file: /etc/openstack/rabbitmq-ca.pem
196
197
198Notice:
199 * The `message_queue.port` is set to **5671** (AMQPS) by default if `ssl.enabled=True`.
200 * Use `message_queue.ssl.version` if you need to specify protocol version. By default is TLSv1 for python < 2.7.9 and TLSv1_2 for version above.
201
202
Filip Pytloun4a72d792015-10-06 16:28:32 +0200203Compute nodes
204-------------
205
206Nova controller services on compute node
207
208.. code-block:: yaml
209
210 nova:
211 compute:
212 version: juno
213 enabled: true
214 virtualization: kvm
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100215 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200216 aggregates:
217 - hosts_with_fc
218 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200219 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200220 resume_guests_state_on_host_boot: False
Filip Pytloun4a72d792015-10-06 16:28:32 +0200221 bind:
222 vnc_address: 172.20.0.100
223 vnc_port: 6080
224 vnc_name: openstack.domain.com
225 vnc_protocol: http
226 database:
227 engine: mysql
228 host: 127.0.0.1
229 port: 3306
230 name: nova
231 user: nova
232 password: pwd
233 identity:
234 engine: keystone
235 host: 127.0.0.1
236 port: 35357
237 user: nova
238 password: pwd
239 tenant: service
240 message_queue:
241 engine: rabbitmq
242 host: 127.0.0.1
243 port: 5672
244 user: openstack
245 password: pwd
246 virtual_host: '/openstack'
247 image:
248 engine: glance
249 host: 127.0.0.1
250 port: 9292
251 network:
252 engine: neutron
253 host: 127.0.0.1
254 port: 9696
255 identity:
256 engine: keystone
257 host: 127.0.0.1
258 port: 35357
259 user: neutron
260 password: pwd
261 tenant: service
262 qemu:
263 max_files: 4096
264 max_processes: 4096
265
266Nova services on compute node with OpenContrail
267
268.. code-block:: yaml
269
270 nova:
271 compute:
272 enabled: true
273 ...
274 networking: contrail
275
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200276
Filip Pytloun4a72d792015-10-06 16:28:32 +0200277Nova services on compute node with memcached caching
278
279.. code-block:: yaml
280
281 nova:
282 compute:
283 enabled: true
284 ...
285 cache:
286 engine: memcached
287 members:
288 - host: 127.0.0.1
289 port: 11211
290 - host: 127.0.0.1
291 port: 11211
292
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200293
294Client-side RabbitMQ HA setup
295
296.. code-block:: yaml
297
298 nova:
Kirill Bespalov64617172017-07-11 14:43:14 +0300299 compute:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200300 ....
301 message_queue:
302 engine: rabbitmq
303 members:
304 - host: 10.0.16.1
305 - host: 10.0.16.2
306 - host: 10.0.16.3
307 user: openstack
308 password: pwd
309 virtual_host: '/openstack'
310 ....
311
maxstack39e6aca2016-05-04 13:50:13 +0000312Nova with ephemeral configured with Ceph
313
314.. code-block:: yaml
315
316 nova:
317 compute:
318 enabled: true
319 ...
320 ceph:
321 ephemeral: yes
322 rbd_pool: nova
323 rbd_user: nova
324 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
325
326
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100327Client role
328-----------
329
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300330Nova configured with NFS
331
332.. code-block:: yaml
333
334 nova:
335 compute:
336 instances_path: /mnt/nova/instances
337
338 linux:
339 storage:
340 enabled: true
341 mount:
342 nfs_nova:
343 enabled: true
344 path: ${nova:compute:instances_path}
345 device: 172.31.35.145:/data
346 file_system: nfs
347 opts: rw,vers=3
348
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100349Nova flavors
350
351.. code-block:: yaml
352
353 nova:
354 client:
355 enabled: true
356 server:
357 identity:
358 flavor:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100359 flavor1:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100360 flavor_id: 10
361 ram: 4096
362 disk: 10
363 vcpus: 1
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100364 flavor2:
365 flavor_id: auto
366 ram: 4096
367 disk: 20
368 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100369 identity1:
370 flavor:
371 ...
372
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100373
374Availability zones
375
376.. code-block:: yaml
377
378 nova:
379 client:
380 enabled: true
381 server:
382 identity:
383 availability_zones:
384 - availability_zone_01
385 - availability_zone_02
386
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200387
388
389Aggregates
390
391.. code-block:: yaml
392
393 nova:
394 client:
395 enabled: true
396 server:
397 identity:
398 aggregates:
399 - aggregate1
400 - aggregate2
401
Petr Jedinýd855ef22017-03-06 22:24:33 +0100402SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100403------
404
405Add PciPassthroughFilter into scheduler filters and NICs on specific compute nodes.
406
407.. code-block:: yaml
408
409 nova:
410 controller:
411 sriov: true
412 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
413
414 nova:
415 compute:
416 sriov:
417 nic_one:
418 devname: eth1
419 physical_network: physnet1
420
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100421CPU pinning & Hugepages
422-----------------------
423
424CPU pinning of virtual machine instances to dedicated physical CPU cores.
425Hugepages mount point for libvirt.
426
427.. code-block:: yaml
428
429 nova:
430 controller:
431 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
432
433 nova:
434 compute:
435 vcpu_pin_set: 2,3,4,5
436 hugepages:
437 mount_points:
438 - path: /mnt/hugepages_1GB
439 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100440
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200441Custom Scheduler filters
442------------------------
443
444If you have a custom filter, that needs to be included in the scheduler, then you can include it like so:
445
446.. code-block:: yaml
447
448 nova:
449 controller:
450 scheduler_custom_filters:
451 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
452
453 # Then add your custom filter on the end (make sure to include all other ones that you need as well)
454 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
455
Michel Nederlofeb566f62017-04-21 15:37:47 +0200456Hardware Trip/Unmap Support
457---------------------------
458
459To enable TRIM support for ephemeral images (thru nova managed images), libvirt has this option.
460
461.. code-block:: yaml
462
463 nova:
464 compute:
465 libvirt:
466 hw_disk_discard: unmap
467
468In order to actually utilize this feature, the following metadata must be set on the image as well, so the SCSI unmap is supported.
469
470.. code-block:: bash
471
472 glance image-update --property hw_scsi_model=virtio-scsi <image>
473 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100474
Thom Gerdesec00afd2017-04-07 18:06:59 +0000475libvirt CPU mode
476----------------
477
478Allow setting the model of CPU that is exposed to a VM. This allows better
479support live migration between hypervisors with different hardware, among other
480things. Defaults to host-passthrough.
481
482.. code-block:: yaml
483
484 nova:
485 compute:
486 cpu_mode: host-model
487
Michel Nederloff7eefb22017-07-10 11:14:33 +0200488Nova compute workarounds
489------------------------
490
491Live snapshotting is disabled by default in nova. To enable this, it needs a manual switch.
492
493From manual:
494
495.. code-block:: yaml
496
497 # When using libvirt 1.2.2 live snapshots fail intermittently under load
498 # (likely related to concurrent libvirt/qemu operations). This config
499 # option provides a mechanism to disable live snapshot, in favor of cold
500 # snapshot, while this is resolved. Cold snapshot causes an instance
501 # outage while the guest is going through the snapshotting process.
502 #
503 # For more information, refer to the bug report:
504 #
505 # https://bugs.launchpad.net/nova/+bug/1334398
506
507Configurable pillar data:
508
509.. code-block:: yaml
510
511 nova:
512 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200513 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200514 disable_libvirt_livesnapshot: False
515
Michel Nederlofb51a5142017-06-27 08:31:35 +0200516Config drive options
517--------------------
518
519See example below on how to configure the options for the config drive.
520
521.. code-block:: yaml
522
523 nova:
524 compute:
525 config_drive:
526 forced: True # Default: True
527 cdrom: True # Default: False
528 format: iso9660 # Default: vfat
529 inject_password: False # Default: False
530
Thom Gerdesec00afd2017-04-07 18:06:59 +0000531
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100532Documentation and Bugs
533======================
534
535To learn how to install and update salt-formulas, consult the documentation
536available online at:
537
538 http://salt-formulas.readthedocs.io/
539
540In the unfortunate event that bugs are discovered, they should be reported to
541the appropriate issue tracker. Use Github issue tracker for specific salt
542formula:
543
544 https://github.com/salt-formulas/salt-formula-nova/issues
545
546For feature requests, bug reports or blueprints affecting entire ecosystem,
547use Launchpad salt-formulas project:
548
549 https://launchpad.net/salt-formulas
550
551You can also join salt-formulas-users team and subscribe to mailing list:
552
553 https://launchpad.net/~salt-formulas-users
554
555Developers wishing to work on the salt-formulas projects should always base
556their work on master branch and submit pull request against specific formula.
557
558 https://github.com/salt-formulas/salt-formula-nova
559
560Any questions or feedback is always welcome so feel free to join our IRC
561channel:
562
563 #salt-formulas @ irc.freenode.net