blob: ab61b7128dc9359d666e656a6674d42cb3d60f6f [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
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +030029 cross_az_attach: false
Jiri Konecnyb5a80e42016-03-22 11:51:01 +010030 workers: 8
Jakub Pavlik617a8962016-09-04 18:50:06 +020031 report_interval: 60
Filip Pytloun4a72d792015-10-06 16:28:32 +020032 bind:
33 public_address: 10.0.0.122
34 public_name: openstack.domain.com
35 novncproxy_port: 6080
36 database:
37 engine: mysql
38 host: 127.0.0.1
39 port: 3306
40 name: nova
41 user: nova
42 password: pwd
43 identity:
44 engine: keystone
45 host: 127.0.0.1
46 port: 35357
47 user: nova
48 password: pwd
49 tenant: service
50 message_queue:
51 engine: rabbitmq
52 host: 127.0.0.1
53 port: 5672
54 user: openstack
55 password: pwd
56 virtual_host: '/openstack'
57 network:
58 engine: neutron
59 host: 127.0.0.1
60 port: 9696
Jakub Pavlik617a8962016-09-04 18:50:06 +020061 extension_sync_interval: 600
Filip Pytloun4a72d792015-10-06 16:28:32 +020062 identity:
63 engine: keystone
64 host: 127.0.0.1
65 port: 35357
66 user: neutron
67 password: pwd
68 tenant: service
69 metadata:
70 password: password
Petr Michalecaa23dc02016-11-29 16:30:25 +010071 audit:
72 enabled: false
Simon Pasquier8683b7a2017-02-03 16:00:16 +010073 osapi_max_limit: 500
Filip Pytloun4a72d792015-10-06 16:28:32 +020074
Jiri Konecnye31f2c52016-04-14 17:16:02 +020075
Filip Pytloun4a72d792015-10-06 16:28:32 +020076Nova services from custom package repository
77
78.. code-block:: yaml
79
80 nova:
81 controller:
82 version: juno
83 source:
84 engine: pkg
85 address: http://...
86 ....
87
Jiri Konecnye31f2c52016-04-14 17:16:02 +020088
89Client-side RabbitMQ HA setup
90
91.. code-block:: yaml
92
93 nova:
94 controller:
95 ....
96 message_queue:
97 engine: rabbitmq
98 members:
99 - host: 10.0.16.1
100 - host: 10.0.16.2
101 - host: 10.0.16.3
102 user: openstack
103 password: pwd
104 virtual_host: '/openstack'
105 ....
106
107
Petr Michalecaa23dc02016-11-29 16:30:25 +0100108Enable auditing filter, ie: CADF
109
110.. code-block:: yaml
111
112 nova:
113 controller:
Simon Pasquier6a3c8f72016-12-19 15:37:24 +0100114 audit:
Petr Michalecaa23dc02016-11-29 16:30:25 +0100115 enabled: true
116 ....
117 filter_factory: 'keystonemiddleware.audit:filter_factory'
118 map_file: '/etc/pycadf/nova_api_audit_map.conf'
119 ....
120
121
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200122Enable CORS parameters
123
124.. code-block:: yaml
125
126 nova:
127 controller:
128 cors:
129 allowed_origin: https:localhost.local,http:localhost.local
130 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
131 allow_methods: GET,PUT,POST,DELETE,PATCH
132 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
133 allow_credentials: True
134 max_age: 86400
135
Dmitry Ukov3562a082017-05-04 00:00:48 +0400136Configuration of policy.json file
137
138.. code-block:: yaml
139
140 nova:
141 controller:
142 ....
143 policy:
144 context_is_admin: 'role:admin or role:administrator'
145 'compute:create': 'rule:admin_or_owner'
146 # Add key without value to remove line from policy.json
147 'compute:create:attach_network':
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200148
Filip Pytloun4a72d792015-10-06 16:28:32 +0200149Compute nodes
150-------------
151
152Nova controller services on compute node
153
154.. code-block:: yaml
155
156 nova:
157 compute:
158 version: juno
159 enabled: true
160 virtualization: kvm
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +0300161 cross_az_attach: false
Dmitry Stremkovskiy35e53b72017-07-29 12:50:39 +0300162 disk_cachemodes: network=writeback,block=none
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100163 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200164 aggregates:
165 - hosts_with_fc
166 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200167 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200168 resume_guests_state_on_host_boot: False
Dmitry Stremkovskiy8a0ff512017-07-25 20:54:13 +0300169 my_ip: 10.1.0.16
Filip Pytloun4a72d792015-10-06 16:28:32 +0200170 bind:
171 vnc_address: 172.20.0.100
172 vnc_port: 6080
173 vnc_name: openstack.domain.com
174 vnc_protocol: http
175 database:
176 engine: mysql
177 host: 127.0.0.1
178 port: 3306
179 name: nova
180 user: nova
181 password: pwd
182 identity:
183 engine: keystone
184 host: 127.0.0.1
185 port: 35357
186 user: nova
187 password: pwd
188 tenant: service
189 message_queue:
190 engine: rabbitmq
191 host: 127.0.0.1
192 port: 5672
193 user: openstack
194 password: pwd
195 virtual_host: '/openstack'
196 image:
197 engine: glance
198 host: 127.0.0.1
199 port: 9292
200 network:
201 engine: neutron
202 host: 127.0.0.1
203 port: 9696
204 identity:
205 engine: keystone
206 host: 127.0.0.1
207 port: 35357
208 user: neutron
209 password: pwd
210 tenant: service
211 qemu:
212 max_files: 4096
213 max_processes: 4096
Dmitry Stremkovskiy96281f52017-07-26 00:39:22 +0300214 host: node-12.domain.tld
Filip Pytloun4a72d792015-10-06 16:28:32 +0200215
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300216Group membership for user nova (upgrade related)
217
218.. code-block:: yaml
219
220 nova:
221 compute:
222 enabled: true
223 ...
224 user:
225 groups:
226 - libvirt
227
Filip Pytloun4a72d792015-10-06 16:28:32 +0200228Nova services on compute node with OpenContrail
229
230.. code-block:: yaml
231
232 nova:
233 compute:
234 enabled: true
235 ...
236 networking: contrail
237
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200238
Filip Pytloun4a72d792015-10-06 16:28:32 +0200239Nova services on compute node with memcached caching
240
241.. code-block:: yaml
242
243 nova:
244 compute:
245 enabled: true
246 ...
247 cache:
248 engine: memcached
249 members:
250 - host: 127.0.0.1
251 port: 11211
252 - host: 127.0.0.1
253 port: 11211
254
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200255
256Client-side RabbitMQ HA setup
257
258.. code-block:: yaml
259
260 nova:
261 controller:
262 ....
263 message_queue:
264 engine: rabbitmq
265 members:
266 - host: 10.0.16.1
267 - host: 10.0.16.2
268 - host: 10.0.16.3
269 user: openstack
270 password: pwd
271 virtual_host: '/openstack'
272 ....
273
maxstack39e6aca2016-05-04 13:50:13 +0000274
275Nova with ephemeral configured with Ceph
276
277.. code-block:: yaml
278
279 nova:
280 compute:
281 enabled: true
282 ...
283 ceph:
284 ephemeral: yes
285 rbd_pool: nova
286 rbd_user: nova
287 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
Kalynovskyi0bc79692017-07-21 16:22:09 +0300288 ....
maxstack39e6aca2016-05-04 13:50:13 +0000289
Kalynovskyi0bc79692017-07-21 16:22:09 +0300290Nova with ephemeral configured with LVM
291
292.. code-block:: yaml
293
294 nova:
295 compute:
296 enabled: true
297 ...
298 lvm:
299 ephemeral: yes
300 images_volume_group: nova_vg
301
302 linux:
303 storage:
304 lvm:
305 nova_vg:
306 name: nova_vg
307 devices:
308 - /dev/sdf
309 - /dev/sdd
310 - /dev/sdg
311 - /dev/sde
312 - /dev/sdc
313 - /dev/sdj
314 - /dev/sdh
maxstack39e6aca2016-05-04 13:50:13 +0000315
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100316Client role
317-----------
318
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300319Nova configured with NFS
320
321.. code-block:: yaml
322
323 nova:
324 compute:
325 instances_path: /mnt/nova/instances
326
327 linux:
328 storage:
329 enabled: true
330 mount:
331 nfs_nova:
332 enabled: true
333 path: ${nova:compute:instances_path}
334 device: 172.31.35.145:/data
335 file_system: nfs
336 opts: rw,vers=3
337
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100338Nova flavors
339
340.. code-block:: yaml
341
342 nova:
343 client:
344 enabled: true
345 server:
346 identity:
347 flavor:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100348 flavor1:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100349 flavor_id: 10
350 ram: 4096
351 disk: 10
352 vcpus: 1
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100353 flavor2:
354 flavor_id: auto
355 ram: 4096
356 disk: 20
357 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100358 identity1:
359 flavor:
360 ...
361
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100362
363Availability zones
364
365.. code-block:: yaml
366
367 nova:
368 client:
369 enabled: true
370 server:
371 identity:
372 availability_zones:
373 - availability_zone_01
374 - availability_zone_02
375
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200376
377
378Aggregates
379
380.. code-block:: yaml
381
382 nova:
383 client:
384 enabled: true
385 server:
386 identity:
387 aggregates:
388 - aggregate1
389 - aggregate2
390
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300391Upgrade levels
392
393.. code-block:: yaml
394
395 nova:
396 controller:
397 upgrade_levels:
398 compute: juno
399
400 nova:
401 compute:
402 upgrade_levels:
403 compute: juno
404
Petr Jedinýd855ef22017-03-06 22:24:33 +0100405SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100406------
407
408Add PciPassthroughFilter into scheduler filters and NICs on specific compute nodes.
409
410.. code-block:: yaml
411
412 nova:
413 controller:
414 sriov: true
415 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
416
417 nova:
418 compute:
419 sriov:
420 nic_one:
421 devname: eth1
422 physical_network: physnet1
423
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100424CPU pinning & Hugepages
425-----------------------
426
427CPU pinning of virtual machine instances to dedicated physical CPU cores.
428Hugepages mount point for libvirt.
429
430.. code-block:: yaml
431
432 nova:
433 controller:
434 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
435
436 nova:
437 compute:
438 vcpu_pin_set: 2,3,4,5
439 hugepages:
440 mount_points:
441 - path: /mnt/hugepages_1GB
442 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100443
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200444Custom Scheduler filters
445------------------------
446
447If you have a custom filter, that needs to be included in the scheduler, then you can include it like so:
448
449.. code-block:: yaml
450
451 nova:
452 controller:
453 scheduler_custom_filters:
454 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
455
456 # Then add your custom filter on the end (make sure to include all other ones that you need as well)
457 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
458
Michel Nederlofeb566f62017-04-21 15:37:47 +0200459Hardware Trip/Unmap Support
460---------------------------
461
462To enable TRIM support for ephemeral images (thru nova managed images), libvirt has this option.
463
464.. code-block:: yaml
465
466 nova:
467 compute:
468 libvirt:
469 hw_disk_discard: unmap
470
471In order to actually utilize this feature, the following metadata must be set on the image as well, so the SCSI unmap is supported.
472
473.. code-block:: bash
474
475 glance image-update --property hw_scsi_model=virtio-scsi <image>
476 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100477
Thom Gerdesec00afd2017-04-07 18:06:59 +0000478libvirt CPU mode
479----------------
480
481Allow setting the model of CPU that is exposed to a VM. This allows better
482support live migration between hypervisors with different hardware, among other
483things. Defaults to host-passthrough.
484
485.. code-block:: yaml
486
487 nova:
488 compute:
489 cpu_mode: host-model
490
Michel Nederloff7eefb22017-07-10 11:14:33 +0200491Nova compute workarounds
492------------------------
493
494Live snapshotting is disabled by default in nova. To enable this, it needs a manual switch.
495
496From manual:
497
498.. code-block:: yaml
499
500 # When using libvirt 1.2.2 live snapshots fail intermittently under load
501 # (likely related to concurrent libvirt/qemu operations). This config
502 # option provides a mechanism to disable live snapshot, in favor of cold
503 # snapshot, while this is resolved. Cold snapshot causes an instance
504 # outage while the guest is going through the snapshotting process.
505 #
506 # For more information, refer to the bug report:
507 #
508 # https://bugs.launchpad.net/nova/+bug/1334398
509
510Configurable pillar data:
511
512.. code-block:: yaml
513
514 nova:
515 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200516 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200517 disable_libvirt_livesnapshot: False
518
Michel Nederlofb51a5142017-06-27 08:31:35 +0200519Config drive options
520--------------------
521
522See example below on how to configure the options for the config drive.
523
524.. code-block:: yaml
525
526 nova:
527 compute:
528 config_drive:
529 forced: True # Default: True
530 cdrom: True # Default: False
531 format: iso9660 # Default: vfat
532 inject_password: False # Default: False
533
Thom Gerdesec00afd2017-04-07 18:06:59 +0000534
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100535Documentation and Bugs
536======================
537
538To learn how to install and update salt-formulas, consult the documentation
539available online at:
540
541 http://salt-formulas.readthedocs.io/
542
543In the unfortunate event that bugs are discovered, they should be reported to
544the appropriate issue tracker. Use Github issue tracker for specific salt
545formula:
546
547 https://github.com/salt-formulas/salt-formula-nova/issues
548
549For feature requests, bug reports or blueprints affecting entire ecosystem,
550use Launchpad salt-formulas project:
551
552 https://launchpad.net/salt-formulas
553
554You can also join salt-formulas-users team and subscribe to mailing list:
555
556 https://launchpad.net/~salt-formulas-users
557
558Developers wishing to work on the salt-formulas projects should always base
559their work on master branch and submit pull request against specific formula.
560
561 https://github.com/salt-formulas/salt-formula-nova
562
563Any questions or feedback is always welcome so feel free to join our IRC
564channel:
565
566 #salt-formulas @ irc.freenode.net