关闭

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

标签: openstack解决方案私有云高可用nova
295人阅读 评论(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
0
0
查看评论
发表评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场

基于openstack构建私有云实践

主要分享的是云计算、openstack的使用、私有云平台建设、云服务器云硬盘的构建和使用。从基本概念入手到私有云建设,信息量非常大。对于openstack的安装部署都是从官方文档中一步步的介绍,内容非...
  • sdksdk0
  • sdksdk0
  • 2017-02-02 13:35
  • 2743

mitaka版本openstack虚拟化云桌面的实现(spice)

作者:【吴业亮】云计算开发工程师 博客:http://blog.csdn.net/wylfengyujiancheng 什么是vdi VDI,英文全称Virtual Desktop Infrast...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2016-07-05 23:13
  • 7273

openstack 命令行管理二十一 - 云盘管理 (备忘)

Openstack 中, 云硬盘是必须可少的管理工具 常见利用 cinder, nova 命令进行管理
  • signmem
  • signmem
  • 2016-03-15 15:27
  • 3715

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

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

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

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng创建用户# openstack user create --domain default --pro...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:46
  • 286

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

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

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

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujianchengNova 安装软件包# yum install openstack-nova-compute ...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-28 09:34
  • 232

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

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

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

1、三个节点安装haproxy,并设置开机自动启动# yum install -y haproxy # systemctl enable haproxy2、跟rsyslog结合配置haproxy日...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:34
  • 256

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

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng创建用户# openstack user create --domain default --pro...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-28 09:23
  • 206
    个人资料
    • 访问:378020次
    • 积分:4200
    • 等级:
    • 排名:第8416名
    • 原创:141篇
    • 转载:0篇
    • 译文:0篇
    • 评论:65条
    文章分类
    最新评论