首页 > 代码库 > devstack自动部署openstack之localrc文件及遇到的问题解决
devstack自动部署openstack之localrc文件及遇到的问题解决
做完前期准备后,在devstack目录下创建localrc文件,最好不要直接上传,然后将下面的内容贴进去即可,下面是我转载的,以下有出处,但是部署期间有几个问题,我也列出来了。
# Misc
DATABASE_PASSWORD=123456
ADMIN_PASSWORD=123456
SERVICE_PASSWORD=123456
SERVICE_TOKEN=123456
RABBIT_PASSWORD=123456
# Reclone each time
RECLONE=yes
## For Keystone
KEYSTONE_TOKEN_FORMAT=PKI
## For Swift
#SWIFT_REPLICAS=1
#SWIFT_HASH=011688b44136573e209e
# Enable Logging
DEST=/home/openstack
LOGFILE=$DEST/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=$DEST/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,n-novnc,n-cauth
IMAGE_URLS+=",https://launchpad.net/cirros/trunk/0.3.0/+download/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
VIF_PLUGGING_IS_FATAL=False
VIF_PLUGGING_TIMEOUT=10
## 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
ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch
# 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
# Apache fronted for WSGI
APACHE_ENABLED_SERVICES+=keystone
#,swift
#SWIFT_HASH=123456
可能由于源的问题,会有点慢,但是部署是没有问题的,大家可以试试。
脚本转自:http://f.dataguru.cn/thread-355966-1-1.html
以下是我部署时遇到的问题:
1、这是由于你使用的localrc文件网络配置有问题,切记如果没有经验不要改动文件,也不要直接使用FTP等上传,在devstack目录下新建localrc文件,将内容贴进去,然后再查看下有没有乱码,此问题解决,重新运行./stack.sh前要先运行./unstack.sh清理一下。
2、进行到这里,基本脚本没问题了,这是你使用自己创建的用户来运行脚本导致的权限问题,记住不能使用root用户运行,默认使用stack用户没有问题,我是使用我创建的openstack用户来执行的所以遇到这个问题,咱们手动执行sudo -p /opt/stack/status,然后赋权chown -R openstack:openstack /opt/stack/status,你清理下./unstack.sh,再重新运行./stack.sh,是不是成功啦。
3、还有一个问题就是我使用默认的3.0镜像创建虚拟机,无法进入系统,看起来是硬盘的问题,看日志邮箱是网络问题,后来有人说是3.0镜像的BUG,就换了3.2的镜像创建后没有问题了。镜像地址我贴在这里:wgethttp://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img,你可以直接修改localrc文件,也可以自己下载好通过dashboard上传。
以上即是我遇到的问题,仅供参考。
devstack自动部署openstack之localrc文件及我遇到的问题,/home/openstack/devstack/lib/neutron:line 523:neutron_pi not found,permission denied,exit 1,checktime reached,running e2fsck recommended,wget:server returned error:HTTP/1.1 500 internal server error,cloud-setup:failed 15/30:up 885.58 request failed
本文出自 “天魂永恒” 博客,请务必保留此出处http://tianhunyongheng.blog.51cto.com/1446947/1545037
devstack自动部署openstack之localrc文件及遇到的问题解决