Openstack CentOS6.5 ALL IN ONE 安装

本文档以RDO的方式安装单节点、单网卡的Openstack。

RDO是可在Red Hat Enterprise
Linux、Fedora及其变体上运行的社区支持OpenStack版本。部署简单方便,RDO中包含核心的OpenStack组件 –
Nova、Glance、Keystone、Cinder、Neutron、Swift和Horizon,还有用于云应用协调的孵化项目 –
Heat,以及用于资源监视和计量的Ceilometer。利用红帽开发的安装工具 – PackStack,可以实现非常简便轻松的安装过程。

RDO的ALL IN ONE安装方式主要用于测试环境,安装所需要的环境比较容易实现,生产环境推荐使用真实物理机,多节点并逐个安装各组件的方式进行。

一、安装环境:

服务器:vmware虚拟机 系统:CentOS6.5 内核版本:2.6.32-431.3.1.el6.x86_64

网卡:一块(eth0) IP:192.168.8.229 netmask:255.255.255.0
gateway:192.168.8.1(办公网络)

二、配置国内源

Shell

cd/etc/yum.repos.d/

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

yum list

三、设置FQDN

因为RDO的安装方式是通过puppet进行安装需要用到FQDN的命名方式,所以主机名要这样设置,名字可以随意取

vim/etc/sysconfig/network

controller.domain.cc

hostname controller.domain.cc

[root@controller~]# hostname -f

controller.domain.cc

四、修改HOST文件

vi/etc/hosts

192.168.8.229controller.domain.cc

五、 配置cinder-volumes

给cinder-volumes单独一个分区,可以提高性能,我在安装系统的时候预留了一块分区未挂载。如果未预留,可以给虚拟机加一块硬盘做来此分区。

fdisk-l

pvcreate/dev/sda5

vgcreate cinder-volumes/dev/sda5

六、安装packstack

yum install-yhttp://rdo.fedorapeople.org/openstack/openstack-havana/rdo-release-havana.rpm

yum install-yopenstack-packstack

yum-yupdate

yum更新后重启服务器

七、关闭selinux

vi/etc/selinux/config

#SELINUX=enforcing

SELINUX=disabled

八、开始安装

因为我们提前配置了cinder-volumes所以在安装命令中取消cinder-volumes的配置

packstack--allinone--provision-demo=nCONFIG_CINDER_VOLUMES_CREATE=n

九、安装过程

[root@controller~]# packstack  --allinone --provision-demo=n
CONFIG_CINDER_VOLUMES_CREATE=n

Welcome toInstaller setup utility

Packstack changed given value  torequired value/root/.ssh/id_rsa.pub

Installing:

Clean Up...                                            [DONE]

Setting up ssh keys...root@192.168.8.229‘spassword:

root@192.168.8.229‘spassword:

[DONE]

Discovering hosts‘details...                          [DONE]

Adding pre install manifest entries...                 [DONE]

Adding MySQL manifest entries...                       [DONE]

Adding QPID manifest entries...                        [DONE]

Adding Keystone manifest entries...                    [DONE]

Adding Glance Keystone manifest entries...             [DONE]

Adding Glance manifest entries...                      [DONE]

Installing dependencies forCinder...                  [DONE]

Adding Cinder Keystone manifest entries...             [DONE]

Adding Cinder manifest entries...                      [DONE]

Checking ifthe Cinder server hasacinder-volumes vg...[DONE]

Adding Nova API manifest entries...                    [DONE]

Adding Nova Keystone manifest entries...               [DONE]

Adding Nova Cert manifest entries...                   [DONE]

Adding Nova Conductor manifest entries...              [DONE]

Adding Nova Compute manifest entries...                [DONE]

Adding Nova Scheduler manifest entries...              [DONE]

Adding Nova VNC Proxy manifest entries...              [DONE]

Adding Nova Common manifest entries...                 [DONE]

Adding Openstack Network-related Nova manifest entries...[DONE]

Adding Neutron API manifest entries...                 [DONE]

Adding Neutron Keystone manifest entries...            [DONE]

Adding Neutron L3 manifest entries...                  [DONE]

Adding Neutron L2 Agent manifest entries...            [DONE]

Adding Neutron DHCP Agent manifest entries...          [DONE]

Adding Neutron LBaaS Agent manifest entries...         [DONE]

Adding Neutron Metadata Agent manifest entries...      [DONE]

Adding OpenStack Client manifest entries...            [DONE]

