码迷,mamicode.com
首页 > 其他好文 > 详细

Packstack –answer-file方式部署多节点openstack环境--三节点

时间:2016-05-12 18:34:15      阅读:873      评论:0      收藏:0      [点我收藏+]

标签:

5.1 Centos环境准备

Hostname

IP

         flating ip

func

 

Lxp-node1

192.168.11.10

10.33.41.135

 

Controller+network

 

Lxp-node2

192.168.11.11

10.33.41.136

 

Compute+storage

 

Lxp-node3

192.168.11.12

10.33.41.139

 

Compute+storage

 

 

/etc/hostname都要改

/etc/hosts增加:

192.168.11.10 lxp-node1

192.168.11.11 lxp-node2

192.168.11.12 lxp-node3

10.1.14.235 mirrors.hikvision.com.cn

 

将网卡配置成开机启动:

/etc/sysconfig/network-scripts/ifcfg-eth0中,将ONBOOT=no改为yes

 

配置yum 源,配置为公司内部的yum源,安装会很快

 

 

5.2 使用packstack部署三节点openstack环境

在三个节点安装packstack:

yum install openstack-packstack -y

生成answer-file:

# packstack --gen-answer-file=hcloud.txt

 

修改hcloud.txt中的如下配置:

(1)修改计算节点和网络节点IP

[root@lxp-node1 ~]# grep HOST ./hcloud.txt

CONFIG_CONTROLLER_HOST=192.168.11.10

CONFIG_COMPUTE_HOSTS=192.168.11.10  改为:CONFIG_COMPUTE_HOSTS=192.168.11.11,192.168.11.12

CONFIG_NETWORK_HOSTS=192.168.11.10

CONFIG_VCENTER_HOST=

CONFIG_STORAGE_HOST=192.168.11.10改为:CONFIG_STORAGE_HOST=192.168.11.11,192.168.11.12

CONFIG_SAHARA_HOST=192.168.11.10

CONFIG_AMQP_HOST=192.168.11.10

CONFIG_MARIADB_HOST=192.168.11.10

(2)不安装cirros镜像

另外将CONFIG_PROVISION_DEMO=y改为n

部署之前再检查一下/etc/hostname和/etc/hosts:

节点1

[root@lxp-node1 ~]# cat /etc/hostname

lxp-node1

[root@lxp-node1 ~]# cat /etc/hosts

127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4

::1        localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.11.10 lxp-node1

192.168.11.11 lxp-node2

192.168.11.12 lxp-node3

10.1.14.235 mirrors.hikvision.com.cn

 

节点2

[root@lxp-node2 ~]# cat /etc/hostname

lxp-node2

[root@lxp-node2 ~]# cat /etc/hosts

127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4

::1        localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.11.10 lxp-node1

192.168.11.11 lxp-node2

192.168.11.12 lxp-node3

10.1.14.235 mirrors.hikvision.com.cn

 

节点3

[root@lxp-node3 ~]# cat /etc/hostname

lxp-node3

[root@lxp-node3 ~]# cat /etc/hosts

127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4

::1        localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.11.10 lxp-node1

192.168.11.11 lxp-node2

192.168.11.12 lxp-node3

10.1.14.235 mirrors.hikvision.com.cn

 

再次检查hcloud.txt

[root@lxp-node1 ~]# grep HOST ./hcloud.txt

CONFIG_CONTROLLER_HOST=192.168.11.10

CONFIG_COMPUTE_HOSTS=192.168.11.11,192.168.11.12

CONFIG_NETWORK_HOSTS=192.168.11.10

CONFIG_VCENTER_HOST=

CONFIG_STORAGE_HOST=192.168.11.11,192.168.11.12

CONFIG_SAHARA_HOST=192.168.11.10

 

还有如下选项:

[root@lxp-node1 ~]# grep CONFIG_PROVISION_DEMO ./hcloud.txt

CONFIG_PROVISION_DEMO=n

 

开始部署,只在控制节点执行即可:

# yum install screen

# screen packstack--answer-file=hcloud.txt

 

