码迷,mamicode.com
首页 > 其他好文 > 详细

openstack(五)nova(控制节点/计算节点)

时间:2020-04-19 14:29:45      阅读:89      评论:0      收藏:0      [点我收藏+]

标签:sysfs   discover   tables   sch   kvm   com   reg   ace   oop   

控制节点

yum install -y openstack-nova-api openstack-nova-placement-api   openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler libibverbs

/etc/nova/nova.conf

技术图片
cat > /etc/nova/nova.conf <<EOF
[DEFAULT]
enabled_apis=osapi_compute,metadata
transport_url = rabbit://openstack:openstack@192.168.3.220
use_neutron=true
firewall_driver = nova.virt.firewall.NoopFirewallDriver

[api]
auth_strategy=keystone

[glance]
api_servers = http://192.168.3.220:9292

[api_database]
connection= mysql+pymysql://nova:nova@192.168.3.220/nova_api

[database]
connection= mysql+pymysql://nova:nova@192.168.3.220/nova

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

[vnc]
enabled=true
server_listen = 0.0.0.0
server_proxyclient_address = 192.168.3.220

[oslo_concurrency]
lock_path=/var/lib/nova/tmp

[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://192.168.3.220:35357/v3
username = placement
password = placement
EOF
nova.conf

初始化api数据库

su -s /bin/sh -c "nova-manage api_db sync" nova

注册cell0

su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova

添加cell1
su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova

初始化nova数据库
su -s /bin/sh -c "nova-manage db sync" nova

查看注册cells

nova-manage cell_v2 list_cells

查看数据库表

mysql -unova -pnova -e " use nova;show tables;use nova_api;show tables;use nova_cell0;show tables;"

 

启动并配置开机启动

systemctl restart  openstack-nova-scheduler openstack-nova-conductor openstack-nova-novncproxy openstack-nova-api openstack-nova-console openstack-nova-scheduler

systemctl enable openstack-nova-api openstack-nova-scheduler openstack-nova-conductor  openstack-nova-novncproxy openstack-nova-console 1>&2

配置服务与端点

技术图片
openstack service create --name nova   --description "Openstack Compute " compute 
openstack endpoint create --region RegionOne compute public   http://192.168.3.220:8774/v2.1
openstack endpoint create --region RegionOne compute internal http://192.168.3.220:8774/v2.1
openstack endpoint create --region RegionOne compute admin    http://192.168.3.220:8774/v2.1
View Code

nova service-list

========================================================

计算节点

yum install -y openstack-nova-compute sysfsutils

/etc/nova/nova.conf 

技术图片
cat > /etc/nova/nova.conf << EOF
[DEFAULT]
enabled_apis=osapi_compute,metadata
transport_url = rabbit://openstack:openstack@192.168.3.220
use_neutron=true
firewall_driver = nova.virt.firewall.NoopFirewallDriver
vif_plugging_is_fatal = False 
vif_plugging_timeout = 0

[api]
auth_strategy=keystone

[glance]
api_servers = http://192.168.3.220:9292

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

[vnc]
enabled=true
server_listen = 0.0.0.0
server_proxyclient_address = 192.168.3.220
novncproxy_base_url = http://192.168.3.220:6080/vnc_auto.html

[oslo_concurrency]
lock_path=/var/lib/nova/tmp

[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://192.168.3.220:35357/v3
username = placement
password = placement

[libvirt]
virt_type=kvm

EOF
nova.conf

配置开机启动服务并启动服务

systemctl restart libvirtd openstack-nova-compute && systemctl enable libvirtd openstack-nova-compute

========================================================

控制节点上加入主机

su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova

查看主机

openstack host list
openstack compute service list
openstack catalog list

openstack(五)nova(控制节点/计算节点)

标签:sysfs   discover   tables   sch   kvm   com   reg   ace   oop   

原文地址:https://www.cnblogs.com/Leaders543/p/12731280.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!