Install openstack quickly in devstack under Centos7
Prepare the environment
Selinux and iptables disabled
mkdir
-p~/.pip
# Using Douban pip Source
vim~/.pip
/pip
.conf
[global]
index-url=http:
//pypi
.douban.com
/simple/
yum
install
-ygit
# Install git
cd
/home
gitclonehttps:
//github
.com
/openstack-dev/devstack
.git
cd
/home/devstack/tools/
# Devstack cannot run as root by default
.
/create-stack-user
.sh
# A stack user is created.
chown
-Rstack.
/home/devstack
Prepare local. conf
su
stack
# Switching to a stack user
cd
/home/devstack/
# Switch to the devstack directory
cp
samples
/local
.conf./
# Copy a local. conf file to a local directory.
vim
local
.conf
# Edit the local. conf configuration file and fill in the components you want to install
[[
local
|localrc]]
#Definethedevstackinstalldirectory
DEST=
/opt/ice/code/openstack/
#Datadirectory
DATA_DIR=
/opt/ice/data
#Servicedirctory
SERVICE_DIR=
/opt/ice/data/service
#yumcommand
YUM=yum
#nointernet
#OFFLINE=True
#Reclone
RECLONE=True
#allpackageforlib
LIBS_FROM_GIT=True
#MinimalContents
#----------------
#While``stack.sh``ishappytorunwithout``localrc``,devlifeisbetterwhen
#thereareafewminimalvariablesset:
#Ifthe``SERVICE_TOKEN``and``*_PASSWORD``variablesarenotset
#hereyouwillbepromptedtoentervaluesforthemby``stack.sh``
#andtheywillbeaddedto``local.conf``.
SERVICE_TOKEN=ice_token
ADMIN_PASSWORD=admin
MYSQL_PASSWORD=stackdb
RABBIT_PASSWORD=stackmq
SERVICE_PASSWORD=$ADMIN_PASSWORD
#``HOST_IP``shouldbesetmanuallyforbestresultsiftheNICconfiguration
#ofthehostisunusual,i.e.``eth1``hasthedefaultroutebut``eth0``isthe
#publicinterface.Itisauto-detectedin``stack.sh``butoftenisindeterminate
#onlaterrunsduetotheIPmovingfromanEthernetinterfacetoabridgeon
#thehost.Settingitherealsomakesitavailablefor``openrc``toinclude
#whensetting``OS_AUTH_URL``.
#``HOST_IP``isnotsetbydefault.
#HOST_IP=w.x.y.z
#Logging
#-------
#Bydefault``stack.sh``outputonlygoestotheterminalwhereitruns.Itcan
#beconfiguredtoadditionallylogtoafilebysetting``LOGFILE``tothefull
#pathofthedestinationlogfile.Atimestampwillbeappendedtothegivenname.
LOGFILE=$DATA_DIR
/logs/stack
.sh.log
#Oldlogfilesareautomaticallyremovedafter7daystokeepthingsneat.Change
#thenumberofdaysbysetting``LOGDAYS``.
LOGDAYS=2
#Novalogswillbecolorizedif``SYSLOG``isnotset;turnthisoffbysetting
#``LOG_COLOR``false.
#LOG_COLOR=False
#Usingmilestone-proposedbranches
#---------------------------------
#Uncommentthesetograbthemilestone-proposedbranchesfromtherepos:
CINDER_BRANCH=stable
/juno
GLANCE_BRANCH=stable
/juno
KEYSTONE_BRANCH=stable
/juno
NOVA_BRANCH=stable
/juno
NEUTRON_BRANCH=stable
/juno
CEILOMETER_BRANCH=stable
/juno
HORIZON_BRANCH=stable
/juno
REQUIREMENTS_BRANCH=stable
/juno
#-------Service
#
#
ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch,n-xvnc,n-cauth,mysql,rabbit
ENABLED_SERVICES+=,c-sch,c-api,c-vol
ENABLED_SERVICES+=,ceilometer
#Horizonconfig
#disable_servicehorzion
#Installthetempesttestsuite
enable_servicetempest
#Neutron
disable_servicen-net
enable_serviceq-svc
enable_serviceq-agt
enable_serviceq-dhcp
enable_serviceq-l3
enable_serviceq-meta
enable_serviceq-metering
enable_serviceneutron
#VXLANtunnelconfiguration
Q_PLUGIN=ml2
Q_ML2_TENANT_NETWORK_TYPE=vxlan
Install
cd
/home/devstack
.
/stack
.sh
# Start Installation
yum
install
openstack-dashboardhttpd
# The above local. conf does not have horizon. My boss has tested it. I have manually installed horizon.
vim
/etc/openstack-dashboard/local_settings
# The modification content is as follows:
ALLOW_HOSTS=[
'*'
,
'localhost'
]
OPENSTACK_HOST=
"172.16.105.16"
servicehttpdrestart
# Restart the service to take effect
Run Devstack
Admin user
source
/home/devstack/openrc
adminadmin
# Loading environment variables for operations
Demo user
source
/home/devstack/openrc
demodemo
# Loading environment variables for operations
Reference
Http://www.chenshake.com/devstack-installation-and-testing/
This article is from the "the-way-to-cloud" blog, please be sure to keep this source http://iceyao.blog.51cto.com/9426658/1604027