centos7---openstack 3.14.3管理平台安装

准备工作:
控制节点:10.1.1.101
计算节点:10.1.1.102

#openstack版本
[root@openstack-102 neutron]# openstack --version
openstack 3.14.3
#centos系统版本
[root@openstack-102 neutron]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 

1、keystone认证服务(认证和服务目录两大功能)
安装keystone

[root@openstack-101 ~]# yum install openstack-keystone httpd mod_wsgi

1-1、配置修改/etc/keystone/keystone.conf

[root@openstack-101 ~]# egrep -v '^#|^$' /etc/keystone/keystone.conf 
# admin_token登录秘钥
#注意:可以用openssl rand -hex 10随机生成10位数字密码,更安全
[DEFAULT]
admin_token = 3fee36e1150546aca312
#配置数据库连接
[database]
connection = mysql+pymysql://keystone:keystone@10.1.1.101/keystone
#配置缓存服务器地址
[memcache]
servers = 10.1.1.101:11211
driver = memcache
#配置token类型
[token]
provider = fernet

1-2、数据库同步
#注意:最好是在配置完连接数据库后就同步数据库

[root@openstack-101 ~]# su -s /bin/sh -c "keystone-manage db_sync" keystone

1-3、初始化Fernet keys

[root@openstack-101 ~]# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone

1-4、配置Apache响应服务器
1)修改/etc/httpd/conf/httpd.conf

[root@openstack-101 ~]# vim /etc/httpd/httpd.conf
ServerName 10.1.1.101:80

2)修改创建/etc/httpd/conf.d/wsgi-keystone.conf

[root@openstack-101 ~]# cat /etc/httpd/conf.d/wsgi-keystone.conf
Listen 5000
Listen 35357
<VirtualHost *:5000>
    WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
    WSGIProcessGroup keystone-public
    WSGIScriptAlias / /usr/bin/keystone-wsgi-public
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    ErrorLogFormat "%{cu}t %M"
    ErrorLog /var/log/httpd/keystone-error.log
    CustomLog /var/log/httpd/keystone-access.log combined
    <Directory /usr/bin>
        Require all granted
    </Directory>
</VirtualHost>
<VirtualHost *:35357>
    WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
    WSGIProcessGroup keystone-admin
    WSGIScriptAlias / /usr/bin/keystone-wsgi-admin
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    ErrorLogFormat "%{cu}t %M"
    ErrorLog /var/log/httpd/keystone-error.log
    CustomLog /var/log/httpd/keystone-access.log combined
    <Directory /usr/bin>
        Require all granted
    </Directory>
</VirtualHost>

3)启动Apache服务

[root@openstack-101 ~]# systemctl enable httpd.service
[root@openstack-101 ~]# systemctl start httpd.service

1-5、创建服务实体和身份认证服务并授权
#注意:OpenStack使用三个API端点变种代表每种服务:admin,internal和public,默认情况下,身份认证服务数据库不包含支持传统认证和目录服务的信息。你必须使用:doc:keystone-install 章节中为身份认证服务创建的临时身份验证令牌用来初始化的服务实体和API端点。
你必须使用–os-token参数将认证令牌的值传递给:command:openstack 命令。类似的,你必须使用–os-url 参数将身份认证服务的 URL传递给 openstack 命令或者设置OS_URL环境变量。本指南使用环境变量以缩短命令行的长度。
1)配置环境变量

配置认证令牌
export OS_TOKEN=3fee36e1150546aca312
配置端点URL
export OS_URL=http://10.1.1.101:35357/v3
配置认证 API 版本
export OS_IDENTITY_API_VERSION=3

2)可以用脚本代替(以admin用户密码为admin用户创建服务)

[root@openstack-101 ~]# cat admin-openstack.sh 
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_AUTH_URL=http://10.1.1.101:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2

3)创建服务实体和身份认证服务并授权

[root@openstack-101 ~]# openstack service create --name keystone --description "OpenStack Identity" identity

解释:
Service:项目
–name keystone:
-description:描述内容

[root@openstack-101 ~]# openstack endpoint create --region RegionOne identity public http://10.1.1.101:5000/v3
[root@openstack-101 ~]# openstack endpoint create --region RegionOne identity admin http://10.1.1.101:35357/v3  ##注意keystone的admin端口是35357
[root@openstack-101 ~]# openstack endpoint create --region RegionOne identity internal http://10.1.1.101:5000/v3

2、RabbitMQ列队
2-1、安装RabbitMQ

[root@openstack-101 ~]# yum install -y rabbitmq-server

