您好,登錄后才能下訂單哦!
??OpenStack網(wǎng)絡(luò)(neutron)允許您創(chuàng)建并將其他OpenStack服務(wù)管理的接口設(shè)備附加到網(wǎng)絡(luò)上??梢詫?shí)現(xiàn)插件來適應(yīng)不同的網(wǎng)絡(luò)設(shè)備和軟件,從而為OpenStack體系結(jié)構(gòu)和部署提供靈活性。
??它包括以下組成部分:
Messaging queue
大多數(shù)OpenStack網(wǎng)絡(luò)安裝都使用它在neutron-server和各種代理之間路由信息。還充當(dāng)數(shù)據(jù)庫,存儲(chǔ)特定插件的網(wǎng)絡(luò)狀態(tài)。
Before you configure the OpenStack Networking (neutron) service, you must create a database, service credentials, and API endpoints.
○ Use the database access client to connect to the database server as the root user:
$ mysql -u root -p root123
○ Create the neutron database:
MariaDB [keystone]> CREATE DATABASE neutron;
○ Grant proper access to the neutron database, replacing NEUTRON_DBPASS with a suitable password:
MariaDB [keystone]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'neutron123';
$ . admin-openrc
To create the service credentials, complete these steps:
○ Create the neutron user:
$ openstack user create --domain default --password-prompt neutron
User Password:neutron123
Repeat User Password:neutron123
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | fdb0f541e28141719b6a43c8944bf1fb |
| name | neutron |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
○ Add the admin role to the neutron user:
$ openstack role add --project service --user neutron admin
?
Note: This command provides no output.
○ Create the neutron service entity:
$ openstack service create --name neutron --description "OpenStack Networking" network
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Networking |
| enabled | True |
| id | f71529314dab4a4d8eca427e701d209e |
| name | neutron |
| type | network |
+-------------+----------------------------------+
#openstack endpoint create --region RegionOne network public http://stack.flex.net:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 85d80a6d02fc4b7683f611d7fc1493a3 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | f71529314dab4a4d8eca427e701d209e |
| service_name | neutron |
| service_type | network |
| url | http://stack.flex.net:9696 |
+--------------+----------------------------------+
#openstack endpoint create --region RegionOne network internal http://stack.flex.net:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 09753b537ac74422a68d2d791cf3714f |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | f71529314dab4a4d8eca427e701d209e |
| service_name | neutron |
| service_type | network |
| url | http://stack.flex.net:9696 |
+--------------+----------------------------------+
#openstack endpoint create --region RegionOne network admin http://stack.flex.net:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 1ee14289c9374dffb5db92a5c112fc4e |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | f71529314dab4a4d8eca427e701d209e |
| service_name | neutron |
| service_type | network |
| url | http://stack.flex.net:9696 |
+--------------+----------------------------------+
#### Configure networking options
可以使用選項(xiàng)1和選項(xiàng)2表示的兩種體系結(jié)構(gòu)中的一種部署網(wǎng)絡(luò)服務(wù)。
選項(xiàng)1部署了最簡單的體系結(jié)構(gòu),它只支持將實(shí)例附加到provider(external)網(wǎng)絡(luò)。沒有self-service(private)網(wǎng)絡(luò)、路由器或浮動(dòng)IP地址。只有管理員或其他特權(quán)用戶才能管理provider網(wǎng)絡(luò)。
選項(xiàng)2支持將實(shí)例附加到自助服務(wù)網(wǎng)絡(luò)的3層服務(wù)來增強(qiáng)選項(xiàng)1。demo或其他無特權(quán)用戶可以管理自助服務(wù)網(wǎng)絡(luò),包括在自助服務(wù)網(wǎng)絡(luò)和提供者網(wǎng)絡(luò)之間提供連接的路由器。此外,浮動(dòng)IP地址使用來自外部網(wǎng)絡(luò)(如Internet)的自助服務(wù)網(wǎng)絡(luò)提供到實(shí)例的連接。
自服務(wù)網(wǎng)絡(luò)通常使用overlay網(wǎng)絡(luò)。overlay網(wǎng)絡(luò)協(xié)議如vxlan包括額外的頭部信息,這些頭文件增加了開銷,減少了有效負(fù)載或用戶數(shù)據(jù)可用的空間。在不了解虛擬網(wǎng)絡(luò)基礎(chǔ)設(shè)施的情況下,實(shí)例嘗試使用默認(rèn)的1500字節(jié)以太網(wǎng)最大傳輸單元(MTU)發(fā)送數(shù)據(jù)包。網(wǎng)絡(luò)服務(wù)通過DHCP自動(dòng)向?qū)嵗峁┱_的MTU值。但是,有些云鏡像不使用DHCP或忽略DHCP MTU選項(xiàng),需要使用元數(shù)據(jù)或腳本進(jìn)行配置。
選擇下列網(wǎng)絡(luò)選項(xiàng)中的一個(gè),或兩個(gè)全選,參看下面的兩個(gè)章節(jié)。并返回這里再向下繼續(xù)配置
○ Networking Option 1: Provider networks
○ Networking Option 2: Self-service networks
The metadata agent provides configuration information such as credentials to instances.
Edit the /etc/neutron/metadata_agent.ini file and complete the following actions:
○ In the [DEFAULT] section, configure the metadata host and shared secret:
[DEFAULT]
# ...
nova_metadata_host = stack.flex.net
metadata_proxy_shared_secret = 1234
Replace METADATA_SECRET with a suitable secret for the metadata proxy.
Note: The Nova compute service must be installed to complete this step.
Edit the /etc/nova/nova.conf file and perform the following actions:
○ In the [neutron] section, configure access parameters, enable the metadata proxy, and configure the secret:
[neutron]
# ...
url = http://stack.flex.net:9696
auth_url = http://stack.flex.net:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron123
service_metadata_proxy = true
metadata_proxy_shared_secret = 1234
# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
注意:由于腳本需要完整的服務(wù)器和插件配置文件,數(shù)據(jù)庫填充將在稍后用于網(wǎng)絡(luò)。?
# systemctl restart openstack-nova-api.service
For both networking options:
# systemctl enable neutron-server.service \
neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service
# systemctl start neutron-server.service \
neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service
For networking option 2, also enable and start the layer-3 service:
# systemctl enable neutron-l3-agent.service
# systemctl start neutron-l3-agent.service
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。