私有云落地解决方案之openstack高可用(pike版本)-nova

标签: openstack 解决方案 私有云 高可用 nova
613人阅读 评论(0) 收藏 举报
分类:

作者:【吴业亮】

博客:http://blog.csdn.net/wylfengyujiancheng

创建数据库ova_api, nova, and nova_cell0 databases:

#  mysql -u root -pChangeme_123

CREATE DATABASE  nova_placement ;
CREATE DATABASE  nova_cell0 ;
CREATE DATABASE  nova ;
CREATE DATABASE  nova_api ;

GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost'  IDENTIFIED BY 'Changeme_123'; 

GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%'   IDENTIFIED BY 'Changeme_123';

GRANT ALL PRIVILEGES ON nova_placement.* TO 'nova'@'localhost'  IDENTIFIED BY 'Changeme_123'; 

GRANT ALL PRIVILEGES ON nova_placement.* TO 'nova'@'%'   IDENTIFIED BY 'Changeme_123'; 

GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost'  IDENTIFIED BY 'Changeme_123';

GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%'   IDENTIFIED BY 'Changeme_123';


GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost'  IDENTIFIED BY 'Changeme_123';

GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%'   IDENTIFIED BY 'Changeme_123';

创建用户

#  openstack user create --domain default  --password Changeme_123 nova

赋予admin权限

#  openstack role add --project service --user nova admin

这个命令没有回显
创建service

#  openstack service create --name nova \
  --description "OpenStack Compute" compute

创建endpoint

#  openstack endpoint create --region RegionOne \
  compute public http://172.16.8.50:8774/v2.1
#  openstack endpoint create --region RegionOne \
  compute internal http://172.16.8.50:8774/v2.1
#  openstack endpoint create --region RegionOne \
  compute admin http://172.16.8.50:8774/v2.1

创建placement用户

#  openstack user create --domain default --password Changeme_123 placement

赋予admin权限

#  openstack role add --project service --user placement admin

创建服务

#  openstack service create --name placement --description "Placement API" placement

创建endpoint

#  openstack endpoint create --region RegionOne placement public http://172.16.8.50:8778
#  openstack endpoint create --region RegionOne placement internal http://172.16.8.50:8778
#  openstack endpoint create --region RegionOne placement admin http://172.16.8.50:8778

安装软件包

# yum install openstack-nova-api openstack-nova-conductor \
  openstack-nova-console openstack-nova-novncproxy \
  openstack-nova-scheduler openstack-nova-placement-api -y

修改配置文件/etc/nova/nova.conf

