本文共 3103 字,大约阅读时间需要 10 分钟。
学习openstack 安装实验环境,经过诸多挫折,顺利搭建,记录如下,以作备忘。
环境: linux ubuntu16.04.3 , 虚拟机上安装,openstack是由devstack安装 版本stable/pike
两主机,一个是controller控制节点,安装所有组件,另一台是compute1计算节点
控制主机三个虚拟网卡,计算主机两个虚拟网卡
首先两台电脑安装 ubuntu16.04.3 server版,controller第一网卡设置静态ip:192.168.0.102, 计算节点compute第一个网卡ip:192.168.0.103,安装openssh 并设置允许root远程登录
分别在两台主机开始安装以下步骤:
1.修改apt为国内源
deb xenial main restricted universe multiverse
deb xenial-security main restricted universe multiversedeb xenial-updates main restricted universe multiversedeb xenial-proposed main restricted universe multiversedeb xenial-backports main restricted universe multiverse2.更新源
3.取得devstack代码
4.创建stack用户
5.移动目录
6.切换到 stack 用户
7.编辑local.conf
在 /opt/stack/devstack 目录下,创建 local.conf,控制节和计算节点分别如下--------------controller节点----------------------
[[local|localrc]]MULTI_HOST=trueHOST_IP=192.168.1.102
LOGFILE=/opt/stack/logs/stack.sh.logADMIN_PASSWORD=admin
MYSQL_PASSWORD=secretRABBIT_PASSWORD=secretSERVICE_PASSWORD=secretSERVICE_TOKEN=abcdefghijklmnopqrstuvwxyzdisable_service n-net
enable_service q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron,q-lbaas,q-fwaasQ_AGENT=linuxbridgeENABLE_TENANT_VLANS=TrueTENANT_VLAN_RANGE=3001:4000PHYSICAL_NETWORK=defaultLOG_COLOR=TrueLOGDIR=$DEST/logsSCREEN_LOGDIR=$LOGDIR/screen--------------compute节点----------------------
[[local|localrc]]GIT_BASE=
NOVNC_REPO=SPICE_REPO=DEST=/opt/stack
LOGFILE=$DEST/logs/stack.sh.logVERBOSE=TrueLOGDAYS=1LOG_COLOR=TrueRECLONE=falsePIP_UPGRADE=FlaseDOWNLOAD_DEFAULT_IMAGES=FalseIMAGE_URLS="http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img"IP_VERSION=4SERVICE_IP_VERSION=4ENABLE_IDENTITY_V2=FalseDATABASE_TYPE=mysqlSERVICE_HOST=192.168.1.102MYSQL_HOST=$SERVICE_HOSTRABBIT_HOST=$SERVICE_HOSTGLANCE_HOSTPORT=$SERVICE_HOST:9292ADMIN_PASSWORD=adminMYSQL_PASSWORD=secretRABBIT_PASSWORD=secretSERVICE_PASSWORD=secretNEUTRON_CREATE_INITIAL_NETWORKS=False
MULTI_HOST=1ENABLED_SERVICES=n-cpu,q-agt,n-api-meta,placement-client,n-novnc
NOVA_VNC_ENABLED=TrueNOVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_auto.html"HOST_IP=192.168.1.103
FLAT_INTERFACE=ens33VNCSERVER_PROXYCLIENT_ADDRESS=$HOST_IPVNCSERVER_LISTEN=$HOST_IP8.执行安装脚本
如果中途退出 可以再次运行
也可以运行 ./unstack.sh ./clean.sh清理后重新再执行./stack.sh 直至安装成功DevStack Component Timing
run_process 50
test_with_retry 10apt-get-update 46pip_install 673osc 283wait_for_service 93git_timed 1628dbsync 41Total runtime 4032
This is your host IP address: 192.168.1.102
This is your host IPv6 address: ::1Horizon is now available at Keystone is serving at The default users are: admin and demoThe password: secret10.可以在浏览器登录web管理界面
转载地址:http://phtpo.baihongyu.com/