2-2、启动消息队列服务并将其配置为随系统启动

[root@openstack-101 ~]# systemctl enable rabbitmq-server.service
[root@openstack-101 ~]# systemctl start rabbitmq-server.service 

2-3、添加 openstack 用户

[root@openstack-101 ~]# rabbitmqctl add_user openstack RABBIT_PASS
RABBIT_PASS这是密码我们用openstack代替

2-4、给openstack用户配置写和读权限

[root@openstack-101 ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"

3、memcache缓存
3-1、安装memcache缓存

[root@openstack-101 ~]# yum install memcached python-memcached

3-2、启动memcache

[root@openstack-101 ~]# systemctl enable memcached.service
[root@openstack-101 ~]# systemctl start memcached.service

4、glance镜像服务
4-1、安装glance

[root@openstack-101 ~]# yum install openstack-glance

4-2、修改etc/glance/glance-api.conf

[root@openstack-101 ~]# egrep -v '^#|^$' /etc/glance/glance-api.conf 
#配置数据库连接
[database]
connection = mysql+pymysql://glance:glance@10.1.1.101/glance
#配置本地文件系统存储和镜像文件位置(配置镜像存储路径)
[glance_store]
filesystem_store_datadir = /var/lib/glance/images/
stores = file,http
default_store = file
#配置keystone认证
[keystone_authtoken]
auth_uri = http://10.1.1.101:5000
auth_url = http://10.1.1.101:35357
memcached_servers = 10.1.1.101:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = glance
[paste_deploy]
flavor = keystone  ##开启keystone认证

4-3、修改/etc/glance/glance-registry.conf

[root@openstack-101 ~]# egrep -v '^#|^$' /etc/glance/glance-registry.conf
#配置数据库连接
[database]
connection = mysql+pymysql://glance:glance@10.1.1.101/glance
#配置keystone认证
[keystone_authtoken]
auth_uri = http://10.1.1.101:5000
auth_url = http://10.1.1.101:35357
memcached_servers = 10.1.1.101:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = glance
[paste_deploy]
flavor = keystone  ##开启keystone认证

4-4、写入镜像服务数据库

[root@openstack-101 ~]# su -s /bin/sh -c "glance-manage db_sync" glance

4-5、启动镜像服务、配置他们随机启动

[root@openstack-101 ~]# systemctl enable openstack-glance-api.service openstack-glance-registry.service
[root@openstack-101 ~]# systemctl start openstack-glance-api.service openstack-glance-registry.service

4-6、创建glance服务实体

[root@openstack-101 ~]# openstack service create --name glance   --description "OpenStack Image" image
4-6-1、创建镜像服务的 API 端点
[root@openstack-101 ~]# openstack endpoint create --region RegionOne image public http://10.1.1.101:9292
[root@openstack-101 ~]# openstack endpoint create --region RegionOne image internal http://10.1.1.101:9292
[root@openstack-101 ~]# openstack endpoint create --region RegionOne image admin http://10.1.1.101:9292

4-7、上传镜像

[root@openstack-101 ~]# rz
cirros-0.3.4-x86_64-disk.img
[root@openstack-101 ~]# openstack image create "cirros"   --file cirros-0.3.4-x86_64-disk.img   --disk-format qcow2 --container-format bare   --public

5、nova计算服务
5-1、控制节点安装nova

[root@openstack-101 ~]# yum install -y openstack-nova-api openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy  openstack-nova-scheduler

5-2、修改/etc/nova/nova.conf

[root@openstack-101 ~]# egrep -v '^#|^$' /etc/nova/nova.conf
[DEFAULT]
enabled_apis=osapi_compute,metadata  ##只启用计算和元数据API
#使能 Networking 服务(开启nova防护墙)
[DEFAULT]
use_neutron = True
firewall_driver=nova.virt.firewall.NoopFirewallDriver ##开启nova防护墙
#配置glance-api数据库连接
[api_database]
connection=mysql+pymysql://nova:nova@10.1.1.101/nova_api
#配置glance连接数据库
[database]
connection=mysql+pymysql://nova:nova@10.1.1.101/nova
#配置glance-api
[glance]
api_servers=http://10.1.1.101:9292
#配置keystone认证
[api]
auth_strategy=keystone  ##开启keystone认证
[keystone_authtoken]
auth_uri = http://10.1.1.101:5000
auth_url = http://10.1.1.101:35357
memcached_servers = 10.1.1.101:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
#配置neutron,在这不配置,安装neutron时在配置
[DEFAULT]
use_neutron=true
[neutron]
url = http://10.1.1.101:9696
auth_url = http://10.1.1.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 =jack
#配置锁文件
[oslo_concurrency]
lock_path=/var/lib/nova/tmp
#配置RabbitMQ列队
[DEFAULT]
transport_url=rabbit://openstack:openstack@10.1.1.101
[oslo_messaging_rabbit]
rabbit_host=10.1.1.101
rabbit_port=5672
rabbit_userid=openstack
rabbit_password=openstack
#配置placement,当openstack host list 查询主机时,返回为空,具体参考问题及解决
[placement]
auth_uri = http://10.1.1.101:5000
auth_url = http://10.1.1.101:35357
memcached_servers = 10.1.1.101:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
os_region_name = RegionOne
#配置vnc
[vnc]
vncserver_listen=10.1.1.101
server_proxyclient_address=10.1.1.101

5-3、同步Compute 数据库

[root@openstack-101 ~]# su -s /bin/sh -c "nova-manage api_db sync" nova
 [root@openstack-101 ~]# su -s /bin/sh -c "nova-manage db sync" nova

5-4、启动 Compute 服务并将其设置为随系统启动

[root@openstack-101 ~]# systemctl enable openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
[root@openstack-101 ~]# systemctl start openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service

5-6、创建 Compute实体及服务 API 端点

[root@openstack-101 ~]# openstack service create --name nova --description "OpenStack Compute" compute
[root@openstack-101 ~]# openstack endpoint create --region RegionOne   compute public http://10.1.1.101:8774/v2.1/%\(tenant_id\)s
[root@openstack-101 ~]# openstack endpoint create --region RegionOne   compute internal http://10.1.1.101:8774/v2.1/%\(tenant_id\)s
[root@openstack-101 ~]# openstack endpoint create --region RegionOne   compute admin http://10.1.1.101:8774/v2.1/%\(tenant_id\)s

5-7、问题及解决方案
##注意:当执行openstack compute service list返回值为空时,日志提示:下列错误

#2019-12-15 17:27:29.082 3475 ERROR nova.context [req-97fc26a6-8370-4fcf-b7a5-8b5237762837 1de9bf2dffed4f2aaf909928fea21f46 6d7a61524a97461585c2162c1c1c43a0 - f60d8109e4b444479df45a7139845ed0 f60d8109e4b444479df45a7139845ed0] No cells are configured, unable to continue

1)修改vim /etc/nova/nova.conf
[root@openstack-102 neutron]# vim /etc/nova/nova.conf

