当前位置:网站首页>Openstack explanation (XXIII) -- other configurations, database initialization and service startup of neutron

Openstack explanation (XXIII) -- other configurations, database initialization and service startup of neutron

2022-06-11 09:11:00 Always a teenager

Today I will continue to introduce Linux Operation and maintenance related knowledge , The main content of this paper is Neutron Other configuration 、 Database initialization and service startup .

One 、Neutron Metadata proxy configuration

Above openstack Detailed explanation ( Twenty-two )——Neutron The plug-in configuration in , We finished Neutron Plug-in configuration , today , Let's do it Neutron Metadata proxy configuration for 、 Database initialization and service startup .
open Neutron Metadata proxy configuration file /etc/neutron/metadata_agent.ini, stay [DEFAULT] Under module , We find the following parameters , And change it to the following :

nova_metadata=192.168.136.101
metadata_proxy_shared_secret=neutron

The first configuration indicates that the metadata host is specified , The second configuration indicates that the metadata sharing password is specified , The completed configuration file is as follows :
 Insert picture description here
such , our Neutron The metadata proxy configuration is completed .

Two 、Neutron Network service configuration

At the completion of Neutron After the metadata proxy is configured , Next we need to configure Neutron Network services for , open nova Configuration file for /etc/nova/nova.conf, Among them neutron Add the following to the module :

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

Be careful , In the above configuration , final metadata_proxy_shared_secret Be consistent with the key configured in the previous module .
The completed configuration file is as follows :
 Insert picture description here
after , We need to create a soft link /etc/neutron/plugin.ini, Point to /etc/neutron/plugins/ml2/ml2_conf.ini.
Carry out orders :

ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

You can complete the creation of soft links .
such , our Neutron Your network configuration is complete .

3、 ... and 、Neutron Database initialization

At the completion of Neutron After network configuration of , We can do it Neutron The database of is configured with . Carry out orders :

su -s /bin/sh -c "neutron-db-nanage --config /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head " neutron

The execution result of this command is as follows :
 Insert picture description here
after , We carry out orders :

mysql -h 192.168.136.101 -uneutron -pneutron -e "use neutron;show tables"

View the configuration under the current database , The discovery configuration is as follows :
 Insert picture description here
You can see from the picture above , our Neutron Database initialization service configuration succeeded .
after , We need to restart the calculation API service , Carry out orders :

systemctl restart openstack-nova-api

that will do .

Four 、Neutron Service startup

Last , We're going to start Neutron service , Carry out orders :

systemctl start neutron-server
systemctl start neutron-linuxbridge-agent
systemctl start neutron-dhcp-agent
systemctl start neutron-metadata-agent

Can finish Neutron Start of service , The above command is executed as follows :
 Insert picture description here
Originality is not easy. , Reprint please explain the source :https://blog.csdn.net/weixin_40228200

原网站

版权声明
本文为[Always a teenager]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110857203534.html