DevStack

采用豆瓣的pypi进行安装。

目前Devstack脚本已经支持Centos 6.5,那么你可以选择是在Ubuntu 12.04或者CentOS 6.5下来安装,步骤基本都是一样。就是一个git命令安装的区别.

最小化安装CentOS 6.5,我是关闭了selinux,不关闭应该也是可以的。,用root账号登陆。

对于CentOS6.5来说,devstack脚本会添加EPEL和RDO源。

2014年6月6日:文档更新,已经可以支持siwft和trove。不过安装过程,你可能会遇到cliff的bughttps://review.openstack.org/#/c/95916/,如果你遇到horizon无法启动,那么你就去 /etc/httpd/conf.d/ 里把那个配置文件后缀disable去掉就ok。还有就是安装过程,由于启用了heat,会下载一个heat的镜像,会导致安装过程很慢,可以考虑修改stackrc文件,不让下载。另外csdn的git源,也应该没法使用,因为项目太多没有同步了。

修复cilff的bug,估计上游很快就会merge

cd /opt/stack/cliff/
git fetch https://review.openstack.org/openstack/cliff refs/changes/16/95916/4 && git checkout FETCH_HEAD

准备环境

设置使用豆瓣pypi源

mkdir $HOME/.pip
vi $HOME/.pip/pip.conf

输入下面内容

[global]
index-url = http://pypi.douban.com/simple/

简单的做法

mkdir /root/.pip
cat >/root/.pip/pip.conf <<EOF
[global]
index-url = http://pypi.douban.com/simple/
EOF

安装git

yum -y install git

设置iptables

我发现目前版本,devstack不会去打开iptables的80端口,所以在运行脚本前,我设置一下iptables,编辑 /etc/sysconfig/iptables,添加一行,打开80端口。

准备Devstack

下载代码

cd /home
git clone https://github.com/openstack-dev/devstack.git

目前Devstack脚本已经不支持直接使用root身份运行,你需要创建stack用户运行

cd /home/devstack/tools/
./create-stack-user.sh

修改devstack目录权限,让stack用户可以运行

chown -R stack:stack /home/devstack

切换的stack用户下

su stack
cd /home/devstack

devstack运行时候,检测到操作系统是CentOS,会额外添加RDO和EPEL源,由于我的os已经配置好,我需要把添加的步骤注释掉,修改一下 stack.sh 脚本就可以。

进入devstack目录下,创建localrc 文件,默认devstack会创建一个stack-volumes,用文件来模拟,我修改成cinder-volumes。

你还需要修改你的host ip. 我的localrc

# Misc
HOST_IP=172.28.1.132
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
RABBIT_PASSWORD=password


#change from github to csdn
#GIT_BASE=https://code.csdn.net


## vnc

#enable_service n-spice
#enable_service n-novnc
#enable_service n-xvnc


# Reclone each time
#RECLONE=yes
RECLONE=no

## For Keystone
KEYSTONE_TOKEN_FORMAT=PKI

## For Swift
SWIFT_REPLICAS=1
SWIFT_HASH=011688b44136573e209e

# Enable Logging
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=/opt/stack/logs

# Pre-requisite
ENABLED_SERVICES=rabbit,mysql,key

## If you want ZeroMQ instead of RabbitMQ (don't forget to un-declare 'rabbit' from the pre-requesite)
#ENABLED_SERVICES+=,-rabbit,-qpid,zeromq

## If you want Qpid instead of RabbitMQ (don't forget to un-declare 'rabbit' from the pre-requesite)
#ENABLED_SERVICES+=,-rabbit,-zeromq,qpid

# Horizon (Dashboard UI) - (always use the trunk)
ENABLED_SERVICES+=,horizon
HORIZON_REPO=https://github.com/openstack/horizon
HORIZON_BRANCH=master

# Nova - Compute Service
ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch

######vnc
ENABLED_SERVICES+=,n-novnc,n-xvnc


IMAGE_URLS+=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"
#IMAGE_URLS+=",http://172.28.0.1/image/cirros-0.3.0-x86_64-disk.img"


# Nova Network - If you don't want to use Neutron and need a simple network setup (old good stuff!)
#ENABLED_SERVICES+=,n-net

## Nova Cells
ENABLED_SERVICES+=,n-cell

# Glance - Image Service
ENABLED_SERVICES+=,g-api,g-reg

# Swift - Object Storage
ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account

# Neutron - Networking Service
# If Neutron is not declared the old good nova-network will be used
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron

## Neutron - Load Balancing
ENABLED_SERVICES+=,q-lbaas

## Neutron - VPN as a Service
ENABLED_SERVICES+=,q-vpn

## Neutron - Firewall as a Service
ENABLED_SERVICES+=,q-fwaas

# VLAN configuration
#Q_PLUGIN=ml2
#ENABLE_TENANT_VLANS=True

# GRE tunnel configuration
Q_PLUGIN=ml2
ENABLE_TENANT_TUNNELS=True

# VXLAN tunnel configuration
#Q_PLUGIN=ml2
#Q_ML2_TENANT_NETWORK_TYPE=vxlan   

# Cinder - Block Device Service
VOLUME_GROUP="cinder-volumes"
ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch,c-bak

# Heat - Orchestration Service
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
#IMAGE_URLS+=",http://fedorapeople.org/groups/heat/prebuilt-jeos-images/F17-x86_64-cfntools.qcow2"

# Ceilometer - Metering Service (metering + alarming)
ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api
ENABLED_SERVICES+=,ceilometer-alarm-notify,ceilometer-alarm-eval

ENABLED_SERVICES+=,trove,tr-api,tr-tmgr,tr-cond


# Apache fronted for WSGI
APACHE_ENABLED_SERVICES+=keystone,swift
#APACHE_ENABLED_SERVICES+=keystone

 

运行Devstack

记住,我们是使用stack用户运行的。

cd /home/devstack
./stack.sh

默认Devstack创建 admin和demo两个用户,通过设置环境变量可以进行操作

admin

source openrc admin admin

demo

source openrc demo demo
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值