transport_url=rabbit://openstack:openstack@10.1.1.101
#并注释掉:rpc_backend=rabbit  ##为什么高版本不能用这个,纳闷,
#配置placement,当openstack host list 查询主机时,返回为空,具体参考问题及解决
[placement]
auth_uri = http://10.1.1.101:5000
auth_url = http://10.1.1.101:35357
memcached_servers = 10.1.1.101:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
os_region_name = RegionOne

2)配置数据库

[root@openstack-102 neutron]# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE nova_cell0;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' IDENTIFIED BY 'nova';
[root@openstack-102 neutron]# su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
[root@openstack-102 neutron]# su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
109e1d4b-536a-40d0-83c6-5f121b82b650
[root@openstack-102 neutron]# su -s /bin/sh -c "nova-manage db sync" nova
nova-manage cell_v2 list_cells
[root@openstack-102 neutron]# su -s /bin/sh -c "nova-manage api_db sync" nova

5-8、计算节点配置:10.1.1.102
1)计算节点安装nova

[root@openstack-102 neutron]# yum install openstack-nova-compute

2)配置计算节点配置文件如下
复制控制节点10.1.1.101:/etc/nova/nova.conf配置文件到10.1.1.102

[root@openstack-102 neutron]# egrep -v '^#|^$' /etc/nova/nova.conf
[DEFAULT]
use_neutron=true
firewall_driver=nova.virt.firewall.NoopFirewallDriver
enabled_apis=osapi_compute,metadata
transport_url=rabbit://openstack:openstack@10.1.1.101
[api]
auth_strategy=keystone
[api_database]
connection=mysql+pymysql://nova:nova@10.1.1.101/nova_api
[glance]
api_servers=http://10.1.1.101:9292
[keystone_authtoken]
auth_uri = http://10.1.1.101:5000
auth_url = http://10.1.1.101:35357
memcached_servers = 10.1.1.101:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
[libvirt]
virt_type=kvm
[neutron]
url = http://10.1.1.101:9696
auth_url = http://10.1.1.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 =jack
[oslo_concurrency]
lock_path=/var/lib/nova/tmp
[oslo_messaging_rabbit]
rabbit_host=10.1.1.101
rabbit_port=5672
rabbit_userid=openstack
rabbit_password=openstack
[placement]
auth_uri = http://10.1.1.101:5000
auth_url = http://10.1.1.101:35357
memcached_servers = 10.1.1.101:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
os_region_name = RegionOne
[vnc]
vncserver_listen=0.0.0.0
server_proxyclient_address=10.1.1.102
novncproxy_base_url=http://10.1.1.101:6080/vnc_auto.html

