Filip Pytloun | 2793040 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1 | ============ |
| 2 | OpenContrail |
| 3 | ============ |
| 4 | |
| 5 | Contrail Controller is an open, standards-based software solution that delivers network virtualization and service automation for federated cloud networks. It provides self-service provisioning, improves network troubleshooting and diagnostics, and enables service chaining for dynamic application environments across enterprise virtual private cloud (VPC), managed Infrastructure as a Service (IaaS), and Networks Functions Virtualization (NFV) use cases. |
| 6 | |
Jiri Konecny | 463dee5 | 2016-03-03 11:08:46 +0100 | [diff] [blame^] | 7 | |
Filip Pytloun | 2793040 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 8 | Sample pillars |
| 9 | ============== |
| 10 | |
Jiri Konecny | 463dee5 | 2016-03-03 11:08:46 +0100 | [diff] [blame^] | 11 | Controller nodes |
| 12 | ---------------- |
| 13 | |
| 14 | There are several scenarios for OpenContrail control plane. |
| 15 | |
| 16 | All-in-one single |
| 17 | ~~~~~~~~~~~~~~~~~ |
| 18 | |
| 19 | Config, control, analytics, database, web -- altogether on one node. |
| 20 | |
| 21 | .. code-block:: yaml |
| 22 | |
| 23 | opencontrail: |
| 24 | common: |
| 25 | version: 2.2 |
| 26 | source: |
| 27 | engine: pkg |
| 28 | address: http://mirror.robotice.cz/contrail-havana/ |
| 29 | identity: |
| 30 | engine: keystone |
| 31 | host: 127.0.0.1 |
| 32 | port: 35357 |
| 33 | token: token |
| 34 | password: password |
| 35 | network: |
| 36 | engine: neutron |
| 37 | host: 127.0.0.1 |
| 38 | port: 9696 |
| 39 | config: |
| 40 | version: 2.2 |
| 41 | enabled: true |
| 42 | network: |
| 43 | engine: neutron |
| 44 | host: 127.0.0.1 |
| 45 | port: 9696 |
| 46 | discovery: |
| 47 | host: 127.0.0.1 |
| 48 | analytics: |
| 49 | host: 127.0.0.1 |
| 50 | bind: |
| 51 | address: 127.0.0.1 |
| 52 | message_queue: |
| 53 | engine: rabbitmq |
| 54 | host: 127.0.0.1 |
| 55 | port: 5672 |
| 56 | database: |
| 57 | members: |
| 58 | - host: 127.0.0.1 |
| 59 | port: 9160 |
| 60 | cache: |
| 61 | host: 127.0.0.1 |
| 62 | identity: |
| 63 | engine: keystone |
| 64 | version: '2.0' |
| 65 | region: RegionOne |
| 66 | host: 127.0.0.1 |
| 67 | port: 35357 |
| 68 | user: admin |
| 69 | password: password |
| 70 | token: token |
| 71 | tenant: admin |
| 72 | members: |
| 73 | - host: 127.0.0.1 |
| 74 | id: 1 |
| 75 | control: |
| 76 | version: 2.2 |
| 77 | enabled: true |
| 78 | bind: |
| 79 | address: 127.0.0.1 |
| 80 | discovery: |
| 81 | host: 127.0.0.1 |
| 82 | master: |
| 83 | host: 127.0.0.1 |
| 84 | members: |
| 85 | - host: 127.0.0.1 |
| 86 | id: 1 |
| 87 | collector: |
| 88 | version: 2.2 |
| 89 | enabled: true |
| 90 | bind: |
| 91 | address: 127.0.0.1 |
| 92 | master: |
| 93 | host: 127.0.0.1 |
| 94 | discovery: |
| 95 | host: 127.0.0.1 |
| 96 | data_ttl: 2 |
| 97 | database: |
| 98 | members: |
| 99 | - host: 127.0.0.1 |
| 100 | port: 9160 |
| 101 | database: |
| 102 | version: 2.2 |
| 103 | cassandra: |
| 104 | version: 2 |
| 105 | enabled: true |
| 106 | minimum_disk: 10 |
| 107 | name: 'Contrail' |
| 108 | original_token: 0 |
| 109 | data_dirs: |
| 110 | - /var/lib/cassandra |
| 111 | id: 1 |
| 112 | discovery: |
| 113 | host: 127.0.0.1 |
| 114 | bind: |
| 115 | host: 127.0.0.1 |
| 116 | port: 9042 |
| 117 | rpc_port: 9160 |
| 118 | members: |
| 119 | - host: 127.0.0.1 |
| 120 | id: 1 |
| 121 | web: |
| 122 | version: 2.2 |
| 123 | enabled: True |
| 124 | bind: |
| 125 | address: 127.0.0.1 |
| 126 | analytics: |
| 127 | host: 127.0.0.1 |
| 128 | master: |
| 129 | host: 127.0.0.1 |
| 130 | cache: |
| 131 | engine: redis |
| 132 | host: 127.0.0.1 |
| 133 | port: 6379 |
| 134 | members: |
| 135 | - host: 127.0.0.1 |
| 136 | id: 1 |
| 137 | identity: |
| 138 | engine: keystone |
| 139 | version: '2.0' |
| 140 | host: 127.0.0.1 |
| 141 | port: 35357 |
| 142 | user: admin |
| 143 | password: password |
| 144 | token: token |
| 145 | tenant: admin |
| 146 | |
| 147 | |
| 148 | All-in-one cluster |
| 149 | ~~~~~~~~~~~~~~~~~~ |
| 150 | |
| 151 | Config, control, analytics, database, web -- altogether, clustered on multiple nodes. |
| 152 | |
| 153 | .. code-block:: yaml |
| 154 | |
| 155 | opencontrail: |
| 156 | common: |
| 157 | version: 2.2 |
| 158 | source: |
| 159 | engine: pkg |
| 160 | address: http://mirror.robotice.cz/contrail-havana/ |
| 161 | identity: |
| 162 | engine: keystone |
| 163 | host: 127.0.0.1 |
| 164 | port: 35357 |
| 165 | token: token |
| 166 | password: password |
| 167 | network: |
| 168 | engine: neutron |
| 169 | host: 127.0.0.1 |
| 170 | port: 9696 |
| 171 | config: |
| 172 | version: 2.2 |
| 173 | enabled: true |
| 174 | network: |
| 175 | engine: neutron |
| 176 | host: 127.0.0.1 |
| 177 | port: 9696 |
| 178 | discovery: |
| 179 | host: 127.0.0.1 |
| 180 | analytics: |
| 181 | host: 127.0.0.1 |
| 182 | bind: |
| 183 | address: 127.0.0.1 |
| 184 | message_queue: |
| 185 | engine: rabbitmq |
| 186 | host: 127.0.0.1 |
| 187 | port: 5672 |
| 188 | database: |
| 189 | members: |
| 190 | - host: 127.0.0.1 |
| 191 | port: 9160 |
| 192 | - host: 127.0.0.1 |
| 193 | port: 9160 |
| 194 | - host: 127.0.0.1 |
| 195 | port: 9160 |
| 196 | cache: |
| 197 | host: 127.0.0.1 |
| 198 | identity: |
| 199 | engine: keystone |
| 200 | version: '2.0' |
| 201 | region: RegionOne |
| 202 | host: 127.0.0.1 |
| 203 | port: 35357 |
| 204 | user: admin |
| 205 | password: password |
| 206 | token: token |
| 207 | tenant: admin |
| 208 | members: |
| 209 | - host: 127.0.0.1 |
| 210 | id: 1 |
| 211 | - host: 127.0.0.1 |
| 212 | id: 2 |
| 213 | - host: 127.0.0.1 |
| 214 | id: 3 |
| 215 | control: |
| 216 | version: 2.2 |
| 217 | enabled: true |
| 218 | bind: |
| 219 | address: 127.0.0.1 |
| 220 | discovery: |
| 221 | host: 127.0.0.1 |
| 222 | master: |
| 223 | host: 127.0.0.1 |
| 224 | members: |
| 225 | - host: 127.0.0.1 |
| 226 | id: 1 |
| 227 | - host: 127.0.0.1 |
| 228 | id: 2 |
| 229 | - host: 127.0.0.1 |
| 230 | id: 3 |
| 231 | collector: |
| 232 | version: 2.2 |
| 233 | enabled: true |
| 234 | bind: |
| 235 | address: 127.0.0.1 |
| 236 | master: |
| 237 | host: 127.0.0.1 |
| 238 | discovery: |
| 239 | host: 127.0.0.1 |
| 240 | data_ttl: 1 |
| 241 | database: |
| 242 | members: |
| 243 | - host: 127.0.0.1 |
| 244 | port: 9160 |
| 245 | - host: 127.0.0.1 |
| 246 | port: 9160 |
| 247 | - host: 127.0.0.1 |
| 248 | port: 9160 |
| 249 | database: |
| 250 | version: 2.2 |
| 251 | cassandra: |
| 252 | version: 2 |
| 253 | enabled: true |
| 254 | name: 'Contrail' |
| 255 | minimum_disk: 10 |
| 256 | original_token: 0 |
| 257 | data_dirs: |
| 258 | - /var/lib/cassandra |
| 259 | id: 1 |
| 260 | discovery: |
| 261 | host: 127.0.0.1 |
| 262 | bind: |
| 263 | host: 127.0.0.1 |
| 264 | port: 9042 |
| 265 | rpc_port: 9160 |
| 266 | members: |
| 267 | - host: 127.0.0.1 |
| 268 | id: 1 |
| 269 | - host: 127.0.0.1 |
| 270 | id: 2 |
| 271 | - host: 127.0.0.1 |
| 272 | id: 3 |
| 273 | web: |
| 274 | version: 2.2 |
| 275 | enabled: True |
| 276 | bind: |
| 277 | address: 127.0.0.1 |
| 278 | master: |
| 279 | host: 127.0.0.1 |
| 280 | analytics: |
| 281 | host: 127.0.0.1 |
| 282 | cache: |
| 283 | engine: redis |
| 284 | host: 127.0.0.1 |
| 285 | port: 6379 |
| 286 | members: |
| 287 | - host: 127.0.0.1 |
| 288 | id: 1 |
| 289 | - host: 127.0.0.1 |
| 290 | id: 2 |
| 291 | - host: 127.0.0.1 |
| 292 | id: 3 |
| 293 | identity: |
| 294 | engine: keystone |
| 295 | version: '2.0' |
| 296 | host: 127.0.0.1 |
| 297 | port: 35357 |
| 298 | user: admin |
| 299 | password: password |
| 300 | token: token |
| 301 | tenant: admin |
| 302 | |
| 303 | |
| 304 | Separated analytics from control and config |
| 305 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 306 | |
| 307 | Config, control, database, web. |
| 308 | |
| 309 | .. code-block:: yaml |
| 310 | |
| 311 | opencontrail: |
| 312 | common: |
| 313 | version: 2.2 |
| 314 | identity: |
| 315 | engine: keystone |
| 316 | host: 127.0.0.1 |
| 317 | port: 35357 |
| 318 | token: token |
| 319 | password: password |
| 320 | network: |
| 321 | engine: neutron |
| 322 | host: 127.0.0.1 |
| 323 | port: 9696 |
| 324 | config: |
| 325 | version: 2.2 |
| 326 | enabled: true |
| 327 | network: |
| 328 | engine: neutron |
| 329 | host: 127.0.0.1 |
| 330 | port: 9696 |
| 331 | discovery: |
| 332 | host: 127.0.0.1 |
| 333 | analytics: |
| 334 | host: 127.0.0.1 |
| 335 | bind: |
| 336 | address: 127.0.0.1 |
| 337 | message_queue: |
| 338 | engine: rabbitmq |
| 339 | host: 127.0.0.1 |
| 340 | port: 5672 |
| 341 | database: |
| 342 | members: |
| 343 | - host: 127.0.0.1 |
| 344 | port: 9160 |
| 345 | - host: 127.0.0.1 |
| 346 | port: 9160 |
| 347 | - host: 127.0.0.1 |
| 348 | port: 9160 |
| 349 | cache: |
| 350 | host: 127.0.0.1 |
| 351 | identity: |
| 352 | engine: keystone |
| 353 | version: '2.0' |
| 354 | region: RegionOne |
| 355 | host: 127.0.0.1 |
| 356 | port: 35357 |
| 357 | user: admin |
| 358 | password: password |
| 359 | token: token |
| 360 | tenant: admin |
| 361 | members: |
| 362 | - host: 127.0.0.1 |
| 363 | id: 1 |
| 364 | - host: 127.0.0.1 |
| 365 | id: 2 |
| 366 | - host: 127.0.0.1 |
| 367 | id: 3 |
| 368 | control: |
| 369 | version: 2.2 |
| 370 | enabled: true |
| 371 | bind: |
| 372 | address: 127.0.0.1 |
| 373 | discovery: |
| 374 | host: 127.0.0.1 |
| 375 | master: |
| 376 | host: 127.0.0.1 |
| 377 | members: |
| 378 | - host: 127.0.0.1 |
| 379 | id: 1 |
| 380 | - host: 127.0.0.1 |
| 381 | id: 2 |
| 382 | - host: 127.0.0.1 |
| 383 | id: 3 |
| 384 | database: |
| 385 | version: 127.0.0.1 |
| 386 | cassandra: |
| 387 | version: 2 |
| 388 | enabled: true |
| 389 | name: 'Contrail' |
| 390 | minimum_disk: 10 |
| 391 | original_token: 0 |
| 392 | data_dirs: |
| 393 | - /var/lib/cassandra |
| 394 | id: 1 |
| 395 | discovery: |
| 396 | host: 127.0.0.1 |
| 397 | bind: |
| 398 | host: 127.0.0.1 |
| 399 | port: 9042 |
| 400 | rpc_port: 9160 |
| 401 | members: |
| 402 | - host: 127.0.0.1 |
| 403 | id: 1 |
| 404 | - host: 127.0.0.1 |
| 405 | id: 2 |
| 406 | - host: 127.0.0.1 |
| 407 | id: 3 |
| 408 | web: |
| 409 | version: 2.2 |
| 410 | enabled: True |
| 411 | bind: |
| 412 | address: 127.0.0.1 |
| 413 | analytics: |
| 414 | host: 127.0.0.1 |
| 415 | master: |
| 416 | host: 127.0.0.1 |
| 417 | cache: |
| 418 | engine: redis |
| 419 | host: 127.0.0.1 |
| 420 | port: 6379 |
| 421 | members: |
| 422 | - host: 127.0.0.1 |
| 423 | id: 1 |
| 424 | - host: 127.0.0.1 |
| 425 | id: 2 |
| 426 | - host: 127.0.0.1 |
| 427 | id: 3 |
| 428 | identity: |
| 429 | engine: keystone |
| 430 | version: '2.0' |
| 431 | host: 127.0.0.1 |
| 432 | port: 35357 |
| 433 | user: admin |
| 434 | password: password |
| 435 | token: token |
| 436 | tenant: admin |
| 437 | |
| 438 | |
| 439 | Analytic nodes |
| 440 | ---------------- |
| 441 | |
| 442 | Analytics and database on an analytic node(s) |
| 443 | |
| 444 | .. code-block:: yaml |
| 445 | |
| 446 | opencontrail: |
| 447 | common: |
| 448 | version: 2.2 |
| 449 | identity: |
| 450 | engine: keystone |
| 451 | host: 127.0.0.1 |
| 452 | port: 35357 |
| 453 | token: token |
| 454 | password: password |
| 455 | network: |
| 456 | engine: neutron |
| 457 | host: 127.0.0.1 |
| 458 | port: 9696 |
| 459 | collector: |
| 460 | version: 2.2 |
| 461 | enabled: true |
| 462 | bind: |
| 463 | address: 127.0.0.1 |
| 464 | master: |
| 465 | host: 127.0.0.1 |
| 466 | discovery: |
| 467 | host: 127.0.0.1 |
| 468 | data_ttl: 1 |
| 469 | database: |
| 470 | members: |
| 471 | - host: 127.0.0.1 |
| 472 | port: 9160 |
| 473 | - host: 127.0.0.1 |
| 474 | port: 9160 |
| 475 | - host: 127.0.0.1 |
| 476 | port: 9160 |
| 477 | database: |
| 478 | version: 2.2 |
| 479 | cassandra: |
| 480 | version: 2 |
| 481 | enabled: true |
| 482 | name: 'Contrail' |
| 483 | minimum_disk: 10 |
| 484 | original_token: 0 |
| 485 | data_dirs: |
| 486 | - /var/lib/cassandra |
| 487 | id: 1 |
| 488 | discovery: |
| 489 | host: 127.0.0.1 |
| 490 | bind: |
| 491 | host: 127.0.0.1 |
| 492 | port: 9042 |
| 493 | rpc_port: 9160 |
| 494 | members: |
| 495 | - host: 127.0.0.1 |
| 496 | id: 1 |
| 497 | - host: 127.0.0.1 |
| 498 | id: 2 |
| 499 | - host: 127.0.0.1 |
| 500 | id: 3 |
| 501 | |
| 502 | |
| 503 | Compute nodes |
| 504 | ---------------- |
| 505 | |
| 506 | Vrouter configuration on a compute node(s) |
| 507 | |
| 508 | .. code-block:: yaml |
| 509 | |
| 510 | opencontrail: |
| 511 | common: |
| 512 | version: 2.2 |
| 513 | identity: |
| 514 | engine: keystone |
| 515 | host: 127.0.0.1 |
| 516 | port: 35357 |
| 517 | token: token |
| 518 | password: password |
| 519 | network: |
| 520 | engine: neutron |
| 521 | host: 127.0.0.1 |
| 522 | port: 9696 |
| 523 | compute: |
| 524 | version: 2.2 |
| 525 | enabled: True |
| 526 | discovery: |
| 527 | host: 127.0.0.1 |
| 528 | interface: |
| 529 | address: 127.0.0.1 |
| 530 | dev: eth0 |
| 531 | gateway: 127.0.0.1 |
| 532 | mask: /24 |
| 533 | dns: 127.0.0.1 |
| 534 | mtu: 9000 |
| 535 | |
| 536 | |
| 537 | |
Jakub Pavlik | 735005f | 2016-02-26 15:54:53 +0100 | [diff] [blame] | 538 | Keystone v3 |
| 539 | ------------- |
| 540 | |
| 541 | To enable support for keystone v3 in opencontrail, there must be defined version for config and web role. |
| 542 | |
| 543 | .. code-block:: yaml |
| 544 | |
| 545 | opencontrail: |
| 546 | config: |
| 547 | version: 2.2 |
| 548 | enabled: true |
| 549 | ... |
| 550 | identity: |
| 551 | engine: keystone |
| 552 | version: '3' |
| 553 | ... |
| 554 | |
| 555 | opencontrail: |
| 556 | web: |
| 557 | version: 2.2 |
| 558 | enabled: true |
| 559 | ... |
| 560 | identity: |
| 561 | engine: keystone |
| 562 | version: '3' |
| 563 | ... |
| 564 | |
Filip Pytloun | 2793040 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 565 | Usage |
| 566 | ===== |
| 567 | |
| 568 | Basic installation |
| 569 | ================== |
| 570 | |
| 571 | Add control BGP |
| 572 | =============== |
| 573 | |
| 574 | 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 |
| 575 | |
| 576 | Compute node installation |
| 577 | ========================= |
| 578 | |
| 579 | .. code-block:: yaml |
| 580 | |
| 581 | yum install contrail-vrouter contrail-openstack-vrouter |
| 582 | |
| 583 | salt-call state.sls nova,opencontrail |
| 584 | |
| 585 | Add virtual router |
| 586 | ================== |
| 587 | |
| 588 | .. code-block:: yaml |
| 589 | |
| 590 | 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 |
| 591 | |
| 592 | /etc/sysconfig/network-scripts/ifcfg-bond0 -- comment GATEWAY,NETMASK,IPADDR |
| 593 | |
| 594 | reboot |
| 595 | |
| 596 | Service debugging |
| 597 | ================= |
| 598 | |
| 599 | Display vhost XMPP connection status |
| 600 | |
| 601 | You should see the correct controller_ip and state should be established. |
| 602 | |
| 603 | http://<compute-node>:8085/Snh_AgentXmppConnectionStatusReq? |
| 604 | |
| 605 | Display vrouter interface status |
| 606 | |
| 607 | When vrf_name = ---ERROR--- then something goes wrong |
| 608 | |
| 609 | http://<compute-node>:8085/Snh_ItfReq?name= |
| 610 | |
| 611 | Display IF MAP table |
| 612 | |
| 613 | Look for neighbours, if VM has 2, it's ok |
| 614 | |
| 615 | http://<control-node>:8083/Snh_IFMapTableShowReq?table_name= |
| 616 | |
| 617 | Trace XMPP requests |
| 618 | |
| 619 | http://<compute-node>:8085/Snh_SandeshTraceRequest?x=XmppMessageTrace |
| 620 | |
| 621 | Read more |
| 622 | ========= |
| 623 | |
| 624 | * http://opencontrail.org |
| 625 | * http://juniper.github.io/contrail-vnc/README.html |
| 626 | * http://www.juniper.net/techpubs/en_US/contrail1.0/information-products/topic-collections/release-notes/index.html |
| 627 | * http://www.juniper.net/support/downloads/?p=contrail#sw |