devstack如何安裝openstackpike

這篇文章主要介紹devstack如何安裝openstack pike,文中介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們一定要看完!

創(chuàng)新互聯(lián)專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于成都網(wǎng)站制作、成都網(wǎng)站建設(shè)、潮南網(wǎng)絡(luò)推廣、成都小程序開發(fā)、潮南網(wǎng)絡(luò)營銷、潮南企業(yè)策劃、潮南品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們最大的嘉獎;創(chuàng)新互聯(lián)為所有大學(xué)生創(chuàng)業(yè)者提供潮南建站搭建服務(wù),24小時服務(wù)熱線:18982081108,官方網(wǎng)址:muchs.cn

1.環(huán)境說明

物理機操作系統(tǒng):ubuntu-16.04.4-server-amd64
controller:192.168.18.61 ubuntu61
compute:192.168.18.62 ubuntu62
compute:192.168.18.63 ubuntu63

2.修改apt源

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

3.安裝 python-pip

apt-get install python-pip
檢驗是否安裝成功:pip -V

4.下載devstack

cd /home
git clone https://git.openstack.org/openstack-dev/devstack -b stable/pike
國內(nèi)源
git clone https://git.openstack.org/openstack-dev/devstack -b stable/pike

5.創(chuàng)建stack用戶

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

6.設(shè)置pip的鏡像源

分別為root和stack用戶設(shè)置使用國內(nèi)的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/

7.編輯controller節(jié)點的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

        #初次安裝設(shè)置true,重復(fù)安裝設(shè)置為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

8.切換到stack用戶,執(zhí)行安裝腳本

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

9.安裝compute節(jié)點

同controller節(jié)點操作一致:

更新apt源
安裝 python-pip
下載devstack
創(chuàng)建stack用戶
設(shè)置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用戶,執(zhí)行安裝腳本
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

最后,要讓計算節(jié)點注冊在控制節(jié)點上運行
root@ubuntu61:/opt/stack/devstack/tools# ./discover_hosts.sh

以上是“devstack如何安裝openstack pike”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

網(wǎng)頁名稱:devstack如何安裝openstackpike
轉(zhuǎn)載源于:http://muchs.cn/article28/gdeojp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供域名注冊、動態(tài)網(wǎng)站、品牌網(wǎng)站制作Google、服務(wù)器托管、建站公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站網(wǎng)頁設(shè)計