openstacknova(控制节点/计算节点)

Posted leaders543

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstacknova(控制节点/计算节点)相关的知识,希望对你有一定的参考价值。

控制节点

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

以上是关于openstacknova(控制节点/计算节点)的主要内容,如果未能解决你的问题,请参考以下文章

ovn+ 控制节点 + 计算节点

全网疯传!java编程代写有哪些平台

OpenStake架构-----nova组件

A18. openstack架构实战-控制节点和计算节点的结合

A18. openstack架构实战-控制节点和计算节点的结合

OpenStack服务-Nova(控制节点)