本文档以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. nodejs prefix(全局)和cache(缓存)windows下设置

    引:在安装完nodejs后,通过npm下载全局模块默认安装到{%USERDATA%}C:\Users\username\AppData\下的Roaming\npm下,这当然是不太对的默认. 1,安装L ...

  2. 应用docker化

    1)首先安装源代码工具Git.  [root@master~]# yum install-y git  2)从GitHub上下载示例的Java应用源代码.  [root@master~]# cd/op ...

  3. JS页面跳转代码怎么写?总结了5种方法

    我们在建站时有些链接是固定的,比如客服咨询链接,一般是第三方url,如果直接加上去不太专业,那么就想着用站内的页面做跳转,跳转用js比较多,那么JS页面跳转代码怎么写呢?ytkah在网上搜索了一下,大 ...

  4. 误删除innodb ibdata数据文件 文件句柄 文件描述符 proc fd

    误删除innodb ibdata数据文件  文件句柄  文件描述符  proc  fd http://www.cnblogs.com/gomysql/p/3702216.html 提示:如果不小心通过 ...

  5. what's the python之内置函数

    what's the 内置函数? 内置函数,内置函数就是python本身定义好的,我们直接拿来就可以用的函数.(python中一共有68中内置函数.)     Built-in Functions   ...

  6. 谷歌浏览器安装octotree插件

    Octotree Chrome安装与使用方法 Octotree Chrome作用: 主要使你在github查看项目时可以清晰明了的看到项目的结构以及具体代码,使下载代码更具有目的性,减少不必要代码的下 ...

  7. redis.conf密码设置的问题

    requirepass是终端客户端登录需要的密码,配置在服务端 masterauth是从服务器端登录master端需要的密码,配置在从服务端

  8. cordava打包vue项目成app

    注意:安装目录不要以中文命名 1.安装cordova :npm install -g cordova 2.安装java jdk :配置环境变量: 1.系统变量:名:JAVA_HOME    值:C:\ ...

  9. Centos7下ups监控apcupsd的使用

    什么是UPS UPS-Uninterrupted Power System:利用电池化学能作为后备能量,在市电断电等电网故障时,不间断地为用户设备提供(交流)电能的一种能量转换装置. UPS的主要功能 ...

  10. component 理解

    1: sap中的component理解 component分为 genil component 和ui component component相当于整个应用中某一小块的前台/后台所有的东西都包括进去. ...