next up previous contents
Next: 設定 openvswitch Up: Quantum 網路服務 Previous: 建立 Openstack-Quantum 用戶   Contents

安裝 Openstack-Quantum

  1. 安裝 quantum 套件。
    [root@kvm4 ~(keystone_admin)]# yum install -y openstack-quantum openstack-quantum-openvswitch
    
  2. Openstack Networking 服務必須連結 qpidd,先確認此服務正常運作。
    [root@kvm4 ~(keystone_admin)]# /etc/init.d/qpidd status
    qpidd (pid  17255) is running...
    
  3. 設定 Openstack Networking。
    [root@kvm4 ~(keystone_admin)]# openstack-config --set /etc/quantum/quantum.conf \
    DEFAULT rpc_backend quantum.openstack.common.rpc.impl_qpid
    [root@kvm4 ~(keystone_admin)]# openstack-config --set /etc/quantum/quantum.conf \
    DEFAULT qpid_hostname 192.168.122.4
    [root@kvm4 ~(keystone_admin)]# openstack-config --set /etc/quantum/quantum.conf \
    DEFAULT qpid_username qpidauth
    [root@kvm4 ~(keystone_admin)]# openstack-config --set /etc/quantum/quantum.conf \
    DEFAULT qpid_password 123qwe
    [root@kvm4 ~(keystone_admin)]# openstack-config --set /etc/quantum/quantum.conf \
    DEFAULT qpid_protocol ssl
    [root@kvm4 ~(keystone_admin)]# openstack-config --set /etc/quantum/quantum.conf \
    keystone_authtoken admin_tenant_name services
    [root@kvm4 ~(keystone_admin)]# openstack-config --set /etc/quantum/quantum.conf \
    keystone_authtoken admin_user quantum
    [root@kvm4 ~(keystone_admin)]# openstack-config --set /etc/quantum/quantum.conf \
    keystone_authtoken admin_password 123qwe
    
  4. 建立用戶 quantum 環境變數載入腳本。
    [root@kvm4 ~(keystone_admin)]# cat > keystonerc_quantum << EOF
    > if [ "\$1" == "" -o "\$1" == 'export' ];then
    >     export OS_USERNAME=quantum
    >     export OS_TENANT_NAME=services
    >     export OS_PASSWORD=123qwe
    >     export OS_AUTH_URL=http://kvm4.deyu.wang:35357/v2.0/
    >     export PS1='[\u@\h \W(keystone_quantum)]\\$ '
    > else
    >     unset OS_USERNAME
    >     unset OS_TENANT_NAME
    >     unset OS_PASSWORD
    >     unset OS_AUTH_URL
    >     export PS1='[\u@\h \W]\\$ '
    > fi
    > EOF
    
  5. 變換環境變數為用戶 quantum。
    [root@kvm4 ~(keystone_admin)]# source keystonerc_quantum 
    [root@kvm4 ~(keystone_quantum)]#
    
  6. 網路設定前一定要先確定本機的主機名稱及對應 ip。
    [root@kvm4 ~(keystone_quantum)]# hostname 
    kvm4.deyu.wang
    [root@kvm4 ~(keystone_quantum)]# host kvm4.deyu.wang
    kvm4.deyu.wang has address 192.168.122.4
    
  7. Openstack Networking 設定會改變設定檔 /etc/nova/nova.conf,故先安裝包含此設定檔的套件 openstack-nova-common,其設定及使用請參考第 [*]
    [root@kvm4 ~(keystone_quantum)]# yum install -y openstack-nova-common
    
  8. 設定 openstack networking 使用外掛 openvswitch。
    [root@kvm4 ~(keystone_quantum)]# quantum-server-setup --yes --rootpw 123qwe --plugin openvswitch
    Quantum plugin: openvswitch
    Plugin: openvswitch => Database: ovs_quantum
    Verified connectivity to MySQL.
    Configuration updates complete!
    
  9. 啟動 quantum-server,並設定開機自動啟動。
    [root@kvm4 ~(keystone_quantum)]# /etc/init.d/quantum-server start
    Starting quantum-server:                           [  OK  ]
    [root@kvm4 ~(keystone_quantum)]# chkconfig quantum-server on
    
  10. 查看啟動紀錄,是否有錯誤?沒有訊息表示正常。
    [root@kvm4 ~(keystone_quantum)]# egrep 'ERROR|CRITICAL' /var/log/quantum/server.log
    
  11. 查看 openstack 狀況,注意 quantum,目前只有 quantum-server 啟動。
    [root@kvm4 ~(keystone_quantum)]# openstack-status 
    .....
    == Quantum services ==
    quantum-server:               active
    quantum-dhcp-agent:           inactive (disabled on boot)
    quantum-l3-agent:             inactive (disabled on boot)
    quantum-linuxbridge-agent:    dead (disabled on boot)
    quantum-openvswitch-agent:    inactive (disabled on boot)
    openvswitch:                  dead
    .....
    



2015-12-29