blob: c0b397e5370cfc64b0acc4b4f1a9fe18bc4a0607 [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:
67 host: 127.0.0.1
68 identity:
69 engine: keystone
70 version: '2.0'
71 region: RegionOne
72 host: 127.0.0.1
73 port: 35357
74 user: admin
75 password: password
76 token: token
77 tenant: admin
78 members:
79 - host: 127.0.0.1
80 id: 1
81 control:
82 version: 2.2
83 enabled: true
84 bind:
85 address: 127.0.0.1
86 discovery:
87 host: 127.0.0.1
88 master:
89 host: 127.0.0.1
90 members:
91 - host: 127.0.0.1
92 id: 1
93 collector:
94 version: 2.2
95 enabled: true
96 bind:
97 address: 127.0.0.1
98 master:
99 host: 127.0.0.1
100 discovery:
101 host: 127.0.0.1
102 data_ttl: 2
103 database:
104 members:
105 - host: 127.0.0.1
106 port: 9160
107 database:
108 version: 2.2
109 cassandra:
110 version: 2
111 enabled: true
112 minimum_disk: 10
113 name: 'Contrail'
114 original_token: 0
115 data_dirs:
116 - /var/lib/cassandra
117 id: 1
118 discovery:
119 host: 127.0.0.1
120 bind:
121 host: 127.0.0.1
122 port: 9042
123 rpc_port: 9160
124 members:
125 - host: 127.0.0.1
126 id: 1
127 web:
128 version: 2.2
129 enabled: True
130 bind:
131 address: 127.0.0.1
132 analytics:
133 host: 127.0.0.1
134 master:
135 host: 127.0.0.1
136 cache:
137 engine: redis
138 host: 127.0.0.1
139 port: 6379
140 members:
141 - host: 127.0.0.1
142 id: 1
143 identity:
144 engine: keystone
145 version: '2.0'
146 host: 127.0.0.1
147 port: 35357
148 user: admin
149 password: password
150 token: token
151 tenant: admin
152
153
154All-in-one cluster
155~~~~~~~~~~~~~~~~~~
156
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200157Config, control, analytics, database, web -- altogether, clustered on multiple
158nodes.
Jiri Konecny463dee52016-03-03 11:08:46 +0100159
160.. code-block:: yaml
161
162 opencontrail:
163 common:
164 version: 2.2
165 source:
166 engine: pkg
167 address: http://mirror.robotice.cz/contrail-havana/
168 identity:
169 engine: keystone
170 host: 127.0.0.1
171 port: 35357
172 token: token
173 password: password
174 network:
175 engine: neutron
176 host: 127.0.0.1
177 port: 9696
178 config:
179 version: 2.2
180 enabled: true
181 network:
182 engine: neutron
183 host: 127.0.0.1
184 port: 9696
185 discovery:
186 host: 127.0.0.1
187 analytics:
188 host: 127.0.0.1
189 bind:
190 address: 127.0.0.1
191 message_queue:
192 engine: rabbitmq
193 host: 127.0.0.1
194 port: 5672
195 database:
196 members:
197 - host: 127.0.0.1
198 port: 9160
199 - host: 127.0.0.1
200 port: 9160
201 - host: 127.0.0.1
202 port: 9160
203 cache:
204 host: 127.0.0.1
205 identity:
206 engine: keystone
207 version: '2.0'
208 region: RegionOne
209 host: 127.0.0.1
210 port: 35357
211 user: admin
212 password: password
213 token: token
214 tenant: admin
215 members:
216 - host: 127.0.0.1
217 id: 1
218 - host: 127.0.0.1
219 id: 2
220 - host: 127.0.0.1
221 id: 3
222 control:
223 version: 2.2
224 enabled: true
225 bind:
226 address: 127.0.0.1
227 discovery:
228 host: 127.0.0.1
229 master:
230 host: 127.0.0.1
231 members:
232 - host: 127.0.0.1
233 id: 1
234 - host: 127.0.0.1
235 id: 2
236 - host: 127.0.0.1
237 id: 3
238 collector:
239 version: 2.2
240 enabled: true
241 bind:
242 address: 127.0.0.1
243 master:
244 host: 127.0.0.1
245 discovery:
246 host: 127.0.0.1
247 data_ttl: 1
248 database:
249 members:
250 - host: 127.0.0.1
251 port: 9160
252 - host: 127.0.0.1
253 port: 9160
254 - host: 127.0.0.1
255 port: 9160
256 database:
257 version: 2.2
258 cassandra:
259 version: 2
260 enabled: true
261 name: 'Contrail'
262 minimum_disk: 10
263 original_token: 0
264 data_dirs:
265 - /var/lib/cassandra
266 id: 1
267 discovery:
268 host: 127.0.0.1
269 bind:
270 host: 127.0.0.1
271 port: 9042
272 rpc_port: 9160
273 members:
274 - host: 127.0.0.1
275 id: 1
276 - host: 127.0.0.1
277 id: 2
278 - host: 127.0.0.1
279 id: 3
280 web:
281 version: 2.2
282 enabled: True
283 bind:
284 address: 127.0.0.1
285 master:
286 host: 127.0.0.1
287 analytics:
288 host: 127.0.0.1
289 cache:
290 engine: redis
291 host: 127.0.0.1
292 port: 6379
293 members:
294 - host: 127.0.0.1
295 id: 1
296 - host: 127.0.0.1
297 id: 2
298 - host: 127.0.0.1
299 id: 3
300 identity:
301 engine: keystone
302 version: '2.0'
303 host: 127.0.0.1
304 port: 35357
305 user: admin
306 password: password
307 token: token
308 tenant: admin
309
310
311Separated analytics from control and config
312~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
313
314Config, control, database, web.
315
316.. code-block:: yaml
317
318 opencontrail:
319 common:
320 version: 2.2
321 identity:
322 engine: keystone
323 host: 127.0.0.1
324 port: 35357
325 token: token
326 password: password
327 network:
328 engine: neutron
329 host: 127.0.0.1
330 port: 9696
331 config:
332 version: 2.2
333 enabled: true
334 network:
335 engine: neutron
336 host: 127.0.0.1
337 port: 9696
338 discovery:
339 host: 127.0.0.1
340 analytics:
341 host: 127.0.0.1
342 bind:
343 address: 127.0.0.1
344 message_queue:
345 engine: rabbitmq
346 host: 127.0.0.1
347 port: 5672
348 database:
349 members:
350 - host: 127.0.0.1
351 port: 9160
352 - host: 127.0.0.1
353 port: 9160
354 - host: 127.0.0.1
355 port: 9160
356 cache:
357 host: 127.0.0.1
358 identity:
359 engine: keystone
360 version: '2.0'
361 region: RegionOne
362 host: 127.0.0.1
363 port: 35357
364 user: admin
365 password: password
366 token: token
367 tenant: admin
368 members:
369 - host: 127.0.0.1
370 id: 1
371 - host: 127.0.0.1
372 id: 2
373 - host: 127.0.0.1
374 id: 3
375 control:
376 version: 2.2
377 enabled: true
378 bind:
379 address: 127.0.0.1
380 discovery:
381 host: 127.0.0.1
382 master:
383 host: 127.0.0.1
384 members:
385 - host: 127.0.0.1
386 id: 1
387 - host: 127.0.0.1
388 id: 2
389 - host: 127.0.0.1
390 id: 3
391 database:
392 version: 127.0.0.1
393 cassandra:
394 version: 2
395 enabled: true
396 name: 'Contrail'
397 minimum_disk: 10
398 original_token: 0
399 data_dirs:
400 - /var/lib/cassandra
401 id: 1
402 discovery:
403 host: 127.0.0.1
404 bind:
405 host: 127.0.0.1
406 port: 9042
407 rpc_port: 9160
408 members:
409 - host: 127.0.0.1
410 id: 1
411 - host: 127.0.0.1
412 id: 2
413 - host: 127.0.0.1
414 id: 3
415 web:
416 version: 2.2
417 enabled: True
418 bind:
419 address: 127.0.0.1
420 analytics:
421 host: 127.0.0.1
422 master:
423 host: 127.0.0.1
424 cache:
425 engine: redis
426 host: 127.0.0.1
427 port: 6379
428 members:
429 - host: 127.0.0.1
430 id: 1
431 - host: 127.0.0.1
432 id: 2
433 - host: 127.0.0.1
434 id: 3
435 identity:
436 engine: keystone
437 version: '2.0'
438 host: 127.0.0.1
439 port: 35357
440 user: admin
441 password: password
442 token: token
443 tenant: admin
444
445
446Analytic nodes
447----------------
448
449Analytics and database on an analytic node(s)
450
451.. code-block:: yaml
452
453 opencontrail:
454 common:
455 version: 2.2
456 identity:
457 engine: keystone
458 host: 127.0.0.1
459 port: 35357
460 token: token
461 password: password
462 network:
463 engine: neutron
464 host: 127.0.0.1
465 port: 9696
466 collector:
467 version: 2.2
468 enabled: true
469 bind:
470 address: 127.0.0.1
471 master:
472 host: 127.0.0.1
473 discovery:
474 host: 127.0.0.1
475 data_ttl: 1
476 database:
477 members:
478 - host: 127.0.0.1
479 port: 9160
480 - host: 127.0.0.1
481 port: 9160
482 - host: 127.0.0.1
483 port: 9160
484 database:
485 version: 2.2
486 cassandra:
487 version: 2
488 enabled: true
489 name: 'Contrail'
490 minimum_disk: 10
491 original_token: 0
492 data_dirs:
493 - /var/lib/cassandra
494 id: 1
495 discovery:
496 host: 127.0.0.1
497 bind:
498 host: 127.0.0.1
499 port: 9042
500 rpc_port: 9160
501 members:
502 - host: 127.0.0.1
503 id: 1
504 - host: 127.0.0.1
505 id: 2
506 - host: 127.0.0.1
507 id: 3
508
509
510Compute nodes
511----------------
512
513Vrouter configuration on a compute node(s)
514
515.. code-block:: yaml
516
517 opencontrail:
518 common:
519 version: 2.2
520 identity:
521 engine: keystone
522 host: 127.0.0.1
523 port: 35357
524 token: token
525 password: password
526 network:
527 engine: neutron
528 host: 127.0.0.1
529 port: 9696
530 compute:
531 version: 2.2
532 enabled: True
533 discovery:
534 host: 127.0.0.1
535 interface:
536 address: 127.0.0.1
537 dev: eth0
538 gateway: 127.0.0.1
539 mask: /24
540 dns: 127.0.0.1
541 mtu: 9000
542
Jakub Pavlik735005f2016-02-26 15:54:53 +0100543Keystone v3
544-------------
545
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200546To enable support for keystone v3 in opencontrail, there must be defined
547version for config and web role.
Jakub Pavlik735005f2016-02-26 15:54:53 +0100548
549.. code-block:: yaml
550
551 opencontrail:
552 config:
553 version: 2.2
554 enabled: true
555 ...
556 identity:
557 engine: keystone
558 version: '3'
559 ...
560
561 opencontrail:
562 web:
563 version: 2.2
564 enabled: true
565 ...
566 identity:
567 engine: keystone
568 version: '3'
569 ...
570
marco10cc2212016-04-03 14:21:54 +0200571Without Keystone
572----------------
573
574.. code-block:: yaml
575
576 opencontrail:
577 ...
578 common:
579 ...
580 identity:
581 engine: none
582 token: none
583 password: none
584 ...
585 config:
586 ...
587 identity:
588 engine: none
589 password: none
590 token: none
591 ...
592 web:
593 ...
594 identity:
595 engine: none
596 password: none
597 token: none
598 ...
marcof5461712016-04-04 20:49:36 +0200599
600Kubernetes vrouter nodes
601------------------------
602
603Vrouter configuration on a kubernetes node(s)
604
605.. code-block:: yaml
606
607 opencontrail:
608 ...
609 compute:
610 engine: kubernetes
611 ...
612
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200613Disable Contrail API authentication
614-----------------------------------
615
616Contrail version must >=3.0. It is useful especially for Keystone v3.
617
618.. code-block:: yaml
619
620 opencontrail:
621 ...
622 config:
623 multi_tenancy: false
624 ...
625
marco2502e052016-05-31 22:53:54 +0200626Cassandra listen interface
627------------------------------
628
629.. code-block:: yaml
630
631 database:
632 ....
633 bind:
634 interface: eth0
635 port: 9042
636 rpc_port: 9160
637 ....
Jakub Pavlik6d90f362016-04-19 20:34:37 +0200638
Filip Pytloun27930402015-10-06 16:28:32 +0200639Usage
640=====
641
642Basic installation
643==================
644
645Add control BGP
646===============
647
648 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
649
650Compute node installation
651=========================
652
653.. code-block:: yaml
654
655 yum install contrail-vrouter contrail-openstack-vrouter
656
657 salt-call state.sls nova,opencontrail
658
659Add virtual router
660==================
661
662.. code-block:: yaml
663
664 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
665
666 /etc/sysconfig/network-scripts/ifcfg-bond0 -- comment GATEWAY,NETMASK,IPADDR
667
668 reboot
669
670Service debugging
671=================
672
673Display vhost XMPP connection status
674
675You should see the correct controller_ip and state should be established.
676
677 http://<compute-node>:8085/Snh_AgentXmppConnectionStatusReq?
678
679Display vrouter interface status
680
681When vrf_name = ---ERROR--- then something goes wrong
682
683 http://<compute-node>:8085/Snh_ItfReq?name=
684
685Display IF MAP table
686
687Look for neighbours, if VM has 2, it's ok
688
689 http://<control-node>:8083/Snh_IFMapTableShowReq?table_name=
690
691Trace XMPP requests
692
693 http://<compute-node>:8085/Snh_SandeshTraceRequest?x=XmppMessageTrace
694
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200695Documentation and Bugs
696============================
Filip Pytloun27930402015-10-06 16:28:32 +0200697
Jakub Pavlik01fe5372016-05-20 11:23:28 +0200698To learn how to deploy OpenStack Salt, consult the documentation available
699online at:
700
701 https://wiki.openstack.org/wiki/OpenStackSalt
702
703In the unfortunate event that bugs are discovered, they should be reported to
704the appropriate bug tracker. If you obtained the software from a 3rd party
705operating system vendor, it is often wise to use their own bug tracker for
706reporting problems. In all other cases use the master OpenStack bug tracker,
707available at:
708
709 http://bugs.launchpad.net/openstack-salt
710
711Developers wishing to work on the OpenStack Salt project should always base
712their work on the latest formulas code, available from the master GIT
713repository at:
714
715 https://git.openstack.org/cgit/openstack/salt-formula-opencontrail
716
717Developers should also join the discussion on the IRC list, at:
718
719 https://wiki.openstack.org/wiki/Meetings/openstack-salt