前面咱們詳細討論了 Neutron 架構,包括 Neutron Server,Core 和 Service Agent。如今用兩張圖作個總結。
先看第一張:linux
與 OpenStack 其餘服務同樣,Neutron 採用的是分佈式架構,包括 Neutorn Server、各類 plugin/agent、database 和 message queue。api
Neutron server 接收 api 請求。網絡
plugin/agent 實現請求。架構
database 保存 neutron 網絡狀態。分佈式
message queue 實現組件之間通訊。ide
metadata-agent 以前沒有講到,這裏作個補充:spa
instance 在啓動時須要訪問 nova-metadata-api 服務獲取 metadata 和 userdata,這些 data 是該 instance 的定製化信息,好比 hostname, ip, public key 等。orm
但 instance 啓動時並無 ip,如何可以經過網絡訪問到 nova-metadata-api 服務呢?server
答案就是 neutron-metadata-agentip
該 agent 讓 instance 可以經過 dhcp-agent 或者 l3-agent 與 nova-metadata-api 通訊
若是咱們將 Neutron 架構展開,則會獲得下面第二張圖:
Neutron 經過 plugin 和 agent 提供的網絡服務。
plugin 位於 Neutron server,包括 core plugin 和 service plugin。
agent 位於各個節點,負責實現網絡服務。
core plugin 提供 L2 功能,ML2 是推薦的 plugin。
使用最普遍的 L2 agent 是 linux bridage 和 open vswitch。
service plugin 和 agent 提供擴展功能,包括 dhcp, routing, load balance, firewall, *** 等。
至此,Neutron 架構已經討論完,但願你們已經理解。
下節開始,將經過實驗來實踐架構中的各個組件。
第一步將是準備實驗用的物理環境。