devStack安装OpenStack Ocata版本 (Linux Bridge+VLAN)
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                devStack安装OpenStack Ocata版本 (Linux Bridge+VLAN)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                
                            
                            
                            控制節點
 
Hostname: controller
 
OS: ubuntu 16.04 server
 
Mem: 8g
 
Disk: 100g
 
網絡1: 192.168.104.10
 
網絡2: manual
 
網絡3: 10.0.0.110 (請根據自己的情況做修改)
 
計算節點 Hostname: compute OS: ubuntu 16.04 server Mem: 8G Disk: 50G 網絡1: 192.168.104.11 網絡2: manual 網絡3: 10.0.0.111 (非必須,只是個人為了ssh方便)
網絡環境說明 網絡1用于openstack的管理 網絡2用于租戶網絡 網絡3用于連接外網
安裝ubuntu 16.04時選擇Virtual Machine host和OpenSSH Server
設置ubuntu使用root用戶 使用安裝時創建的用戶ssh到服務器, 比如用戶名是chenhf, 那么ssh chenhf@10.0.0.110 sudo su - passwd vim /etc/ssh/ssh_config PermitRootLogin yes systemctl restart sshd
配置網絡/etc/network/interfaces
設置ubuntu apt源國內鏡像 http://blog.csdn.net/chenhaifeng2016/article/details/78945600
安裝pip apt install python-pip
設置python pip源國內鏡像 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源也可以使用阿里云、網易、清華大學的源。
 
 
安裝Stack git clone https://git.openstack.org/openstack-dev/devstack -b stable/ocata
創建用戶stack devstack/tools/create-stack-user.sh
mv devstack /opt/stack/ chown -R stack:stack /opt/stack/devstack
切換到用戶stack su - stack
設置pip國內鏡像 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控制節點 創建配置文件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開始安裝 ./stack.sh
 
 
安裝OpenStack計算節點 創建配置文件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
開始安裝 ./stack.sh
 
 
安裝過程中常見問題 報錯No matching distribution found for oslo.messaging===5.17.3 ,查看日志發現是在/opt/stack/requirements/upper-constraints.txt文件的第243行,版本要求為5.17.3,但實際上不存在這個版本,修改版本為5.17.2后就可以成功安裝了。
 
 
讓我們登錄一下dashboard查看一下系統信息。 http://192.168.104.10/dashboard 用戶名和密碼是admin和admin
 
 
 
 
驗證openstack是否安裝成功 http://blog.csdn.net/chenhaifeng2016/article/details/78963397
 
 
下一次會講解如何創建網絡,創建實例 并配置訪問外網和Floating IP。 http://blog.csdn.net/chenhaifeng2016/article/details/78969759
 
 
                            
                        
                        
                        計算節點 Hostname: compute OS: ubuntu 16.04 server Mem: 8G Disk: 50G 網絡1: 192.168.104.11 網絡2: manual 網絡3: 10.0.0.111 (非必須,只是個人為了ssh方便)
網絡環境說明 網絡1用于openstack的管理 網絡2用于租戶網絡 網絡3用于連接外網
安裝ubuntu 16.04時選擇Virtual Machine host和OpenSSH Server
設置ubuntu使用root用戶 使用安裝時創建的用戶ssh到服務器, 比如用戶名是chenhf, 那么ssh chenhf@10.0.0.110 sudo su - passwd vim /etc/ssh/ssh_config PermitRootLogin yes systemctl restart sshd
配置網絡/etc/network/interfaces
設置ubuntu apt源國內鏡像 http://blog.csdn.net/chenhaifeng2016/article/details/78945600
安裝pip apt install python-pip
設置python pip源國內鏡像 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源也可以使用阿里云、網易、清華大學的源。
安裝Stack git clone https://git.openstack.org/openstack-dev/devstack -b stable/ocata
創建用戶stack devstack/tools/create-stack-user.sh
mv devstack /opt/stack/ chown -R stack:stack /opt/stack/devstack
切換到用戶stack su - stack
設置pip國內鏡像 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控制節點 創建配置文件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開始安裝 ./stack.sh
安裝OpenStack計算節點 創建配置文件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
開始安裝 ./stack.sh
安裝過程中常見問題 報錯No matching distribution found for oslo.messaging===5.17.3 ,查看日志發現是在/opt/stack/requirements/upper-constraints.txt文件的第243行,版本要求為5.17.3,但實際上不存在這個版本,修改版本為5.17.2后就可以成功安裝了。
讓我們登錄一下dashboard查看一下系統信息。 http://192.168.104.10/dashboard 用戶名和密碼是admin和admin
驗證openstack是否安裝成功 http://blog.csdn.net/chenhaifeng2016/article/details/78963397
下一次會講解如何創建網絡,創建實例 并配置訪問外網和Floating IP。 http://blog.csdn.net/chenhaifeng2016/article/details/78969759
總結
以上是生活随笔為你收集整理的devStack安装OpenStack Ocata版本 (Linux Bridge+VLAN)的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: Tensorflow GPU安装指南 (
- 下一篇: devstack安装OpenStack
