您好,登錄后才能下訂單哦!
這篇文章主要介紹devstack如何安裝openstack pike,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!
物理機操作系統:ubuntu-16.04.4-server-amd64
controller:192.168.18.61 ubuntu61
compute:192.168.18.62 ubuntu62
compute:192.168.18.63 ubuntu63
vi /etc/apt/source.list
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
apt-get update
apt-get install python-pip
檢驗是否安裝成功:pip -V
cd /home
git clone https://git.openstack.org/openstack-dev/devstack -b stable/pike
國內源
git clone https://git.openstack.org/openstack-dev/devstack -b stable/pike
cd /home/devstack/tools/ ./create-stack-user.sh cd /home/ mv devstack /opt/stack chown -R stack:stack /opt/stack/devstack chmod 777 /dev/pts/0
分別為root和stack用戶設置使用國內的pip源
mkdir ~/.pip vi ~/.pip/pip.conf [global] index-url = https://pypi.douban.com/simple download_cache = ~/.cache/pip [install] use-mirrors = true mirrors = http://pypi.douban.com/
su - stack $ mkdir ~/.pip $ vi ~/.pip/pip.conf [global] index-url = https://pypi.douban.com/simple download_cache = ~/.cache/pip [install] use-mirrors = true mirrors = http://pypi.douban.com/
cd /opt/stack/devstack vi local.conf [[local|localrc]] 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 #初次安裝設置true,重復安裝設置為False #RECLONE=False RECLONE=True MULTI_HOST=true HOST_IP=192.168.18.61 LOGFILE=/opt/stack/logs/stack.sh.log ADMIN_PASSWORD=123456 MYSQL_PASSWORD=123456 RABBIT_PASSWORD=123456 SERVICE_PASSWORD=123456 SERVICE_TOKEN=abcdefghijklmnopqrstuvwxyz 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 Q_USE_SECGROUP=True FLOATING_RANGE="192.168.18.0/24" FIXED_RANGE="10.0.0.0/24" Q_FLOATING_ALLOCATION_POOL=start=192.168.18.220,end=192.168.18.230 PUBLIC_NETWORK_GATEWAY="192.168.18.3" Q_L3_ENABLED=True PUBLIC_INTERFACE=enp7s0f0 Q_USE_PROVIDERNET_FOR_PUBLIC=True OVS_PHYSICAL_BRIDGE=br-ex PUBLIC_BRIDGE=br-ex OVS_BRIDGE_MAPPINGS=public:br-ex Q_PLUGIN=ml2 ENABLE_TENANT_VLANS=True LOG_COLOR=True LOGDIR=/opt/stack/logs SCREEN_LOGDIR=$LOGDIR/screen chown -R stack:stack /opt/stack/devstack/local.conf
su - stack cd devstack/ ./stack.sh
中間如果出錯
./unstack.sh 后重新安裝
還是出錯,
./clean.sh 后重新安裝
安裝完成輸出
=========================
DevStack Component Timing
=========================
Total runtime 3375
run_process 15 test_with_retry 6 apt-get-update 11 pip_install 756 osc 237 wait_for_service 25 git_timed 546 dbsync 239 apt-get 361 ========================= This is your host IP address: 192.168.18.61 This is your host IPv6 address: ::1 Horizon is now available at http://192.168.18.61/dashboard Keystone is serving at http://192.168.18.61/identity/ The default users are: admin and demo The password: 123456
同controller節點操作一致:
更新apt源 安裝 python-pip 下載devstack 創建stack用戶 設置pip的鏡像源
編輯local.conf
cd /opt/stack/devstack vi local.conf [[local|localrc]] 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 RECLONE=False MULTI_HOST=true HOST_IP=192.168.18.62 LOGFILE=/opt/stack/logs/stack.sh.log ADMIN_PASSWORD=123456 MYSQL_PASSWORD=123456 RABBIT_PASSWORD=123456 SERVICE_PASSWORD=123456 SERVICE_TOKEN=abcdefghijklmnopqrstuvwxyz SERVICE_HOST=192.168.18.61 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_HOST ENABLED_SERVICES=n-cpu,q-agt,neutron Q_PLUGIN=ml2 ENABLE_TENANT_VLANS=True NEUTRON_CREATE_INITIAL_NETWORKS=False enable_service placement-api NOVA_VNC_ENABLED=True NOVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_auto.html" VNCSERVER_LISTEN=$HOST_IP VNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTEN LOG_COLOR=True disable_service tempest
切換到stack用戶,執行安裝腳本
su - stack
cd devstack/
./stack.sh
安裝完成輸出
========================= DevStack Component Timing ========================= Total runtime 275 run_process 4 apt-get-update 8 pip_install 109 osc 14 wait_for_service 16 apt-get 28 ========================= This is your host IP address: 192.168.18.62 This is your host IPv6 address: ::1 WARNING: Using lib/neutron-legacy is deprecated, and it will be removed in the future Services are running under systemd unit files. For more information see: https://docs.openstack.org/devstack/latest/systemd.html DevStack Version: pike Change: 73d848772186bf674e12f6253263aed9e164413a Merge "Bump the Cinder LVM backing file size to 24Gb." into stable/pike 2018-04-21 05:10:38 +0000 OS Version: Ubuntu 16.04 xenial
最后,要讓計算節點注冊在控制節點上運行
root@ubuntu61:/opt/stack/devstack/tools# ./discover_hosts.sh
以上是“devstack如何安裝openstack pike”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業資訊頻道!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。