Chapter VIII nova components are installed 2

1, the control node assembly mounted nova

apt -y install nova-api nova-placement-api nova-conductor nova-consoleauth nova-scheduler nova-novncproxy python3-novaclient
# 配置文件
mv /etc/nova/nova.conf /etc/nova/nova.conf.org    # 备份官方的
vi /etc/nova/nova.conf
# 修改如下
# create new
[DEFAULT]
# allow resize to same host
allow_resize_to_same_host = True
# block allocate time
block_device_allocate_retries = 600
block_device_allocate_retries_interval = 6
max_concurrent_live_migrations = 10
debug = True                                    # 打开调试功能
use_neutron = True
linuxnet_interface_driver = nova.network.linux_net.LinuxBridgeInterfaceDriver   # LinuxBridge桥接
firewall_driver = nova.virt.firewall.NoopFirewallDriver
# define own IP
my_ip = 192.168.222.29                            # API IP
state_path = /var/lib/nova
enabled_apis = osapi_compute,metadata
log_dir = /var/log/nova

# RabbitMQ connection info
transport_url = rabbit://openstack:[email protected]

[api]
auth_strategy = keystone

# Glance connection info
[glance]
api_servers = http://192.168.220.29:9292       # 这里配置存储网的IP,也可以API网

[oslo_concurrency]
lock_path = $state_path/tmp

# MariaDB connection info
[api_database]
connection = mysql+pymysql://nova:[email protected]/nova_api

[database]
connection = mysql+pymysql://nova:[email protected]/nova

# Keystone auth info
[keystone_authtoken]
www_authenticate_uri = http://192.168.222.29:5000
auth_url = http://192.168.222.29:5000
memcached_servers = 192.168.222.29:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = servicepassword

[placement]
auth_url = http://192.168.222.29:5000
os_region_name = RegionOne
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = placement
password = servicepassword

[placement_database]
connection = mysql+pymysql://nova:[email protected]/nova_placement

[wsgi]
api_paste_config = /etc/nova/api-paste.ini

[neutron]
auth_url = http://192.168.222.29:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = servicepassword
service_metadata_proxy = True
metadata_proxy_shared_secret = metadata_secret

[cinder]
os_region_name = RegionOne

# 改变文件的权限
chmod 640 /etc/nova/nova.conf
chgrp nova /etc/nova/nova.conf

2, the synchronization control node database

# 同步数据库,python的orm对象关系映射,需要初始化来生成数据库表结构
su -s /bin/bash nova -c "nova-manage api_db sync"
su -s /bin/bash nova -c "nova-manage cell_v2 map_cell0"
su -s /bin/bash nova -c "nova-manage db sync"                       # warning提示不用关心
su -s /bin/bash nova -c "nova-manage cell_v2 create_cell --name cell1"
systemctl restart apache2

for service in api conductor scheduler consoleauth novncproxy; do
systemctl restart nova-$service                           # 服务已经开机自启动
done

# 查看验证
openstack compute service list

备注:如果在同步数据时有出现“ deprecated ****”等信息,不用理会

Guess you like

Origin www.cnblogs.com/shihongkuan/p/11399223.html