nova计算服务分布式

控制节点

#第一步 控制节点下载nova-conpute包

#安装依赖包

#vim /etc/nova/nova.conf

[DEFAULT]
my_ip=#当前节点IP
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
enabled_apis=osapi_compute,metadata
transport_url = rabbit://openstack:admin@controller

[api]
auth_strategy = keystone

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

[barbican]

[cache]

[cells]

[cinder]
#os_region_name = RegionOne

[cloudpipe]

[conductor]

[console]

[consoleauth]

[cors]

[cors.subdomain]

[crypto]

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

[ephemeral_storage_encryption]

[filter_scheduler]

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

[guestfs]

[healthcheck]

[hyperv]

[image_file_url]

[ironic]

[key_manager]

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

[libvirt]
virt_type=qemu

[matchmaker_redis]

[metrics]

[mks]

[neutron]
#url = http://controller:9696
#auth_url = http://controller: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 = METADATA_SECRET

[notifications]

[osapi_v21]

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

[oslo_messaging_amqp]

[oslo_messaging_kafka]

[oslo_messaging_notifications]

[oslo_messaging_rabbit]

[oslo_messaging_zmq]

[oslo_middleware]

[oslo_policy]

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

[quota]

[rdp]

[remote_debug]

[scheduler]

[serial_console]

[service_user]

[spice]

[ssl]

[trusted_computing]

[upgrade_levels]

[vendordata_dynamic_auth]

[vmware]

[vnc]
enabled=true
vncserver_listen=0.0.0.0
vncserver_proxyclient_address=$my_ip
novncproxy_base_url = http://192.168.24.8:6080/vnc_auto.html

[workarounds]

[wsgi]

[xenserver]

[xvp]

#启动compute服务并设为开机自启        

systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service

#列示openstack管理的虚拟化类型

openstack hypervisor list

#给数据库同步计算节点

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

#列示openstack管理的计算服务

openstack compute service list

#查看服务列表

openstack catalog list

#查看镜像

openstack image list

#更新一下nova服务状态的检测,三个状态必须都是成功

nova-status upgrade check

存储节点

#第一步 上传此包,安装三个依赖(学校网需此步操作,外网直接下一步)

#解压此包进入后安装
yum localinstall –y ./*

#下载nova-compute

yum install openstack-nova-compute

#编辑nova配置文件

cd /etc/nova/
cp nova.conf nova.conf.bak
vim nova.conf
#清空原内容,粘贴如下内容
[DEFAULT]
my_ip=#计算节点管理网卡地址
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
enabled_apis=osapi_compute,metadata
transport_url = rabbit://openstack:admin@controller

[api]
auth_strategy = keystone

[api_database]
#connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova_api

[barbican]

[cache]

[cells]

[cinder]
#os_region_name = RegionOne

[cloudpipe]

[conductor]

[console]

[consoleauth]

[cors]

[cors.subdomain]

[crypto]

[database]
#connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova

[ephemeral_storage_encryption]

[filter_scheduler]

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

[guestfs]

[healthcheck]

[hyperv]

[image_file_url]

[ironic]

[key_manager]

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

[libvirt]
virt_type=qemu

[matchmaker_redis]

[metrics]

[mks]

[neutron]
#url = http://controller:9696
#auth_url = http://controller: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 = METADATA_SECRET

[notifications]

[osapi_v21]

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

[oslo_messaging_amqp]

[oslo_messaging_kafka]

[oslo_messaging_notifications]

[oslo_messaging_rabbit]

[oslo_messaging_zmq]

[oslo_middleware]

[oslo_policy]

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

[quota]

[rdp]

[remote_debug]

[scheduler]

[serial_console]

[service_user]

[spice]

[ssl]

[trusted_computing]

[upgrade_levels]

[vendordata_dynamic_auth]

[vmware]

[vnc]
enabled=true
vncserver_listen=0.0.0.0
vncserver_proxyclient_address=$my_ip
novncproxy_base_url = http://控制节点IP:6080/vnc_auto.html

[workarounds]

[wsgi]

[xenserver]

[xvp]

#过滤以下两个节点是否以下两个参数,因为你计算节点是调用kvm虚拟化启动虚拟机,看开启虚拟化功能没有

egrep -c '(vmx|svm)' /proc/cpuinfo

#启动compute服务并设为开机自启

systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service

#返回至控制节点

#宣告环境变量

. openrc

#列示openstack管理的虚拟化类型

openstack hypervisor list

#给数据库同步计算节点

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

#列示openstack管理的计算服务

openstack compute service list

#查看服务列表

openstack catalog list

#查看镜像

openstack image list

#更新一下nova服务状态的检测,三个状态必须都是成功

nova-status upgrade check
posted @ 2019-06-12 22:00  冷漠铁锤王富贵  阅读(207)  评论(0编辑  收藏  举报