本文档以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 安装的更多相关文章

  1. #openstack centos6 centos7 kvm镜像制作

    #openstack centos6 centos7 kvm 镜像制作 openstack windows 2008镜像 制作 http://www.cnblogs.com/elvi/p/800129 ...

  2. openstack pike 集群高可用 安装 部署 目录汇总

    # openstack pike 集群高可用 安装部署#安装环境 centos 7 史上最详细的openstack pike版 部署文档欢迎经验分享,欢迎笔记分享欢迎留言,或加QQ群663105353 ...

  3. Linux学习之CentOS6下Mysql数据库的安装与配置

    转自:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建好j ...

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

    CentOS-6.5-x86_64 最小化安装后.怎样安装man 程序? CentOS-6.5-x86_64 最小化安装后,没有man 程序,没它还真的不方便. man 是 manual(手冊)的意思 ...

  5. CentOS-6.6下Tomcat-7.0安装与配置(Linux)

    CentOS-6.6下Tomcat-7.0安装与配置(Linux) 一.认识tomcat Tomcat是一个免费的开源的Serlvet容器,它是Apache基金会的Jakarta项目中的一个核心项目, ...

  6. Centos6下Python3的编译安装

    本文转载自 Centos6下Python3的编译安装 系统环境:CentOS 6.8-Minimal 安装Python依赖包: 1 [root@Python src]# yum install zli ...

  7. centos6.9环境下JDK安装部署

    1.准备jdk安装文件: 这里我使用的是 jdk-7u79-linux-x64.tar.gz 2.在 /usr/local 目录下创建 sotfware目录,并上传JDK文件: 解压文件并修改文件夹为 ...

  8. centos6.9环境下JDK安装

    1.准备jdk安装文件: 这里我使用的是 jdk-7u79-linux-x64.tar.gz 2.在 /usr/local 目录下创建 sotfware目录,并上传JDK文件: 解压文件并修改文件夹为 ...

  9. centos6.8下redis的安装和配置

    centos6.8下redis的安装和配置 下载.安装 在redis官网可以获取到最新版本的redis 进入/usr/local/目录,执行如下命令 wget http://download.redi ...

随机推荐

  1. py 正则表达式 List的使用, cxfreeze打包

    从index.html当做检索出压缩文件,index.html的内容如下: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN& ...

  2. 状压dp的另一种形式

    做的那么多都是一些比较怎么说呢,都是在数网格一类的题目之中,这些题目有些有点固定的套路,而一些需要状态压缩的题目呢,则么是真正对状态转移的考验. 这道题呢,被彻底打脸了,以后一定要任性一点一道题做不出 ...

  3. java string和int之间的相互转化

    java 中string和int之间的相互转化 1 如何将字串 String 转换成整数 int? A. 有两个方法: 1). int i = Integer.parseInt([String]); ...

  4. 转:Java 异常结构体系

    原文地址:Java 异常结构体系 保存一份资料 前几天在参加网易和360公司的在线考试的时候,都出了一道关于java中异常类的多项选择题.这几天翻看了相关书籍和网上一些资料,结合自己的理解与思考,将自 ...

  5. tomcat端口设置

    在tomcat安装目录下,编辑/conf/server.properties 更改对应的端口: 然后系统重启就可以了.

  6. Python开发【笔记】:接口压力测试

    接口压力测试脚本 1.单进程多线程模式 # #!/usr/bin/env python # # -*- coding:utf-8 -*- import time import logging impo ...

  7. python摸爬滚打之day11----函数闭包,迭代器

    1.函数名 函数名就是一个变量名, 函数名存储的是该函数的内存地址.    函数名都可以进行哪些应用? 函数名可以赋值给其他的变量; 函数名可以作容器里的元素使用; 函数名可以当做形参传进另一函数; ...

  8. 1_02 Vue Slot

    slot 插槽 插槽内容 const component ={ template: ` <div> <slot></slot> </div> ` } n ...

  9. oracle中索引快速全扫描和索引全扫描的区别

    当进行index full scan的时候 oracle定位到索引的root block,然后到branch block(如果有的话),再定位到第一个leaf block, 然后根据leaf bloc ...

  10. SVN安装部署

    svn安装版本用的是1.8 SVN属于功能性软件,yum安装即是最佳实践. 安装svn yum install subversion 检查svn是否安装完毕 [root@mysql ~]# rpm - ...