next up previous contents
Next: NOVNC 設定 Up: Dashboard Previous: Dashboard   Contents

安裝與設定

  1. 安裝 openstack-dashboard 套件。
    [root@controller ~]# yum install openstack-dashboard
    
  2. 編輯設定檔 /etc/openstack-dashboard/local_settings
    [root@controller ~]# vim /etc/openstack-dashboard/local_settings
    
  3. 設定允許所有 IP 存取 dashboard,dashboard 主機在 controoler,其中 163.17.10. 表示接受 163.17.10.xxx IP,另 controller IP 163.17.10.112 一定要加入,否則將無法存取 。
    [root@controller ~]# egrep '^(OPENSTACK_HOST|ALLOWED_HOSTS)'  /etc/openstack-dashboard/local_settings 
    ALLOWED_HOSTS = ['.cyut.edu.tw', 'localhost']
    ALLOWED_HOSTS = ['163.17.27.219', '163.17.10.', 'localhost', '163.17.10.112']
    
    OPENSTACK_HOST = "controller"
    
  4. 設定 memcached session 儲存服務。
    [root@controller ~]# egrep -A6 '^SESSION_ENGINE'  /etc/openstack-dashboard/local_settings 
    SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
    CACHES = {
        'default': {
            'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
            'LOCATION': 'controller:11211',
        },
    }
    
  5. 啟動 Identity API version 3,支援 multidomain,預設 doamin 為 default,預設 role 為 user。
    [root@controller ~]# egrep '^OPENSTACK_KEYSTONE_'  /etc/openstack-dashboard/local_settings 
    OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
    OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'
    OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
    OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
    OPENSTACK_KEYSTONE_BACKEND = {
    
  6. API 版本。
    [root@controller ~]# egrep -A4 '^OPENSTACK_API_VERSIONS'  /etc/openstack-dashboard/local_settings 
    OPENSTACK_API_VERSIONS = {
        "identity": 3,
        "image": 2,
        "volume": 2,
    }
    
  7. 網路設定。
    [root@controller ~]# egrep -A8 '^OPENSTACK_NEUTRON_NETWORK'  /etc/openstack-dashboard/local_settings 
    OPENSTACK_NEUTRON_NETWORK = {
        'enable_router': False,
        'enable_quotas': False,
        'enable_distributed_router': False,
        'enable_ha_router': False,
        'enable_lb': False,
        'enable_firewall': False,
        'enable_vpn': False,
        'enable_fip_topology_check': False,
    
  8. 設定時區 Asia/Taipei。
    [root@controller ~]# egrep '^TIME_ZONE'  /etc/openstack-dashboard/local_settings 
    TIME_ZONE = "Asia/Taipei"
    
  9. 重新啟動 httpd 及 memcached 服務。
    [root@controller ~]# systemctl restart httpd.service memcached.service
    



De-Yu Wang 2018-11-06