我要评分
获取效率
正确性
完整性
易理解

Installing, Configuring, and Verifying Horizon

Horizon provides a web-based interface for interacting with internal service components. For example, IP addresses are assigned to plugin VM instances and access control is configured through this interface.

Install, configure, and verify Horizon on controller nodes.

Installing and Configuring Components

  1. Install the software package.
    1
    yum -y install openstack-dashboard
    
  2. Edit the etc/openstack-dashboard/local_settings file and make the following changes:
    1
    vim /etc/openstack-dashboard/local_settings
    
    1. Configure the dashboard to use the OpenStack service on the controller node.
      1
      OPENSTACK_HOST = "controller"
      
    2. Allow access from all hosts. Note that there is a space after the comma.
      1
      ALLOWED_HOSTS = ['*', ]
      

    3. Configure the Memcached session storage service. Comment out any other session storage configuration. Pay attention to the format.
      1
      2
      3
      4
      5
      6
      7
      SESSION_ENGINE = 'django.contrib.sessions.backends.file'
      CACHES = {
          'default': {
              'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
              'LOCATION': 'controller:11211',
          }
      }
      

    4. Enable Identity API version 3.
      1
      OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
      
    5. Enable domain support.
      1
      OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
      
    6. Configure the API version. Ensure the correct format.
      1
      2
      3
      4
      5
      OPENSTACK_API_VERSIONS = {
          "identity": 3,
          "image": 2,
          "volume": 3,
      }
      

    7. Set the Default domain as the default domain for the user created using the dashboard.
      1
      OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"
      
    8. Set the user role as the default role for the user created using the dashboard.
      1
      OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
      
    9. Disable the support for Layer 3 network services.
      1
      2
      3
      4
      5
      6
      7
      8
      9
      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,
      

    10. (Optional) Configure the time zone, for example, Shanghai.
      1
      TIME_ZONE = "Asia/Shanghai"
      

  3. Edit the /etc/httpd/conf.d/openstack-dashboard.conf file.
    1
    vim /etc/httpd/conf.d/openstack-dashboard.conf
    
    Add the following information:
    1
    WSGIApplicationGroup %{GLOBAL}
    

  4. Grant permissions on the /usr/share/openstack-dashboard/ folder for the apache user and user group.
    1
    chown -R apache:apache /usr/share/openstack-dashboard/
    
  5. Restart the web server and session storage service.
    1
    systemctl restart httpd.service memcached.service
    

Verifying Horizon

  1. Use a browser to log in to the dashboard using the management IP address of the controller node.

    Example: http://172.168.201.11/dashboard

  2. On the Dashboard page, perform OpenStack service management operations.