blob: bf4fe0138205dbfd6098096bd0f4df8a480c0b03 [file] [log] [blame]
Aleš Komáreka3314b22017-04-11 13:46:06 +02001====================
2OpenContrail Formula
3====================
Filip Pytloun27930402015-10-06 16:28:32 +02004
Jakub Pavlik01fe5372016-05-20 11:23:28 +02005Contrail Controller is an open, standards-based software solution that
6delivers network virtualization and service automation for federated cloud
7networks. It provides self-service provisioning, improves network
8troubleshooting and diagnostics, and enables service chaining for dynamic
9application environments across enterprise virtual private cloud (VPC),
10managed Infrastructure as a Service (IaaS), and Networks Functions
11Virtualization (NFV) use cases.
Filip Pytloun27930402015-10-06 16:28:32 +020012
Jiri Konecny463dee52016-03-03 11:08:46 +010013
Petr Michalec579e64d2017-03-24 12:54:29 +010014Package source
15==============
Aleš Komáreka3314b22017-04-11 13:46:06 +020016
Petr Michalec579e64d2017-03-24 12:54:29 +010017Formula support OpenContrail as well as Juniper Contrail package repository in the backend.
18
19Differences withing the configuration and state run are controlled by
20``opencontrail.common.vendor: [opencontrail|juniper]`` pillar attribute.
21
22Default value is set to ``opencontrail``.
23
24Juniper releases tested with this formula:
25 - 3.0.2.x
26
27To use Juniper Contrail repository as a source of packages override pillar as in this example:
28
29.. code-block:: yaml
30
31 opencontrail:
32 common:
33 vendor: juniper
34
35
Aleš Komáreka3314b22017-04-11 13:46:06 +020036Sample Pillars
Filip Pytloun27930402015-10-06 16:28:32 +020037==============
38
Jiri Konecny463dee52016-03-03 11:08:46 +010039Controller nodes
40----------------
41
42There are several scenarios for OpenContrail control plane.
43
44All-in-one single
45~~~~~~~~~~~~~~~~~
46
47Config, control, analytics, database, web -- altogether on one node.
48
49.. code-block:: yaml
50
51 opencontrail:
52 common:
53 version: 2.2
54 source:
55 engine: pkg
56 address: http://mirror.robotice.cz/contrail-havana/
57 identity:
58 engine: keystone
ibumarskovea5c65c2019-04-16 00:15:00 +040059 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +010060 host: 127.0.0.1
61 port: 35357
62 token: token
63 password: password
64 network:
65 engine: neutron
66 host: 127.0.0.1
67 port: 9696
68 config:
69 version: 2.2
70 enabled: true
71 network:
72 engine: neutron
73 host: 127.0.0.1
74 port: 9696
75 discovery:
76 host: 127.0.0.1
77 analytics:
78 host: 127.0.0.1
79 bind:
80 address: 127.0.0.1
81 message_queue:
82 engine: rabbitmq
83 host: 127.0.0.1
84 port: 5672
85 database:
86 members:
87 - host: 127.0.0.1
88 port: 9160
89 cache:
Jakub Pavlikd1a059e2016-07-13 23:08:33 +020090 members:
91 - host: 127.0.0.1
92 port: 11211
Jiri Konecny463dee52016-03-03 11:08:46 +010093 identity:
94 engine: keystone
95 version: '2.0'
96 region: RegionOne
ibumarskovea5c65c2019-04-16 00:15:00 +040097 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +010098 host: 127.0.0.1
99 port: 35357
100 user: admin
101 password: password
102 token: token
103 tenant: admin
104 members:
105 - host: 127.0.0.1
106 id: 1
Dmitry Stremkovskiy841fee32017-09-01 18:08:41 +0300107 rootlogger: "INFO, CONSOLE"
Jiri Konecny463dee52016-03-03 11:08:46 +0100108 control:
109 version: 2.2
110 enabled: true
111 bind:
112 address: 127.0.0.1
113 discovery:
114 host: 127.0.0.1
115 master:
116 host: 127.0.0.1
117 members:
118 - host: 127.0.0.1
119 id: 1
120 collector:
121 version: 2.2
122 enabled: true
123 bind:
124 address: 127.0.0.1
125 master:
126 host: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400127 contrail_cache:
128 engine: redis
129 host: 127.0.0.1
130 port: 6379
131 password: guest
Jiri Konecny463dee52016-03-03 11:08:46 +0100132 discovery:
133 host: 127.0.0.1
134 data_ttl: 2
135 database:
136 members:
137 - host: 127.0.0.1
138 port: 9160
Sergey Kreysfd017c12018-05-04 18:35:37 +0300139 message_queue:
140 members:
141 - host: 127.0.0.1
142 - host: 127.0.0.1
143 - host: 127.0.0.1
Jiri Konecny463dee52016-03-03 11:08:46 +0100144 database:
145 version: 2.2
146 cassandra:
147 version: 2
148 enabled: true
149 minimum_disk: 10
150 name: 'Contrail'
151 original_token: 0
Dmitry Stremkovskiy2a079c72017-07-12 23:11:18 +0300152 compaction_throughput_mb_per_sec: 16
Dmitry Stremkovskiy71b310a2017-08-11 20:39:11 +0300153 concurrent_compactors: 1
Jiri Konecny463dee52016-03-03 11:08:46 +0100154 data_dirs:
155 - /var/lib/cassandra
156 id: 1
157 discovery:
158 host: 127.0.0.1
159 bind:
160 host: 127.0.0.1
161 port: 9042
162 rpc_port: 9160
163 members:
164 - host: 127.0.0.1
165 id: 1
166 web:
167 version: 2.2
168 enabled: True
169 bind:
170 address: 127.0.0.1
171 analytics:
172 host: 127.0.0.1
173 master:
174 host: 127.0.0.1
175 cache:
176 engine: redis
177 host: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400178 password: guest
Jiri Konecny463dee52016-03-03 11:08:46 +0100179 port: 6379
180 members:
181 - host: 127.0.0.1
182 id: 1
183 identity:
184 engine: keystone
185 version: '2.0'
ibumarskovea5c65c2019-04-16 00:15:00 +0400186 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +0100187 host: 127.0.0.1
188 port: 35357
189 user: admin
190 password: password
191 token: token
192 tenant: admin
193
194
195All-in-one cluster
196~~~~~~~~~~~~~~~~~~
197
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200198Config, control, analytics, database, web -- altogether, clustered on multiple
199nodes.
Jiri Konecny463dee52016-03-03 11:08:46 +0100200
201.. code-block:: yaml
202
203 opencontrail:
204 common:
205 version: 2.2
206 source:
207 engine: pkg
208 address: http://mirror.robotice.cz/contrail-havana/
209 identity:
210 engine: keystone
ibumarskovea5c65c2019-04-16 00:15:00 +0400211 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +0100212 host: 127.0.0.1
213 port: 35357
214 token: token
215 password: password
216 network:
217 engine: neutron
218 host: 127.0.0.1
219 port: 9696
220 config:
221 version: 2.2
222 enabled: true
223 network:
224 engine: neutron
225 host: 127.0.0.1
226 port: 9696
227 discovery:
228 host: 127.0.0.1
229 analytics:
230 host: 127.0.0.1
231 bind:
232 address: 127.0.0.1
233 message_queue:
234 engine: rabbitmq
235 host: 127.0.0.1
236 port: 5672
237 database:
238 members:
239 - host: 127.0.0.1
240 port: 9160
241 - host: 127.0.0.1
242 port: 9160
243 - host: 127.0.0.1
244 port: 9160
245 cache:
Jakub Pavlikd1a059e2016-07-13 23:08:33 +0200246 members:
247 - host: 127.0.0.1
248 port: 11211
249 - host: 127.0.0.1
250 port: 11211
251 - host: 127.0.0.1
252 port: 11211
Jiri Konecny463dee52016-03-03 11:08:46 +0100253 identity:
254 engine: keystone
255 version: '2.0'
256 region: RegionOne
ibumarskovea5c65c2019-04-16 00:15:00 +0400257 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +0100258 host: 127.0.0.1
259 port: 35357
260 user: admin
261 password: password
262 token: token
263 tenant: admin
264 members:
265 - host: 127.0.0.1
266 id: 1
267 - host: 127.0.0.1
268 id: 2
269 - host: 127.0.0.1
270 id: 3
271 control:
272 version: 2.2
273 enabled: true
274 bind:
275 address: 127.0.0.1
276 discovery:
277 host: 127.0.0.1
278 master:
279 host: 127.0.0.1
280 members:
281 - host: 127.0.0.1
282 id: 1
283 - host: 127.0.0.1
284 id: 2
285 - host: 127.0.0.1
286 id: 3
287 collector:
288 version: 2.2
289 enabled: true
290 bind:
291 address: 127.0.0.1
292 master:
293 host: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400294 contrail_cache:
295 engine: redis
296 host: 127.0.0.1
297 port: 6379
298 password: guest
Jiri Konecny463dee52016-03-03 11:08:46 +0100299 discovery:
300 host: 127.0.0.1
301 data_ttl: 1
302 database:
303 members:
304 - host: 127.0.0.1
305 port: 9160
306 - host: 127.0.0.1
307 port: 9160
308 - host: 127.0.0.1
309 port: 9160
Sergey Kreysfd017c12018-05-04 18:35:37 +0300310 message_queue:
311 members:
312 - host: 127.0.0.1
313 - host: 127.0.0.1
314 - host: 127.0.0.1
Jiri Konecny463dee52016-03-03 11:08:46 +0100315 database:
316 version: 2.2
317 cassandra:
318 version: 2
319 enabled: true
320 name: 'Contrail'
321 minimum_disk: 10
322 original_token: 0
323 data_dirs:
324 - /var/lib/cassandra
325 id: 1
326 discovery:
327 host: 127.0.0.1
328 bind:
329 host: 127.0.0.1
330 port: 9042
331 rpc_port: 9160
332 members:
333 - host: 127.0.0.1
334 id: 1
335 - host: 127.0.0.1
336 id: 2
337 - host: 127.0.0.1
338 id: 3
339 web:
340 version: 2.2
341 enabled: True
342 bind:
343 address: 127.0.0.1
344 master:
345 host: 127.0.0.1
346 analytics:
347 host: 127.0.0.1
348 cache:
349 engine: redis
350 host: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400351 password: guest
Jiri Konecny463dee52016-03-03 11:08:46 +0100352 port: 6379
353 members:
354 - host: 127.0.0.1
355 id: 1
356 - host: 127.0.0.1
357 id: 2
358 - host: 127.0.0.1
359 id: 3
360 identity:
361 engine: keystone
362 version: '2.0'
ibumarskovea5c65c2019-04-16 00:15:00 +0400363 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +0100364 host: 127.0.0.1
365 port: 35357
366 user: admin
367 password: password
368 token: token
369 tenant: admin
370
371
372Separated analytics from control and config
373~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
374
375Config, control, database, web.
376
377.. code-block:: yaml
378
379 opencontrail:
380 common:
381 version: 2.2
382 identity:
383 engine: keystone
ibumarskovea5c65c2019-04-16 00:15:00 +0400384 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +0100385 host: 127.0.0.1
386 port: 35357
387 token: token
388 password: password
389 network:
390 engine: neutron
391 host: 127.0.0.1
392 port: 9696
393 config:
394 version: 2.2
395 enabled: true
396 network:
397 engine: neutron
398 host: 127.0.0.1
399 port: 9696
400 discovery:
401 host: 127.0.0.1
402 analytics:
403 host: 127.0.0.1
404 bind:
405 address: 127.0.0.1
406 message_queue:
407 engine: rabbitmq
408 host: 127.0.0.1
409 port: 5672
410 database:
411 members:
412 - host: 127.0.0.1
413 port: 9160
414 - host: 127.0.0.1
415 port: 9160
416 - host: 127.0.0.1
417 port: 9160
418 cache:
Jakub Pavlikd1a059e2016-07-13 23:08:33 +0200419 members:
420 - host: 127.0.0.1
421 port: 11211
422 - host: 127.0.0.1
423 port: 11211
424 - host: 127.0.0.1
425 port: 11211
Jiri Konecny463dee52016-03-03 11:08:46 +0100426 identity:
427 engine: keystone
428 version: '2.0'
429 region: RegionOne
ibumarskovea5c65c2019-04-16 00:15:00 +0400430 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +0100431 host: 127.0.0.1
432 port: 35357
433 user: admin
434 password: password
435 token: token
436 tenant: admin
437 members:
438 - host: 127.0.0.1
439 id: 1
440 - host: 127.0.0.1
441 id: 2
442 - host: 127.0.0.1
443 id: 3
444 control:
445 version: 2.2
446 enabled: true
447 bind:
448 address: 127.0.0.1
449 discovery:
450 host: 127.0.0.1
451 master:
452 host: 127.0.0.1
453 members:
454 - host: 127.0.0.1
455 id: 1
456 - host: 127.0.0.1
457 id: 2
458 - host: 127.0.0.1
459 id: 3
460 database:
461 version: 127.0.0.1
462 cassandra:
463 version: 2
464 enabled: true
465 name: 'Contrail'
466 minimum_disk: 10
467 original_token: 0
468 data_dirs:
469 - /var/lib/cassandra
470 id: 1
471 discovery:
472 host: 127.0.0.1
473 bind:
474 host: 127.0.0.1
475 port: 9042
476 rpc_port: 9160
477 members:
478 - host: 127.0.0.1
479 id: 1
480 - host: 127.0.0.1
481 id: 2
482 - host: 127.0.0.1
483 id: 3
484 web:
485 version: 2.2
486 enabled: True
487 bind:
488 address: 127.0.0.1
489 analytics:
490 host: 127.0.0.1
491 master:
492 host: 127.0.0.1
493 cache:
494 engine: redis
495 host: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400496 password: guest
Jiri Konecny463dee52016-03-03 11:08:46 +0100497 port: 6379
498 members:
499 - host: 127.0.0.1
500 id: 1
501 - host: 127.0.0.1
502 id: 2
503 - host: 127.0.0.1
504 id: 3
505 identity:
506 engine: keystone
507 version: '2.0'
ibumarskovea5c65c2019-04-16 00:15:00 +0400508 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +0100509 host: 127.0.0.1
510 port: 35357
511 user: admin
512 password: password
513 token: token
514 tenant: admin
515
Jiri Konecny463dee52016-03-03 11:08:46 +0100516Analytic nodes
Jiri Konecny463dee52016-03-03 11:08:46 +0100517
518Analytics and database on an analytic node(s)
519
520.. code-block:: yaml
521
522 opencontrail:
523 common:
524 version: 2.2
525 identity:
526 engine: keystone
ibumarskovea5c65c2019-04-16 00:15:00 +0400527 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +0100528 host: 127.0.0.1
529 port: 35357
530 token: token
531 password: password
532 network:
533 engine: neutron
534 host: 127.0.0.1
535 port: 9696
536 collector:
537 version: 2.2
538 enabled: true
539 bind:
540 address: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400541 contrail_cache:
542 engine: redis
543 host: 127.0.0.1
544 password: guest
545 port: 6379
Jiri Konecny463dee52016-03-03 11:08:46 +0100546 master:
547 host: 127.0.0.1
548 discovery:
549 host: 127.0.0.1
550 data_ttl: 1
551 database:
552 members:
553 - host: 127.0.0.1
554 port: 9160
555 - host: 127.0.0.1
556 port: 9160
557 - host: 127.0.0.1
558 port: 9160
Sergey Kreysfd017c12018-05-04 18:35:37 +0300559 message_queue:
560 members:
561 - host: 127.0.0.1
562 - host: 127.0.0.1
563 - host: 127.0.0.1
Jiri Konecny463dee52016-03-03 11:08:46 +0100564 database:
565 version: 2.2
566 cassandra:
567 version: 2
568 enabled: true
569 name: 'Contrail'
570 minimum_disk: 10
571 original_token: 0
572 data_dirs:
573 - /var/lib/cassandra
574 id: 1
575 discovery:
576 host: 127.0.0.1
577 bind:
578 host: 127.0.0.1
579 port: 9042
580 rpc_port: 9160
581 members:
582 - host: 127.0.0.1
583 id: 1
584 - host: 127.0.0.1
585 id: 2
586 - host: 127.0.0.1
587 id: 3
588
589
590Compute nodes
Aleš Komáreka3314b22017-04-11 13:46:06 +0200591-------------
Jiri Konecny463dee52016-03-03 11:08:46 +0100592
593Vrouter configuration on a compute node(s)
594
595.. code-block:: yaml
596
597 opencontrail:
598 common:
599 version: 2.2
600 identity:
601 engine: keystone
ibumarskovea5c65c2019-04-16 00:15:00 +0400602 protocol: http
Jiri Konecny463dee52016-03-03 11:08:46 +0100603 host: 127.0.0.1
604 port: 35357
605 token: token
606 password: password
607 network:
608 engine: neutron
609 host: 127.0.0.1
610 port: 9696
611 compute:
612 version: 2.2
613 enabled: True
Dmitry Stremkovskiy0cb5c562017-07-26 00:32:51 +0300614 hostname: node-12.domain.tld
Danysa144f292018-06-26 16:08:50 +0200615 flow_hold_limit: 0
Jiri Konecny463dee52016-03-03 11:08:46 +0100616 discovery:
617 host: 127.0.0.1
618 interface:
619 address: 127.0.0.1
620 dev: eth0
621 gateway: 127.0.0.1
622 mask: /24
623 dns: 127.0.0.1
624 mtu: 9000
625
Petr Jediný5f3008a2017-07-31 15:04:05 +0200626
627Compute nodes with gateway_mode
628-------------------------------
629
630Gateway mode: can be server/ vcpe (default is none)
631
632.. code-block:: yaml
633
634 opencontrail:
635 compute:
636 gateway_mode: server
637
Vasyl Saienkob10b7202017-09-05 14:19:03 +0300638TSN nodes
639---------
640
641Configure TSN nodes
642
643.. code-block:: yaml
644
645 opencontrail:
646 compute:
Anton Samoylov2a301f92019-04-05 17:00:49 +0400647 enabled: True
Vasyl Saienkob10b7202017-09-05 14:19:03 +0300648 tor:
Anton Samoylov2a301f92019-04-05 17:00:49 +0400649 enabled: True
Vasyl Saienkob10b7202017-09-05 14:19:03 +0300650 agent:
651 tor01:
652 id: 0
Vasyl Saienkob10b7202017-09-05 14:19:03 +0300653 address: 127.0.0.1
Anton Samoylov2a301f92019-04-05 17:00:49 +0400654 tor_name: TOR1
655 tor_ip: 10.11.0.100
656 tor_ovs_port: 6640
657 tor_ovs_protocol: tcp
658 http_server_port: 9090
659 tsn_ip: 127.0.0.1
660 tor_tunnel_ip: 10.10.0.100
661 tor_vendor_name: ovs
662 xmpp_auth_enable: False
663 xmpp_dns_auth_enable: False
Petr Jediný5f3008a2017-07-31 15:04:05 +0200664
Andreyeff77ac2017-08-25 12:14:06 -0500665Set up metadata secret for the Vrouter
Petr Jedinýfe51c6a2017-09-05 18:30:31 +0200666--------------------------------------
Andreyeff77ac2017-08-25 12:14:06 -0500667
Petr Jedinýfe51c6a2017-09-05 18:30:31 +0200668In order to get cloud-init within the instance to properly fetch
Andreyeff77ac2017-08-25 12:14:06 -0500669instance metadata, metadata_proxy_secret in the Vrouter agent config
670should match the value in nova.conf. The administrator should define
671it in the pillar:
672
673.. code-block:: yaml
674
675 opencontrail:
676 compute:
677 metadata:
678 secret: opencontrail
679
Petr Jedinýfe51c6a2017-09-05 18:30:31 +0200680Add auth info for Barbican on compute nodes
681-------------------------------------------
682
683.. code-block:: yaml
684
685 opencontrail:
686 compute:
687 lbaas:
688 enabled: true
689 secret_manager:
690 engine: barbican
691 identity:
692 user: admin
693 password: "supersecretpassword123"
694 tenant: admin
695
696
Jakub Pavlik735005f2016-02-26 15:54:53 +0100697Keystone v3
Aleš Komáreka3314b22017-04-11 13:46:06 +0200698-----------
Jakub Pavlik735005f2016-02-26 15:54:53 +0100699
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200700To enable support for keystone v3 in opencontrail, there must be defined
701version for config and web role.
Jakub Pavlik735005f2016-02-26 15:54:53 +0100702
703.. code-block:: yaml
704
705 opencontrail:
706 config:
707 version: 2.2
708 enabled: true
709 ...
710 identity:
711 engine: keystone
712 version: '3'
713 ...
714
715 opencontrail:
716 web:
717 version: 2.2
718 enabled: true
719 ...
720 identity:
721 engine: keystone
722 version: '3'
723 ...
724
marco10cc2212016-04-03 14:21:54 +0200725Without Keystone
726----------------
727
728.. code-block:: yaml
729
730 opencontrail:
731 ...
732 common:
733 ...
734 identity:
735 engine: none
736 token: none
737 password: none
738 ...
739 config:
740 ...
741 identity:
742 engine: none
743 password: none
744 token: none
745 ...
746 web:
747 ...
748 identity:
749 engine: none
750 password: none
751 token: none
752 ...
marcof5461712016-04-04 20:49:36 +0200753
Pavel Cizinsky14eb00e2018-11-09 15:15:07 +0100754XMPP Encryption
755---------------
756
757Configure encryption of XMPP
758
759Computes nodes
760~~~~~~~~~~~~~~
761
762.. code-block:: yaml
763
764 opencontrail:
765 compute:
766 xmpp:
767 tls:
768 enabled: False
769 auth:
770 enabled: False
771 (optional) cert_file: /etc/contrail/server.pem
772 (optional) key_file: /etc/contrail/privkey.pem
773 (optional) ca_cert_file: /etc/contrail/ca-cert.pem
774
775Control nodes
776~~~~~~~~~~~~~
777
778.. code-block:: yaml
779
780 opencontrail:
781 control:
782 xmpp:
783 tls:
784 enabled: False
785 auth:
786 enabled: False
787 (optional) cert_file: /etc/contrail/server.pem
788 (optional) key_file: /etc/contrail/privkey.pem
789 (optional) ca_cert_file: /etc/contrail/ca-cert.pem
790
Aleš Komáreka3314b22017-04-11 13:46:06 +0200791Kubernetes support
792------------------
793
marcof5461712016-04-04 20:49:36 +0200794Kubernetes vrouter nodes
marcof5461712016-04-04 20:49:36 +0200795
796Vrouter configuration on a kubernetes node(s)
797
798.. code-block:: yaml
799
800 opencontrail:
801 ...
802 compute:
803 engine: kubernetes
804 ...
805
Jakub Pavlik0d1f67e2016-11-30 10:04:13 +0100806vRouter with separated control plane
Jakub Pavlik0d1f67e2016-11-30 10:04:13 +0100807
808Separate XMPP traffic from dataplane interface.
809
810.. code-block:: yaml
811
812 opencontrail:
813 compute:
814 bind:
815 address: 172.16.0.50
816 ...
817
Petr Jediný439fab32017-07-10 14:33:09 +0200818Override RPF default in Contrail API
819------------------------------------
820
821From MCP1.1 with OpenContrail >= 3.1.1 you can override RPF default for newly
822created virtual networks. This can be useful for usecases like running
823Calico and K8S in overlay. The `override_rpf_default_by` has valid values
824`disable`, `enable`. If not defined, the configuration fallbacks to Contrail
825default - currently `enable`.
826
827.. code-block:: yaml
828
829 opencontrail:
830 ...
831 config:
832 override_rpf_default_by: 'disable'
833 ...
834
Petr Jediný01c18822017-11-15 12:30:53 +0100835Cassandra GC logging
836--------------------
837
838From Contrail version 3 you can set a way you want to handle Cassandra GC logs.
839The behavior is controlled by `cassandra_gc_logging`. Valid values are
840'rotation' (default), 'legacy' and false.
841
842- 'rotation' is supported by JDK 6u34 7u2 or later and handles rotation of log
843files automatically.
844- 'legacy' is a way to support older JDKs and you will need to handle logs by
845other means. This can be handled for example by using
846`- service.opencontrail.database.cassandra_log_cleanup` in your reclass model.
847- false will disable the cassandra gc logging
848
849.. code-block:: yaml
850
851 opencontrail:
852 ...
853 database:
854 cassandra_gc_logging: false
855 ...
856
Petr Jediný439fab32017-07-10 14:33:09 +0200857
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200858Disable Contrail API authentication
859-----------------------------------
860
Petr Jediný78e6f422017-06-01 13:24:49 +0200861Contrail version must >= 3.0. It is useful especially for Keystone v3.
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200862
863.. code-block:: yaml
864
865 opencontrail:
866 ...
867 config:
868 multi_tenancy: false
869 ...
870
Marek Celoudae98c642018-01-31 12:43:42 +0100871Enable RBAC
872-----------
873
874
875.. code-block:: yaml
876
877 opencontrail:
878 ...
879 config:
880 aaa_mode: rbac
881 cloud_admin_role: admin
882 global_read_only_role: member
883 ...
884
Petr Jediný78e6f422017-06-01 13:24:49 +0200885Switch from on demand to periodic keystone sync
886-----------------------------------------------
887
888This can be useful when you want to sync projects from OpenStack to Contrail
889automatically. The period of sync is 60s.
890
891.. code-block:: yaml
892
893 opencontrail:
894 ...
895 config:
896 identity:
897 sync_on_demand: false
898 ...
899
Petr Jediný03027902018-07-17 20:32:52 +0200900Cassandra listen configuration
901------------------------------
902
903Interface example:
marco2502e052016-05-31 22:53:54 +0200904
905.. code-block:: yaml
Vasyl Saienkob10b7202017-09-05 14:19:03 +0300906
marco2502e052016-05-31 22:53:54 +0200907 database:
908 ....
909 bind:
910 interface: eth0
911 port: 9042
912 rpc_port: 9160
913 ....
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200914
Petr Jediný03027902018-07-17 20:32:52 +0200915For running config and analytics db clusters on same hosts, you will need to
916change ports not to collide. The host is required.
917
918 database:
919 ....
920 bind:
921 host: 127.0.0.1
922 port: 9042
923 rpc_port: 9160
924 # for containers we need to move configdb to neighbouring ports
925 port_configdb: 9041
926 rpc_port_configdb: 9161
927 ....
928
929
Petr Jedinýffbe2082017-03-07 00:56:47 +0100930OpenContrail WebUI version >= 3.1.1
931-----------------------------------
Petr Jediný78e6f422017-06-01 13:24:49 +0200932For OpenContrail version >= 3.1.1 and Cassandra >= 2.1 we should override WebUI's cassandra port from 9160 to 9042.
Petr Jedinýffbe2082017-03-07 00:56:47 +0100933
934For appropriate node at class level:
935
936.. code-block:: yaml
Aleš Komáreka3314b22017-04-11 13:46:06 +0200937
Petr Jedinýffbe2082017-03-07 00:56:47 +0100938 opencontrail:
939 ....
940 web:
941 database:
942 port: 9042
943 ....
944
945
Jakub Pavlik9a4de012016-12-14 13:23:55 +0100946RabbitMQ HA hosts
947------------------
948
949.. code-block:: yaml
950
951 opencontrail:
952 config:
953 message_queue:
954 engine: rabbitmq
955 members:
956 - host: 10.0.16.1
957 - host: 10.0.16.2
958 - host: 10.0.16.3
959 port: 5672
960
961.. code-block:: yaml
962
963 database:
964 ....
965 bind:
966 interface: eth0
967 port: 9042
968 rpc_port: 9160
969 ....
970
Jakub Pavlike3590062017-02-20 23:32:57 +0100971DPDK vRouter
972-------------
973
974.. code-block:: yaml
975
976 opencontrail:
977 compute:
978 dpdk:
979 enabled: true
Jakub Pavlik54761d82017-03-08 11:22:37 +0100980 taskset: "0x0000003C00003C"
981 socket_mem: "1024,1024"
Jakub Pavlike3590062017-02-20 23:32:57 +0100982 interface:
983 mac_address: 90:e2:ba:7c:22:e1
984 pci: 0000:81:00.1
985 ...
986
Petr Jedinýe9960762018-05-04 17:36:59 +0200987Increase number of contrail-api workers
988---------------------------------------
989
990.. code-block:: yaml
991
992 opencontrail:
993 ...
994 config:
Svimbaca9fa5b2018-09-19 14:31:34 +0200995 api:
996 workers_count: 3
Petr Jedinýe9960762018-05-04 17:36:59 +0200997 ...
998
Marek Celouddbba7ed2017-12-07 10:36:24 +0100999Increase number of alarm-gen workers
1000------------------------------------
1001
1002Port prefix will increment used ports by workers starting with 5901.
1003
1004.. code-block:: yaml
1005
1006 collector:
1007 alarm_gen:
1008 workers: 1
1009 port_prefix: 59
1010
Ales Komarekad46d2e2017-03-09 17:16:38 +01001011Contrail client
1012---------------
1013
1014Basic parameters with identity and host configs
1015
Petr Jediný78e6f422017-06-01 13:24:49 +02001016.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001017
1018 opencontrail:
1019 client:
1020 identity:
1021 user: admin
1022 project: admin
1023 password: adminpass
1024 host: keystone_host
1025 config:
1026 host: contrail_api_host
1027 port: contrail_api_ort
1028
1029Enforcing virtual routers
1030
Petr Jediný78e6f422017-06-01 13:24:49 +02001031.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001032
1033 opencontrail:
1034 client:
1035 ...
1036 virtual_router:
1037 cmp01:
1038 ip_address: 172.16.0.11
1039 dpdk_enabled: True
1040 cmp02:
1041 ip_address: 172.16.0.12
1042 dpdk_enabled: True
1043
psvimbersky3c84e272018-01-02 10:34:29 +01001044
1045Enforcing global system config
1046
1047.. code-block:: yaml
1048
1049 opencontrail:
1050 client:
1051 ...
1052 global_system_config:
1053 name: default-global-system-config
1054 asn: 64512
1055 grp:
1056 enable: true
1057 restart_time: 60
1058 end_of_rib_timeout: 30
1059 bgp_helper_enable: false
1060 xmpp_helper_enable: false
1061 long_lived_restart_time: 300
1062
1063
Pavel Svimbersky13cda442017-09-14 14:46:13 +02001064Enforcing global vrouter config
1065
1066.. code-block:: yaml
1067
1068 opencontrail:
1069 client:
1070 ...
1071 global_vrouter_config:
Petr Jediný554d0412018-01-04 22:35:48 +01001072 name: default-global-vrouter-config
Pavel Svimbersky13cda442017-09-14 14:46:13 +02001073 parent_type: global-system-config
1074 encap_priority: "MPLSoUDP,MPLSoGRE"
1075 vxlan_vn_id_mode: automatic
1076 fq_names:
1077 - 'default-global-system-config'
1078 - 'default-global-vrouter-config'
1079
psvimbersky3c84e272018-01-02 10:34:29 +01001080
1081
Ales Komarekad46d2e2017-03-09 17:16:38 +01001082Enforcing control nodes
1083
Petr Jediný78e6f422017-06-01 13:24:49 +02001084.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001085
1086 opencontrail:
1087 client:
1088 ...
1089 bgp_router:
1090 ntw01:
1091 type: control-node
1092 ip_address: 172.16.0.11
1093 nwt02:
1094 type: control-node
1095 ip_address: 172.16.0.12
1096 nwt03:
1097 type: control-node
1098 ip_address: 172.16.0.13
1099
1100
1101Enforcing edge BGP routers
1102
Petr Jediný78e6f422017-06-01 13:24:49 +02001103.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001104
1105 opencontrail:
1106 client:
1107 ...
1108 bgp_router:
1109 mx01:
1110 type: router
1111 ip_address: 172.16.0.21
1112 asn: 64512
1113 mx02:
1114 type: router
1115 ip_address: 172.16.0.22
1116 asn: 64512
Marek Celoud3097e5b2018-01-09 13:52:14 +01001117 key_type: md5
1118 key: password
Ales Komarekad46d2e2017-03-09 17:16:38 +01001119
1120Enforcing config nodes
1121
Petr Jediný78e6f422017-06-01 13:24:49 +02001122.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001123
1124 opencontrail:
1125 client:
1126 ...
1127 config_node:
1128 ctl01:
1129 ip_address: 172.16.0.21
1130 ctl02:
1131 ip_address: 172.16.0.22
1132
1133Enforcing database nodes
1134
Petr Jediný78e6f422017-06-01 13:24:49 +02001135.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001136
1137 opencontrail:
1138 client:
1139 ...
1140 database_node:
1141 ntw01:
1142 ip_address: 172.16.0.21
1143 ntw02:
1144 ip_address: 172.16.0.22
1145
1146Enforcing analytics nodes
1147
Petr Jediný78e6f422017-06-01 13:24:49 +02001148.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001149
1150 opencontrail:
1151 client:
1152 ...
1153 analytics_node:
1154 nal01:
1155 ip_address: 172.16.0.31
1156 nal02:
1157 ip_address: 172.16.0.32
1158
Petr Jediný5f3efe32017-05-26 17:55:09 +02001159Enforcing Link Local Services
1160
1161.. code-block:: yaml
1162
1163 opencontrail:
1164 client:
1165 ...
1166 linklocal_service:
1167 # example with dns name address (only one permited)
1168 meta1:
1169 lls_ip: 10.0.0.23
1170 lls_port: 80
1171 ipf_addresses: "meta.example.com"
1172 ipf_port: 80
1173 # example with multiple ip addresses
1174 meta2:
1175 lls_ip: 10.0.0.23
1176 lls_port: 80
1177 ipf_addresses:
1178 - 10.10.10.10
1179 - 10.20.20.20
1180 - 10.30.30.30
1181 ipf_port: 80
1182 # example with one ip address
1183 meta3:
1184 lls_ip: 10.0.0.23
1185 lls_port: 80
1186 ipf_addresses:
1187 - 10.10.10.10
1188 ipf_port: 80
1189 # example with name override
1190 lls_meta4:
1191 name: meta4
1192 lls_ip: 10.0.0.23
1193 lls_port: 80
1194 ipf_addresses:
1195 - 10.10.10.10
1196 ipf_port: 80
1197
Vasyl Saienkob10b7202017-09-05 14:19:03 +03001198
Michel Nederloff5bccda2017-11-20 13:31:38 +01001199Configuring OpenStack default quotasx
1200
1201.. code-block:: yaml
1202 config:
1203 quota:
1204 network: 5
1205 subnet: 10
1206 router: 10
1207 floating_ip: 100
1208 secgroup: 1000
1209 secgroup_rule: 1000
1210 port: 1000
1211 pool: -1
1212 member: -1
1213 health_monitor: -1
1214 vip: -1
1215
1216Enforcing physical routers
Petr Jediný04bed9b2018-05-03 19:44:10 +02001217
Vasyl Saienkob10b7202017-09-05 14:19:03 +03001218.. code-block:: yaml
1219
1220 opencontrail:
1221 client:
1222 ...
1223 physical_router:
1224 router1:
1225 name: router1
1226 dataplane_ip: 1.2.3.4
1227 management_ip: 1.2.3.4
1228 vendor_name: ovs
1229 product_name: ovs
1230 agents:
1231 - tsn0-0
1232 - tsn0
1233
1234Enforcing physical/logical interfaces for routers
1235
1236
1237.. code-block:: yaml
1238
1239 opencontrail
1240 client:
1241 ...
1242 physical_router:
1243 router1:
1244 ...
1245 interface:
1246 port1:
1247 name: port1
1248 logical_interface:
1249 port1_l:
1250 name: 'port1.0'
1251 vlan_tag: 0
1252 interface_type: L2
1253 virtual_machine_interface:
1254 port1_port:
1255 name: port1_port
1256 ip_address: 192.168.90.107
1257 mac_address: '2e:92:a8:af:c2:21'
1258 security_group: 'default'
1259 virtual_network: 'virtual-network'
1260
Jan Cachebfed1c2018-01-09 17:21:35 +01001261Enforcing virtual networks
1262
1263
1264.. code-block:: yaml
1265
1266 opencontrail:
1267 client:
1268 virtual_networks:
1269 net01:
1270 name: 'network01'
1271 ip_address: '172.16.111.0'
1272 ip_prefix: 24
1273 asn: 64512
1274 route_target: 10000
1275 external: True
1276 allow_transit: False
1277 forwarding_mode: 'l2_l3'
1278 rpf: 'disable'
1279 mirror_destination: False
1280 domain: 'default-domain'
1281 project: 'admin'
1282 ipam_domain: 'default-domain'
1283 ipam_project: 'default-project'
1284 ipam_name: 'default-network-ipam'
1285 net02:
1286 name: 'network02'
1287 net03:
1288 name: 'network03'
1289
Ales Komarekad46d2e2017-03-09 17:16:38 +01001290
Jan Cachb3092722018-01-31 12:46:16 +01001291Enforcing floating ip pool setings.
1292
1293Virtual network with flag external needs to be created before managing the floating ip pool.
1294Param vn_name is the name of the external network.
1295
1296.. code-block:: yaml
1297
1298 opencontrail:
1299 client:
1300 floating_ip_pools:
1301 pool1:
1302 vn_name: external-network
1303 vn_project: admin
1304 vn_domain: default-domain
1305 owner_access: 7
1306 global_access: 0
1307 list_of_projects:
1308 - [tenant1, 7]
1309 - [tenant2, 7]
1310 - [tenant3, 7]
1311 pool2:
1312 vn_name: floating-ips
1313 vn_project: admin
1314 vn_domain: default-domain
1315 owner_access: 7
1316 global_access: 0
1317 list_of_projects:
1318 - [tenant3, 7]
1319
1320
Pavel Cizinsky14eb00e2018-11-09 15:15:07 +01001321If you want to remove all shares from the ip floating pool, define only empty list in
Jan Cachb3092722018-01-31 12:46:16 +01001322list of projects, like this:
1323
1324.. code-block:: yaml
1325
1326 opencontrail:
1327 client:
1328 floating_ip_pools:
1329 pool1:
1330 vn_name: external-network
1331 vn_project: admin
1332 vn_domain: default-domain
1333 owner_access: 7
1334 global_access: 0
1335 list_of_projects: []
1336
1337
Michel Nederlof5364ab62017-12-11 15:02:25 +01001338Contrail DNS custom forwarders
1339------------------------------
1340
1341By default Contrail uses the /etc/resolv.conf file to determine the upstream DNS servers.
1342This can have some side-affects, like resolving internal DNS entries on you public instances.
1343
1344In order to overrule this default set, you can configure nameservers using pillar data.
1345The formula is then responsible for configuring and generating a alternate resolv.conf file.
1346
1347Note: this has been patched recently in the Contrail distribution of Mirantis:
1348https://github.com/Mirantis/contrail-controller/commit/ed9a25ccbcfebd7d079a93aecc5a1a7bf1265ea4
1349https://github.com/Mirantis/contrail-controller/commit/94c844cf2e9bcfcd48587aec03d10b869e737ade
1350
1351
1352To change forwarders for the default-dns option (which is handled by compute nodes):
1353
1354.. code-block:: yaml
1355
1356 compute:
1357 ....
1358 dns:
1359 forwarders:
1360 - 8.8.8.8
1361 - 8.8.4.4
1362 ....
1363
1364To change forwarders for vDNS zones (handled by control nodes):
1365
1366.. code-block:: yaml
1367
1368 control:
1369 ....
1370 dns:
1371 forwarders:
1372 - 8.8.8.8
1373 - 8.8.4.4
1374 ....
1375
Petr Jediný04bed9b2018-05-03 19:44:10 +02001376Contrail IF-MAP server configuration
1377------------------------------------
1378
1379Contrail 3.2 contains internal IF-MAP server implementation. This implementation can be enabled
1380by setting ``config:ifmap:engine`` to internal. Currently supported engines are ``internal`` and
1381``irond`` (default). The ``internal`` will configure contrail-api to run as a IF-MAP server in the
1382same process as contrail-api and will generate security certificates in specified folder.
1383
1384.. code-block:: yaml
1385
1386 config:
1387 ....
1388 ifmap:
1389 engine: internal
1390 cert_dir: /etc/contrail/ssl/certs/ # default
1391 basename_cert: ifmap.crt # default
1392 basename_key: ifmap.key # default
1393 ....
1394
1395To set static configuration of the IF-MAP server for contrail-control instead of using
1396discovery service, you can use ``control:ifmap:bind:host`` and ``port``. The static configuration
1397is triggered by existence of non-empty value of ``control:ifmap:bind`` key.
1398
1399.. code-block:: yaml
1400 control:
1401 ....
1402 ifmap
1403 bind:
1404 host: 127.0.0.1
1405 port: 8443
1406 ....
1407
Jan Cach2f99ae82018-10-03 19:50:09 +02001408Configure TCP_TW_RECYCLE in kernel
1409------------------------------------
Petr Jediný04bed9b2018-05-03 19:44:10 +02001410
Jan Cach2f99ae82018-10-03 19:50:09 +02001411Enable fast recycling of TIME-WAIT sockets. To enable set parameter to 1, which is
1412default value in formula. To turn off this option set parameter to 0:
1413
1414.. code-block:: yaml
1415
1416 opencontrail:
1417 ....
1418 common
1419 ....
1420 tcp_tw_recycle: 0
1421 ....
Michel Nederloff5bccda2017-11-20 13:31:38 +01001422
Anton Samoylov28ad4fa2018-10-02 14:45:41 +04001423Define extra states for contrail services health check
1424------------------------------------------------------
1425
1426Service health check procedure verifies that all available contrail services are in ``active``
1427state.
1428Additional states could be defined for every service as expected states for validation procedure.
1429
1430.. code-block:: yaml
1431
1432 config:
1433 ....
1434 services_extra_states:
1435 contrail-schema:
1436 - backup
1437 contrail-device-manager
1438 - backup
1439 contrail-svc-monitor:
1440 - backup
1441 ....
1442
1443``contrail-schema``, ``contrail-device-manager`` and ``contrail-svc-monitor`` config services already
1444have additional ``backup`` state by default.
1445
Svimba4c4d45a2019-05-03 15:49:08 +02001446Setup Sandesh rate limit
1447------------------------
1448Sandesh send rate limit can be used to throttle system logs transmitted per second. System logs are
1449dropped if the sending rate is exceeded.
1450
1451It is possible to use only global limit for all services of contrail component.
1452
1453.. code-block:: yaml
1454
1455 opencontrail:
1456 control:
1457 ....
1458 sandesh_send_rate_limits:
1459 global: 10
1460 ....
1461
1462
1463Global limit and limit for specific service can be defined together where specific service limit
1464has higher priority.
1465
1466.. code-block:: yaml
1467
1468 opencontrail:
1469 config:
1470 ....
1471 sandesh_send_rate_limits:
1472 global: 10
1473 config_api: 3
1474 schema: 5
1475 ....
1476
1477Only specific service limit can be defined. In this case other services of Contrail component
1478keep default value (0) of `sandesh_send_rate_limit`
1479
1480.. code-block:: yaml
1481
1482 opencontrail:
1483 collector:
1484 ....
1485 sandesh_send_rate_limits:
1486 collector: 100
1487 analytics-api: 50
1488 ....
1489
1490Full list:
1491
1492.. code-block:: yaml
1493
1494 opencontrail:
1495 control:
1496 ....
1497 sandesh_send_rate_limits:
1498 global: 100
1499 control: 10
1500 dns: 10
1501 nodemgr: 10
1502 ....
1503
1504 config:
1505 ....
1506 sandesh_send_rate_limits:
1507 global: 100
1508 config_api: 10
1509 schema: 10
1510 svc_monitor: 10
1511 device_manager: 10
1512 nodemgr: 10
1513 ....
1514
1515 collector:
1516 ....
1517 sandesh_send_rate_limits:
1518 global: 100
1519 collector: 10
1520 analytics_api: 10
1521 query_engine: 10
1522 alarm_gen: 10
1523 snmp_collector: 10
1524 topology: 10
1525 nodemgr: 10
1526 ....
1527
1528 compute:
1529 ....
1530 sandesh_send_rate_limits:
1531 global: 100
1532 agent: 10
1533 nodemgr: 10
1534 ....
1535
Filip Pytloun27930402015-10-06 16:28:32 +02001536Usage
1537=====
1538
1539Basic installation
Ales Komarekad46d2e2017-03-09 17:16:38 +01001540------------------
Filip Pytloun27930402015-10-06 16:28:32 +02001541
1542Add control BGP
Ales Komarekad46d2e2017-03-09 17:16:38 +01001543
1544.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +02001545
1546 python /etc/contrail/provision_control.py --api_server_ip 192.168.1.11 --api_server_port 8082 --host_name network1.contrail.domain.com --host_ip 192.168.1.11 --router_asn 64512
1547
Ales Komarekad46d2e2017-03-09 17:16:38 +01001548Install compute node
Filip Pytloun27930402015-10-06 16:28:32 +02001549
Ales Komarekad46d2e2017-03-09 17:16:38 +01001550.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +02001551
1552 yum install contrail-vrouter contrail-openstack-vrouter
1553
1554 salt-call state.sls nova,opencontrail
1555
1556Add virtual router
Filip Pytloun27930402015-10-06 16:28:32 +02001557
Ales Komarekad46d2e2017-03-09 17:16:38 +01001558.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +02001559
1560 python /etc/contrail/provision_vrouter.py --host_name hostnode1.intra.domain.com --host_ip 10.0.100.101 --api_server_ip 10.0.100.30 --oper add --admin_user admin --admin_password cloudlab --admin_tenant_name admin
1561
1562 /etc/sysconfig/network-scripts/ifcfg-bond0 -- comment GATEWAY,NETMASK,IPADDR
1563
1564 reboot
1565
Aleš Komáreka3314b22017-04-11 13:46:06 +02001566Debugging
1567---------
Filip Pytloun27930402015-10-06 16:28:32 +02001568
1569Display vhost XMPP connection status
1570
1571You should see the correct controller_ip and state should be established.
1572
1573 http://<compute-node>:8085/Snh_AgentXmppConnectionStatusReq?
1574
1575Display vrouter interface status
1576
1577When vrf_name = ---ERROR--- then something goes wrong
1578
1579 http://<compute-node>:8085/Snh_ItfReq?name=
1580
1581Display IF MAP table
1582
Vasyl Saienkob10b7202017-09-05 14:19:03 +03001583Look for neighbours, if VM has 2, it's ok
Filip Pytloun27930402015-10-06 16:28:32 +02001584
1585 http://<control-node>:8083/Snh_IFMapTableShowReq?table_name=
1586
1587Trace XMPP requests
1588
1589 http://<compute-node>:8085/Snh_SandeshTraceRequest?x=XmppMessageTrace