Devstack 安装笔记

个人笔记:

搭建  O版openstack  

apt-get install git -y
apt-get install python-pip -y


mkdir /root/.pip/
cd /root/.pip
touch pip.conf
cat > pip.conf << EOF
[global]
index-url = http://pypi.douban.com/simple #豆瓣源,可以换成其他的源
trusted-host = pypi.douban.com            #添加豆瓣源为可信主机,要不然可能报错
disable-pip-version-check = true          #取消pip版本检查,排除每次都报最新的pip
timeout = 120

EOF

 git clone http://git.trystack.cn/openstack-dev/devstack.git -b stable/ocata
 pip install --upgrade  pip
 pip install -U os-testr

 cd /home/devstack/tools/
./create-stack-user.sh    
chown -R stack:stack /home/devstack
chmod 777 /dev/pts/0
su stack
cd /home/devstack



 touch local.conf
 cat > local.conf <<EOF

 
[[local|localrc]]

# use TryStack git mirror
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git

#OFFLINE=True
RECLONE=True

# Define images to be automatically downloaded during the DevStack built process.
DOWNLOAD_DEFAULT_IMAGES=False
IMAGE_URLS="http://images.trystack.cn/cirros/cirros-0.3.4-x86_64-disk.img"

HOST_IP=192.168.100.130


# Credentials
DATABASE_PASSWORD=admin
ADMIN_PASSWORD=admin
SERVICE_PASSWORD=admin
SERVICE_TOKEN=admin
RABBIT_PASSWORD=admin

HORIZON_BRANCH=stable/mitaka
KEYSTONE_BRANCH=stable/mitaka
NOVA_BRANCH=stable/mitaka
NEUTRON_BRANCH=stable/mitaka
GLANCE_BRANCH=stable/mitaka
CINDER_BRANCH=stable/mitaka


#keystone
KEYSTONE_TOKEN_FORMAT=UUID

##Heat
HEAT_BRANCH=stable/mitaka
enable_service h-eng h-api h-api-cfn h-api-cw

#mistral
enable_plugin mistral http://git.trystack.cn/openstack/deb-mistral
#aodh
enable_plugin aodh http://git.trystack.cn/openstack/deb-aodh

## Swift
SWIFT_BRANCH=stable/mitaka
ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account
SWIFT_REPLICAS=1
SWIFT_HASH=011688b44136573e209e

#magnum
#enable_plugin magnum https://git.openstack.org/openstack/magnum  


## vnc

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


# Enabling Neutron (network) Service
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

## Neutron options
Q_USE_SECGROUP=True
FLOATING_RANGE="192.168.100.0/24"
FIXED_RANGE="10.0.0.0/24"
Q_FLOATING_ALLOCATION_POOL=start=192.168.100.102,end=192.168.100.110
PUBLIC_NETWORK_GATEWAY="192.168.100.128"
Q_L3_ENABLED=True
PUBLIC_INTERFACE=eth1
Q_USE_PROVIDERNET_FOR_PUBLIC=True
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=public:br-ex

# #VLAN configuration.
Q_PLUGIN=ml2
ENABLE_TENANT_VLANS=True

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

EOF




mkdir /opt/stack/logs/


./stack.sh

 #################done##################
 #######################################
 
 
This is your host IP address: 192.168.16.127
This is your host IPv6 address: ::1
Horizon is now available at http://192.168.16.127/dashboard
Keystone is serving at http://192.168.16.127/identity/
The default users are: admin and demo
The password: admin
2017-03-15 02:40:57.832 | WARNING: 
2017-03-15 02:40:57.832 | Using lib/neutron-legacy is deprecated, and it will be removed in the future
2017-03-15 02:40:57.832 | stack.sh completed in 5831 seconds.

 #########################################
 
 
如果打开不了,可能是端口没开:
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT  //开放22端口</span>  
 iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT 
 
端口转发:#
[指定网卡])
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 31521 -j DNAT --to 192.168.0.211:1521 


用iptables做本机端口转发
   iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
 
posted @ 2017-04-04 11:58  tonycloud  阅读(343)  评论(0)    收藏  举报