中性子制御ノード

最初のポーリング
メモリ、空き時間の
ディスクは、-h dfを
CPU検出トップ、PS
70のアラーム、80適度なアラーム
メモリはクリアエラーログがいっぱいです
の/ var / mailog /ログイン
スケジュールされたタスクを作成します

检测OpenStackの
systemctlステータスのhttpd | アクティブgrepの
systemctlステータスRabbitMQの-server.serviceを| アクティブgrepの
systemctlステータスmariadbを| アクティブgrepの
systemctlステータスmemcached.serviceを| アクティブgrepし
cluster_status rabbitmqctlを
新星リスト
systemctl状況OpenStackの-一目-registry.service OpenStackの-一目-api.service | grepのアクティブ
新星サービスリスト


展開する前に、環境
zxw6 3枚のカードノード
ルートの@ zxw6〜]#のCAT / etc / sysconfig / network-scriptsに/のifcfg-ens38を
HWADDR = 00:0C:29 :. 5C :. 6C:B2
TYPE =イーサネット
IPV6INIT = NO
NAME = ens38の
UUID 8656cb7b-4b13-377a-be81-796a0b19085c =
ONBOOT = yesの
AUTOCONNECT_PRIORITY = -999

 

 

 

ステップ1:作成中性子データベースとユーザー
[ルート@ zxw6〜]#のMySQL-uroot - P123
データベース中性子を作成します。
* '中性子' @ 'loaclhost'「をby'zxw6 identntifiedへの中性子のすべてを付与し;
中性子のすべてを付与します。 *「%@「中性子は」に 」「by'zxw6識別。


OpenStackのインターフェイスにログオンします


第二步:创建neutron用户
[root@zxw6 ~]# openstack user create --domain default --password=zxw6 neutron
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 0778712d47f844a9ab20cd34e1b9baf0 |
| name | neutron |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+

第三步:在service项目添加neutron用户到admin角色
[root@zxw6 ~]# openstack role add --project service --user neutron admin

第三步:创建项目
[root@zxw6 ~]# openstack service create --name neutron --description "OpenStack Networking" network
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Networking |
| enabled | True |
| id | 84bbbe38ac374ed38acaa1808cc11dbe |
| name | neutron |
| type | network |

第四步:创建服务节点9696

[root@zxw6 ~]# openstack endpoint create --region RegionOne \
network public http://zxw6:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 9117edf4faef4c3f9e606107cb3f2f61 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 84bbbe38ac374ed38acaa1808cc11dbe |
| service_name | neutron |
| service_type | network |
| url | http://zxw6:9696 |


[root@zxw6 ~]# openstack endpoint create --region RegionOne \
network internal http://zxw6:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 4f673d1bd6f74babae231a951068e7e9 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 84bbbe38ac374ed38acaa1808cc11dbe |
| service_name | neutron |
| service_type | network |
| url | http://zxw6:9696 |
+--------------+----------------------------------+

root@zxw6 ~]# openstack endpoint create --region RegionOne network admin http://zxw6:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 161f83bfcbfd46b0874f40abc230b785 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 84bbbe38ac374ed38acaa1808cc11dbe |
| service_name | neutron |
| service_type | network |
| url | http://zxw6:9696 |
+--------------+----------------------------------+


第四步:下载nuetron安装包
[root@zxw6 ~]# yum install openstack-neutron openstack-neutron-ml2 openvswitch openstack-neutron-openvswitch ebtables -y

第五步:修改配置文件
[root@zxw6 ~]# cat /etc/neutron/neutron.conf
[DEFAULT]
state_path = /var/lib/neutron
auth_strategy = keystone
core_plugin = ml2
service_plugins = router
dhcp_agent_notification = true
allow_overlapping_ips = True
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
transport_url = rabbit://openstack:zxw6@zxw6

[agent]

[cors]

[cors.subdomain]

[database]
connection = mysql+pymysql://neutron:zxw6@zxw6/neutron

[keystone_authtoken]
auth_uri = http://zxw6:5000
auth_url = http://zxw6:35357
memcached_servers = zxw6:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = zxw6

[matchmaker_redis]

[nova]
region_name = RegionOne
auth_url = http://zxw6:35357
auth_type = password
project_domain_name = default
project_name = service
user_domain_name = default
username = nova
password = zxw6

[oslo_concurrency]
lock_path = $state_path/lock

[oslo_messaging_amqp]

[oslo_messaging_kafka]

[oslo_messaging_notifications]

[oslo_messaging_rabbit]

[oslo_messaging_zmq]

[oslo_middleware]

[oslo_policy]

[qos]

[quotas]

[ssl]


修改ml2的配置文件
[root@zxw6 ml2]# pwd
/etc/neutron/plugins/ml2
root@zxw6 ml2]# vim ml2_conf.ini

[DEFAULT]
[ml2]
type_drivers = flat,vxlan
tenant_network_types = vxlanmechanism_drivers = openvswitch,l2population
extension_drivers = port_security

[ml2_type_flat]
[ml2_type_geneve]
[ml2_type_gre][ml2_type_vlan]