3)自启与开启

[root@openstack-102 neutron]# systemctl enable libvirtd.service openstack-nova-compute.service
[root@openstack-102 neutron]# systemctl start libvirtd.service openstack-nova-compute.service

6、neutron网络服务
配置文件修改:
第一步:数据库连接
第二步:keystone认证配置
第三部:rabitmq队列配置
6-1、安装neutron

[root@openstack-101 ~]# yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables

6-2、修改/etc/neutron/neutron.conf

[root@openstack-101 ~]# egrep -v '^#|^$' /etc/neutron/neutron.conf 
[DEFAULT]
#启用ML2插件并禁用其他插件(不带参数就是禁止其他插件)
core_plugin = ml2  
service_plugins =   
#配置数据库访问
[database]
connection = mysql+pymysql://neutron:neutron@10.1.1.101/neutron
#配置认证服务访问
[DEFAULT]
auth_strategy = keystone  ##开启keystone认证服务
[keystone_authtoken]
auth_uri = http://10.1.1.101:5000
auth_url = http://10.1.1.101:35357
memcached_servers = 10.1.1.101:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron 
#配置网络服务来通知计算节点的网络拓扑变化
[DEFAULT]
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
[nova] 
auth_url = http://10.1.1.101:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = nova
#配置锁文件
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp  ##锁文件
#配置 “RabbitMQ” 消息队列的连接(可以使用rpc_backend,但是高版本可能会报错)
[DEFAULT]
transport_url = rabbit://openstack:openstack@10.1.1.101
[oslo_messaging_rabbit]
rabbit_host = 10.1.1.101  ##RabbitMQ主机地址
rabbit_port = 5672  ##RabbitMQ主机端口
rabbit_userid = openstack  ##RabbitMQ主机用户名
rabbit_password = openstack  ##RabbitMQ主机密码

6-3、修改/etc/nova/nova.conf

[root@openstack-101 ~]# egrep -v '^#|^$' /etc/nova/nova.conf
#配置访问参数,启用元数据代理并设置密码(就是neutron连接nova时参数配置,及认证秘钥)
[neutron]
url = http://10.1.1.101:9696
auth_url = http://10.1.1.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 =jack

6-4、修改/etc/neutron/metadata_agent.ini

[root@openstack-101 ~]# egrep -v '^#|^$' /etc/neutron/metadata_agent.ini
[DEFAULT]
#配置元数据主机以及共享密码
nova_metadata_host = 10.1.1.101
metadata_proxy_shared_secret =jack
#注意:nova和neutron是息息相关的,这里的共享秘钥与nova.conf文件中neutron栏中共享秘钥一致,这样才能通过认证
修改/etc/neutron/plugins/ml2/ml2_conf.ini
[root@openstack-101 ~]# egrep -v '^#|^$' /etc/neutron/plugins/ml2/ml2_conf.ini
#启用flat和VLAN网络,默认有多种,只要去掉local就行,这里支持列表
[ml2]
type_drivers = flat,vlan
#禁用私有网络
tenant_network_types = 
#启用Linuxbridge机制
mechanism_drivers = linuxbridge
#配置完ML2插件之后,删除可能导致数据库不一致的``type_drivers``项的值--
#启用端口安全扩展驱动
extension_drivers =port_security
#配置公共虚拟网络为flat网络,自定义名称,必须与/etc/neutron/plugins/ml2/linuxbridge_agent.ini配置文件中行physical_interface_mappings = 名称:物理网口----名称一致
[ml2_type_flat]
flat_networks = provider
#启用 ipset 增加安全组规则的高效性
[securitygroup]
enable_ipset = true

6-5、修改/etc/neutron/plugins/ml2/linuxbridge_agent.ini

[root@openstack-101 ~]# egrep -v '^#|^$' /etc/neutron/plugins/ml2/linuxbridge_agent.ini 
#将公共虚拟网络和公共物理网络接口对应起来,映射关系上面提到过
[linux_bridge]
physical_interface_mappings =provider:ens33
#启用安全组并配置 Linuxbridge iptables firewall driver
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = true
#禁止vxlan网络
[vxlan]
enable_vxlan = False  # 

