标签:sync none su - 双节点 tps service blog point sql
#mysql -uroot -p000000
>create database nova;
>create database nova_api;
>grant all privileges on nova.* to 'nova'@'localhost' identified by '000000';
>grant all privileges on nova.* to 'nova'@'%' identified by '000000';
>grant all privileges on nova_api.* to 'nova'@'localhost' identified by '000000';
>grant all privileges on nova_api.* to 'nova'@'%' identified by '000000';
>
#. /root/admin-openrc
#openstack user create --domain default --password 000000 nova
#openstack role add --project service --user nova admin
创建 nova 服务实体:
#openstack service create --name nova --description "OpenStack Compute" compute
#openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1/%\(tenant_id\)s
#openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1/%\(tenant_id\)s
#openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1/%\(tenant_id\)s
#yum -y install openstack-nova-api openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler
/etc/nova/nova.conf
文件#vi /etc/nova/nova.conf
在[DEFAULT]下添加
enabled_apis = osapi_compute,metadata
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 192.168.100.10
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
在[api_database]下添加
connection = mysql+pymysql://nova:000000@controller/nova_api
在[database]下添加
connection = mysql+pymysql://nova:000000@controller/nova
在[oslo_messaging_rabbit]下添加,配置 “RabbitMQ” 消息队列访问
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 000000
在[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 = 000000
在[vnc]部分,配置VNC代理使用控制节点的管理接口IP地址
vncserver_listen = 192.168.100.10
vncserver_proxyclient_address = 192.168.100.10
在 [glance] 区域,配置镜像服务 API 的位置
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 db sync" nova
#systemctl start openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
#systemctl enable openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
[root@compute ~]# yum -y install openstack-nova-compute
#vi /etc/nova/nova.conf
在 [DEFAULT] 下添加
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 192.168.100.20
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
在[oslo_messaging_rabbit]下添加
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 000000
在[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 = 000000
在``[vnc]``部分,启用并配置远程控制台访问
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 192.168.100.20
novncproxy_base_url = http://192.168.100.10:6080/vnc_auto.html
在 [glance] 区域,配置镜像服务 API 的位置:
api_servers = http://controller:9292
在 [oslo_concurrency] 部分,配置锁路径:
lock_path = /var/lib/nova/tmp
#egrep -c '(vmx|svm)' /proc/cpuinfo
#因为一开始创建的时候在CPU选项部分勾选了虚拟化服务,所以是这样
①如果这个命令返回了 1或者大于1 的值,那么你的计算节点支持硬件加速且不需要额外的配置。
②如果这个命令返回了 0 值,那么你的计算节点不支持硬件加速。你必须配置 libvirt 来使用 QEMU 去代替 KVM
编辑/etc/nova/nova.conf 文件的 [libvirt]
#vi /etc/nova/nova.conf
在[libvirtd]下添加
virt_type = qemu
[root@compute ~]# systemctl start libvirtd.service openstack-nova-compute.service
[root@compute ~]# systemctl enable libvirtd.service openstack-nova-compute.service
[root@controller ~]# . /root/admin-openrc
列出服务组件,查看是否成功注册并启动服务进程
[root@controller ~]# openstack compute service list
(五)OpenStack---M版---双节点搭建---Nova安装和配置
标签:sync none su - 双节点 tps service blog point sql
原文地址:https://www.cnblogs.com/zhijian1574/p/11956838.html