Adding Horizon manifest entries...                     [DONE]

Adding Swift Keystone manifest entries...              [DONE]

Adding Swift builder manifest entries...               [DONE]

Adding Swift proxy manifest entries...                 [DONE]

Adding Swift storage manifest entries...               [DONE]

Adding Swift common manifest entries...                [DONE]

Adding Ceilometer manifest entries...                  [DONE]

Adding Ceilometer Keystone manifest entries...         [DONE]

Adding Nagios server manifest entries...               [DONE]

Adding Nagios host manifest entries...                 [DONE]

Adding post install manifest entries...                [DONE]

Preparing servers...                                   [DONE]

Installing Dependencies...                             [DONE]

Copying Puppet modules andmanifests...                [DONE]

Applying Puppet manifests...

Applying192.168.8.229_prescript.pp

192.168.8.229_prescript.pp:               [DONE]

Applying192.168.8.229_mysql.pp

Applying192.168.8.229_qpid.pp

192.168.8.229_mysql.pp:                       [DONE]

192.168.8.229_qpid.pp:                         [DONE]

Applying192.168.8.229_keystone.pp

Applying192.168.8.229_glance.pp

Applying192.168.8.229_cinder.pp

192.168.8.229_keystone.pp:                 [DONE]

192.168.8.229_glance.pp:                     [DONE]

192.168.8.229_cinder.pp:                     [DONE]

Applying192.168.8.229_api_nova.pp

192.168.8.229_api_nova.pp:                 [DONE]

Applying192.168.8.229_nova.pp

192.168.8.229_nova.pp:                         [DONE]

Applying192.168.8.229_neutron.pp

192.168.8.229_neutron.pp:                   [DONE]

Applying192.168.8.229_osclient.pp

Applying192.168.8.229_horizon.pp

192.168.8.229_osclient.pp:                 [DONE]

192.168.8.229_horizon.pp:                   [DONE]

Applying192.168.8.229_ring_swift.pp

192.168.8.229_ring_swift.pp:             [DONE]

Applying192.168.8.229_swift.pp

Applying192.168.8.229_ceilometer.pp

Applying192.168.8.229_nagios.pp

Applying192.168.8.229_nagios_nrpe.pp

192.168.8.229_swift.pp:                       [DONE]

192.168.8.229_nagios.pp:                     [DONE]

192.168.8.229_ceilometer.pp:             [DONE]

192.168.8.229_nagios_nrpe.pp:           [DONE]

Applying192.168.8.229_postscript.pp

192.168.8.229_postscript.pp:             [DONE]

[DONE]

Finalizing...                                          [DONE]

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

Additional information:

*Anewanswerfile was created in:/root/packstack-answers-20140122-060833.txt

*Timesynchronization installation was skipped.Please note that unsynchronized timeon server instances might be problem forsome OpenStack components.

*Did notcreateacinder volume group,one already existed

*File/root/keystonerc_admin has been created on OpenStack client host192.168.8.229.Tousethe commandline tools you need tosource the file.

*Toaccess the OpenStack Dashboard browse tohttp://192.168.8.229/dashboard.

Please,findyour login credentials stored inthe keystonerc_admin inyour home directory.

*TouseNagios,browse tohttp://192.168.8.229/nagios username:nagiosadmin,password:cd40bf59e297418d

*The installation log fileisavailable at:/var/tmp/packstack/20140122-060832-eVf1sO/openstack-setup.log

*The generated manifests are available at:/var/tmp/packstack/20140122-060832-eVf1sO/manifest

安装过程中可能会因为源的问题中断,加上应答文件再次执行即可

packstack--answer-file=/root/packstack-answers-20140121-232841.txt

安装完成后,重启服务器

十、配置网络

安装好以后配置网络

#
cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

ONBOOT=yes

HWADDR=00:E0:81:D8:43:BE

TYPE=OVSPort

DEVICETYPE=ovs

OVS_BRIDGE=br-ex

ifcfg-br-ex 是一个openvswitch
的连接外网的bridge。因为RDO目前的BUG,安装后成后并没有ifcfg-br-ex被创建,需要手动新增。

#
cat /etc/sysconfig/network-scripts/ifcfg-br-ex

DEVICE=br-ex

DEVICETYPE=ovs

TYPE=OVSBridge

BOOTPROTO=static

IPADDR=192.168.8.229

NETMASK=255.255.255.0

GATEWAY=192.168.8.1

ONBOOT=yes

重启网卡

十、安装镜像