Welcome to the Packstack setup utility

 

The installation log file is available at:/var/tmp/packstack/20160509-021808-zfHLVi/openstack-setup.log

 

Installing:

Clean Up                                             [DONE ]

Discovering ip protocol version                      [ DONE ]

这里需要手动输入三台节点的密码,接下来一直等待直到部署完成:

root@192.168.11.11‘spassword:

root@192.168.11.10‘spassword:

root@192.168.11.12‘spassword:

Setting up ssh keys                                  [ DONE ]

 

部署成功后,出现如下信息:

**** Installation completed successfully******

 

Additional information:

 *Time synchronization installation was skipped. Please note that unsynchronizedtime on server instances might be problem for some OpenStack components.

 *Warning: NetworkManager is active on 192.168.11.11, 192.168.11.10,192.168.11.12. OpenStack networking currently does not work on systems thathave the Network Manager service enabled.

 *File /root/keystonerc_admin has been created on OpenStack client host192.168.11.10. To use the command line tools you need to source the file.

 * Toaccess the OpenStack Dashboard browse to http://192.168.11.10/dashboard .

Please, find your login credentials storedin the keystonerc_admin in your home directory.

 * Touse Nagios, browse to http://192.168.11.10/nagios username: nagiosadmin,password: 60d5a77204514174

 *The installation log file is available at:/var/tmp/packstack/20160509-021808-zfHLVi/openstack-setup.log

 *The generated manifests are available at:/var/tmp/packstack/20160509-021808-zfHLVi/manifests

 

[screen is terminating]

5.3 基本服务检查

 

[root@lxp-node1 ~(keystone_admin)]# cinder service-list

+------------------+---------------+------+---------+-------+----------------------------+-----------------+

|     Binary      |      Host    | Zone |  Status | State |         Updated_at         | Disabled Reason |

+------------------+---------------+------+---------+-------+----------------------------+-----------------+

| cinder-backup   |   lxp-node1  | nova | enabled |   up  | 2016-05-09T06:44:30.000000 |        -       |

| cinder-scheduler |   lxp-node1  | nova | enabled |   up  | 2016-05-09T06:44:27.000000 |        -       |

cinder-volume   | lxp-node1@lvm | nova | enabled|   up | 2016-05-09T06:44:27.000000 |       -        |

+------------------+---------------+------+---------+-------+----------------------------+-----------------+

[root@lxp-node1 ~(keystone_admin)]#

[root@lxp-node1 ~(keystone_admin)]# nova service-list

+----+------------------+-----------+----------+---------+-------+----------------------------+-----------------+

| Id | Binary           | Host      | Zone    | Status  | State | Updated_at                 | Disabled Reason |

+----+------------------+-----------+----------+---------+-------+----------------------------+-----------------+

| 1 | nova-consoleauth | lxp-node1 | internal | enabled | up    | 2016-05-09T06:44:42.000000 | -               |

| 2 | nova-scheduler   | lxp-node1 |internal | enabled | up    | 2016-05-09T06:44:44.000000| -               |

| 3 | nova-conductor   | lxp-node1 |internal | enabled | up    |2016-05-09T06:44:36.000000 | -              |

| 5 | nova-cert        | lxp-node1 |internal | enabled | up    |2016-05-09T06:44:43.000000 | -               |

| 6 | nova-compute     | lxp-node3 | nova     | enabled | up    | 2016-05-09T06:44:38.000000 | -               |

| 7 | nova-compute     | lxp-node2 | nova     | enabled | up    | 2016-05-09T06:44:45.000000 | -               |

+----+------------------+-----------+----------+---------+-------+----------------------------+-----------------+

[root@lxp-node1 ~(keystone_admin)]#

这里cinder-volume还是安装到了lxp-node1,即控制节点上

这里可能是packstack的bug,不过关系不大,cinder-volume大不了手动部署一下

接下来尝试下四个节点的安装


Packstack –answer-file方式部署多节点openstack环境--三节点

标签:

原文地址:http://blog.csdn.net/xiangpingli/article/details/51352944

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!