blob: 4aae3e120c7c5b38508e5e0c2245982c84a12644 [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
654------------------------------
655
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
Jakub Pavlik9a4de012016-12-14 13:23:55 +0100666RabbitMQ HA hosts
667------------------
668
669.. code-block:: yaml
670
671 opencontrail:
672 config:
673 message_queue:
674 engine: rabbitmq
675 members:
676 - host: 10.0.16.1
677 - host: 10.0.16.2
678 - host: 10.0.16.3
679 port: 5672
680
681.. code-block:: yaml
682
683 database:
684 ....
685 bind:
686 interface: eth0
687 port: 9042
688 rpc_port: 9160
689 ....
690
Jakub Pavlike3590062017-02-20 23:32:57 +0100691DPDK vRouter
692-------------
693
694.. code-block:: yaml
695
696 opencontrail:
697 compute:
698 dpdk:
699 enabled: true
700 taskset: 0x0000003C00003C
701 interface:
702 mac_address: 90:e2:ba:7c:22:e1
703 pci: 0000:81:00.1
704 ...
705
Ales Komarekad46d2e2017-03-09 17:16:38 +0100706Contrail client
707---------------
708
709Basic parameters with identity and host configs
710
711.. code-block:: bash
712
713 opencontrail:
714 client:
715 identity:
716 user: admin
717 project: admin
718 password: adminpass
719 host: keystone_host
720 config:
721 host: contrail_api_host
722 port: contrail_api_ort
723
724Enforcing virtual routers
725
726.. code-block:: bash
727
728 opencontrail:
729 client:
730 ...
731 virtual_router:
732 cmp01:
733 ip_address: 172.16.0.11
734 dpdk_enabled: True
735 cmp02:
736 ip_address: 172.16.0.12
737 dpdk_enabled: True
738
739Enforcing control nodes
740
741.. code-block:: bash
742
743 opencontrail:
744 client:
745 ...
746 bgp_router:
747 ntw01:
748 type: control-node
749 ip_address: 172.16.0.11
750 nwt02:
751 type: control-node
752 ip_address: 172.16.0.12
753 nwt03:
754 type: control-node
755 ip_address: 172.16.0.13
756
757
758Enforcing edge BGP routers
759
760.. code-block:: bash
761
762 opencontrail:
763 client:
764 ...
765 bgp_router:
766 mx01:
767 type: router
768 ip_address: 172.16.0.21
769 asn: 64512
770 mx02:
771 type: router
772 ip_address: 172.16.0.22
773 asn: 64512
774
775Enforcing config nodes
776
777.. code-block:: bash
778
779 opencontrail:
780 client:
781 ...
782 config_node:
783 ctl01:
784 ip_address: 172.16.0.21
785 ctl02:
786 ip_address: 172.16.0.22
787
788Enforcing database nodes
789
790.. code-block:: bash
791
792 opencontrail:
793 client:
794 ...
795 database_node:
796 ntw01:
797 ip_address: 172.16.0.21
798 ntw02:
799 ip_address: 172.16.0.22
800
801Enforcing analytics nodes
802
803.. code-block:: bash
804
805 opencontrail:
806 client:
807 ...
808 analytics_node:
809 nal01:
810 ip_address: 172.16.0.31
811 nal02:
812 ip_address: 172.16.0.32
813
814
Filip Pytloun27930402015-10-06 16:28:32 +0200815Usage
816=====
817
818Basic installation
Ales Komarekad46d2e2017-03-09 17:16:38 +0100819------------------
Filip Pytloun27930402015-10-06 16:28:32 +0200820
821Add control BGP
Ales Komarekad46d2e2017-03-09 17:16:38 +0100822
823.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +0200824
825 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
826
Ales Komarekad46d2e2017-03-09 17:16:38 +0100827Install compute node
Filip Pytloun27930402015-10-06 16:28:32 +0200828
Ales Komarekad46d2e2017-03-09 17:16:38 +0100829.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +0200830
831 yum install contrail-vrouter contrail-openstack-vrouter
832
833 salt-call state.sls nova,opencontrail
834
835Add virtual router
Filip Pytloun27930402015-10-06 16:28:32 +0200836
Ales Komarekad46d2e2017-03-09 17:16:38 +0100837.. code-block:: bash
Filip Pytloun27930402015-10-06 16:28:32 +0200838
839 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
840
841 /etc/sysconfig/network-scripts/ifcfg-bond0 -- comment GATEWAY,NETMASK,IPADDR
842
843 reboot
844
845Service debugging
Ales Komarekad46d2e2017-03-09 17:16:38 +0100846-----------------
Filip Pytloun27930402015-10-06 16:28:32 +0200847
848Display vhost XMPP connection status
849
850You should see the correct controller_ip and state should be established.
851
852 http://<compute-node>:8085/Snh_AgentXmppConnectionStatusReq?
853
854Display vrouter interface status
855
856When vrf_name = ---ERROR--- then something goes wrong
857
858 http://<compute-node>:8085/Snh_ItfReq?name=
859
860Display IF MAP table
861
862Look for neighbours, if VM has 2, it's ok
863
864 http://<control-node>:8083/Snh_IFMapTableShowReq?table_name=
865
866Trace XMPP requests
867
868 http://<compute-node>:8085/Snh_SandeshTraceRequest?x=XmppMessageTrace
869
Filip Pytlounf6b79d42017-02-02 13:02:03 +0100870
871Documentation and Bugs
872======================
873
874To learn how to install and update salt-formulas, consult the documentation
875available online at:
876
877 http://salt-formulas.readthedocs.io/
878
879In the unfortunate event that bugs are discovered, they should be reported to
880the appropriate issue tracker. Use Github issue tracker for specific salt
881formula:
882
883 https://github.com/salt-formulas/salt-formula-opencontrail/issues
884
885For feature requests, bug reports or blueprints affecting entire ecosystem,
886use Launchpad salt-formulas project:
887
888 https://launchpad.net/salt-formulas
889
890You can also join salt-formulas-users team and subscribe to mailing list:
891
892 https://launchpad.net/~salt-formulas-users
893
894Developers wishing to work on the salt-formulas projects should always base
895their work on master branch and submit pull request against specific formula.
896
897 https://github.com/salt-formulas/salt-formula-opencontrail
898
899Any questions or feedback is always welcome so feel free to join our IRC
900channel:
901
902 #salt-formulas @ irc.freenode.net