blob: 7ad6f17d59f188c13c203b1eed38e26fe13f67cd [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
105 control:
106 version: 2.2
107 enabled: true
108 bind:
109 address: 127.0.0.1
110 discovery:
111 host: 127.0.0.1
112 master:
113 host: 127.0.0.1
114 members:
115 - host: 127.0.0.1
116 id: 1
117 collector:
118 version: 2.2
119 enabled: true
120 bind:
121 address: 127.0.0.1
122 master:
123 host: 127.0.0.1
124 discovery:
125 host: 127.0.0.1
126 data_ttl: 2
127 database:
128 members:
129 - host: 127.0.0.1
130 port: 9160
131 database:
132 version: 2.2
133 cassandra:
134 version: 2
135 enabled: true
136 minimum_disk: 10
137 name: 'Contrail'
138 original_token: 0
139 data_dirs:
140 - /var/lib/cassandra
141 id: 1
142 discovery:
143 host: 127.0.0.1
144 bind:
145 host: 127.0.0.1
146 port: 9042
147 rpc_port: 9160
148 members:
149 - host: 127.0.0.1
150 id: 1
151 web:
152 version: 2.2
153 enabled: True
154 bind:
155 address: 127.0.0.1
156 analytics:
157 host: 127.0.0.1
158 master:
159 host: 127.0.0.1
160 cache:
161 engine: redis
162 host: 127.0.0.1
163 port: 6379
164 members:
165 - host: 127.0.0.1
166 id: 1
167 identity:
168 engine: keystone
169 version: '2.0'
170 host: 127.0.0.1
171 port: 35357
172 user: admin
173 password: password
174 token: token
175 tenant: admin
176
177
178All-in-one cluster
179~~~~~~~~~~~~~~~~~~
180
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200181Config, control, analytics, database, web -- altogether, clustered on multiple
182nodes.
Jiri Konecny463dee52016-03-03 11:08:46 +0100183
184.. code-block:: yaml
185
186 opencontrail:
187 common:
188 version: 2.2
189 source:
190 engine: pkg
191 address: http://mirror.robotice.cz/contrail-havana/
192 identity:
193 engine: keystone
194 host: 127.0.0.1
195 port: 35357
196 token: token
197 password: password
198 network:
199 engine: neutron
200 host: 127.0.0.1
201 port: 9696
202 config:
203 version: 2.2
204 enabled: true
205 network:
206 engine: neutron
207 host: 127.0.0.1
208 port: 9696
209 discovery:
210 host: 127.0.0.1
211 analytics:
212 host: 127.0.0.1
213 bind:
214 address: 127.0.0.1
215 message_queue:
216 engine: rabbitmq
217 host: 127.0.0.1
218 port: 5672
219 database:
220 members:
221 - host: 127.0.0.1
222 port: 9160
223 - host: 127.0.0.1
224 port: 9160
225 - host: 127.0.0.1
226 port: 9160
227 cache:
Jakub Pavlikd1a059e2016-07-13 23:08:33 +0200228 members:
229 - host: 127.0.0.1
230 port: 11211
231 - host: 127.0.0.1
232 port: 11211
233 - host: 127.0.0.1
234 port: 11211
Jiri Konecny463dee52016-03-03 11:08:46 +0100235 identity:
236 engine: keystone
237 version: '2.0'
238 region: RegionOne
239 host: 127.0.0.1
240 port: 35357
241 user: admin
242 password: password
243 token: token
244 tenant: admin
245 members:
246 - host: 127.0.0.1
247 id: 1
248 - host: 127.0.0.1
249 id: 2
250 - host: 127.0.0.1
251 id: 3
252 control:
253 version: 2.2
254 enabled: true
255 bind:
256 address: 127.0.0.1
257 discovery:
258 host: 127.0.0.1
259 master:
260 host: 127.0.0.1
261 members:
262 - host: 127.0.0.1
263 id: 1
264 - host: 127.0.0.1
265 id: 2
266 - host: 127.0.0.1
267 id: 3
268 collector:
269 version: 2.2
270 enabled: true
271 bind:
272 address: 127.0.0.1
273 master:
274 host: 127.0.0.1
275 discovery:
276 host: 127.0.0.1
277 data_ttl: 1
278 database:
279 members:
280 - host: 127.0.0.1
281 port: 9160
282 - host: 127.0.0.1
283 port: 9160
284 - host: 127.0.0.1
285 port: 9160
286 database:
287 version: 2.2
288 cassandra:
289 version: 2
290 enabled: true
291 name: 'Contrail'
292 minimum_disk: 10
293 original_token: 0
294 data_dirs:
295 - /var/lib/cassandra
296 id: 1
297 discovery:
298 host: 127.0.0.1
299 bind:
300 host: 127.0.0.1
301 port: 9042
302 rpc_port: 9160
303 members:
304 - host: 127.0.0.1
305 id: 1
306 - host: 127.0.0.1
307 id: 2
308 - host: 127.0.0.1
309 id: 3
310 web:
311 version: 2.2
312 enabled: True
313 bind:
314 address: 127.0.0.1
315 master:
316 host: 127.0.0.1
317 analytics:
318 host: 127.0.0.1
319 cache:
320 engine: redis
321 host: 127.0.0.1
322 port: 6379
323 members:
324 - host: 127.0.0.1
325 id: 1
326 - host: 127.0.0.1
327 id: 2
328 - host: 127.0.0.1
329 id: 3
330 identity:
331 engine: keystone
332 version: '2.0'
333 host: 127.0.0.1
334 port: 35357
335 user: admin
336 password: password
337 token: token
338 tenant: admin
339
340
341Separated analytics from control and config
342~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
343
344Config, control, database, web.
345
346.. code-block:: yaml
347
348 opencontrail:
349 common:
350 version: 2.2
351 identity:
352 engine: keystone
353 host: 127.0.0.1
354 port: 35357
355 token: token
356 password: password
357 network:
358 engine: neutron
359 host: 127.0.0.1
360 port: 9696
361 config:
362 version: 2.2
363 enabled: true
364 network:
365 engine: neutron
366 host: 127.0.0.1
367 port: 9696
368 discovery:
369 host: 127.0.0.1
370 analytics:
371 host: 127.0.0.1
372 bind:
373 address: 127.0.0.1
374 message_queue:
375 engine: rabbitmq
376 host: 127.0.0.1
377 port: 5672
378 database:
379 members:
380 - host: 127.0.0.1
381 port: 9160
382 - host: 127.0.0.1
383 port: 9160
384 - host: 127.0.0.1
385 port: 9160
386 cache:
Jakub Pavlikd1a059e2016-07-13 23:08:33 +0200387 members:
388 - host: 127.0.0.1
389 port: 11211
390 - host: 127.0.0.1
391 port: 11211
392 - host: 127.0.0.1
393 port: 11211
Jiri Konecny463dee52016-03-03 11:08:46 +0100394 identity:
395 engine: keystone
396 version: '2.0'
397 region: RegionOne
398 host: 127.0.0.1
399 port: 35357
400 user: admin
401 password: password
402 token: token
403 tenant: admin
404 members:
405 - host: 127.0.0.1
406 id: 1
407 - host: 127.0.0.1
408 id: 2
409 - host: 127.0.0.1
410 id: 3
411 control:
412 version: 2.2
413 enabled: true
414 bind:
415 address: 127.0.0.1
416 discovery:
417 host: 127.0.0.1
418 master:
419 host: 127.0.0.1
420 members:
421 - host: 127.0.0.1
422 id: 1
423 - host: 127.0.0.1
424 id: 2
425 - host: 127.0.0.1
426 id: 3
427 database:
428 version: 127.0.0.1
429 cassandra:
430 version: 2
431 enabled: true
432 name: 'Contrail'
433 minimum_disk: 10
434 original_token: 0
435 data_dirs:
436 - /var/lib/cassandra
437 id: 1
438 discovery:
439 host: 127.0.0.1
440 bind:
441 host: 127.0.0.1
442 port: 9042
443 rpc_port: 9160
444 members:
445 - host: 127.0.0.1
446 id: 1
447 - host: 127.0.0.1
448 id: 2
449 - host: 127.0.0.1
450 id: 3
451 web:
452 version: 2.2
453 enabled: True
454 bind:
455 address: 127.0.0.1
456 analytics:
457 host: 127.0.0.1
458 master:
459 host: 127.0.0.1
460 cache:
461 engine: redis
462 host: 127.0.0.1
463 port: 6379
464 members:
465 - host: 127.0.0.1
466 id: 1
467 - host: 127.0.0.1
468 id: 2
469 - host: 127.0.0.1
470 id: 3
471 identity:
472 engine: keystone
473 version: '2.0'
474 host: 127.0.0.1
475 port: 35357
476 user: admin
477 password: password
478 token: token
479 tenant: admin
480
Jiri Konecny463dee52016-03-03 11:08:46 +0100481Analytic nodes
Jiri Konecny463dee52016-03-03 11:08:46 +0100482
483Analytics and database on an analytic node(s)
484
485.. code-block:: yaml
486
487 opencontrail:
488 common:
489 version: 2.2
490 identity:
491 engine: keystone
492 host: 127.0.0.1
493 port: 35357
494 token: token
495 password: password
496 network:
497 engine: neutron
498 host: 127.0.0.1
499 port: 9696
500 collector:
501 version: 2.2
502 enabled: true
503 bind:
504 address: 127.0.0.1
505 master:
506 host: 127.0.0.1
507 discovery:
508 host: 127.0.0.1
509 data_ttl: 1
510 database:
511 members:
512 - host: 127.0.0.1
513 port: 9160
514 - host: 127.0.0.1
515 port: 9160
516 - host: 127.0.0.1
517 port: 9160
518 database:
519 version: 2.2
520 cassandra:
521 version: 2
522 enabled: true
523 name: 'Contrail'
524 minimum_disk: 10
525 original_token: 0
526 data_dirs:
527 - /var/lib/cassandra
528 id: 1
529 discovery:
530 host: 127.0.0.1
531 bind:
532 host: 127.0.0.1
533 port: 9042
534 rpc_port: 9160
535 members:
536 - host: 127.0.0.1
537 id: 1
538 - host: 127.0.0.1
539 id: 2
540 - host: 127.0.0.1
541 id: 3
542
543
544Compute nodes
Aleš Komáreka3314b22017-04-11 13:46:06 +0200545-------------
Jiri Konecny463dee52016-03-03 11:08:46 +0100546
547Vrouter configuration on a compute node(s)
548
549.. code-block:: yaml
550
551 opencontrail:
552 common:
553 version: 2.2
554 identity:
555 engine: keystone
556 host: 127.0.0.1
557 port: 35357
558 token: token
559 password: password
560 network:
561 engine: neutron
562 host: 127.0.0.1
563 port: 9696
564 compute:
565 version: 2.2
566 enabled: True
567 discovery:
568 host: 127.0.0.1
569 interface:
570 address: 127.0.0.1
571 dev: eth0
572 gateway: 127.0.0.1
573 mask: /24
574 dns: 127.0.0.1
575 mtu: 9000
576
Jakub Pavlik735005f2016-02-26 15:54:53 +0100577Keystone v3
Aleš Komáreka3314b22017-04-11 13:46:06 +0200578-----------
Jakub Pavlik735005f2016-02-26 15:54:53 +0100579
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200580To enable support for keystone v3 in opencontrail, there must be defined
581version for config and web role.
Jakub Pavlik735005f2016-02-26 15:54:53 +0100582
583.. code-block:: yaml
584
585 opencontrail:
586 config:
587 version: 2.2
588 enabled: true
589 ...
590 identity:
591 engine: keystone
592 version: '3'
593 ...
594
595 opencontrail:
596 web:
597 version: 2.2
598 enabled: true
599 ...
600 identity:
601 engine: keystone
602 version: '3'
603 ...
604
marco10cc2212016-04-03 14:21:54 +0200605Without Keystone
606----------------
607
608.. code-block:: yaml
609
610 opencontrail:
611 ...
612 common:
613 ...
614 identity:
615 engine: none
616 token: none
617 password: none
618 ...
619 config:
620 ...
621 identity:
622 engine: none
623 password: none
624 token: none
625 ...
626 web:
627 ...
628 identity:
629 engine: none
630 password: none
631 token: none
632 ...
marcof5461712016-04-04 20:49:36 +0200633
Aleš Komáreka3314b22017-04-11 13:46:06 +0200634Kubernetes support
635------------------
636
marcof5461712016-04-04 20:49:36 +0200637Kubernetes vrouter nodes
marcof5461712016-04-04 20:49:36 +0200638
639Vrouter configuration on a kubernetes node(s)
640
641.. code-block:: yaml
642
643 opencontrail:
644 ...
645 compute:
646 engine: kubernetes
647 ...
648
Jakub Pavlik0d1f67e2016-11-30 10:04:13 +0100649vRouter with separated control plane
Jakub Pavlik0d1f67e2016-11-30 10:04:13 +0100650
651Separate XMPP traffic from dataplane interface.
652
653.. code-block:: yaml
654
655 opencontrail:
656 compute:
657 bind:
658 address: 172.16.0.50
659 ...
660
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200661Disable Contrail API authentication
662-----------------------------------
663
664Contrail version must >=3.0. It is useful especially for Keystone v3.
665
666.. code-block:: yaml
667
668 opencontrail:
669 ...
670 config:
671 multi_tenancy: false
672 ...
673
marco2502e052016-05-31 22:53:54 +0200674Cassandra listen interface
Petr Jedinýffbe2082017-03-07 00:56:47 +0100675--------------------------
marco2502e052016-05-31 22:53:54 +0200676
677.. code-block:: yaml
678
679 database:
680 ....
681 bind:
682 interface: eth0
683 port: 9042
684 rpc_port: 9160
685 ....
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200686
Petr Jedinýffbe2082017-03-07 00:56:47 +0100687OpenContrail WebUI version >= 3.1.1
688-----------------------------------
689For OpenContrail version >= 3.1.1 and Cassandra >=2.1 we should override WebUI's cassandra port from 9160 to 9042.
690
691For appropriate node at class level:
692
693.. code-block:: yaml
Aleš Komáreka3314b22017-04-11 13:46:06 +0200694
Petr Jedinýffbe2082017-03-07 00:56:47 +0100695 opencontrail:
696 ....
697 web:
698 database:
699 port: 9042
700 ....
701
702
Jakub Pavlik9a4de012016-12-14 13:23:55 +0100703RabbitMQ HA hosts
704------------------
705
706.. code-block:: yaml
707
708 opencontrail:
709 config:
710 message_queue:
711 engine: rabbitmq
712 members:
713 - host: 10.0.16.1
714 - host: 10.0.16.2
715 - host: 10.0.16.3
716 port: 5672
717
718.. code-block:: yaml
719
720 database:
721 ....
722 bind:
723 interface: eth0
724 port: 9042
725 rpc_port: 9160
726 ....
727
Jakub Pavlike3590062017-02-20 23:32:57 +0100728DPDK vRouter
729-------------
730
731.. code-block:: yaml
732
733 opencontrail:
734 compute:
735 dpdk:
736 enabled: true
Jakub Pavlik54761d82017-03-08 11:22:37 +0100737 taskset: "0x0000003C00003C"
738 socket_mem: "1024,1024"
Jakub Pavlike3590062017-02-20 23:32:57 +0100739 interface:
740 mac_address: 90:e2:ba:7c:22:e1
741 pci: 0000:81:00.1
742 ...
743
Ales Komarekad46d2e2017-03-09 17:16:38 +0100744Contrail client
745---------------
746
747Basic parameters with identity and host configs
748
749.. code-block:: bash
750
751 opencontrail:
752 client:
753 identity:
754 user: admin
755 project: admin
756 password: adminpass
757 host: keystone_host
758 config:
759 host: contrail_api_host
760 port: contrail_api_ort
761
762Enforcing virtual routers
763
764.. code-block:: bash
765
766 opencontrail:
767 client:
768 ...
769 virtual_router:
770 cmp01:
771 ip_address: 172.16.0.11
772 dpdk_enabled: True
773 cmp02:
774 ip_address: 172.16.0.12
775 dpdk_enabled: True
776
777Enforcing control nodes
778
779.. code-block:: bash
780
781 opencontrail:
782 client:
783 ...
784 bgp_router:
785 ntw01:
786 type: control-node
787 ip_address: 172.16.0.11
788 nwt02:
789 type: control-node
790 ip_address: 172.16.0.12
791 nwt03:
792 type: control-node
793 ip_address: 172.16.0.13
794
795
796Enforcing edge BGP routers
797
798.. code-block:: bash
799
800 opencontrail:
801 client:
802 ...
803 bgp_router:
804 mx01:
805 type: router
806 ip_address: 172.16.0.21
807 asn: 64512
808 mx02:
809 type: router
810 ip_address: 172.16.0.22
811 asn: 64512
812
813Enforcing config nodes
814
815.. code-block:: bash
816
817 opencontrail:
818 client:
819 ...
820 config_node:
821 ctl01:
822 ip_address: 172.16.0.21
823 ctl02:
824 ip_address: 172.16.0.22
825
826Enforcing database nodes
827
828.. code-block:: bash
829
830 opencontrail:
831 client:
832 ...
833 database_node:
834 ntw01:
835 ip_address: 172.16.0.21
836 ntw02:
837 ip_address: 172.16.0.22
838
839Enforcing analytics nodes
840
841.. code-block:: bash
842
843 opencontrail:
844 client:
845 ...
846 analytics_node:
847 nal01:
848 ip_address: 172.16.0.31
849 nal02:
850 ip_address: 172.16.0.32
851
852
Filip Pytloun27930402015-10-06 16:28:32 +0200853Usage
854=====
855
856Basic installation
Ales Komarekad46d2e2017-03-09 17:16:38 +0100857------------------
Filip Pytloun27930402015-10-06 16:28:32 +0200858
859Add control BGP
Ales Komarekad46d2e2017-03-09 17:16:38 +0100860
861.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +0200862
863 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
864
Ales Komarekad46d2e2017-03-09 17:16:38 +0100865Install compute node
Filip Pytloun27930402015-10-06 16:28:32 +0200866
Ales Komarekad46d2e2017-03-09 17:16:38 +0100867.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +0200868
869 yum install contrail-vrouter contrail-openstack-vrouter
870
871 salt-call state.sls nova,opencontrail
872
873Add virtual router
Filip Pytloun27930402015-10-06 16:28:32 +0200874
Ales Komarekad46d2e2017-03-09 17:16:38 +0100875.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +0200876
877 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
878
879 /etc/sysconfig/network-scripts/ifcfg-bond0 -- comment GATEWAY,NETMASK,IPADDR
880
881 reboot
882
Aleš Komáreka3314b22017-04-11 13:46:06 +0200883Debugging
884---------
Filip Pytloun27930402015-10-06 16:28:32 +0200885
886Display vhost XMPP connection status
887
888You should see the correct controller_ip and state should be established.
889
890 http://<compute-node>:8085/Snh_AgentXmppConnectionStatusReq?
891
892Display vrouter interface status
893
894When vrf_name = ---ERROR--- then something goes wrong
895
896 http://<compute-node>:8085/Snh_ItfReq?name=
897
898Display IF MAP table
899
900Look for neighbours, if VM has 2, it's ok
901
902 http://<control-node>:8083/Snh_IFMapTableShowReq?table_name=
903
904Trace XMPP requests
905
906 http://<compute-node>:8085/Snh_SandeshTraceRequest?x=XmppMessageTrace
907
Filip Pytlounf6b79d42017-02-02 13:02:03 +0100908
909Documentation and Bugs
910======================
911
912To learn how to install and update salt-formulas, consult the documentation
913available online at:
914
915 http://salt-formulas.readthedocs.io/
916
917In the unfortunate event that bugs are discovered, they should be reported to
918the appropriate issue tracker. Use Github issue tracker for specific salt
919formula:
920
921 https://github.com/salt-formulas/salt-formula-opencontrail/issues
922
923For feature requests, bug reports or blueprints affecting entire ecosystem,
924use Launchpad salt-formulas project:
925
926 https://launchpad.net/salt-formulas
927
928You can also join salt-formulas-users team and subscribe to mailing list:
929
930 https://launchpad.net/~salt-formulas-users
931
932Developers wishing to work on the salt-formulas projects should always base
933their work on master branch and submit pull request against specific formula.
934
935 https://github.com/salt-formulas/salt-formula-opencontrail
936
937Any questions or feedback is always welcome so feel free to join our IRC
938channel:
939
940 #salt-formulas @ irc.freenode.net