[ml2_type_vxlan]
vni_ranges = 1:1000

[securitygroup]
enable_ipset = true

修改openvswitch_agent的配置文件
[root@zxw6 ml2]# pwd
/etc/neutron/plugins/ml2

[root@zxw6 ml2]# vim openvswitch_agent.ini

[DEFAULT]
 
[agent]
tunnel_types = vxlan
l2_population = True
 
[ovs]tunnel_bridge = br-tun
local_ip = 192.168.92.135
bridge_mappings =
 
[securitygroup]
firewall_driver = iptables_hybridenable_security_group = true
 
[xenapi]


修改 l3_agent.ini的配置文件
[root@zxw6 neutron]# pwd
/etc/neutron
[root@zxw6 neutron]# vim l3_agent.ini

[DEFAULT]
interface_driver = openvswitch
external_network_bridge = br-ex
 
[agent]
 
[ovs]


修改 dhcp的配置文件
[root@zxw6 neutron]# pwd
/etc/neutron
[root@zxw6 neutron]# vim dhcp_agent.ini

[DEFAULT]
interface_driver = openvswitch
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
 
[agent]
 
[ovs]

修改 metadata_agent的配置文件元数据

[root@zxw6 neutron]# vim metadata_agent.ini

[DEFAULT]
nova_metadata_ip = zxw6
metadata_proxy_shared_secret = METADATA_SECRET
 
[agent]
 
[cache]

第六步:编辑配置文件nova
[root@zxw6 nova]# vim /etc/nova/nova.conf

[neutron]
url = http://zxw6:9696
auth_url = http://zxw6:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = zxw6
service_metadata_proxy = true
metadata_proxy_shared_secret = METADATA_SECRET

 

 

 

 

 


第七步:软连接ml2_conf.ini到plugin.ini
[root@zxw6 nova]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

第八步:导入neutron的数据库
[root@zxw6 ~]# 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


第九步:重启nova_api服务
[root@zxw6 ~]# systemctl restart openstack-nova-api.service

第十步:启动所有服务
[root@zxw6 ~]# systemctl start neutron-server.service neutron-dhcp-agent.service openvswitch neutron-openvswitch-agent neutron-metadata-agent.service

[root@zxw6 ~]# systemctl enable neutron-server.service neutron-dhcp-agent.service openvswitch neutron-openvswitch-agent neutron-metadata-agent.service

[root@zxw6 ~]# systemctl status neutron-server.service neutron-dhcp-agent.service openvswitch neutron-openvswitch-agent neutron-metadata-agent.service | grep active
Active: active (running) since 四 2019-08-01 22:55:24 CST; 1min 33s ago
Active: active (running) since 四 2019-08-01 22:56:56 CST; 1s ago
Active: active (exited) since 四 2019-08-01 22:55:12 CST; 1min 45s ago
Active: active (running) since 四 2019-08-01 22:56:55 CST; 2s ago
Active: active (running) since 四 2019-08-01 22:56:57 CST; 147ms ago

第十一步:创建br-ex的网桥
[root@zxw6 ~]# ovs-vsctl add-br br-ex

[root@zxw6 ~]# ovs-vsctl show
65eb7fce-e6b1-48ce-971f-3192e21103d6
Bridge br-ex
Port br-ex
Interface br-ex
type: internal
ovs_version: "2.9.0"


第十二步:添加ens38到br-ex网桥
[root@zxw6 ~]# ovs-vsctl add-port br-ex ens38
[root@zxw6 ~]# ovs-vsctl show
65eb7fce-e6b1-48ce-971f-3192e21103d6
Bridge br-ex
Port br-ex
Interface br-ex
type: internal
Port "ens38"
Interface "ens38"
ovs_version: "2.9.0"2019-08-14
[root@zxw6 ~]# neutron agent-list
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+------------------------+--------------------+------+-------------------+-------+----------------+-------------------------+
| id | agent_type | host | availability_zone | alive | admin_state_up | binary |
+------------------------+--------------------+------+-------------------+-------+----------------+-------------------------+
| 5e559f85-fabf-4695-a75 | DHCP agent | zxw6 | nova | :-) | True | neutron-dhcp-agent |
| 8-95a605c374e6 | | | | | | |
| 6d9dd18e-bba8-4546-99e | Open vSwitch agent | zxw6 | | :-) | True | neutron-openvswitch- |
| 4-d4cfe27bfea9 | | | | | | agent |
| 98ce7a22-eae1-4727-811 | Metadata agent | zxw6 | | :-) | True | neutron-metadata-agent |
| 4-eed65c1703f3 | | | | | | |
+------------------------+--------------------+------+-------------------+-------+----------------+-------------------------+

第十三步:启动l3-agent服务
[root@zxw6 ~]# systemctl start neutron-l3-agent.service
[root@zxw6 ~]# systemctl enable neutron-l3-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-l3-agent.service to /usr/lib/systemd/system/neutron-l3-agent.service.

 

おすすめ

転載: www.cnblogs.com/itzhao/p/11349729.html