blob: 1b642baa6d19b99307aa53c1ca25ba6fda6f80fa [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
125 discovery:
126 host: 127.0.0.1
127 data_ttl: 2
128 database:
129 members:
130 - host: 127.0.0.1
131 port: 9160
Sergey Kreysfd017c12018-05-04 18:35:37 +0300132 message_queue:
133 members:
134 - host: 127.0.0.1
135 - host: 127.0.0.1
136 - host: 127.0.0.1
Jiri Konecny463dee52016-03-03 11:08:46 +0100137 database:
138 version: 2.2
139 cassandra:
140 version: 2
141 enabled: true
142 minimum_disk: 10
143 name: 'Contrail'
144 original_token: 0
Dmitry Stremkovskiy2a079c72017-07-12 23:11:18 +0300145 compaction_throughput_mb_per_sec: 16
Dmitry Stremkovskiy71b310a2017-08-11 20:39:11 +0300146 concurrent_compactors: 1
Jiri Konecny463dee52016-03-03 11:08:46 +0100147 data_dirs:
148 - /var/lib/cassandra
149 id: 1
150 discovery:
151 host: 127.0.0.1
152 bind:
153 host: 127.0.0.1
154 port: 9042
155 rpc_port: 9160
156 members:
157 - host: 127.0.0.1
158 id: 1
159 web:
160 version: 2.2
161 enabled: True
162 bind:
163 address: 127.0.0.1
164 analytics:
165 host: 127.0.0.1
166 master:
167 host: 127.0.0.1
168 cache:
169 engine: redis
170 host: 127.0.0.1
171 port: 6379
172 members:
173 - host: 127.0.0.1
174 id: 1
175 identity:
176 engine: keystone
177 version: '2.0'
178 host: 127.0.0.1
179 port: 35357
180 user: admin
181 password: password
182 token: token
183 tenant: admin
184
185
186All-in-one cluster
187~~~~~~~~~~~~~~~~~~
188
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200189Config, control, analytics, database, web -- altogether, clustered on multiple
190nodes.
Jiri Konecny463dee52016-03-03 11:08:46 +0100191
192.. code-block:: yaml
193
194 opencontrail:
195 common:
196 version: 2.2
197 source:
198 engine: pkg
199 address: http://mirror.robotice.cz/contrail-havana/
200 identity:
201 engine: keystone
202 host: 127.0.0.1
203 port: 35357
204 token: token
205 password: password
206 network:
207 engine: neutron
208 host: 127.0.0.1
209 port: 9696
210 config:
211 version: 2.2
212 enabled: true
213 network:
214 engine: neutron
215 host: 127.0.0.1
216 port: 9696
217 discovery:
218 host: 127.0.0.1
219 analytics:
220 host: 127.0.0.1
221 bind:
222 address: 127.0.0.1
223 message_queue:
224 engine: rabbitmq
225 host: 127.0.0.1
226 port: 5672
227 database:
228 members:
229 - host: 127.0.0.1
230 port: 9160
231 - host: 127.0.0.1
232 port: 9160
233 - host: 127.0.0.1
234 port: 9160
235 cache:
Jakub Pavlikd1a059e2016-07-13 23:08:33 +0200236 members:
237 - host: 127.0.0.1
238 port: 11211
239 - host: 127.0.0.1
240 port: 11211
241 - host: 127.0.0.1
242 port: 11211
Jiri Konecny463dee52016-03-03 11:08:46 +0100243 identity:
244 engine: keystone
245 version: '2.0'
246 region: RegionOne
247 host: 127.0.0.1
248 port: 35357
249 user: admin
250 password: password
251 token: token
252 tenant: admin
253 members:
254 - host: 127.0.0.1
255 id: 1
256 - host: 127.0.0.1
257 id: 2
258 - host: 127.0.0.1
259 id: 3
260 control:
261 version: 2.2
262 enabled: true
263 bind:
264 address: 127.0.0.1
265 discovery:
266 host: 127.0.0.1
267 master:
268 host: 127.0.0.1
269 members:
270 - host: 127.0.0.1
271 id: 1
272 - host: 127.0.0.1
273 id: 2
274 - host: 127.0.0.1
275 id: 3
276 collector:
277 version: 2.2
278 enabled: true
279 bind:
280 address: 127.0.0.1
281 master:
282 host: 127.0.0.1
283 discovery:
284 host: 127.0.0.1
285 data_ttl: 1
286 database:
287 members:
288 - host: 127.0.0.1
289 port: 9160
290 - host: 127.0.0.1
291 port: 9160
292 - host: 127.0.0.1
293 port: 9160
Sergey Kreysfd017c12018-05-04 18:35:37 +0300294 message_queue:
295 members:
296 - host: 127.0.0.1
297 - host: 127.0.0.1
298 - host: 127.0.0.1
Jiri Konecny463dee52016-03-03 11:08:46 +0100299 database:
300 version: 2.2
301 cassandra:
302 version: 2
303 enabled: true
304 name: 'Contrail'
305 minimum_disk: 10
306 original_token: 0
307 data_dirs:
308 - /var/lib/cassandra
309 id: 1
310 discovery:
311 host: 127.0.0.1
312 bind:
313 host: 127.0.0.1
314 port: 9042
315 rpc_port: 9160
316 members:
317 - host: 127.0.0.1
318 id: 1
319 - host: 127.0.0.1
320 id: 2
321 - host: 127.0.0.1
322 id: 3
323 web:
324 version: 2.2
325 enabled: True
326 bind:
327 address: 127.0.0.1
328 master:
329 host: 127.0.0.1
330 analytics:
331 host: 127.0.0.1
332 cache:
333 engine: redis
334 host: 127.0.0.1
335 port: 6379
336 members:
337 - host: 127.0.0.1
338 id: 1
339 - host: 127.0.0.1
340 id: 2
341 - host: 127.0.0.1
342 id: 3
343 identity:
344 engine: keystone
345 version: '2.0'
346 host: 127.0.0.1
347 port: 35357
348 user: admin
349 password: password
350 token: token
351 tenant: admin
352
353
354Separated analytics from control and config
355~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
356
357Config, control, database, web.
358
359.. code-block:: yaml
360
361 opencontrail:
362 common:
363 version: 2.2
364 identity:
365 engine: keystone
366 host: 127.0.0.1
367 port: 35357
368 token: token
369 password: password
370 network:
371 engine: neutron
372 host: 127.0.0.1
373 port: 9696
374 config:
375 version: 2.2
376 enabled: true
377 network:
378 engine: neutron
379 host: 127.0.0.1
380 port: 9696
381 discovery:
382 host: 127.0.0.1
383 analytics:
384 host: 127.0.0.1
385 bind:
386 address: 127.0.0.1
387 message_queue:
388 engine: rabbitmq
389 host: 127.0.0.1
390 port: 5672
391 database:
392 members:
393 - host: 127.0.0.1
394 port: 9160
395 - host: 127.0.0.1
396 port: 9160
397 - host: 127.0.0.1
398 port: 9160
399 cache:
Jakub Pavlikd1a059e2016-07-13 23:08:33 +0200400 members:
401 - host: 127.0.0.1
402 port: 11211
403 - host: 127.0.0.1
404 port: 11211
405 - host: 127.0.0.1
406 port: 11211
Jiri Konecny463dee52016-03-03 11:08:46 +0100407 identity:
408 engine: keystone
409 version: '2.0'
410 region: RegionOne
411 host: 127.0.0.1
412 port: 35357
413 user: admin
414 password: password
415 token: token
416 tenant: admin
417 members:
418 - host: 127.0.0.1
419 id: 1
420 - host: 127.0.0.1
421 id: 2
422 - host: 127.0.0.1
423 id: 3
424 control:
425 version: 2.2
426 enabled: true
427 bind:
428 address: 127.0.0.1
429 discovery:
430 host: 127.0.0.1
431 master:
432 host: 127.0.0.1
433 members:
434 - host: 127.0.0.1
435 id: 1
436 - host: 127.0.0.1
437 id: 2
438 - host: 127.0.0.1
439 id: 3
440 database:
441 version: 127.0.0.1
442 cassandra:
443 version: 2
444 enabled: true
445 name: 'Contrail'
446 minimum_disk: 10
447 original_token: 0
448 data_dirs:
449 - /var/lib/cassandra
450 id: 1
451 discovery:
452 host: 127.0.0.1
453 bind:
454 host: 127.0.0.1
455 port: 9042
456 rpc_port: 9160
457 members:
458 - host: 127.0.0.1
459 id: 1
460 - host: 127.0.0.1
461 id: 2
462 - host: 127.0.0.1
463 id: 3
464 web:
465 version: 2.2
466 enabled: True
467 bind:
468 address: 127.0.0.1
469 analytics:
470 host: 127.0.0.1
471 master:
472 host: 127.0.0.1
473 cache:
474 engine: redis
475 host: 127.0.0.1
476 port: 6379
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 identity:
485 engine: keystone
486 version: '2.0'
487 host: 127.0.0.1
488 port: 35357
489 user: admin
490 password: password
491 token: token
492 tenant: admin
493
Jiri Konecny463dee52016-03-03 11:08:46 +0100494Analytic nodes
Jiri Konecny463dee52016-03-03 11:08:46 +0100495
496Analytics and database on an analytic node(s)
497
498.. code-block:: yaml
499
500 opencontrail:
501 common:
502 version: 2.2
503 identity:
504 engine: keystone
505 host: 127.0.0.1
506 port: 35357
507 token: token
508 password: password
509 network:
510 engine: neutron
511 host: 127.0.0.1
512 port: 9696
513 collector:
514 version: 2.2
515 enabled: true
516 bind:
517 address: 127.0.0.1
518 master:
519 host: 127.0.0.1
520 discovery:
521 host: 127.0.0.1
522 data_ttl: 1
523 database:
524 members:
525 - host: 127.0.0.1
526 port: 9160
527 - host: 127.0.0.1
528 port: 9160
529 - host: 127.0.0.1
530 port: 9160
Sergey Kreysfd017c12018-05-04 18:35:37 +0300531 message_queue:
532 members:
533 - host: 127.0.0.1
534 - host: 127.0.0.1
535 - host: 127.0.0.1
Jiri Konecny463dee52016-03-03 11:08:46 +0100536 database:
537 version: 2.2
538 cassandra:
539 version: 2
540 enabled: true
541 name: 'Contrail'
542 minimum_disk: 10
543 original_token: 0
544 data_dirs:
545 - /var/lib/cassandra
546 id: 1
547 discovery:
548 host: 127.0.0.1
549 bind:
550 host: 127.0.0.1
551 port: 9042
552 rpc_port: 9160
553 members:
554 - host: 127.0.0.1
555 id: 1
556 - host: 127.0.0.1
557 id: 2
558 - host: 127.0.0.1
559 id: 3
560
561
562Compute nodes
Aleš Komáreka3314b22017-04-11 13:46:06 +0200563-------------
Jiri Konecny463dee52016-03-03 11:08:46 +0100564
565Vrouter configuration on a compute node(s)
566
567.. code-block:: yaml
568
569 opencontrail:
570 common:
571 version: 2.2
572 identity:
573 engine: keystone
574 host: 127.0.0.1
575 port: 35357
576 token: token
577 password: password
578 network:
579 engine: neutron
580 host: 127.0.0.1
581 port: 9696
582 compute:
583 version: 2.2
584 enabled: True
Dmitry Stremkovskiy0cb5c562017-07-26 00:32:51 +0300585 hostname: node-12.domain.tld
Danysa144f292018-06-26 16:08:50 +0200586 flow_hold_limit: 0
Jiri Konecny463dee52016-03-03 11:08:46 +0100587 discovery:
588 host: 127.0.0.1
589 interface:
590 address: 127.0.0.1
591 dev: eth0
592 gateway: 127.0.0.1
593 mask: /24
594 dns: 127.0.0.1
595 mtu: 9000
596
Petr Jediný5f3008a2017-07-31 15:04:05 +0200597
598Compute nodes with gateway_mode
599-------------------------------
600
601Gateway mode: can be server/ vcpe (default is none)
602
603.. code-block:: yaml
604
605 opencontrail:
606 compute:
607 gateway_mode: server
608
Vasyl Saienkob10b7202017-09-05 14:19:03 +0300609TSN nodes
610---------
611
612Configure TSN nodes
613
614.. code-block:: yaml
615
616 opencontrail:
617 compute:
618 enabled: true
619 tor:
620 enabled: true
621 bind:
622 port: 8086
623 agent:
624 tor01:
625 id: 0
626 port: 6632
627 host: 127.0.0.1
628 address: 127.0.0.1
629
Petr Jediný5f3008a2017-07-31 15:04:05 +0200630
Andreyeff77ac2017-08-25 12:14:06 -0500631Set up metadata secret for the Vrouter
Petr Jedinýfe51c6a2017-09-05 18:30:31 +0200632--------------------------------------
Andreyeff77ac2017-08-25 12:14:06 -0500633
Petr Jedinýfe51c6a2017-09-05 18:30:31 +0200634In order to get cloud-init within the instance to properly fetch
Andreyeff77ac2017-08-25 12:14:06 -0500635instance metadata, metadata_proxy_secret in the Vrouter agent config
636should match the value in nova.conf. The administrator should define
637it in the pillar:
638
639.. code-block:: yaml
640
641 opencontrail:
642 compute:
643 metadata:
644 secret: opencontrail
645
Petr Jedinýfe51c6a2017-09-05 18:30:31 +0200646Add auth info for Barbican on compute nodes
647-------------------------------------------
648
649.. code-block:: yaml
650
651 opencontrail:
652 compute:
653 lbaas:
654 enabled: true
655 secret_manager:
656 engine: barbican
657 identity:
658 user: admin
659 password: "supersecretpassword123"
660 tenant: admin
661
662
Jakub Pavlik735005f2016-02-26 15:54:53 +0100663Keystone v3
Aleš Komáreka3314b22017-04-11 13:46:06 +0200664-----------
Jakub Pavlik735005f2016-02-26 15:54:53 +0100665
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200666To enable support for keystone v3 in opencontrail, there must be defined
667version for config and web role.
Jakub Pavlik735005f2016-02-26 15:54:53 +0100668
669.. code-block:: yaml
670
671 opencontrail:
672 config:
673 version: 2.2
674 enabled: true
675 ...
676 identity:
677 engine: keystone
678 version: '3'
679 ...
680
681 opencontrail:
682 web:
683 version: 2.2
684 enabled: true
685 ...
686 identity:
687 engine: keystone
688 version: '3'
689 ...
690
marco10cc2212016-04-03 14:21:54 +0200691Without Keystone
692----------------
693
694.. code-block:: yaml
695
696 opencontrail:
697 ...
698 common:
699 ...
700 identity:
701 engine: none
702 token: none
703 password: none
704 ...
705 config:
706 ...
707 identity:
708 engine: none
709 password: none
710 token: none
711 ...
712 web:
713 ...
714 identity:
715 engine: none
716 password: none
717 token: none
718 ...
marcof5461712016-04-04 20:49:36 +0200719
Pavel Cizinsky14eb00e2018-11-09 15:15:07 +0100720XMPP Encryption
721---------------
722
723Configure encryption of XMPP
724
725Computes nodes
726~~~~~~~~~~~~~~
727
728.. code-block:: yaml
729
730 opencontrail:
731 compute:
732 xmpp:
733 tls:
734 enabled: False
735 auth:
736 enabled: False
737 (optional) cert_file: /etc/contrail/server.pem
738 (optional) key_file: /etc/contrail/privkey.pem
739 (optional) ca_cert_file: /etc/contrail/ca-cert.pem
740
741Control nodes
742~~~~~~~~~~~~~
743
744.. code-block:: yaml
745
746 opencontrail:
747 control:
748 xmpp:
749 tls:
750 enabled: False
751 auth:
752 enabled: False
753 (optional) cert_file: /etc/contrail/server.pem
754 (optional) key_file: /etc/contrail/privkey.pem
755 (optional) ca_cert_file: /etc/contrail/ca-cert.pem
756
Aleš Komáreka3314b22017-04-11 13:46:06 +0200757Kubernetes support
758------------------
759
marcof5461712016-04-04 20:49:36 +0200760Kubernetes vrouter nodes
marcof5461712016-04-04 20:49:36 +0200761
762Vrouter configuration on a kubernetes node(s)
763
764.. code-block:: yaml
765
766 opencontrail:
767 ...
768 compute:
769 engine: kubernetes
770 ...
771
Jakub Pavlik0d1f67e2016-11-30 10:04:13 +0100772vRouter with separated control plane
Jakub Pavlik0d1f67e2016-11-30 10:04:13 +0100773
774Separate XMPP traffic from dataplane interface.
775
776.. code-block:: yaml
777
778 opencontrail:
779 compute:
780 bind:
781 address: 172.16.0.50
782 ...
783
Petr Jediný439fab32017-07-10 14:33:09 +0200784Override RPF default in Contrail API
785------------------------------------
786
787From MCP1.1 with OpenContrail >= 3.1.1 you can override RPF default for newly
788created virtual networks. This can be useful for usecases like running
789Calico and K8S in overlay. The `override_rpf_default_by` has valid values
790`disable`, `enable`. If not defined, the configuration fallbacks to Contrail
791default - currently `enable`.
792
793.. code-block:: yaml
794
795 opencontrail:
796 ...
797 config:
798 override_rpf_default_by: 'disable'
799 ...
800
Petr Jediný01c18822017-11-15 12:30:53 +0100801Cassandra GC logging
802--------------------
803
804From Contrail version 3 you can set a way you want to handle Cassandra GC logs.
805The behavior is controlled by `cassandra_gc_logging`. Valid values are
806'rotation' (default), 'legacy' and false.
807
808- 'rotation' is supported by JDK 6u34 7u2 or later and handles rotation of log
809files automatically.
810- 'legacy' is a way to support older JDKs and you will need to handle logs by
811other means. This can be handled for example by using
812`- service.opencontrail.database.cassandra_log_cleanup` in your reclass model.
813- false will disable the cassandra gc logging
814
815.. code-block:: yaml
816
817 opencontrail:
818 ...
819 database:
820 cassandra_gc_logging: false
821 ...
822
Petr Jediný439fab32017-07-10 14:33:09 +0200823
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200824Disable Contrail API authentication
825-----------------------------------
826
Petr Jediný78e6f422017-06-01 13:24:49 +0200827Contrail version must >= 3.0. It is useful especially for Keystone v3.
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200828
829.. code-block:: yaml
830
831 opencontrail:
832 ...
833 config:
834 multi_tenancy: false
835 ...
836
Marek Celoudae98c642018-01-31 12:43:42 +0100837Enable RBAC
838-----------
839
840
841.. code-block:: yaml
842
843 opencontrail:
844 ...
845 config:
846 aaa_mode: rbac
847 cloud_admin_role: admin
848 global_read_only_role: member
849 ...
850
Petr Jediný78e6f422017-06-01 13:24:49 +0200851Switch from on demand to periodic keystone sync
852-----------------------------------------------
853
854This can be useful when you want to sync projects from OpenStack to Contrail
855automatically. The period of sync is 60s.
856
857.. code-block:: yaml
858
859 opencontrail:
860 ...
861 config:
862 identity:
863 sync_on_demand: false
864 ...
865
Petr Jediný03027902018-07-17 20:32:52 +0200866Cassandra listen configuration
867------------------------------
868
869Interface example:
marco2502e052016-05-31 22:53:54 +0200870
871.. code-block:: yaml
Vasyl Saienkob10b7202017-09-05 14:19:03 +0300872
marco2502e052016-05-31 22:53:54 +0200873 database:
874 ....
875 bind:
876 interface: eth0
877 port: 9042
878 rpc_port: 9160
879 ....
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200880
Petr Jediný03027902018-07-17 20:32:52 +0200881For running config and analytics db clusters on same hosts, you will need to
882change ports not to collide. The host is required.
883
884 database:
885 ....
886 bind:
887 host: 127.0.0.1
888 port: 9042
889 rpc_port: 9160
890 # for containers we need to move configdb to neighbouring ports
891 port_configdb: 9041
892 rpc_port_configdb: 9161
893 ....
894
895
Petr Jedinýffbe2082017-03-07 00:56:47 +0100896OpenContrail WebUI version >= 3.1.1
897-----------------------------------
Petr Jediný78e6f422017-06-01 13:24:49 +0200898For 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 +0100899
900For appropriate node at class level:
901
902.. code-block:: yaml
Aleš Komáreka3314b22017-04-11 13:46:06 +0200903
Petr Jedinýffbe2082017-03-07 00:56:47 +0100904 opencontrail:
905 ....
906 web:
907 database:
908 port: 9042
909 ....
910
911
Jakub Pavlik9a4de012016-12-14 13:23:55 +0100912RabbitMQ HA hosts
913------------------
914
915.. code-block:: yaml
916
917 opencontrail:
918 config:
919 message_queue:
920 engine: rabbitmq
921 members:
922 - host: 10.0.16.1
923 - host: 10.0.16.2
924 - host: 10.0.16.3
925 port: 5672
926
927.. code-block:: yaml
928
929 database:
930 ....
931 bind:
932 interface: eth0
933 port: 9042
934 rpc_port: 9160
935 ....
936
Jakub Pavlike3590062017-02-20 23:32:57 +0100937DPDK vRouter
938-------------
939
940.. code-block:: yaml
941
942 opencontrail:
943 compute:
944 dpdk:
945 enabled: true
Jakub Pavlik54761d82017-03-08 11:22:37 +0100946 taskset: "0x0000003C00003C"
947 socket_mem: "1024,1024"
Jakub Pavlike3590062017-02-20 23:32:57 +0100948 interface:
949 mac_address: 90:e2:ba:7c:22:e1
950 pci: 0000:81:00.1
951 ...
952
Petr Jedinýe9960762018-05-04 17:36:59 +0200953Increase number of contrail-api workers
954---------------------------------------
955
956.. code-block:: yaml
957
958 opencontrail:
959 ...
960 config:
Svimbaca9fa5b2018-09-19 14:31:34 +0200961 api:
962 workers_count: 3
Petr Jedinýe9960762018-05-04 17:36:59 +0200963 ...
964
Marek Celouddbba7ed2017-12-07 10:36:24 +0100965Increase number of alarm-gen workers
966------------------------------------
967
968Port prefix will increment used ports by workers starting with 5901.
969
970.. code-block:: yaml
971
972 collector:
973 alarm_gen:
974 workers: 1
975 port_prefix: 59
976
Ales Komarekad46d2e2017-03-09 17:16:38 +0100977Contrail client
978---------------
979
980Basic parameters with identity and host configs
981
Petr Jediný78e6f422017-06-01 13:24:49 +0200982.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +0100983
984 opencontrail:
985 client:
986 identity:
987 user: admin
988 project: admin
989 password: adminpass
990 host: keystone_host
991 config:
992 host: contrail_api_host
993 port: contrail_api_ort
994
995Enforcing virtual routers
996
Petr Jediný78e6f422017-06-01 13:24:49 +0200997.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +0100998
999 opencontrail:
1000 client:
1001 ...
1002 virtual_router:
1003 cmp01:
1004 ip_address: 172.16.0.11
1005 dpdk_enabled: True
1006 cmp02:
1007 ip_address: 172.16.0.12
1008 dpdk_enabled: True
1009
psvimbersky3c84e272018-01-02 10:34:29 +01001010
1011Enforcing global system config
1012
1013.. code-block:: yaml
1014
1015 opencontrail:
1016 client:
1017 ...
1018 global_system_config:
1019 name: default-global-system-config
1020 asn: 64512
1021 grp:
1022 enable: true
1023 restart_time: 60
1024 end_of_rib_timeout: 30
1025 bgp_helper_enable: false
1026 xmpp_helper_enable: false
1027 long_lived_restart_time: 300
1028
1029
Pavel Svimbersky13cda442017-09-14 14:46:13 +02001030Enforcing global vrouter config
1031
1032.. code-block:: yaml
1033
1034 opencontrail:
1035 client:
1036 ...
1037 global_vrouter_config:
Petr Jediný554d0412018-01-04 22:35:48 +01001038 name: default-global-vrouter-config
Pavel Svimbersky13cda442017-09-14 14:46:13 +02001039 parent_type: global-system-config
1040 encap_priority: "MPLSoUDP,MPLSoGRE"
1041 vxlan_vn_id_mode: automatic
1042 fq_names:
1043 - 'default-global-system-config'
1044 - 'default-global-vrouter-config'
1045
psvimbersky3c84e272018-01-02 10:34:29 +01001046
1047
Ales Komarekad46d2e2017-03-09 17:16:38 +01001048Enforcing control nodes
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 ntw01:
1057 type: control-node
1058 ip_address: 172.16.0.11
1059 nwt02:
1060 type: control-node
1061 ip_address: 172.16.0.12
1062 nwt03:
1063 type: control-node
1064 ip_address: 172.16.0.13
1065
1066
1067Enforcing edge BGP routers
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 bgp_router:
1075 mx01:
1076 type: router
1077 ip_address: 172.16.0.21
1078 asn: 64512
1079 mx02:
1080 type: router
1081 ip_address: 172.16.0.22
1082 asn: 64512
Marek Celoud3097e5b2018-01-09 13:52:14 +01001083 key_type: md5
1084 key: password
Ales Komarekad46d2e2017-03-09 17:16:38 +01001085
1086Enforcing config nodes
1087
Petr Jediný78e6f422017-06-01 13:24:49 +02001088.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001089
1090 opencontrail:
1091 client:
1092 ...
1093 config_node:
1094 ctl01:
1095 ip_address: 172.16.0.21
1096 ctl02:
1097 ip_address: 172.16.0.22
1098
1099Enforcing database nodes
1100
Petr Jediný78e6f422017-06-01 13:24:49 +02001101.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001102
1103 opencontrail:
1104 client:
1105 ...
1106 database_node:
1107 ntw01:
1108 ip_address: 172.16.0.21
1109 ntw02:
1110 ip_address: 172.16.0.22
1111
1112Enforcing analytics nodes
1113
Petr Jediný78e6f422017-06-01 13:24:49 +02001114.. code-block:: yaml
Ales Komarekad46d2e2017-03-09 17:16:38 +01001115
1116 opencontrail:
1117 client:
1118 ...
1119 analytics_node:
1120 nal01:
1121 ip_address: 172.16.0.31
1122 nal02:
1123 ip_address: 172.16.0.32
1124
Petr Jediný5f3efe32017-05-26 17:55:09 +02001125Enforcing Link Local Services
1126
1127.. code-block:: yaml
1128
1129 opencontrail:
1130 client:
1131 ...
1132 linklocal_service:
1133 # example with dns name address (only one permited)
1134 meta1:
1135 lls_ip: 10.0.0.23
1136 lls_port: 80
1137 ipf_addresses: "meta.example.com"
1138 ipf_port: 80
1139 # example with multiple ip addresses
1140 meta2:
1141 lls_ip: 10.0.0.23
1142 lls_port: 80
1143 ipf_addresses:
1144 - 10.10.10.10
1145 - 10.20.20.20
1146 - 10.30.30.30
1147 ipf_port: 80
1148 # example with one ip address
1149 meta3:
1150 lls_ip: 10.0.0.23
1151 lls_port: 80
1152 ipf_addresses:
1153 - 10.10.10.10
1154 ipf_port: 80
1155 # example with name override
1156 lls_meta4:
1157 name: meta4
1158 lls_ip: 10.0.0.23
1159 lls_port: 80
1160 ipf_addresses:
1161 - 10.10.10.10
1162 ipf_port: 80
1163
Vasyl Saienkob10b7202017-09-05 14:19:03 +03001164
Michel Nederloff5bccda2017-11-20 13:31:38 +01001165Configuring OpenStack default quotasx
1166
1167.. code-block:: yaml
1168 config:
1169 quota:
1170 network: 5
1171 subnet: 10
1172 router: 10
1173 floating_ip: 100
1174 secgroup: 1000
1175 secgroup_rule: 1000
1176 port: 1000
1177 pool: -1
1178 member: -1
1179 health_monitor: -1
1180 vip: -1
1181
1182Enforcing physical routers
Petr Jediný04bed9b2018-05-03 19:44:10 +02001183
Vasyl Saienkob10b7202017-09-05 14:19:03 +03001184.. code-block:: yaml
1185
1186 opencontrail:
1187 client:
1188 ...
1189 physical_router:
1190 router1:
1191 name: router1
1192 dataplane_ip: 1.2.3.4
1193 management_ip: 1.2.3.4
1194 vendor_name: ovs
1195 product_name: ovs
1196 agents:
1197 - tsn0-0
1198 - tsn0
1199
1200Enforcing physical/logical interfaces for routers
1201
1202
1203.. code-block:: yaml
1204
1205 opencontrail
1206 client:
1207 ...
1208 physical_router:
1209 router1:
1210 ...
1211 interface:
1212 port1:
1213 name: port1
1214 logical_interface:
1215 port1_l:
1216 name: 'port1.0'
1217 vlan_tag: 0
1218 interface_type: L2
1219 virtual_machine_interface:
1220 port1_port:
1221 name: port1_port
1222 ip_address: 192.168.90.107
1223 mac_address: '2e:92:a8:af:c2:21'
1224 security_group: 'default'
1225 virtual_network: 'virtual-network'
1226
Jan Cachebfed1c2018-01-09 17:21:35 +01001227Enforcing virtual networks
1228
1229
1230.. code-block:: yaml
1231
1232 opencontrail:
1233 client:
1234 virtual_networks:
1235 net01:
1236 name: 'network01'
1237 ip_address: '172.16.111.0'
1238 ip_prefix: 24
1239 asn: 64512
1240 route_target: 10000
1241 external: True
1242 allow_transit: False
1243 forwarding_mode: 'l2_l3'
1244 rpf: 'disable'
1245 mirror_destination: False
1246 domain: 'default-domain'
1247 project: 'admin'
1248 ipam_domain: 'default-domain'
1249 ipam_project: 'default-project'
1250 ipam_name: 'default-network-ipam'
1251 net02:
1252 name: 'network02'
1253 net03:
1254 name: 'network03'
1255
Ales Komarekad46d2e2017-03-09 17:16:38 +01001256
Jan Cachb3092722018-01-31 12:46:16 +01001257Enforcing floating ip pool setings.
1258
1259Virtual network with flag external needs to be created before managing the floating ip pool.
1260Param vn_name is the name of the external network.
1261
1262.. code-block:: yaml
1263
1264 opencontrail:
1265 client:
1266 floating_ip_pools:
1267 pool1:
1268 vn_name: external-network
1269 vn_project: admin
1270 vn_domain: default-domain
1271 owner_access: 7
1272 global_access: 0
1273 list_of_projects:
1274 - [tenant1, 7]
1275 - [tenant2, 7]
1276 - [tenant3, 7]
1277 pool2:
1278 vn_name: floating-ips
1279 vn_project: admin
1280 vn_domain: default-domain
1281 owner_access: 7
1282 global_access: 0
1283 list_of_projects:
1284 - [tenant3, 7]
1285
1286
Pavel Cizinsky14eb00e2018-11-09 15:15:07 +01001287If you want to remove all shares from the ip floating pool, define only empty list in
Jan Cachb3092722018-01-31 12:46:16 +01001288list of projects, like this:
1289
1290.. code-block:: yaml
1291
1292 opencontrail:
1293 client:
1294 floating_ip_pools:
1295 pool1:
1296 vn_name: external-network
1297 vn_project: admin
1298 vn_domain: default-domain
1299 owner_access: 7
1300 global_access: 0
1301 list_of_projects: []
1302
1303
Michel Nederlof5364ab62017-12-11 15:02:25 +01001304Contrail DNS custom forwarders
1305------------------------------
1306
1307By default Contrail uses the /etc/resolv.conf file to determine the upstream DNS servers.
1308This can have some side-affects, like resolving internal DNS entries on you public instances.
1309
1310In order to overrule this default set, you can configure nameservers using pillar data.
1311The formula is then responsible for configuring and generating a alternate resolv.conf file.
1312
1313Note: this has been patched recently in the Contrail distribution of Mirantis:
1314https://github.com/Mirantis/contrail-controller/commit/ed9a25ccbcfebd7d079a93aecc5a1a7bf1265ea4
1315https://github.com/Mirantis/contrail-controller/commit/94c844cf2e9bcfcd48587aec03d10b869e737ade
1316
1317
1318To change forwarders for the default-dns option (which is handled by compute nodes):
1319
1320.. code-block:: yaml
1321
1322 compute:
1323 ....
1324 dns:
1325 forwarders:
1326 - 8.8.8.8
1327 - 8.8.4.4
1328 ....
1329
1330To change forwarders for vDNS zones (handled by control nodes):
1331
1332.. code-block:: yaml
1333
1334 control:
1335 ....
1336 dns:
1337 forwarders:
1338 - 8.8.8.8
1339 - 8.8.4.4
1340 ....
1341
Petr Jediný04bed9b2018-05-03 19:44:10 +02001342Contrail IF-MAP server configuration
1343------------------------------------
1344
1345Contrail 3.2 contains internal IF-MAP server implementation. This implementation can be enabled
1346by setting ``config:ifmap:engine`` to internal. Currently supported engines are ``internal`` and
1347``irond`` (default). The ``internal`` will configure contrail-api to run as a IF-MAP server in the
1348same process as contrail-api and will generate security certificates in specified folder.
1349
1350.. code-block:: yaml
1351
1352 config:
1353 ....
1354 ifmap:
1355 engine: internal
1356 cert_dir: /etc/contrail/ssl/certs/ # default
1357 basename_cert: ifmap.crt # default
1358 basename_key: ifmap.key # default
1359 ....
1360
1361To set static configuration of the IF-MAP server for contrail-control instead of using
1362discovery service, you can use ``control:ifmap:bind:host`` and ``port``. The static configuration
1363is triggered by existence of non-empty value of ``control:ifmap:bind`` key.
1364
1365.. code-block:: yaml
1366 control:
1367 ....
1368 ifmap
1369 bind:
1370 host: 127.0.0.1
1371 port: 8443
1372 ....
1373
Jan Cach2f99ae82018-10-03 19:50:09 +02001374Configure TCP_TW_RECYCLE in kernel
1375------------------------------------
Petr Jediný04bed9b2018-05-03 19:44:10 +02001376
Jan Cach2f99ae82018-10-03 19:50:09 +02001377Enable fast recycling of TIME-WAIT sockets. To enable set parameter to 1, which is
1378default value in formula. To turn off this option set parameter to 0:
1379
1380.. code-block:: yaml
1381
1382 opencontrail:
1383 ....
1384 common
1385 ....
1386 tcp_tw_recycle: 0
1387 ....
Michel Nederloff5bccda2017-11-20 13:31:38 +01001388
Anton Samoylov28ad4fa2018-10-02 14:45:41 +04001389Define extra states for contrail services health check
1390------------------------------------------------------
1391
1392Service health check procedure verifies that all available contrail services are in ``active``
1393state.
1394Additional states could be defined for every service as expected states for validation procedure.
1395
1396.. code-block:: yaml
1397
1398 config:
1399 ....
1400 services_extra_states:
1401 contrail-schema:
1402 - backup
1403 contrail-device-manager
1404 - backup
1405 contrail-svc-monitor:
1406 - backup
1407 ....
1408
1409``contrail-schema``, ``contrail-device-manager`` and ``contrail-svc-monitor`` config services already
1410have additional ``backup`` state by default.
1411
Filip Pytloun27930402015-10-06 16:28:32 +02001412Usage
1413=====
1414
1415Basic installation
Ales Komarekad46d2e2017-03-09 17:16:38 +01001416------------------
Filip Pytloun27930402015-10-06 16:28:32 +02001417
1418Add control BGP
Ales Komarekad46d2e2017-03-09 17:16:38 +01001419
1420.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +02001421
1422 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
1423
Ales Komarekad46d2e2017-03-09 17:16:38 +01001424Install compute node
Filip Pytloun27930402015-10-06 16:28:32 +02001425
Ales Komarekad46d2e2017-03-09 17:16:38 +01001426.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +02001427
1428 yum install contrail-vrouter contrail-openstack-vrouter
1429
1430 salt-call state.sls nova,opencontrail
1431
1432Add virtual router
Filip Pytloun27930402015-10-06 16:28:32 +02001433
Ales Komarekad46d2e2017-03-09 17:16:38 +01001434.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +02001435
1436 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
1437
1438 /etc/sysconfig/network-scripts/ifcfg-bond0 -- comment GATEWAY,NETMASK,IPADDR
1439
1440 reboot
1441
Aleš Komáreka3314b22017-04-11 13:46:06 +02001442Debugging
1443---------
Filip Pytloun27930402015-10-06 16:28:32 +02001444
1445Display vhost XMPP connection status
1446
1447You should see the correct controller_ip and state should be established.
1448
1449 http://<compute-node>:8085/Snh_AgentXmppConnectionStatusReq?
1450
1451Display vrouter interface status
1452
1453When vrf_name = ---ERROR--- then something goes wrong
1454
1455 http://<compute-node>:8085/Snh_ItfReq?name=
1456
1457Display IF MAP table
1458
Vasyl Saienkob10b7202017-09-05 14:19:03 +03001459Look for neighbours, if VM has 2, it's ok
Filip Pytloun27930402015-10-06 16:28:32 +02001460
1461 http://<control-node>:8083/Snh_IFMapTableShowReq?table_name=
1462
1463Trace XMPP requests
1464
1465 http://<compute-node>:8085/Snh_SandeshTraceRequest?x=XmppMessageTrace
1466
Filip Pytlounf6b79d42017-02-02 13:02:03 +01001467
1468Documentation and Bugs
1469======================
1470
1471To learn how to install and update salt-formulas, consult the documentation
1472available online at:
1473
1474 http://salt-formulas.readthedocs.io/
1475
1476In the unfortunate event that bugs are discovered, they should be reported to
1477the appropriate issue tracker. Use Github issue tracker for specific salt
1478formula:
1479
1480 https://github.com/salt-formulas/salt-formula-opencontrail/issues
1481
1482For feature requests, bug reports or blueprints affecting entire ecosystem,
1483use Launchpad salt-formulas project:
1484
1485 https://launchpad.net/salt-formulas
1486
1487You can also join salt-formulas-users team and subscribe to mailing list:
1488
1489 https://launchpad.net/~salt-formulas-users
1490
1491Developers wishing to work on the salt-formulas projects should always base
1492their work on master branch and submit pull request against specific formula.
1493
1494 https://github.com/salt-formulas/salt-formula-opencontrail
1495
1496Any questions or feedback is always welcome so feel free to join our IRC
1497channel:
1498
1499 #salt-formulas @ irc.freenode.net