安装完成后,用户、密码以及认证地址等环境变量被保存在/root/keystonerc_admin中,命令行下执行命令的时候需要先导入此文件或写到/etc/profile中。

十一、配置安全组规则

打开tcp:22端口和icmp协议的访问权限

Shell






1

2

neutron
security-group-rule-create--protocol icmp--direction
ingress default

neutron security-group-rule-create--protocol tcp--port-range-min22--port-range-max22--direction ingress
default

查看新增的2个规则

Shell






1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

[root@controller~(keystone_admin)]#
neutron security-group-rule-list

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

|id                                  
|security_group|direction|protocol|remote_ip_prefix|remote_group|

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

|058625eb-7ca6-4717-bc80-f3e645f1b664|default        |ingress  
|          |                  |default      |

|1cf19202-07e4-4413-a4b2-566fb3aef72c|default        |ingress  
|          |                  |default      |

|2482ca61-9f4d-4cf9-a81c-c1ee22df1cc0|default        |egress    |          |                  |              |

|40c6cfb5-231f-4427-9655-9194268a33b5|default        |egress    |          |                  |              |

|57df7a08-c3fd-4696-8f63-32571ccecb24|default        |egress    |          |                  |              |

|8391e869-b371-46bf-958e-d89615165fd1|default        |ingress  
|icmp     |0.0.0.0/0        |              |

|890dbd60-242c-4cfb-9eba-f8a755907d8c|default        |ingress  
|tcp      |0.0.0.0/0        |              |

|96218b0c-338e-472c-befb-c2a3eb2db6ef|default        |egress    |          |                  |              |

|a29a3323-595f-4c7b-bdae-53614a62cb1e|default        |egress    |          |                  |              |

|adc87cfb-5a71-4549-bb15-ffc2ab1b862c|default        |egress    |          |                  |              |

|c952a552-50cc-4432-8f64-2ad305fe5496|default        |ingress  
|          |                  |default      |

|d0426da9-5c31-4670-878c-cdb5771dc71e|default        |ingress  
|          |                  |default      |

|d4620fb7-19fc-41cb-be14-5f70858b1b01|default        |ingress  
|          |                  |default      |

|e468de96-1593-495a-bda9-64657b53a9a0|default        |ingress  
|          |                  |default      |

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

[root@controller~(keystone_admin)]#
neutron security-group-rule-show
8391e869-b371-46bf-958e-d89615165fd1

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

|Field            
|Value                                |

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

|direction        
|ingress                              |

|ethertype        
|IPv4                                
|

|id                |8391e869-b371-46bf-958e-d89615165fd1|

|port_range_max    |                                      |

|port_range_min    |                                      |

|protocol          |icmp                                
|

|remote_group_id  
|                                      |

|remote_ip_prefix  |0.0.0.0/0                            |

|security_group_id|6d8aa78f-1f81-4a7d-ac25-5ac5483e82e2|

|tenant_id        
|02da2e92dd6b4478b09aa63b20a11b5a    
|

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

[root@controller~(keystone_admin)]#
neutron security-group-rule-show
890dbd60-242c-4cfb-9eba-f8a755907d8c

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

|Field            
|Value                                |

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

|direction        
|ingress                              |

|ethertype        
|IPv4                                
|

|id                |890dbd60-242c-4cfb-9eba-f8a755907d8c|

|port_range_max    |22                                  
|

|port_range_min    |22                                  
|

|protocol          |tcp                                  |

|remote_group_id  
|                                      |

|remote_ip_prefix  |0.0.0.0/0                            |

|security_group_id|6d8aa78f-1f81-4a7d-ac25-5ac5483e82e2|

|tenant_id        
|02da2e92dd6b4478b09aa63b20a11b5a    
|

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

(未完待续)

遇到的问题及解决方法:

(先把遇到的问题写在这里怕以后忘记)

配置域名访问web界面后报错:

Shell





1

2

3

4

5

6

7

8

9

2014-01-2208:55:57,3236935ERROR django.requestInternal
Server Error:/dashboard/

Traceback(most recent call last):

File"/usr/lib/python2.6/site-packages/django/core/handlers/base.py",line89,inget_response

response=middleware_method(request)

File"/usr/lib/python2.6/site-packages/django/middleware/common.py",line55,inprocess_request

host=request.get_host()

File"/usr/lib/python2.6/site-packages/django/http/__init__.py",line223,inget_host

"Invalid HTTP_HOST header (you may need to set ):
%s"%host)

