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