blob: 2a6883ca26897baad9c955c9d7b180e9a35b5f7d [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
59 host: 127.0.0.1
60 port: 35357
61 token: token
62 password: password
63 network:
64 engine: neutron
65 host: 127.0.0.1
66 port: 9696
67 config:
68 version: 2.2
69 enabled: true
70 network:
71 engine: neutron
72 host: 127.0.0.1
73 port: 9696
74 discovery:
75 host: 127.0.0.1
76 analytics:
77 host: 127.0.0.1
78 bind:
79 address: 127.0.0.1
80 message_queue:
81 engine: rabbitmq
82 host: 127.0.0.1
83 port: 5672
84 database:
85 members:
86 - host: 127.0.0.1
87 port: 9160
88 cache:
Jakub Pavlikd1a059e2016-07-13 23:08:33 +020089 members:
90 - host: 127.0.0.1
91 port: 11211
Jiri Konecny463dee52016-03-03 11:08:46 +010092 identity:
93 engine: keystone
94 version: '2.0'
95 region: RegionOne
96 host: 127.0.0.1
97 port: 35357
98 user: admin
99 password: password
100 token: token
101 tenant: admin
102 members:
103 - host: 127.0.0.1
104 id: 1
Dmitry Stremkovskiy841fee32017-09-01 18:08:41 +0300105 rootlogger: "INFO, CONSOLE"
Jiri Konecny463dee52016-03-03 11:08:46 +0100106 control:
107 version: 2.2
108 enabled: true
109 bind:
110 address: 127.0.0.1
111 discovery:
112 host: 127.0.0.1
113 master:
114 host: 127.0.0.1
115 members:
116 - host: 127.0.0.1
117 id: 1
118 collector:
119 version: 2.2
120 enabled: true
121 bind:
122 address: 127.0.0.1
123 master:
124 host: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400125 contrail_cache:
126 engine: redis
127 host: 127.0.0.1
128 port: 6379
129 password: guest
Jiri Konecny463dee52016-03-03 11:08:46 +0100130 discovery:
131 host: 127.0.0.1
132 data_ttl: 2
133 database:
134 members:
135 - host: 127.0.0.1
136 port: 9160
Sergey Kreysfd017c12018-05-04 18:35:37 +0300137 message_queue:
138 members:
139 - host: 127.0.0.1
140 - host: 127.0.0.1
141 - host: 127.0.0.1
Jiri Konecny463dee52016-03-03 11:08:46 +0100142 database:
143 version: 2.2
144 cassandra:
145 version: 2
146 enabled: true
147 minimum_disk: 10
148 name: 'Contrail'
149 original_token: 0
Dmitry Stremkovskiy2a079c72017-07-12 23:11:18 +0300150 compaction_throughput_mb_per_sec: 16
Dmitry Stremkovskiy71b310a2017-08-11 20:39:11 +0300151 concurrent_compactors: 1
Jiri Konecny463dee52016-03-03 11:08:46 +0100152 data_dirs:
153 - /var/lib/cassandra
154 id: 1
155 discovery:
156 host: 127.0.0.1
157 bind:
158 host: 127.0.0.1
159 port: 9042
160 rpc_port: 9160
161 members:
162 - host: 127.0.0.1
163 id: 1
164 web:
165 version: 2.2
166 enabled: True
167 bind:
168 address: 127.0.0.1
169 analytics:
170 host: 127.0.0.1
171 master:
172 host: 127.0.0.1
173 cache:
174 engine: redis
175 host: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400176 password: guest
Jiri Konecny463dee52016-03-03 11:08:46 +0100177 port: 6379
178 members:
179 - host: 127.0.0.1
180 id: 1
181 identity:
182 engine: keystone
183 version: '2.0'
184 host: 127.0.0.1
185 port: 35357
186 user: admin
187 password: password
188 token: token
189 tenant: admin
190
191
192All-in-one cluster
193~~~~~~~~~~~~~~~~~~
194
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200195Config, control, analytics, database, web -- altogether, clustered on multiple
196nodes.
Jiri Konecny463dee52016-03-03 11:08:46 +0100197
198.. code-block:: yaml
199
200 opencontrail:
201 common:
202 version: 2.2
203 source:
204 engine: pkg
205 address: http://mirror.robotice.cz/contrail-havana/
206 identity:
207 engine: keystone
208 host: 127.0.0.1
209 port: 35357
210 token: token
211 password: password
212 network:
213 engine: neutron
214 host: 127.0.0.1
215 port: 9696
216 config:
217 version: 2.2
218 enabled: true
219 network:
220 engine: neutron
221 host: 127.0.0.1
222 port: 9696
223 discovery:
224 host: 127.0.0.1
225 analytics:
226 host: 127.0.0.1
227 bind:
228 address: 127.0.0.1
229 message_queue:
230 engine: rabbitmq
231 host: 127.0.0.1
232 port: 5672
233 database:
234 members:
235 - host: 127.0.0.1
236 port: 9160
237 - host: 127.0.0.1
238 port: 9160
239 - host: 127.0.0.1
240 port: 9160
241 cache:
Jakub Pavlikd1a059e2016-07-13 23:08:33 +0200242 members:
243 - host: 127.0.0.1
244 port: 11211
245 - host: 127.0.0.1
246 port: 11211
247 - host: 127.0.0.1
248 port: 11211
Jiri Konecny463dee52016-03-03 11:08:46 +0100249 identity:
250 engine: keystone
251 version: '2.0'
252 region: RegionOne
253 host: 127.0.0.1
254 port: 35357
255 user: admin
256 password: password
257 token: token
258 tenant: admin
259 members:
260 - host: 127.0.0.1
261 id: 1
262 - host: 127.0.0.1
263 id: 2
264 - host: 127.0.0.1
265 id: 3
266 control:
267 version: 2.2
268 enabled: true
269 bind:
270 address: 127.0.0.1
271 discovery:
272 host: 127.0.0.1
273 master:
274 host: 127.0.0.1
275 members:
276 - host: 127.0.0.1
277 id: 1
278 - host: 127.0.0.1
279 id: 2
280 - host: 127.0.0.1
281 id: 3
282 collector:
283 version: 2.2
284 enabled: true
285 bind:
286 address: 127.0.0.1
287 master:
288 host: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400289 contrail_cache:
290 engine: redis
291 host: 127.0.0.1
292 port: 6379
293 password: guest
Jiri Konecny463dee52016-03-03 11:08:46 +0100294 discovery:
295 host: 127.0.0.1
296 data_ttl: 1
297 database:
298 members:
299 - host: 127.0.0.1
300 port: 9160
301 - host: 127.0.0.1
302 port: 9160
303 - host: 127.0.0.1
304 port: 9160
Sergey Kreysfd017c12018-05-04 18:35:37 +0300305 message_queue:
306 members:
307 - host: 127.0.0.1
308 - host: 127.0.0.1
309 - host: 127.0.0.1
Jiri Konecny463dee52016-03-03 11:08:46 +0100310 database:
311 version: 2.2
312 cassandra:
313 version: 2
314 enabled: true
315 name: 'Contrail'
316 minimum_disk: 10
317 original_token: 0
318 data_dirs:
319 - /var/lib/cassandra
320 id: 1
321 discovery:
322 host: 127.0.0.1
323 bind:
324 host: 127.0.0.1
325 port: 9042
326 rpc_port: 9160
327 members:
328 - host: 127.0.0.1
329 id: 1
330 - host: 127.0.0.1
331 id: 2
332 - host: 127.0.0.1
333 id: 3
334 web:
335 version: 2.2
336 enabled: True
337 bind:
338 address: 127.0.0.1
339 master:
340 host: 127.0.0.1
341 analytics:
342 host: 127.0.0.1
343 cache:
344 engine: redis
345 host: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400346 password: guest
Jiri Konecny463dee52016-03-03 11:08:46 +0100347 port: 6379
348 members:
349 - host: 127.0.0.1
350 id: 1
351 - host: 127.0.0.1
352 id: 2
353 - host: 127.0.0.1
354 id: 3
355 identity:
356 engine: keystone
357 version: '2.0'
358 host: 127.0.0.1
359 port: 35357
360 user: admin
361 password: password
362 token: token
363 tenant: admin
364
365
366Separated analytics from control and config
367~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
368
369Config, control, database, web.
370
371.. code-block:: yaml
372
373 opencontrail:
374 common:
375 version: 2.2
376 identity:
377 engine: keystone
378 host: 127.0.0.1
379 port: 35357
380 token: token
381 password: password
382 network:
383 engine: neutron
384 host: 127.0.0.1
385 port: 9696
386 config:
387 version: 2.2
388 enabled: true
389 network:
390 engine: neutron
391 host: 127.0.0.1
392 port: 9696
393 discovery:
394 host: 127.0.0.1
395 analytics:
396 host: 127.0.0.1
397 bind:
398 address: 127.0.0.1
399 message_queue:
400 engine: rabbitmq
401 host: 127.0.0.1
402 port: 5672
403 database:
404 members:
405 - host: 127.0.0.1
406 port: 9160
407 - host: 127.0.0.1
408 port: 9160
409 - host: 127.0.0.1
410 port: 9160
411 cache:
Jakub Pavlikd1a059e2016-07-13 23:08:33 +0200412 members:
413 - host: 127.0.0.1
414 port: 11211
415 - host: 127.0.0.1
416 port: 11211
417 - host: 127.0.0.1
418 port: 11211
Jiri Konecny463dee52016-03-03 11:08:46 +0100419 identity:
420 engine: keystone
421 version: '2.0'
422 region: RegionOne
423 host: 127.0.0.1
424 port: 35357
425 user: admin
426 password: password
427 token: token
428 tenant: admin
429 members:
430 - host: 127.0.0.1
431 id: 1
432 - host: 127.0.0.1
433 id: 2
434 - host: 127.0.0.1
435 id: 3
436 control:
437 version: 2.2
438 enabled: true
439 bind:
440 address: 127.0.0.1
441 discovery:
442 host: 127.0.0.1
443 master:
444 host: 127.0.0.1
445 members:
446 - host: 127.0.0.1
447 id: 1
448 - host: 127.0.0.1
449 id: 2
450 - host: 127.0.0.1
451 id: 3
452 database:
453 version: 127.0.0.1
454 cassandra:
455 version: 2
456 enabled: true
457 name: 'Contrail'
458 minimum_disk: 10
459 original_token: 0
460 data_dirs:
461 - /var/lib/cassandra
462 id: 1
463 discovery:
464 host: 127.0.0.1
465 bind:
466 host: 127.0.0.1
467 port: 9042
468 rpc_port: 9160
469 members:
470 - host: 127.0.0.1
471 id: 1
472 - host: 127.0.0.1
473 id: 2
474 - host: 127.0.0.1
475 id: 3
476 web:
477 version: 2.2
478 enabled: True
479 bind:
480 address: 127.0.0.1
481 analytics:
482 host: 127.0.0.1
483 master:
484 host: 127.0.0.1
485 cache:
486 engine: redis
487 host: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400488 password: guest
Jiri Konecny463dee52016-03-03 11:08:46 +0100489 port: 6379
490 members:
491 - host: 127.0.0.1
492 id: 1
493 - host: 127.0.0.1
494 id: 2
495 - host: 127.0.0.1
496 id: 3
497 identity:
498 engine: keystone
499 version: '2.0'
500 host: 127.0.0.1
501 port: 35357
502 user: admin
503 password: password
504 token: token
505 tenant: admin
506
Jiri Konecny463dee52016-03-03 11:08:46 +0100507Analytic nodes
Jiri Konecny463dee52016-03-03 11:08:46 +0100508
509Analytics and database on an analytic node(s)
510
511.. code-block:: yaml
512
513 opencontrail:
514 common:
515 version: 2.2
516 identity:
517 engine: keystone
518 host: 127.0.0.1
519 port: 35357
520 token: token
521 password: password
522 network:
523 engine: neutron
524 host: 127.0.0.1
525 port: 9696
526 collector:
527 version: 2.2
528 enabled: true
529 bind:
530 address: 127.0.0.1
Gleb Zimin27521c12018-08-21 14:48:37 +0400531 contrail_cache:
532 engine: redis
533 host: 127.0.0.1
534 password: guest
535 port: 6379
Jiri Konecny463dee52016-03-03 11:08:46 +0100536 master:
537 host: 127.0.0.1
538 discovery:
539 host: 127.0.0.1
540 data_ttl: 1
541 database:
542 members:
543 - host: 127.0.0.1
544 port: 9160
545 - host: 127.0.0.1
546 port: 9160
547 - host: 127.0.0.1
548 port: 9160
Sergey Kreysfd017c12018-05-04 18:35:37 +0300549 message_queue:
550 members:
551 - host: 127.0.0.1
552 - host: 127.0.0.1
553 - host: 127.0.0.1
Jiri Konecny463dee52016-03-03 11:08:46 +0100554 database:
555 version: 2.2
556 cassandra:
557 version: 2
558 enabled: true
559 name: 'Contrail'
560 minimum_disk: 10
561 original_token: 0
562 data_dirs:
563 - /var/lib/cassandra
564 id: 1
565 discovery:
566 host: 127.0.0.1
567 bind:
568 host: 127.0.0.1
569 port: 9042
570 rpc_port: 9160
571 members:
572 - host: 127.0.0.1
573 id: 1
574 - host: 127.0.0.1
575 id: 2
576 - host: 127.0.0.1
577 id: 3
578
579
580Compute nodes
Aleš Komáreka3314b22017-04-11 13:46:06 +0200581-------------
Jiri Konecny463dee52016-03-03 11:08:46 +0100582
583Vrouter configuration on a compute node(s)
584
585.. code-block:: yaml
586
587 opencontrail:
588 common:
589 version: 2.2
590 identity:
591 engine: keystone
592 host: 127.0.0.1
593 port: 35357
594 token: token
595 password: password
596 network:
597 engine: neutron
598 host: 127.0.0.1
599 port: 9696
600 compute:
601 version: 2.2
602 enabled: True
Dmitry Stremkovskiy0cb5c562017-07-26 00:32:51 +0300603 hostname: node-12.domain.tld
Danysa144f292018-06-26 16:08:50 +0200604 flow_hold_limit: 0
Jiri Konecny463dee52016-03-03 11:08:46 +0100605 discovery:
606 host: 127.0.0.1
607 interface:
608 address: 127.0.0.1
609 dev: eth0
610 gateway: 127.0.0.1
611 mask: /24
612 dns: 127.0.0.1
613 mtu: 9000
614
Petr Jediný5f3008a2017-07-31 15:04:05 +0200615
616Compute nodes with gateway_mode
617-------------------------------
618
619Gateway mode: can be server/ vcpe (default is none)
620
621.. code-block:: yaml
622
623 opencontrail:
624 compute:
625 gateway_mode: server
626
Vasyl Saienkob10b7202017-09-05 14:19:03 +0300627TSN nodes
628---------
629
630Configure TSN nodes
631
632.. code-block:: yaml
633
634 opencontrail:
635 compute:
636 enabled: true
637 tor:
638 enabled: true
639 bind:
640 port: 8086
641 agent:
642 tor01:
643 id: 0
644 port: 6632
645 host: 127.0.0.1
646 address: 127.0.0.1
647
Petr Jediný5f3008a2017-07-31 15:04:05 +0200648
Andreyeff77ac2017-08-25 12:14:06 -0500649Set up metadata secret for the Vrouter
Petr Jedinýfe51c6a2017-09-05 18:30:31 +0200650--------------------------------------
Andreyeff77ac2017-08-25 12:14:06 -0500651
Petr Jedinýfe51c6a2017-09-05 18:30:31 +0200652In order to get cloud-init within the instance to properly fetch
Andreyeff77ac2017-08-25 12:14:06 -0500653instance metadata, metadata_proxy_secret in the Vrouter agent config
654should match the value in nova.conf. The administrator should define
655it in the pillar:
656
657.. code-block:: yaml
658
659 opencontrail:
660 compute:
661 metadata:
662 secret: opencontrail
663
Petr Jedinýfe51c6a2017-09-05 18:30:31 +0200664Add auth info for Barbican on compute nodes
665-------------------------------------------
666
667.. code-block:: yaml
668
669 opencontrail:
670 compute:
671 lbaas:
672 enabled: true
673 secret_manager:
674 engine: barbican
675 identity:
676 user: admin
677 password: "supersecretpassword123"
678 tenant: admin
679
680
Jakub Pavlik735005f2016-02-26 15:54:53 +0100681Keystone v3
Aleš Komáreka3314b22017-04-11 13:46:06 +0200682-----------
Jakub Pavlik735005f2016-02-26 15:54:53 +0100683
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200684To enable support for keystone v3 in opencontrail, there must be defined
685version for config and web role.
Jakub Pavlik735005f2016-02-26 15:54:53 +0100686
687.. code-block:: yaml
688
689 opencontrail:
690 config:
691 version: 2.2
692 enabled: true
693 ...
694 identity:
695 engine: keystone
696 version: '3'
697 ...
698
699 opencontrail:
700 web:
701 version: 2.2
702 enabled: true
703 ...
704 identity:
705 engine: keystone
706 version: '3'
707 ...
708
marco10cc2212016-04-03 14:21:54 +0200709Without Keystone
710----------------
711
712.. code-block:: yaml
713
714 opencontrail:
715 ...
716 common:
717 ...
718 identity:
719 engine: none
720 token: none
721 password: none
722 ...
723 config:
724 ...
725 identity:
726 engine: none
727 password: none
728 token: none
729 ...
730 web:
731 ...
732 identity:
733 engine: none
734 password: none
735 token: none
736 ...
marcof5461712016-04-04 20:49:36 +0200737
Aleš Komáreka3314b22017-04-11 13:46:06 +0200738Kubernetes support
739------------------
740
marcof5461712016-04-04 20:49:36 +0200741Kubernetes vrouter nodes
marcof5461712016-04-04 20:49:36 +0200742
743Vrouter configuration on a kubernetes node(s)
744
745.. code-block:: yaml
746
747 opencontrail:
748 ...
749 compute:
750 engine: kubernetes
751 ...
752
Jakub Pavlik0d1f67e2016-11-30 10:04:13 +0100753vRouter with separated control plane
Jakub Pavlik0d1f67e2016-11-30 10:04:13 +0100754
755Separate XMPP traffic from dataplane interface.
756
757.. code-block:: yaml
758
759 opencontrail:
760 compute:
761 bind:
762 address: 172.16.0.50
763 ...
764
Petr Jediný439fab32017-07-10 14:33:09 +0200765Override RPF default in Contrail API
766------------------------------------
767
768From MCP1.1 with OpenContrail >= 3.1.1 you can override RPF default for newly
769created virtual networks. This can be useful for usecases like running
770Calico and K8S in overlay. The `override_rpf_default_by` has valid values
771`disable`, `enable`. If not defined, the configuration fallbacks to Contrail
772default - currently `enable`.
773
774.. code-block:: yaml
775
776 opencontrail:
777 ...
778 config:
779 override_rpf_default_by: 'disable'
780 ...
781
Petr Jediný01c18822017-11-15 12:30:53 +0100782Cassandra GC logging
783--------------------
784
785From Contrail version 3 you can set a way you want to handle Cassandra GC logs.
786The behavior is controlled by `cassandra_gc_logging`. Valid values are
787'rotation' (default), 'legacy' and false.
788
789- 'rotation' is supported by JDK 6u34 7u2 or later and handles rotation of log
790files automatically.
791- 'legacy' is a way to support older JDKs and you will need to handle logs by
792other means. This can be handled for example by using
793`- service.opencontrail.database.cassandra_log_cleanup` in your reclass model.
794- false will disable the cassandra gc logging
795
796.. code-block:: yaml
797
798 opencontrail:
799 ...
800 database:
801 cassandra_gc_logging: false
802 ...
803
Petr Jediný439fab32017-07-10 14:33:09 +0200804
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200805Disable Contrail API authentication
806-----------------------------------
807
Petr Jediný78e6f422017-06-01 13:24:49 +0200808Contrail version must >= 3.0. It is useful especially for Keystone v3.
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200809
810.. code-block:: yaml
811
812 opencontrail:
813 ...
814 config:
815 multi_tenancy: false
816 ...
817
Marek Celoudae98c642018-01-31 12:43:42 +0100818Enable RBAC
819-----------
820
821
822.. code-block:: yaml
823
824 opencontrail:
825 ...
826 config:
827 aaa_mode: rbac
828 cloud_admin_role: admin
829 global_read_only_role: member
830 ...
831
Petr Jediný78e6f422017-06-01 13:24:49 +0200832Switch from on demand to periodic keystone sync
833-----------------------------------------------
834
835This can be useful when you want to sync projects from OpenStack to Contrail
836automatically. The period of sync is 60s.
837
838.. code-block:: yaml
839
840 opencontrail:
841 ...
842 config:
843 identity:
844 sync_on_demand: false
845 ...
846
Petr Jediný03027902018-07-17 20:32:52 +0200847Cassandra listen configuration
848------------------------------
849
850Interface example:
marco2502e052016-05-31 22:53:54 +0200851
852.. code-block:: yaml
Vasyl Saienkob10b7202017-09-05 14:19:03 +0300853
marco2502e052016-05-31 22:53:54 +0200854 database:
855 ....
856 bind:
857 interface: eth0
858 port: 9042
859 rpc_port: 9160
860 ....
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200861
Petr Jediný03027902018-07-17 20:32:52 +0200862For running config and analytics db clusters on same hosts, you will need to
863change ports not to collide. The host is required.
864
865 database:
866 ....
867 bind:
868 host: 127.0.0.1
869 port: 9042
870 rpc_port: 9160
871 # for containers we need to move configdb to neighbouring ports
872 port_configdb: 9041
873 rpc_port_configdb: 9161
874 ....
875
876
Petr Jedinýffbe2082017-03-07 00:56:47 +0100877OpenContrail WebUI version >= 3.1.1
878-----------------------------------
Petr Jediný78e6f422017-06-01 13:24:49 +0200879For 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 +0100880
881For appropriate node at class level:
882
883.. code-block:: yaml
Aleš Komáreka3314b22017-04-11 13:46:06 +0200884
Petr Jedinýffbe2082017-03-07 00:56:47 +0100885 opencontrail:
886 ....
887 web:
888 database:
889 port: 9042
890 ....
891
892
Jakub Pavlik9a4de012016-12-14 13:23:55 +0100893RabbitMQ HA hosts
894------------------
895
896.. code-block:: yaml
897
898 opencontrail:
899 config:
900 message_queue:
901 engine: rabbitmq
902 members:
903 - host: 10.0.16.1
904 - host: 10.0.16.2
905 - host: 10.0.16.3
906 port: 5672
907
908.. code-block:: yaml
909
910 database:
911 ....
912 bind:
913 interface: eth0
914 port: 9042
915 rpc_port: 9160
916 ....
917
Jakub Pavlike3590062017-02-20 23:32:57 +0100918DPDK vRouter
919-------------
920
921.. code-block:: yaml
922
923 opencontrail:
924 compute:
925 dpdk:
926 enabled: true
Jakub Pavlik54761d82017-03-08 11:22:37 +0100927 taskset: "0x0000003C00003C"
928 socket_mem: "1024,1024"
Jakub Pavlike3590062017-02-20 23:32:57 +0100929 interface:
930 mac_address: 90:e2:ba:7c:22:e1
931 pci: 0000:81:00.1
932 ...
933
Petr Jedinýe9960762018-05-04 17:36:59 +0200934Increase number of contrail-api workers
935---------------------------------------
936
937.. code-block:: yaml
938
939 opencontrail:
940 ...
941 config:
Svimbaca9fa5b2018-09-19 14:31:34 +0200942 api:
943 workers_count: 3
Petr Jedinýe9960762018-05-04 17:36:59 +0200944 ...
945
Marek Celouddbba7ed2017-12-07 10:36:24 +0100946Increase number of alarm-gen workers
947------------------------------------
948
949Port prefix will increment used ports by workers starting with 5901.
950
951.. code-block:: yaml
952
953 collector:
954 alarm_gen:
955 workers: 1
956 port_prefix: 59
957
Ales Komarekad46d2e2017-03-09 17:16:38 +0100958Contrail client
959---------------
960
961Basic parameters with identity and host configs
962
Petr Jediný78e6f422017-06-01 13:24:49 +0200963.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +0100964
965 opencontrail:
966 client:
967 identity:
968 user: admin
969 project: admin
970 password: adminpass
971 host: keystone_host
972 config:
973 host: contrail_api_host
974 port: contrail_api_ort
975
976Enforcing virtual routers
977
Petr Jediný78e6f422017-06-01 13:24:49 +0200978.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +0100979
980 opencontrail:
981 client:
982 ...
983 virtual_router:
984 cmp01:
985 ip_address: 172.16.0.11
986 dpdk_enabled: True
987 cmp02:
988 ip_address: 172.16.0.12
989 dpdk_enabled: True
990
psvimbersky3c84e272018-01-02 10:34:29 +0100991
992Enforcing global system config
993
994.. code-block:: yaml
995
996 opencontrail:
997 client:
998 ...
999 global_system_config:
1000 name: default-global-system-config
1001 asn: 64512
1002 grp:
1003 enable: true
1004 restart_time: 60
1005 end_of_rib_timeout: 30
1006 bgp_helper_enable: false
1007 xmpp_helper_enable: false
1008 long_lived_restart_time: 300
1009
1010
Pavel Svimbersky13cda442017-09-14 14:46:13 +02001011Enforcing global vrouter config
1012
1013.. code-block:: yaml
1014
1015 opencontrail:
1016 client:
1017 ...
1018 global_vrouter_config:
Petr Jediný554d0412018-01-04 22:35:48 +01001019 name: default-global-vrouter-config
Pavel Svimbersky13cda442017-09-14 14:46:13 +02001020 parent_type: global-system-config
1021 encap_priority: "MPLSoUDP,MPLSoGRE"
1022 vxlan_vn_id_mode: automatic
1023 fq_names:
1024 - 'default-global-system-config'
1025 - 'default-global-vrouter-config'
1026
psvimbersky3c84e272018-01-02 10:34:29 +01001027
1028
Ales Komarekad46d2e2017-03-09 17:16:38 +01001029Enforcing control nodes
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 bgp_router:
1037 ntw01:
1038 type: control-node
1039 ip_address: 172.16.0.11
1040 nwt02:
1041 type: control-node
1042 ip_address: 172.16.0.12
1043 nwt03:
1044 type: control-node
1045 ip_address: 172.16.0.13
1046
1047
1048Enforcing edge BGP routers
1049
Petr Jediný78e6f422017-06-01 13:24:49 +02001050.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001051
1052 opencontrail:
1053 client:
1054 ...
1055 bgp_router:
1056 mx01:
1057 type: router
1058 ip_address: 172.16.0.21
1059 asn: 64512
1060 mx02:
1061 type: router
1062 ip_address: 172.16.0.22
1063 asn: 64512
Marek Celoud3097e5b2018-01-09 13:52:14 +01001064 key_type: md5
1065 key: password
Ales Komarekad46d2e2017-03-09 17:16:38 +01001066
1067Enforcing config nodes
1068
Petr Jediný78e6f422017-06-01 13:24:49 +02001069.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001070
1071 opencontrail:
1072 client:
1073 ...
1074 config_node:
1075 ctl01:
1076 ip_address: 172.16.0.21
1077 ctl02:
1078 ip_address: 172.16.0.22
1079
1080Enforcing database nodes
1081
Petr Jediný78e6f422017-06-01 13:24:49 +02001082.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001083
1084 opencontrail:
1085 client:
1086 ...
1087 database_node:
1088 ntw01:
1089 ip_address: 172.16.0.21
1090 ntw02:
1091 ip_address: 172.16.0.22
1092
1093Enforcing analytics nodes
1094
Petr Jediný78e6f422017-06-01 13:24:49 +02001095.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001096
1097 opencontrail:
1098 client:
1099 ...
1100 analytics_node:
1101 nal01:
1102 ip_address: 172.16.0.31
1103 nal02:
1104 ip_address: 172.16.0.32
1105
Petr Jediný5f3efe32017-05-26 17:55:09 +02001106Enforcing Link Local Services
1107
1108.. code-block:: yaml
1109
1110 opencontrail:
1111 client:
1112 ...
1113 linklocal_service:
1114 # example with dns name address (only one permited)
1115 meta1:
1116 lls_ip: 10.0.0.23
1117 lls_port: 80
1118 ipf_addresses: "meta.example.com"
1119 ipf_port: 80
1120 # example with multiple ip addresses
1121 meta2:
1122 lls_ip: 10.0.0.23
1123 lls_port: 80
1124 ipf_addresses:
1125 - 10.10.10.10
1126 - 10.20.20.20
1127 - 10.30.30.30
1128 ipf_port: 80
1129 # example with one ip address
1130 meta3:
1131 lls_ip: 10.0.0.23
1132 lls_port: 80
1133 ipf_addresses:
1134 - 10.10.10.10
1135 ipf_port: 80
1136 # example with name override
1137 lls_meta4:
1138 name: meta4
1139 lls_ip: 10.0.0.23
1140 lls_port: 80
1141 ipf_addresses:
1142 - 10.10.10.10
1143 ipf_port: 80
1144
Vasyl Saienkob10b7202017-09-05 14:19:03 +03001145
Michel Nederloff5bccda2017-11-20 13:31:38 +01001146Configuring OpenStack default quotasx
1147
1148.. code-block:: yaml
1149 config:
1150 quota:
1151 network: 5
1152 subnet: 10
1153 router: 10
1154 floating_ip: 100
1155 secgroup: 1000
1156 secgroup_rule: 1000
1157 port: 1000
1158 pool: -1
1159 member: -1
1160 health_monitor: -1
1161 vip: -1
1162
1163Enforcing physical routers
Petr Jediný04bed9b2018-05-03 19:44:10 +02001164
Vasyl Saienkob10b7202017-09-05 14:19:03 +03001165.. code-block:: yaml
1166
1167 opencontrail:
1168 client:
1169 ...
1170 physical_router:
1171 router1:
1172 name: router1
1173 dataplane_ip: 1.2.3.4
1174 management_ip: 1.2.3.4
1175 vendor_name: ovs
1176 product_name: ovs
1177 agents:
1178 - tsn0-0
1179 - tsn0
1180
1181Enforcing physical/logical interfaces for routers
1182
1183
1184.. code-block:: yaml
1185
1186 opencontrail
1187 client:
1188 ...
1189 physical_router:
1190 router1:
1191 ...
1192 interface:
1193 port1:
1194 name: port1
1195 logical_interface:
1196 port1_l:
1197 name: 'port1.0'
1198 vlan_tag: 0
1199 interface_type: L2
1200 virtual_machine_interface:
1201 port1_port:
1202 name: port1_port
1203 ip_address: 192.168.90.107
1204 mac_address: '2e:92:a8:af:c2:21'
1205 security_group: 'default'
1206 virtual_network: 'virtual-network'
1207
Jan Cachebfed1c2018-01-09 17:21:35 +01001208Enforcing virtual networks
1209
1210
1211.. code-block:: yaml
1212
1213 opencontrail:
1214 client:
1215 virtual_networks:
1216 net01:
1217 name: 'network01'
1218 ip_address: '172.16.111.0'
1219 ip_prefix: 24
1220 asn: 64512
1221 route_target: 10000
1222 external: True
1223 allow_transit: False
1224 forwarding_mode: 'l2_l3'
1225 rpf: 'disable'
1226 mirror_destination: False
1227 domain: 'default-domain'
1228 project: 'admin'
1229 ipam_domain: 'default-domain'
1230 ipam_project: 'default-project'
1231 ipam_name: 'default-network-ipam'
1232 net02:
1233 name: 'network02'
1234 net03:
1235 name: 'network03'
1236
Ales Komarekad46d2e2017-03-09 17:16:38 +01001237
Jan Cachb3092722018-01-31 12:46:16 +01001238Enforcing floating ip pool setings.
1239
1240Virtual network with flag external needs to be created before managing the floating ip pool.
1241Param vn_name is the name of the external network.
1242
1243.. code-block:: yaml
1244
1245 opencontrail:
1246 client:
1247 floating_ip_pools:
1248 pool1:
1249 vn_name: external-network
1250 vn_project: admin
1251 vn_domain: default-domain
1252 owner_access: 7
1253 global_access: 0
1254 list_of_projects:
1255 - [tenant1, 7]
1256 - [tenant2, 7]
1257 - [tenant3, 7]
1258 pool2:
1259 vn_name: floating-ips
1260 vn_project: admin
1261 vn_domain: default-domain
1262 owner_access: 7
1263 global_access: 0
1264 list_of_projects:
1265 - [tenant3, 7]
1266
1267
1268If you want to remove all shares from the ip floating pool, define only empty list in
1269list of projects, like this:
1270
1271.. code-block:: yaml
1272
1273 opencontrail:
1274 client:
1275 floating_ip_pools:
1276 pool1:
1277 vn_name: external-network
1278 vn_project: admin
1279 vn_domain: default-domain
1280 owner_access: 7
1281 global_access: 0
1282 list_of_projects: []
1283
1284
Michel Nederlof5364ab62017-12-11 15:02:25 +01001285Contrail DNS custom forwarders
1286------------------------------
1287
1288By default Contrail uses the /etc/resolv.conf file to determine the upstream DNS servers.
1289This can have some side-affects, like resolving internal DNS entries on you public instances.
1290
1291In order to overrule this default set, you can configure nameservers using pillar data.
1292The formula is then responsible for configuring and generating a alternate resolv.conf file.
1293
1294Note: this has been patched recently in the Contrail distribution of Mirantis:
1295https://github.com/Mirantis/contrail-controller/commit/ed9a25ccbcfebd7d079a93aecc5a1a7bf1265ea4
1296https://github.com/Mirantis/contrail-controller/commit/94c844cf2e9bcfcd48587aec03d10b869e737ade
1297
1298
1299To change forwarders for the default-dns option (which is handled by compute nodes):
1300
1301.. code-block:: yaml
1302
1303 compute:
1304 ....
1305 dns:
1306 forwarders:
1307 - 8.8.8.8
1308 - 8.8.4.4
1309 ....
1310
1311To change forwarders for vDNS zones (handled by control nodes):
1312
1313.. code-block:: yaml
1314
1315 control:
1316 ....
1317 dns:
1318 forwarders:
1319 - 8.8.8.8
1320 - 8.8.4.4
1321 ....
1322
Petr Jediný04bed9b2018-05-03 19:44:10 +02001323Contrail IF-MAP server configuration
1324------------------------------------
1325
1326Contrail 3.2 contains internal IF-MAP server implementation. This implementation can be enabled
1327by setting ``config:ifmap:engine`` to internal. Currently supported engines are ``internal`` and
1328``irond`` (default). The ``internal`` will configure contrail-api to run as a IF-MAP server in the
1329same process as contrail-api and will generate security certificates in specified folder.
1330
1331.. code-block:: yaml
1332
1333 config:
1334 ....
1335 ifmap:
1336 engine: internal
1337 cert_dir: /etc/contrail/ssl/certs/ # default
1338 basename_cert: ifmap.crt # default
1339 basename_key: ifmap.key # default
1340 ....
1341
1342To set static configuration of the IF-MAP server for contrail-control instead of using
1343discovery service, you can use ``control:ifmap:bind:host`` and ``port``. The static configuration
1344is triggered by existence of non-empty value of ``control:ifmap:bind`` key.
1345
1346.. code-block:: yaml
1347 control:
1348 ....
1349 ifmap
1350 bind:
1351 host: 127.0.0.1
1352 port: 8443
1353 ....
1354
Jan Cach2f99ae82018-10-03 19:50:09 +02001355Configure TCP_TW_RECYCLE in kernel
1356------------------------------------
Petr Jediný04bed9b2018-05-03 19:44:10 +02001357
Jan Cach2f99ae82018-10-03 19:50:09 +02001358Enable fast recycling of TIME-WAIT sockets. To enable set parameter to 1, which is
1359default value in formula. To turn off this option set parameter to 0:
1360
1361.. code-block:: yaml
1362
1363 opencontrail:
1364 ....
1365 common
1366 ....
1367 tcp_tw_recycle: 0
1368 ....
Michel Nederloff5bccda2017-11-20 13:31:38 +01001369
Anton Samoylov28ad4fa2018-10-02 14:45:41 +04001370Define extra states for contrail services health check
1371------------------------------------------------------
1372
1373Service health check procedure verifies that all available contrail services are in ``active``
1374state.
1375Additional states could be defined for every service as expected states for validation procedure.
1376
1377.. code-block:: yaml
1378
1379 config:
1380 ....
1381 services_extra_states:
1382 contrail-schema:
1383 - backup
1384 contrail-device-manager
1385 - backup
1386 contrail-svc-monitor:
1387 - backup
1388 ....
1389
1390``contrail-schema``, ``contrail-device-manager`` and ``contrail-svc-monitor`` config services already
1391have additional ``backup`` state by default.
1392
Filip Pytloun27930402015-10-06 16:28:32 +02001393Usage
1394=====
1395
1396Basic installation
Ales Komarekad46d2e2017-03-09 17:16:38 +01001397------------------
Filip Pytloun27930402015-10-06 16:28:32 +02001398
1399Add control BGP
Ales Komarekad46d2e2017-03-09 17:16:38 +01001400
1401.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +02001402
1403 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
1404
Ales Komarekad46d2e2017-03-09 17:16:38 +01001405Install compute node
Filip Pytloun27930402015-10-06 16:28:32 +02001406
Ales Komarekad46d2e2017-03-09 17:16:38 +01001407.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +02001408
1409 yum install contrail-vrouter contrail-openstack-vrouter
1410
1411 salt-call state.sls nova,opencontrail
1412
1413Add virtual router
Filip Pytloun27930402015-10-06 16:28:32 +02001414
Ales Komarekad46d2e2017-03-09 17:16:38 +01001415.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +02001416
1417 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
1418
1419 /etc/sysconfig/network-scripts/ifcfg-bond0 -- comment GATEWAY,NETMASK,IPADDR
1420
1421 reboot
1422
Aleš Komáreka3314b22017-04-11 13:46:06 +02001423Debugging
1424---------
Filip Pytloun27930402015-10-06 16:28:32 +02001425
1426Display vhost XMPP connection status
1427
1428You should see the correct controller_ip and state should be established.
1429
1430 http://<compute-node>:8085/Snh_AgentXmppConnectionStatusReq?
1431
1432Display vrouter interface status
1433
1434When vrf_name = ---ERROR--- then something goes wrong
1435
1436 http://<compute-node>:8085/Snh_ItfReq?name=
1437
1438Display IF MAP table
1439
Vasyl Saienkob10b7202017-09-05 14:19:03 +03001440Look for neighbours, if VM has 2, it's ok
Filip Pytloun27930402015-10-06 16:28:32 +02001441
1442 http://<control-node>:8083/Snh_IFMapTableShowReq?table_name=
1443
1444Trace XMPP requests
1445
1446 http://<compute-node>:8085/Snh_SandeshTraceRequest?x=XmppMessageTrace
1447
Filip Pytlounf6b79d42017-02-02 13:02:03 +01001448
1449Documentation and Bugs
1450======================
1451
1452To learn how to install and update salt-formulas, consult the documentation
1453available online at:
1454
1455 http://salt-formulas.readthedocs.io/
1456
1457In the unfortunate event that bugs are discovered, they should be reported to
1458the appropriate issue tracker. Use Github issue tracker for specific salt
1459formula:
1460
1461 https://github.com/salt-formulas/salt-formula-opencontrail/issues
1462
1463For feature requests, bug reports or blueprints affecting entire ecosystem,
1464use Launchpad salt-formulas project:
1465
1466 https://launchpad.net/salt-formulas
1467
1468You can also join salt-formulas-users team and subscribe to mailing list:
1469
1470 https://launchpad.net/~salt-formulas-users
1471
1472Developers wishing to work on the salt-formulas projects should always base
1473their work on master branch and submit pull request against specific formula.
1474
1475 https://github.com/salt-formulas/salt-formula-opencontrail
1476
1477Any questions or feedback is always welcome so feel free to join our IRC
1478channel:
1479
1480 #salt-formulas @ irc.freenode.net