next up previous contents
Next: 新增計算節點到 CELL 資料庫 Up: Nova Previous: 控制節點安裝與設定   Contents

計算節點安裝與設定

  1. 安裝 openstack-nova-compute 套件。
    [root@ip112 ~]# yum install openstack-nova-compute
    
  2. 編輯 /etc/nova/nova.conf,設定如下章節:
    [root@ip112 ~]# vim /etc/nova/nova.conf 
    [root@ip112 ~]# egrep '^(\[DEF|\[api_d|\[data|\[api|\[keyst|\[vnc|\
    \[glance|\[oslo_c|\[place|[a-z])' /etc/nova/nova.conf 
    [DEFAULT]
    enabled_apis = osapi_compute,metadata
    transport_url = rabbit://openstack:123qwe@controller
    my_ip = 163.17.10.112
    use_neutron = True
    firewall_driver = nova.virt.firewall.NoopFirewallDriver
    [api]
    auth_strategy = keystone
    [api_database]
    connection = mysql+pymysql://nova:123qwe@controller/nova_api
    [database]
    connection = mysql+pymysql://nova:123qwe@controller/nova
    [glance]
    api_servers = http://controller:9292
    [keystone]
    [keystone_authtoken]
    auth_url = http://controller:5000/v3
    memcached_servers = controller:11211
    auth_type = password
    project_domain_name = default
    user_domain_name = default
    project_name = service
    username = nova
    password = 123qwe
    [oslo_concurrency]
    lock_path = /var/lib/nova/tmp
    [placement]
    os_region_name = RegionOne
    project_domain_name = Default
    project_name = service
    auth_type = password
    user_domain_name = Default
    auth_url = http://controller:5000/v3
    username = placement
    password = 123qwe
    [vnc]
    enabled = true
    server_listen = $my_ip
    server_proxyclient_address = $my_ip
    
  3. 查看主機是否支援虛擬技術,只要數字大於 1,就表示支援。
    [root@ip112 ~]# egrep -c '(vmx|svm)' /proc/cpuinfo
    40
    
  4. 編輯 /etc/nova/nova.conf,在章節 libvirt 中設定虛擬化 type 為 qemu。
    [root@ip112 ~]# vim /etc/nova/nova.conf 
    [root@ip112 ~]# egrep '^(\[libvirt|v)' /etc/nova/nova.conf 
    [libvirt]
    virt_type=qemu
    
  5. 啟動 libvirtd 及 openstack-nova-compute 服務,並設定開機啟動。
    [root@ip112 ~]# systemctl enable libvirtd.service openstack-nova-compute.service
    [root@ip112 ~]# systemctl start libvirtd.service openstack-nova-compute.service
    



De-Yu Wang 2018-12-12