SuspiciousOperation:Invalid HTTP_HOST header(you
may need
toset
ALLOWED_HOSTS):openstack.domain.cc

原因:django有个ALLOWED_HOSTS的配置,有允许的域名可以解析到服务器IP上。

解决方法:在/etc/openstack-dashboard/local_settings
里面找到ALLOWED_HOSTS在其中加入想要解析的域名,修改后的样子:

Shell






1

ALLOWED_HOSTS=[‘192.168.8.229‘,‘controller.domain.cn‘,‘localhost‘,‘openstack.domain.cc‘,]

重启apache

Openstack CentOS6.5 ALL IN ONE 安装,布布扣,bubuko.com

时间: 2024-10-13 11:06:07

Openstack CentOS6.5 ALL IN ONE 安装的相关文章

#openstack centos6 centos7 kvm镜像制作

#openstack centos6 centos7 kvm 镜像制作 openstack pike 集群高可用  安装部署 汇总 http://www.cnblogs.com/elvi/p/7613861.html #openstack centos6 centos7 镜像制作 #################################### #KVM环境 yum install -y kvm virt-* libvirt bridge-utils qemu-img qemu-kvm-

centos6.5 下rpm离线安装apache2.2+php5.5+mysql5.6

1,安装,mysql 见网址:http://bt9527.blog.51cto.com/9142217/1437877 2,安装apache 在如下页面下载apache的for Linux 的源码包 http://www.apache.org/dist/httpd/ 我放在/home/目录下        解压缩:    tar -zxvf httpd-*.tar.gz    mv httpd-* apache    执行命令:    cd apache    ./configure --pre

Vmware Centos6.2下mysql的安装配置

1.vmware10安装centos6 http://jingyan.baidu.com/article/afd8f4de6c25c534e286e9d9.html 2.Vmware Centos6.2下mysql的安装配置 http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 3.navicat无法连接mysql解决方案 http://www.cnblogs.com/zhuawang/p/3918616.

centos6.5 x86_64下yum安装lnmp+phpmyadmin(2)

平台:centos6.5 x86_64最小化安装 上篇是安装的php.mysql版本有点老,安装个版本新一点的,尝尝鲜.^_^ 1,关闭SElinux vi /etc/selinux/config 将SELINUX=enforcing改为SELINUX=disabled reboot 2,添加yum源 vi nginx.repo                   nginx的源 [nginx] name=nginx repo baseurl=http://nginx.org/packages/

CentOS-6.5-x86_64 最小化安装后,怎样安装 man 程序?

CentOS-6.5-x86_64 最小化安装后.怎样安装man 程序? CentOS-6.5-x86_64 最小化安装后,没有man 程序,没它还真的不方便. man 是 manual(手冊)的意思. Linux 系统下的命令的參数一般都非常多,想要都记住是不可能的.仅仅要记住经常使用的一些即可了.其他的就靠 man 程序了. 使用以下的方法安装: yum install man

centos6.5 64位下安装私有npm

搭建自己的私有npm库 1.安装Couchdb [[email protected]_private ~]# yum install wget [[email protected]_private ~]# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm [[email protected]_private ~]# rpm -ivh --test epel-release-6-

使用centos6.6部署Cobbler--自动安装centos系统

Cobbler是一个开源项目,用来部署和安装系统.Cobbler不仅仅是一个pxe服务器,他还可以管理dns和dhcp.一般数据中心里或者生产环境,是不允许dhcp, 但是pxe需要使用dhcp,所以我们这里根据mac地址来分配IP,这样dhcp就不会影响现有网络了. 1.首先关闭selinux [[email protected] ~]#sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config #重新启动linux系统使配置生效:

centos6.5 x86_64下编译安装strongswan

centos6.5 x86_64 1,安装必须的库 yum update yum install pam-devel openssl-devel make gcc 2,下载strongswan wget http://download.strongswan.org/strongswan.tar.gz tar xzf strongswan.tar.gz cd strongswan-* 3,编译安装 ./configure  --enable-eap-identity --enable-eap-md

centos7和centos6.5环境rpm方式安装mysql5.7和mysql5.6详解

centos7和centos6.5环境rpm方式安装mysql5.7和mysql5.6详解 centos环境安装mysql5.7 其实不建议安装mysql5.7 语法和配置可能和以前的版本区别较大,多坑,慎入 1.yum方式安装(不推荐) a.安装mysql5.7 yum源 centos6: wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpmyum localinstall mysql-community-release