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