安装和配置

安装和配置

这个部分将描述如何在控制节点上安装和配置仪表板。

The dashboard relies on functional core services including Identity, Image service, Compute, and either Networking (neutron) or legacy networking (nova-network). Environments with stand-alone services such as Object Storage cannot use the dashboard. For more information, see the developer documentation.

注解

这部分假设认证服务使用的Apache HTTP服务和Memcached服务,已经像在 :ref:`Install and configure the Identity service <keystone-install>`中描述的一样正确的安装,配置和操作。

安全并配置组件

注解

默认配置文件在各发行版本中可能不同。你可能需要添加这些部分和选项而不是修改已经存在的部分和选项。另外,在配置片段中的省略号(...)表示默认的配置选项你应该保留。

  1. 安装软件包:

    # zypper install openstack-dashboard
    
  1. 配置 web 服务器:

    # cp /etc/apache2/conf.d/openstack-dashboard.conf.sample \
      /etc/apache2/conf.d/openstack-dashboard.conf
    # a2enmod rewrite;a2enmod ssl;a2enmod wsgi
    
  2. 编辑文件 /srv/www/openstack-dashboard/openstack_dashboard/local/local_settings.py 并完成如下动作:

    • controller 节点上配置仪表盘以使用 OpenStack 服务:

      OPENSTACK_HOST = "controller"
      
    • 允许所有主机访问仪表板:

      ALLOWED_HOSTS = ['*', ]
      
    • 配置 memcached 会话存储服务:

      CACHES = {
          'default': {
               'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
               'LOCATION': '127.0.0.1:11211',
          }
      }
      

      注解

      将其他的会话存储服务配置注释。

    • 为通过仪表盘创建的用户配置默认的 user 角色:

      OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
      
    • 启用multi-domain model:

      OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
      
    • 配置服务API版本,这样你就可以通过Keystone V3 API来登录dashboard:

      OPENSTACK_API_VERSIONS = {
          "identity": 3,
          "volume": 2,
      }
      
    • 如果您选择网络参数1,禁用支持3层网络服务:

      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,
      }
      
    • 可以选择性地配置时区:

      TIME_ZONE = "TIME_ZONE"
      

      使用恰当的时区标识替换``TIME_ZONE`` 。更多信息,参考 list of time zones

完成安装

  • 启动web 服务器和会话存储服务,并配置它们随系统启动:

    # systemctl enable apache2.service memcached.service
    # systemctl restart apache2.service memcached.service
    

    注解

    如果当前的服务当前没有运行,用 ``systemctl_restart``来启动每个服务。

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.