标签:opesntack
openstack计算(nova)服务篇
mysql-uroot -p123123
createdatabase nove;
createdatabase nova_api;
grantall privileges on nove.* to ‘nove‘@‘localhost‘ identified by ‘123123‘;
grantall privileges on nove.* to ‘nove‘@‘%‘ identified by ‘123123‘;
grantall privileges on nove_api.* to ‘nove‘@‘localhost‘ identified by ‘123123‘;
grantall privileges on nove_api.* to ‘nove‘@‘%‘ identified by ‘123123‘;
exit
sourceadmin-openrc.sh
openstackuser create --domain default --password-prompt nova ##设置密码
openstackrole add --project service --user nova admin
openstackservice create --name nova --description "Openstack Compute" compute
openstackendpoint create --region RegionOne compute public http://controller:8774/v2.1/%\(tenant_id\)s
openstackendpoint create --region RegionOne compute internal http://controller:8774/v2.1/%\(tenant_id\)s
openstackendpoint create --region RegionOne compute admin http://controller:8774/v2.1/%\(tenant_id\)s
yuminstall openstack-nova-api openstack-nova-conductor openstack-nova-consoleopenstack-nova-novncproxy openstack-nova-scheduler
vi/etc/nova/nova.conf
[DEFAULT]
enable_apis= osapi_compute,metadata ##只启用计算和元数据API
rpc_backend = rabbit ##配置rabbit消息队列访问
auth_strategy = keystone ## 配置认证服务访问
my_ip = 10.0.0.11 ##使用控制节点的管理接口的IP 地址
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver ##使用Networking服务
[database]
connection = mysql+pymysql://nova:123123@controller/nova ##配置数据库的连接
[api_database]
connection= mysql+pymysql://nova:123123@controller/nova_api ##配置数据库的连接
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 123123 ##配置rabbit消息队列访问
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = 123123 在[keystone_authtoken]中注释或者删除其他选项。
[vnc]
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip ##配置VNC代理使用控制节点的管理接口IP地址
[glance]
api_servers= http://controller:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
su-s /bin/sh -c “nova-manage api_db sync” nova
su -s /bin/sh -c "nova-manage dbsync" nova
systemctl enable openstack-nova-api.serviceopenstack-nova-consoleauth.service openstack-nova-scheduler.serviceopenstack-nova-conductor.service openstack-nova-novacproxy.service
systemctl start openstack-nova-api.serviceopenstack-nova-consoleauth.service openstack-nova-scheduler.serviceopenstack-nova-conductor.service openstack-nova-novncproxy.service
yum -y install openstack-nova-compute
vi /etc/nova/nova.conf
[DEFAULT]
rpc_backend = rabbit ##配置rabbitmq消息队列的连接
auth_strategy = keystone ##配置认证服务访问
my_ip = 10.0.0.31
use_neutron = True ##使用Networking服务
firewall_driver = nova.virt.firewall.NoopF irewallDriver ##使用Networking服务
[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 = 123123 ##配置认证服务访问,在[keystone_authtoken]中注释或者删除其他选项
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 123123 ##配置rabbitmq消息队列的连接
[vnc]
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html ##启用并配置远程控制台访问
[glance]
api_servers = http://controller:9292 ##配置镜像服务API的位置
[oslo_concurrency]
lock_path = /var/lib/nova/tmp ##配置锁路径
egrep-c ‘(vmx|svm)‘ /proc/cpuinfo
##如果这个命令返回 ``one或者更大``的值,说明您的计算节点支持硬件加速,一般不需要进行额外的配置。
如果这个命令返回``zero``,你的计算节点不支持硬件加速,你必须配置 libvirt 使用QEMU而不是使用KVM。
vi /etc/nova/nova.conf
[libvirt]
virt_type = qemu
systemctl enable libvirtd.serviceopenstack-nova-compute.service
systemctl start libvirtd.serviceopenstack-nova-compute.service
source admin-openrc
openstack compute service list
本文出自 “19941212” 博客,请务必保留此出处http://19941212.blog.51cto.com/11630936/1902297
标签:opesntack
原文地址:http://19941212.blog.51cto.com/11630936/1902297