1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
selinux、iptables关闭
mkdir
-p ~/.pip
# 使用豆瓣pip源
vim ~/.pip
/pip
.conf
[global]
index-url = http:
//pypi
.douban.com
/simple/
yum
install
-y git
# 安装git
cd
/home
git clone https:
//github
.com
/openstack-dev/devstack
.git
cd
/home/devstack/tools/
# devstack默认不能以root身份运行
.
/create-stack-user
.sh
# 会创建一个stack用户
chown
-R stack.
/home/devstack
|
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
su
stack
# 切换为stack用户
cd
/home/devstack/
# 切换到devstack目录下
cp
samples
/local
.conf ./
# 拷贝一个local.conf到本地来
vim
local
.conf
# 编辑local.conf配置文件,填上你需要安装的组件
[[
local
|localrc]]
# Define the devstack install directory
DEST=
/opt/ice/code/openstack/
#Data directory
DATA_DIR=
/opt/ice/data
#Service dirctory
SERVICE_DIR=
/opt/ice/data/service
#yum command
YUM=yum
# no internet
#OFFLINE=True
#Reclone
RECLONE=True
#all package for lib
LIBS_FROM_GIT=True
# Minimal Contents
# ----------------
# While ``stack.sh`` is happy to run without ``localrc``, devlife is better when
# there are a few minimal variables set:
# If the ``SERVICE_TOKEN`` and ``*_PASSWORD`` variables are not set
# here you will be prompted to enter values for them by ``stack.sh``
# and they will be added to ``local.conf``.
SERVICE_TOKEN=ice_token
ADMIN_PASSWORD=admin
MYSQL_PASSWORD=stackdb
RABBIT_PASSWORD=stackmq
SERVICE_PASSWORD=$ADMIN_PASSWORD
# ``HOST_IP`` should be set manually for best results if the NIC configuration
# of the host is unusual, i.e. ``eth1`` has the default route but ``eth0`` is the
# public interface. It is auto-detected in ``stack.sh`` but often is indeterminate
# on later runs due to the IP moving from an Ethernet interface to a bridge on
# the host. Setting it here also makes it available for ``openrc`` to include
# when setting ``OS_AUTH_URL``.
# ``HOST_IP`` is not set by default.
#HOST_IP=w.x.y.z
# Logging
# -------
# By default ``stack.sh`` output only goes to the terminal where it runs. It can
# be configured to additionally log to a file by setting ``LOGFILE`` to the full
# path of the destination log file. A timestamp will be appended to the given name.
LOGFILE=$DATA_DIR
/logs/stack
.sh.log
# Old log files are automatically removed after 7 days to keep things neat. Change
# the number of days by setting ``LOGDAYS``.
LOGDAYS=2
# Nova logs will be colorized if ``SYSLOG`` is not set; turn this off by setting
# ``LOG_COLOR`` false.
#LOG_COLOR=False
# Using milestone-proposed branches
# ---------------------------------
# Uncomment these to grab the milestone-proposed branches from the repos:
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
# Horizon config
enable_service horzion
# Install the tempest test suite
enable_service tempest
# Neutron
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service q-metering
enable_service neutron
# VXLAN tunnel configuration
Q_PLUGIN=ml2
Q_ML2_TENANT_NETWORK_TYPE=vxlan
|
1
2
|
cd
/home/devstack
.
/stack
.sh
# 开始安装
|
1
2
3
4
|
admin用户
source
/home/devstack/openrc
admin admin
# 加载环境变量进行操作
demo用户
source
/home/devstack/openrc
demo demo
# 加载环境变量进行操作
|