openstack安装--nova 博客分类: openstack,openstack安装openstack openstack
程序员文章站
2024-03-13 19:19:10
...
在controller节点操作
创建Nova数据库
添加环境变量(临时加的环境变量,只在当前的窗口有效)
创建Nova用户
Add the admin role to the nova user:
Create the nova service entity:
Create the Compute service API endpoints:
安装相关的packages
vim /etc/nova/nova.conf
同步Nova数据库
设置开机自动启动/启动服务
以下是在compute节点安装
安装openstack-nova-compute服务
vim /etc/nova/nova.conf
判断本台虚拟机是否支持kvm,0:不支持,>=1支持
vim /etc/nova/nova.conf
启动服务
遇到的错误:
AMQP server on controller:5672 is unreachable
解决办法:查看controller节点的5672端口没起来,5672是rabbitmq的端口。检查原因是controller节点忘记装了rabbitmq,因为Nova要用到该服务
AMQP server on controller:5672 is unreachable
该服务虽然开启但是没有权限访问
解决办法赋予权限
创建Nova数据库
mysql -u root -pzouhuiying CREATE DATABASE nova; GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'NOVA_DBPASS'; GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'NOVA_DBPASS'; flush privileges
添加环境变量(临时加的环境变量,只在当前的窗口有效)
source admin-openrc.sh
创建Nova用户
openstack user create --domain default --password-prompt nova
Add the admin role to the nova user:
openstack role add --project service --user nova admin
Create the nova service entity:
openstack service create --name nova --description "OpenStack Compute" compute
Create the Compute service API endpoints:
openstack endpoint create --region RegionOne compute public http://controller:8774/v2/%\(tenant_id\)s openstack endpoint create --region RegionOne compute internal http://controller:8774/v2/%\(tenant_id\)s openstack endpoint create --region RegionOne compute admin http://controller:8774/v2/%\(tenant_id\)s
安装相关的packages
yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler python-novaclient
vim /etc/nova/nova.conf
[database] ... connection = mysql://nova:NOVA_DBPASS@controller/nova 消息队列的配置 [DEFAULT] ... rpc_backend = rabbit [oslo_messaging_rabbit] ... rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASS //改成自己的密码 //认证的配置 [DEFAULT] ... auth_strategy = keystone [keystone_authtoken] ... auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = nova password = NOVA_PASS [DEFAULT] ... my_ip = 10.0.0.11 //使其支持neutron服务 [DEFAULT] ... network_api_class = nova.network.neutronv2.api.API security_group_api = neutron linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver firewall_driver = nova.virt.firewall.NoopFirewallDriver //vnc配置 [vnc] ... vncserver_listen = $my_ip vncserver_proxyclient_address = $my_ip [glance] ... host = controller [oslo_concurrency] ... lock_path = /var/lib/nova/tmp //disable the EC2 API: [DEFAULT] ... enabled_apis=osapi_compute,metadata
同步Nova数据库
su -s /bin/sh -c "nova-manage db sync" nova
设置开机自动启动/启动服务
systemctl enable openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service systemctl start openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
以下是在compute节点安装
安装openstack-nova-compute服务
yum install openstack-nova-compute sysfsutils
vim /etc/nova/nova.conf
[DEFAULT] ... rpc_backend = rabbit [oslo_messaging_rabbit] ... rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASS [DEFAULT] ... auth_strategy = keystone [keystone_authtoken] ... auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = nova password = NOVA_PASS [DEFAULT] ... my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS [DEFAULT] ... network_api_class = nova.network.neutronv2.api.API security_group_api = neutron linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver firewall_driver = nova.virt.firewall.NoopFirewallDriver [vnc] ... enabled = True vncserver_listen = 0.0.0.0 vncserver_proxyclient_address = $my_ip novncproxy_base_url = http://controller:6080/vnc_auto.html [glance] ... host = controller [oslo_concurrency] ... lock_path = /var/lib/nova/tmp
判断本台虚拟机是否支持kvm,0:不支持,>=1支持
egrep -c '(vmx|svm)' /proc/cpuinfo
vim /etc/nova/nova.conf
[libvirt] ... virt_type = qemu //不支持kvm的要用qemu
启动服务
systemctl enable libvirtd.service openstack-nova-compute.service systemctl start libvirtd.service openstack-nova-compute.service
遇到的错误:
AMQP server on controller:5672 is unreachable
解决办法:查看controller节点的5672端口没起来,5672是rabbitmq的端口。检查原因是controller节点忘记装了rabbitmq,因为Nova要用到该服务
AMQP server on controller:5672 is unreachable
该服务虽然开启但是没有权限访问
解决办法赋予权限
rabbitmqctl add_user openstack zouhuiying rabbitmqctl set_permissions openstack ".*" ".*" ".*"
推荐阅读
-
horizon 添加目录 博客分类: openstack openstackhorizon
-
openstack安装--nova 博客分类: openstack,openstack安装openstack openstack
-
openstack安装--keystone 博客分类: openstackopenstack,openstack安装 keystone
-
kolla安装openstack 单节点
-
用最精炼语言介绍OpenStack网络代码演进的前世今生 博客分类: neutronopenstack neutronnetworkML2pluginagent
-
云计算与OpenStack(虚拟机Nova篇) 博客分类: 计算机图书 云计算虚拟机
-
mysql授权localhost&%区别及一直授权错误解决办法(安装openstack有感)_MySQL
-
devstack安装使用openstack常见问题与解决办法_MySQL
-
OpenStack安装部署Liberty Neutron
-
OpenStack 中的Nova组件详解