blob: 243234f0456d7001c91831c3cf657e2d7de142be [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
Filip Pytloun27930402015-10-06 16:28:32 +0200666Usage
667=====
668
669Basic installation
670==================
671
672Add control BGP
673===============
674
675 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
676
677Compute node installation
678=========================
679
680.. code-block:: yaml
681
682 yum install contrail-vrouter contrail-openstack-vrouter
683
684 salt-call state.sls nova,opencontrail
685
686Add virtual router
687==================
688
689.. code-block:: yaml
690
691 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
692
693 /etc/sysconfig/network-scripts/ifcfg-bond0 -- comment GATEWAY,NETMASK,IPADDR
694
695 reboot
696
697Service debugging
698=================
699
700Display vhost XMPP connection status
701
702You should see the correct controller_ip and state should be established.
703
704 http://<compute-node>:8085/Snh_AgentXmppConnectionStatusReq?
705
706Display vrouter interface status
707
708When vrf_name = ---ERROR--- then something goes wrong
709
710 http://<compute-node>:8085/Snh_ItfReq?name=
711
712Display IF MAP table
713
714Look for neighbours, if VM has 2, it's ok
715
716 http://<control-node>:8083/Snh_IFMapTableShowReq?table_name=
717
718Trace XMPP requests
719
720 http://<compute-node>:8085/Snh_SandeshTraceRequest?x=XmppMessageTrace
721
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200722Documentation and Bugs
723============================
Filip Pytloun27930402015-10-06 16:28:32 +0200724
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200725To learn how to deploy OpenStack Salt, consult the documentation available
726online at:
727
728 https://wiki.openstack.org/wiki/OpenStackSalt
729
730In the unfortunate event that bugs are discovered, they should be reported to
731the appropriate bug tracker. If you obtained the software from a 3rd party
732operating system vendor, it is often wise to use their own bug tracker for
733reporting problems. In all other cases use the master OpenStack bug tracker,
734available at:
735
736 http://bugs.launchpad.net/openstack-salt
737
738Developers wishing to work on the OpenStack Salt project should always base
739their work on the latest formulas code, available from the master GIT
740repository at:
741
742 https://git.openstack.org/cgit/openstack/salt-formula-opencontrail
743
744Developers should also join the discussion on the IRC list, at:
745
746 https://wiki.openstack.org/wiki/Meetings/openstack-salt