devStack安装OpenStack Ocata版本 (Linux Bridge+VLAN)
生活随笔
收集整理的這篇文章主要介紹了
devStack安装OpenStack Ocata版本 (Linux Bridge+VLAN)
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
控制節(jié)點(diǎn)
Hostname: controller
OS: ubuntu 16.04 server
Mem: 8g
Disk: 100g
網(wǎng)絡(luò)1: 192.168.104.10
網(wǎng)絡(luò)2: manual
網(wǎng)絡(luò)3: 10.0.0.110 (請(qǐng)根據(jù)自己的情況做修改)
計(jì)算節(jié)點(diǎn) Hostname: compute OS: ubuntu 16.04 server Mem: 8G Disk: 50G 網(wǎng)絡(luò)1: 192.168.104.11 網(wǎng)絡(luò)2: manual 網(wǎng)絡(luò)3: 10.0.0.111 (非必須,只是個(gè)人為了ssh方便)
網(wǎng)絡(luò)環(huán)境說(shuō)明 網(wǎng)絡(luò)1用于openstack的管理 網(wǎng)絡(luò)2用于租戶(hù)網(wǎng)絡(luò) 網(wǎng)絡(luò)3用于連接外網(wǎng)
安裝ubuntu 16.04時(shí)選擇Virtual Machine host和OpenSSH Server
設(shè)置ubuntu使用root用戶(hù) 使用安裝時(shí)創(chuàng)建的用戶(hù)ssh到服務(wù)器, 比如用戶(hù)名是chenhf, 那么ssh chenhf@10.0.0.110 sudo su - passwd vim /etc/ssh/ssh_config PermitRootLogin yes systemctl restart sshd
配置網(wǎng)絡(luò)/etc/network/interfaces
設(shè)置ubuntu apt源國(guó)內(nèi)鏡像 http://blog.csdn.net/chenhaifeng2016/article/details/78945600
安裝pip apt install python-pip
設(shè)置python pip源國(guó)內(nèi)鏡像 mkdir .pip vim .pip/pip.conf [global] index-url = https://pypi.douban.com/simple download_cache = ~/.cache/pip [install] use-mirrors = true mirrors = http://pypi.douban.com/
ubuntu apt源和python pip源也可以使用阿里云、網(wǎng)易、清華大學(xué)的源。
安裝Stack git clone https://git.openstack.org/openstack-dev/devstack -b stable/ocata
創(chuàng)建用戶(hù)stack devstack/tools/create-stack-user.sh
mv devstack /opt/stack/ chown -R stack:stack /opt/stack/devstack
切換到用戶(hù)stack su - stack
設(shè)置pip國(guó)內(nèi)鏡像 mkdir .pip vim .pip/pip.conf [global] index-url = https://pypi.douban.com/simple download_cache = ~/.cache/pip [install] use-mirrors = true mirrors = http://pypi.douban.com/
安裝OpenStack控制節(jié)點(diǎn) 創(chuàng)建配置文件local.conf [[local|localrc]]MULTI_HOST=true# management & api network HOST_IP=192.168.104.10 LOGFILE=/opt/stack/logs/stack.sh.log# Credentials ADMIN_PASSWORD=admin MYSQL_PASSWORD=secret RABBIT_PASSWORD=secret SERVICE_PASSWORD=secret SERVICE_TOKEN=abcdefghijklmnopqrstuvwxyz# enable neutron-ml2-vlan disable_service n-net enable_service q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron,q-lbaas,q-fwaas Q_AGENT=linuxbridge ENABLE_TENANT_VLANS=True TENANT_VLAN_RANGE=3001:4000 PHYSICAL_NETWORK=defaultLOG_COLOR=True LOGDIR=$DEST/logs SCREEN_LOGDIR=$LOGDIR/screen# 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.gitHORIZON_BRANCH=stable/ocata KEYSTONE_BRANCH=stable/ocata NOVA_BRANCH=stable/ocata NEUTRON_BRANCH=stable/ocata GLANCE_BRANCH=stable/ocata CINDER_BRANCH=stable/ocataenable_service placement-api enable_service placement-client開(kāi)始安裝 ./stack.sh
安裝OpenStack計(jì)算節(jié)點(diǎn) 創(chuàng)建配置文件local.conf [[local|localrc]]MULTI_HOST=true # management & api network HOST_IP=192.168.104.11# Credentials ADMIN_PASSWORD=admin MYSQL_PASSWORD=secret RABBIT_PASSWORD=secret SERVICE_PASSWORD=secret SERVICE_TOKEN=abcdefghijklmnopqrstuvwxyz# Service information SERVICE_HOST=192.168.104.10 MYSQL_HOST=$SERVICE_HOST RABBIT_HOST=$SERVICE_HOST GLANCE_HOSTPORT=$SERVICE_HOST:9292 Q_HOST=$SERVICE_HOST KEYSTONE_AUTH_HOST=$SERVICE_HOST KEYSTONE_SERVICE_HOST=$SERVICE_HOSTENABLED_SERVICES=n-cpu,q-agt,neutron Q_AGENT=linuxbridge ENABLE_TENANT_VLANS=True TENANT_VLAN_RANGE=3001:4000 PHYSICAL_NETWORK=default# vnc config NOVA_VNC_ENABLED=True NOVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_auto.html" VNCSERVER_LISTEN=$HOST_IP VNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTENLOG_COLOR=True LOGDIR=$DEST/logs SCREEN_LOGDIR=$LOGDIR/screen# 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.gitHORIZON_BRANCH=stable/ocata KEYSTONE_BRANCH=stable/ocata NOVA_BRANCH=stable/ocata NEUTRON_BRANCH=stable/ocata GLANCE_BRANCH=stable/ocata CINDER_BRANCH=stable/ocataenable_service placement-api enable_service placement-client
開(kāi)始安裝 ./stack.sh
安裝過(guò)程中常見(jiàn)問(wèn)題 報(bào)錯(cuò)No matching distribution found for oslo.messaging===5.17.3 ,查看日志發(fā)現(xiàn)是在/opt/stack/requirements/upper-constraints.txt文件的第243行,版本要求為5.17.3,但實(shí)際上不存在這個(gè)版本,修改版本為5.17.2后就可以成功安裝了。
讓我們登錄一下dashboard查看一下系統(tǒng)信息。 http://192.168.104.10/dashboard 用戶(hù)名和密碼是admin和admin
驗(yàn)證openstack是否安裝成功 http://blog.csdn.net/chenhaifeng2016/article/details/78963397
下一次會(huì)講解如何創(chuàng)建網(wǎng)絡(luò),創(chuàng)建實(shí)例 并配置訪問(wèn)外網(wǎng)和Floating IP。 http://blog.csdn.net/chenhaifeng2016/article/details/78969759
計(jì)算節(jié)點(diǎn) Hostname: compute OS: ubuntu 16.04 server Mem: 8G Disk: 50G 網(wǎng)絡(luò)1: 192.168.104.11 網(wǎng)絡(luò)2: manual 網(wǎng)絡(luò)3: 10.0.0.111 (非必須,只是個(gè)人為了ssh方便)
網(wǎng)絡(luò)環(huán)境說(shuō)明 網(wǎng)絡(luò)1用于openstack的管理 網(wǎng)絡(luò)2用于租戶(hù)網(wǎng)絡(luò) 網(wǎng)絡(luò)3用于連接外網(wǎng)
安裝ubuntu 16.04時(shí)選擇Virtual Machine host和OpenSSH Server
設(shè)置ubuntu使用root用戶(hù) 使用安裝時(shí)創(chuàng)建的用戶(hù)ssh到服務(wù)器, 比如用戶(hù)名是chenhf, 那么ssh chenhf@10.0.0.110 sudo su - passwd vim /etc/ssh/ssh_config PermitRootLogin yes systemctl restart sshd
配置網(wǎng)絡(luò)/etc/network/interfaces
設(shè)置ubuntu apt源國(guó)內(nèi)鏡像 http://blog.csdn.net/chenhaifeng2016/article/details/78945600
安裝pip apt install python-pip
設(shè)置python pip源國(guó)內(nèi)鏡像 mkdir .pip vim .pip/pip.conf [global] index-url = https://pypi.douban.com/simple download_cache = ~/.cache/pip [install] use-mirrors = true mirrors = http://pypi.douban.com/
ubuntu apt源和python pip源也可以使用阿里云、網(wǎng)易、清華大學(xué)的源。
安裝Stack git clone https://git.openstack.org/openstack-dev/devstack -b stable/ocata
創(chuàng)建用戶(hù)stack devstack/tools/create-stack-user.sh
mv devstack /opt/stack/ chown -R stack:stack /opt/stack/devstack
切換到用戶(hù)stack su - stack
設(shè)置pip國(guó)內(nèi)鏡像 mkdir .pip vim .pip/pip.conf [global] index-url = https://pypi.douban.com/simple download_cache = ~/.cache/pip [install] use-mirrors = true mirrors = http://pypi.douban.com/
安裝OpenStack控制節(jié)點(diǎn) 創(chuàng)建配置文件local.conf [[local|localrc]]MULTI_HOST=true# management & api network HOST_IP=192.168.104.10 LOGFILE=/opt/stack/logs/stack.sh.log# Credentials ADMIN_PASSWORD=admin MYSQL_PASSWORD=secret RABBIT_PASSWORD=secret SERVICE_PASSWORD=secret SERVICE_TOKEN=abcdefghijklmnopqrstuvwxyz# enable neutron-ml2-vlan disable_service n-net enable_service q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron,q-lbaas,q-fwaas Q_AGENT=linuxbridge ENABLE_TENANT_VLANS=True TENANT_VLAN_RANGE=3001:4000 PHYSICAL_NETWORK=defaultLOG_COLOR=True LOGDIR=$DEST/logs SCREEN_LOGDIR=$LOGDIR/screen# 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.gitHORIZON_BRANCH=stable/ocata KEYSTONE_BRANCH=stable/ocata NOVA_BRANCH=stable/ocata NEUTRON_BRANCH=stable/ocata GLANCE_BRANCH=stable/ocata CINDER_BRANCH=stable/ocataenable_service placement-api enable_service placement-client開(kāi)始安裝 ./stack.sh
安裝OpenStack計(jì)算節(jié)點(diǎn) 創(chuàng)建配置文件local.conf [[local|localrc]]MULTI_HOST=true # management & api network HOST_IP=192.168.104.11# Credentials ADMIN_PASSWORD=admin MYSQL_PASSWORD=secret RABBIT_PASSWORD=secret SERVICE_PASSWORD=secret SERVICE_TOKEN=abcdefghijklmnopqrstuvwxyz# Service information SERVICE_HOST=192.168.104.10 MYSQL_HOST=$SERVICE_HOST RABBIT_HOST=$SERVICE_HOST GLANCE_HOSTPORT=$SERVICE_HOST:9292 Q_HOST=$SERVICE_HOST KEYSTONE_AUTH_HOST=$SERVICE_HOST KEYSTONE_SERVICE_HOST=$SERVICE_HOSTENABLED_SERVICES=n-cpu,q-agt,neutron Q_AGENT=linuxbridge ENABLE_TENANT_VLANS=True TENANT_VLAN_RANGE=3001:4000 PHYSICAL_NETWORK=default# vnc config NOVA_VNC_ENABLED=True NOVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_auto.html" VNCSERVER_LISTEN=$HOST_IP VNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTENLOG_COLOR=True LOGDIR=$DEST/logs SCREEN_LOGDIR=$LOGDIR/screen# 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.gitHORIZON_BRANCH=stable/ocata KEYSTONE_BRANCH=stable/ocata NOVA_BRANCH=stable/ocata NEUTRON_BRANCH=stable/ocata GLANCE_BRANCH=stable/ocata CINDER_BRANCH=stable/ocataenable_service placement-api enable_service placement-client
開(kāi)始安裝 ./stack.sh
安裝過(guò)程中常見(jiàn)問(wèn)題 報(bào)錯(cuò)No matching distribution found for oslo.messaging===5.17.3 ,查看日志發(fā)現(xiàn)是在/opt/stack/requirements/upper-constraints.txt文件的第243行,版本要求為5.17.3,但實(shí)際上不存在這個(gè)版本,修改版本為5.17.2后就可以成功安裝了。
讓我們登錄一下dashboard查看一下系統(tǒng)信息。 http://192.168.104.10/dashboard 用戶(hù)名和密碼是admin和admin
驗(yàn)證openstack是否安裝成功 http://blog.csdn.net/chenhaifeng2016/article/details/78963397
下一次會(huì)講解如何創(chuàng)建網(wǎng)絡(luò),創(chuàng)建實(shí)例 并配置訪問(wèn)外網(wǎng)和Floating IP。 http://blog.csdn.net/chenhaifeng2016/article/details/78969759
總結(jié)
以上是生活随笔為你收集整理的devStack安装OpenStack Ocata版本 (Linux Bridge+VLAN)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Tensorflow GPU安装指南 (
- 下一篇: Linux下axel多线程下载