commication framework in openstack

22
Communication Framework in OpenStack Sean Chang 2014/12

Upload: sean-chang

Post on 16-Apr-2017

280 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Commication Framework in OpenStack

Communication Framework in

OpenStack

Sean Chang2014/12

Page 2: Commication Framework in OpenStack

Overview of OpenStack commnication

My OpenStack environmentOpenStack communication architectureAMQP

RabbitMQkombuHow to debug

Page 3: Commication Framework in OpenStack

Three nodes for OpenStackNodes(mgm. ip)

control(10.10.10.21)NTP, RabbitMQ, MySQL,

Keystone, Glance, Neutron, Nova, Cinder, Heat, and Horizon

network(10.10.10.22)NTP and Neutron

compute(10.10.10.23)NTP, Nova, and Neutron

Page 4: Commication Framework in OpenStack

Communication Flow

Page 5: Commication Framework in OpenStack

Neutron

Messaging in Openstack using RabbitMQ ( Queue–server)

Page 6: Commication Framework in OpenStack

AMQP

Page 7: Commication Framework in OpenStack

MQ supportSupporting list

RabbitMQ(default in JUNO)QpidZeroMQ(non-AMQP)

Page 8: Commication Framework in OpenStack

●The Advanced Message Queuing Protocol (AMQP) is an open standard for passing business messages between applications or organizations.

● AMQP was designed with the following main characteristics as goals:○ Security○ Reliability○ Interoperability○ Standard○ Open

AMQP

Page 9: Commication Framework in OpenStack

AMQP Product and Success StoriesA standard is no use without products, and there are is a choice of excellent AMQP technology suppliers.

Apache Qpid, an Apache project

Microsoft's Windows Azure Service BusJBoss A-MQ by Red Hat built from QpidStormMQ a cloud hosted messaging service based on AMQPVMware Inc RabbitMQ; also supported by SpringSource...

OpenStackOpenStack is an open-source initiative that provides a massively scalable cloud

operating system and uses RabbitMQ for messaging.

Page 10: Commication Framework in OpenStack

Why does OpenStack use AMQP

Consider design and scalabilityLoose coupling between client and server sideAsynchronize is availableLoad balance could be inactive

Page 11: Commication Framework in OpenStack

RabbitMQYou may be thinking of data delivery, non-blocking operations or push

notifications. Or you want to use publish / subscribe, asynchronous processing, or work queues. All these are patterns, and they form part of messaging.

RabbitMQ is a messaging broker - an intermediary for messaging. It gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.

Page 12: Commication Framework in OpenStack

kombu

kombu - Messaging library for PythonKombu is a messaging library for Python.

The aim of Kombu is to make messaging in Python as easy as possible by providing an

idiomatic high-level interface for the AMQ protocol, and also provide proven and tested

solutions to common messaging problems.

AMQP is the Advanced Message Queuing Protocol, an open standard protocol for message

orientation, queuing, routing, reliability and security, for which the RabbitMQmessaging

server is the most popular implementation.

Page 13: Commication Framework in OpenStack

重點提要雖然網路上有關

AMQP、 RabbitMQ、 kombu的資料不計其數,但真正 OpenStack在實作上應用範圍看下面幾頁就夠了了解太多反而會失去方向

Page 14: Commication Framework in OpenStack

The internals elements of a message broker node

Page 15: Commication Framework in OpenStack

Internals elements relationshipProducers

Producers sends messages to an exchange.Exchanges

Messages are sent to exchanges. Exchanges are named and can be configured to use one of several routing algorithms. The exchange routes the messages to consumers by matching the routing key in the message with the routing key the consumer provides when binding to the exchange.

ConsumersConsumers declares a queue, binds it to a exchange and receives messages

from it.Queues

Queues receive messages sent to exchanges. The queues are declared by consumers.

Page 16: Commication Framework in OpenStack

Routing keysEvery message has a routing key. The interpretation of the routing key depends on the exchange type.

There are four default exchange types defined by the AMQP standard, and vendors can define custom types (so see your vendors manual for details).

These are the default exchange types defined by AMQP/0.8:Direct exchange

Matches if the routing key property of the message and the routing_key attribute of the consumer are identical.

Fan-out exchangeAlways matches, even if the binding does not have a routing key.

Topic exchangeMatches the routing key property of the message by a primitive pattern matching scheme. The

message routing key then consists of words separated by dots (”.”, like domain names), and two special characters are available; star (“*”) and hash (“#”). The star matches any word, and the hash matches zero or more words. For example “*.stock.#” matches the routing keys “usd.stock” and “eur.stock.db” but not “stock.nasdaq”.

The exchange types(define by AMQP)

Page 17: Commication Framework in OpenStack

RPC Casts

Page 18: Commication Framework in OpenStack

RPC Calls

Page 19: Commication Framework in OpenStack

How to debugcommand line

rabbitmqctl [-n node] [-q] {command} [command options...]

Page 20: Commication Framework in OpenStack

How to debugManagement Plugin

The rabbitmq-management plugin provides an HTTP-based API for management and monitoring of your RabbitMQ server, along with a browser-based UI and a command line tool, rabbitmqadmin.

Web UIhttp://server-name:15672/default account/passwd:

guest/guest

Page 21: Commication Framework in OpenStack

心得docs.openstack.org就是很好的學習出發點,不管是整體概念、系統架構、設計說明、程式碼說明;其他資料如 lib docs、網路文件、甚至是 openstack source code當作真的看不懂再去找就可以,避免繞遠路。小心見林不見樹、見樹不見林

Page 22: Commication Framework in OpenStack

Q & A