6-6、修改/etc/neutron/dhcp_agent.ini

[root@openstack-101 ~]# egrep -v '^#|^$' /etc/neutron/dhcp_agent.ini
[DEFAULT]
#配置Linuxbridge驱动接口,DHCP驱动并启用隔离元数据,这样在公共网络上的实例就可以通过网络来访问元数据
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = True

6-7、网络服务初始化脚本需要一个超链接 /etc/neutron/plugin.ini指向ML2插件配置文件/etc/neutron/plugins/ml2/ml2_conf.ini。如果超链接不存在,使用下面的命令创建它

[root@openstack-101 ~]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

6-8、同步数据库

[root@openstack-101 ~]# 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

6-9、重启计算api

[root@openstack-101 ~]# systemctl restart openstack-nova-api.service

6-10、当系统启动时,启动 Networking 服务并配置它启动

[root@openstack-101 ~]# systemctl enable neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service [root@openstack-101 ~]# systemctl start neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service

6-11-1、创建neutron服务实体

[root@openstack-101 ~]# openstack service create --name neutron   --description "OpenStack Networking" network
创建网络服务API端点
[root@openstack-101 ~]# openstack endpoint create --region RegionOne   network public http://10.1.1.101:9696
[root@openstack-101 ~]# openstack endpoint create --region RegionOne   network internal http://10.1.1.101:9696
[root@openstack-101 ~]# openstack endpoint create --region RegionOne   network admin http://10.1.1.101:9696
####[root@openstack-101 ~]# source admin-openstack.sh

6-12、配置neutron计算节点
1)Neutron计算节点安装

[root@openstack-102 neutron]# yum install openstack-neutron-linuxbridge ebtables ipset

2)配置/etc/neutron/neutron.conf配置文件

[root@openstack-102 neutron]# egrep -v '^#|^$' /etc/neutron/neutron.conf
[DEFAULT]
auth_strategy = keystone
transport_url = rabbit://openstack:openstack@10.1.1.101
[keystone_authtoken]
auth_uri = http://10.1.1.101:5000
auth_url = http://10.1.1.101:35357
memcached_servers = 10.1.1.101:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
[oslo_messaging_rabbit]
rabbit_host = 10.1.1.101
rabbit_port = 5672
rabbit_userid = openstack
rabbit_password = openstack

3)配置/etc/neutron/plugins/ml2/linuxbridge_agent.ini配置文件

[root@openstack-102 neutron]# egrep -v '^#|^$' /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:ens33
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = true
[vxlan]
enable_vxlan = false

4)修改/etc/nova/nova.conf配置文件

url = http://10.1.1.101:9696
auth_url = http://10.1.1.101:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron

5)重启计算服务

[root@openstack-102 neutron]# systemctl restart openstack-nova-compute.service

6)启动Linuxbridge代理并配置它开机自启动

[root@openstack-102 neutron]# systemctl enable neutron-linuxbridge-agent.service
[root@openstack-102 neutron]# systemctl start neutron-linuxbridge-agent.service

##查看nova计算节点

[root@openstack-101 ~]#  openstack host list
+---------------+-------------+----------+
| Host Name     | Service     | Zone     |
+---------------+-------------+----------+
| openstack-101 | consoleauth | internal |
| openstack-101 | conductor   | internal |
| openstack-101 | scheduler   | internal |
| openstack-102 | compute     | nova     |
+---------------+-------------+----------+

查看neutron

[root@openstack-101 ~]# 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                    |
+--------------------------------------+--------------------+---------------+-------------------+-------+----------------+---------------------------+
| 5e38ddf4-bd2c-4ef4-bc12-d3dfe117ab93 | Metadata agent     | openstack-101 |                   | :-)   | True           | neutron-metadata-agent    |
| 9ff88dfe-f7ca-40cb-810d-52d8b8b3fdcd | Linux bridge agent | openstack-101 |                   | :-)   | True           | neutron-linuxbridge-agent |
| bf9088f6-d083-4a1c-8a5f-208e9f078094 | Linux bridge agent | openstack-102 |                   | :-)   | True           | neutron-linuxbridge-agent |
| fb7a05aa-3754-488b-8590-3a1b2f45bef0 | DHCP agent         | openstack-101 | nova              | :-)   | True           | neutron-dhcp-agent        |
+--------------------------------------+--------------------+---------------+-------------------+-------+----------------+---------------------------+
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值