[DEFAULT]
enabled_apis = osapi_compute,metadata
my_ip = 172.16.8.60
novncproxy_host = 172.16.8.60
metadata_listen = 172.16.8.60
osapi_volume_listen =  172.16.8.60
osapi_compute_listen = 172.16.8.60
ec2_listen = 172.16.8.60
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
transport_url = rabbit://openstack:Changeme_123@172.16.8.50
[api]
auth_strategy = keystone
[api_database]
connection = mysql+pymysql://nova:Changeme_123@172.16.8.50/nova_api
[barbican]
[cache]
[cells]
[cinder]
[compute]
[conductor]
[console]
[consoleauth]
[cors]
[crypto]
[database]
connection = mysql+pymysql://nova:Changeme_123@172.16.8.50/nova
[ephemeral_storage_encryption]
[filter_scheduler]
[glance]
api_servers = http://172.16.8.50:9292
[guestfs]
[healthcheck]
[hyperv]
[ironic]
[key_manager]
[keystone_authtoken]
auth_uri = http://172.16.8.50:5000
auth_url = http://172.16.8.50:35357
memcached_servers = node1:11211,node2:11211,node3:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = Changeme_123
[libvirt]
[matchmaker_redis]
[metrics]
[mks]
[neutron]
[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
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://172.16.8.50:35357/v3
username = placement
password = Changeme_123
[quota]
[rdp]
[remote_debug]
[scheduler]
[serial_console]
[service_user]
[spice]
[trusted_computing]
[upgrade_levels]
[vendordata_dynamic_auth]
[vmware]
[vnc]
enabled = true
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip
[workarounds]
[wsgi]
[xenserver]
[xvp]

写入配置文件 /etc/httpd/conf.d/00-nova-placement-api.conf

Listen 172.16.8.60:8778

<VirtualHost 172.16.8.60:8778>
  WSGIProcessGroup nova-placement-api
  WSGIApplicationGroup %{GLOBAL}
  WSGIPassAuthorization On
  WSGIDaemonProcess nova-placement-api processes=3 threads=1 user=nova group=nova
  WSGIScriptAlias / /usr/bin/nova-placement-api
  <IfVersion >= 2.4>
    ErrorLogFormat "%M"
  </IfVersion>
  ErrorLog /var/log/nova/nova-placement-api.log
  #SSLEngine On
  #SSLCertificateFile ...
  #SSLCertificateKeyFile ...
  <Directory /usr/bin>
    Require all granted
  </Directory>
</VirtualHost>

Alias /nova-placement-api /usr/bin/nova-placement-api
<Location /nova-placement-api>
  SetHandler wsgi-script
  Options +ExecCGI
  WSGIProcessGroup nova-placement-api
  WSGIApplicationGroup %{GLOBAL}
  WSGIPassAuthorization On
</Location>

注意修改IP

重启服务

# systemctl restart httpd

验证监听

# ss -tanlp | grep 8778

同步数据库

# su -s /bin/sh -c "nova-manage api_db sync" nova
# su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
# su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
# su -s /bin/sh -c "nova-manage db sync" nova
# nova-manage cell_v2 list_cells

启动服务并设置开机启动

# systemctl enable openstack-nova-api.service \
  openstack-nova-consoleauth.service openstack-nova-scheduler.service \
  openstack-nova-conductor.service openstack-nova-novncproxy.service
# systemctl restart openstack-nova-api.service \
  openstack-nova-consoleauth.service openstack-nova-scheduler.service \
  openstack-nova-conductor.service openstack-nova-novncproxy.service
查看评论

私有云落地解决方案之openstack高可用(pike版本)-horizon

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng安装rpm包# yum -y install openstack-dashboard修改配置文件 ...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-28 09:20:23
  • 447

[译] OpenStack Pike 版本中的 53 个新功能盘点

原文:https://www.mirantis.com/blog/53-things-to-look-for-in-openstack-pike/ 作者:Mirantis Nick Chase 发...
  • buyaoxx
  • buyaoxx
  • 2017-08-31 12:21:33
  • 2159

私有云落地解决方案之openstack高可用(pike版本)-添加存储节点

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng一、前提条件 各个节点的时间同步二、基础配置 1、安装软件包# yum -y install ...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-28 09:40:19
  • 668

私有云落地解决方案之openstack高可用(pike版本)-架构

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng本架构借鉴redhat架构1、API 服务:包括 *-api, neutron-server,gla...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:15:39
  • 841

私有云落地解决方案之openstack高可用(pike版本)-集群配置

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng1、安装集群软件[node1&node2&node3]# yum install -y lvm2 c...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:30:34
  • 467

私有云落地解决方案之openstack高可用(pike版本)-环境配置

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng1、配置本地源mkdir /etc/yum.repos.d/bak_repo_bak mv /et...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:23:19
  • 596

私有云落地解决方案之openstack高可用(pike版本)-集群参数

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng一、添加服务将消息队列加入集群监控中crm configure primitive rabbitmq...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-28 10:29:45
  • 952

私有云落地解决方案之openstack高可用(pike版本)-数据库

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng1、安装rpm包# yum install -y MariaDB-server MariaDB-c...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:26:18
  • 553

私有云落地解决方案之openstack高可用(pike版本)-glance

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng安装和配置glance创建glance用户(任一节点)# openstack user create...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:41:23
  • 396

私有云落地解决方案之openstack高可用(pike版本)-keystone

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng1、安装软件包(三个节点)yum install memcached python-memcache...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:38:15
  • 442
    个人资料
    持之以恒
    等级:
    访问量: 44万+
    积分: 4725
    排名: 7407
    最新评论