blob: f7102e11ada649909efd57668b3996787b9ae3a3 [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
Filip Pytloun4a72d792015-10-06 16:28:32 +0200148Compute nodes
149-------------
150
151Nova controller services on compute node
152
153.. code-block:: yaml
154
155 nova:
156 compute:
157 version: juno
158 enabled: true
159 virtualization: kvm
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100160 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200161 aggregates:
162 - hosts_with_fc
163 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200164 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200165 resume_guests_state_on_host_boot: False
Dmitry Stremkovskiy8a0ff512017-07-25 20:54:13 +0300166 my_ip: 10.1.0.16
Filip Pytloun4a72d792015-10-06 16:28:32 +0200167 bind:
168 vnc_address: 172.20.0.100
169 vnc_port: 6080
170 vnc_name: openstack.domain.com
171 vnc_protocol: http
172 database:
173 engine: mysql
174 host: 127.0.0.1
175 port: 3306
176 name: nova
177 user: nova
178 password: pwd
179 identity:
180 engine: keystone
181 host: 127.0.0.1
182 port: 35357
183 user: nova
184 password: pwd
185 tenant: service
186 message_queue:
187 engine: rabbitmq
188 host: 127.0.0.1
189 port: 5672
190 user: openstack
191 password: pwd
192 virtual_host: '/openstack'
193 image:
194 engine: glance
195 host: 127.0.0.1
196 port: 9292
197 network:
198 engine: neutron
199 host: 127.0.0.1
200 port: 9696
201 identity:
202 engine: keystone
203 host: 127.0.0.1
204 port: 35357
205 user: neutron
206 password: pwd
207 tenant: service
208 qemu:
209 max_files: 4096
210 max_processes: 4096
Dmitry Stremkovskiy96281f52017-07-26 00:39:22 +0300211 host: node-12.domain.tld
Filip Pytloun4a72d792015-10-06 16:28:32 +0200212
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300213Group membership for user nova (upgrade related)
214
215.. code-block:: yaml
216
217 nova:
218 compute:
219 enabled: true
220 ...
221 user:
222 groups:
223 - libvirt
224
Filip Pytloun4a72d792015-10-06 16:28:32 +0200225Nova services on compute node with OpenContrail
226
227.. code-block:: yaml
228
229 nova:
230 compute:
231 enabled: true
232 ...
233 networking: contrail
234
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200235
Filip Pytloun4a72d792015-10-06 16:28:32 +0200236Nova services on compute node with memcached caching
237
238.. code-block:: yaml
239
240 nova:
241 compute:
242 enabled: true
243 ...
244 cache:
245 engine: memcached
246 members:
247 - host: 127.0.0.1
248 port: 11211
249 - host: 127.0.0.1
250 port: 11211
251
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200252
253Client-side RabbitMQ HA setup
254
255.. code-block:: yaml
256
257 nova:
258 controller:
259 ....
260 message_queue:
261 engine: rabbitmq
262 members:
263 - host: 10.0.16.1
264 - host: 10.0.16.2
265 - host: 10.0.16.3
266 user: openstack
267 password: pwd
268 virtual_host: '/openstack'
269 ....
270
maxstack39e6aca2016-05-04 13:50:13 +0000271
272Nova with ephemeral configured with Ceph
273
274.. code-block:: yaml
275
276 nova:
277 compute:
278 enabled: true
279 ...
280 ceph:
281 ephemeral: yes
282 rbd_pool: nova
283 rbd_user: nova
284 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
285
286
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100287Client role
288-----------
289
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300290Nova configured with NFS
291
292.. code-block:: yaml
293
294 nova:
295 compute:
296 instances_path: /mnt/nova/instances
297
298 linux:
299 storage:
300 enabled: true
301 mount:
302 nfs_nova:
303 enabled: true
304 path: ${nova:compute:instances_path}
305 device: 172.31.35.145:/data
306 file_system: nfs
307 opts: rw,vers=3
308
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100309Nova flavors
310
311.. code-block:: yaml
312
313 nova:
314 client:
315 enabled: true
316 server:
317 identity:
318 flavor:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100319 flavor1:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100320 flavor_id: 10
321 ram: 4096
322 disk: 10
323 vcpus: 1
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100324 flavor2:
325 flavor_id: auto
326 ram: 4096
327 disk: 20
328 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100329 identity1:
330 flavor:
331 ...
332
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100333
334Availability zones
335
336.. code-block:: yaml
337
338 nova:
339 client:
340 enabled: true
341 server:
342 identity:
343 availability_zones:
344 - availability_zone_01
345 - availability_zone_02
346
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200347
348
349Aggregates
350
351.. code-block:: yaml
352
353 nova:
354 client:
355 enabled: true
356 server:
357 identity:
358 aggregates:
359 - aggregate1
360 - aggregate2
361
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300362Upgrade levels
363
364.. code-block:: yaml
365
366 nova:
367 controller:
368 upgrade_levels:
369 compute: juno
370
371 nova:
372 compute:
373 upgrade_levels:
374 compute: juno
375
Petr Jedinýd855ef22017-03-06 22:24:33 +0100376SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100377------
378
379Add PciPassthroughFilter into scheduler filters and NICs on specific compute nodes.
380
381.. code-block:: yaml
382
383 nova:
384 controller:
385 sriov: true
386 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
387
388 nova:
389 compute:
390 sriov:
391 nic_one:
392 devname: eth1
393 physical_network: physnet1
394
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100395CPU pinning & Hugepages
396-----------------------
397
398CPU pinning of virtual machine instances to dedicated physical CPU cores.
399Hugepages mount point for libvirt.
400
401.. code-block:: yaml
402
403 nova:
404 controller:
405 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
406
407 nova:
408 compute:
409 vcpu_pin_set: 2,3,4,5
410 hugepages:
411 mount_points:
412 - path: /mnt/hugepages_1GB
413 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100414
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200415Custom Scheduler filters
416------------------------
417
418If you have a custom filter, that needs to be included in the scheduler, then you can include it like so:
419
420.. code-block:: yaml
421
422 nova:
423 controller:
424 scheduler_custom_filters:
425 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
426
427 # Then add your custom filter on the end (make sure to include all other ones that you need as well)
428 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
429
Michel Nederlofeb566f62017-04-21 15:37:47 +0200430Hardware Trip/Unmap Support
431---------------------------
432
433To enable TRIM support for ephemeral images (thru nova managed images), libvirt has this option.
434
435.. code-block:: yaml
436
437 nova:
438 compute:
439 libvirt:
440 hw_disk_discard: unmap
441
442In order to actually utilize this feature, the following metadata must be set on the image as well, so the SCSI unmap is supported.
443
444.. code-block:: bash
445
446 glance image-update --property hw_scsi_model=virtio-scsi <image>
447 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100448
Thom Gerdesec00afd2017-04-07 18:06:59 +0000449libvirt CPU mode
450----------------
451
452Allow setting the model of CPU that is exposed to a VM. This allows better
453support live migration between hypervisors with different hardware, among other
454things. Defaults to host-passthrough.
455
456.. code-block:: yaml
457
458 nova:
459 compute:
460 cpu_mode: host-model
461
Michel Nederloff7eefb22017-07-10 11:14:33 +0200462Nova compute workarounds
463------------------------
464
465Live snapshotting is disabled by default in nova. To enable this, it needs a manual switch.
466
467From manual:
468
469.. code-block:: yaml
470
471 # When using libvirt 1.2.2 live snapshots fail intermittently under load
472 # (likely related to concurrent libvirt/qemu operations). This config
473 # option provides a mechanism to disable live snapshot, in favor of cold
474 # snapshot, while this is resolved. Cold snapshot causes an instance
475 # outage while the guest is going through the snapshotting process.
476 #
477 # For more information, refer to the bug report:
478 #
479 # https://bugs.launchpad.net/nova/+bug/1334398
480
481Configurable pillar data:
482
483.. code-block:: yaml
484
485 nova:
486 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200487 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200488 disable_libvirt_livesnapshot: False
489
Michel Nederlofb51a5142017-06-27 08:31:35 +0200490Config drive options
491--------------------
492
493See example below on how to configure the options for the config drive.
494
495.. code-block:: yaml
496
497 nova:
498 compute:
499 config_drive:
500 forced: True # Default: True
501 cdrom: True # Default: False
502 format: iso9660 # Default: vfat
503 inject_password: False # Default: False
504
Thom Gerdesec00afd2017-04-07 18:06:59 +0000505
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100506Documentation and Bugs
507======================
508
509To learn how to install and update salt-formulas, consult the documentation
510available online at:
511
512 http://salt-formulas.readthedocs.io/
513
514In the unfortunate event that bugs are discovered, they should be reported to
515the appropriate issue tracker. Use Github issue tracker for specific salt
516formula:
517
518 https://github.com/salt-formulas/salt-formula-nova/issues
519
520For feature requests, bug reports or blueprints affecting entire ecosystem,
521use Launchpad salt-formulas project:
522
523 https://launchpad.net/salt-formulas
524
525You can also join salt-formulas-users team and subscribe to mailing list:
526
527 https://launchpad.net/~salt-formulas-users
528
529Developers wishing to work on the salt-formulas projects should always base
530their work on master branch and submit pull request against specific formula.
531
532 https://github.com/salt-formulas/salt-formula-nova
533
534Any questions or feedback is always welcome so feel free to join our IRC
535channel:
536
537 #salt-formulas @ irc.freenode.net