本文介绍Dashboard安装步骤,Dashboard 仅需在控制节点安装。
在按照本教程安装之前,请确保完成以下配置:
【Openstack Train安装】一、虚拟机创建
【Openstack Train安装】二、NTP安装
【Openstack Train安装】三、openstack安装
【Openstack Train安装】四、MariaDB/RabbitMQ 安装
【Openstack Train安装】五、Memcached/Etcd安装
【Openstack Train安装】六、Keystone安装
【Openstack Train安装】七、glance安装
【Openstack Train安装】八、placement安装
【Openstack Train安装】九、Nova安装
【Openstack Train安装】十、Neutron安装
安装环境如下
VMware Workstation | V17.0 |
本机系统 | win11 |
虚拟机系统 | CentOS 7.5 |
本文对应的视频教程:【Openstack Train安装】十一、Dashboard 安装
一、安装dashboard
安装包:
yum install openstack-dashboard -y
对/etc/openstack-dashboard/local_settings进行如下修改:
1、注释掉39行的”ALLOWED_HOSTS”,如下图:
2、将以下内容添加到23行以下:
WEBROOT = '/dashboard/'SESSION_TIMEOUT = 86400OPENSTACK_HOST = "controller"ALLOWED_HOSTS = ['*', ]SESSION_ENGINE = 'django.contrib.sessions.backends.file'CACHES = {'default': {'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache','LOCATION': 'controller:11211',}}OPENSTACK_API_VERSIONS = {"identity": 3,"image": 2,"volume": 3,}OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOSTOPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = TrueOPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"OPENSTACK_NEUTRON_NETWORK = {'enable_router': True,'enable_quotas': True,'enable_rbac_policy': True,'enable_distributed_router': False,'enable_ha_router': False,'enable_ipv6': False,'enable_lb': False,'enable_firewall': False,'enable_vpn': False,'enable_fip_topology_check': True,'default_dns_nameservers': [],'supported_provider_types': ['*'],'segmentation_id_range': {},'extra_provider_types': {},'supported_vnic_types': ['*'],'physical_networks': [],}OPENSTACK_CINDER_FEATURES = {'enable_backup': True,}TIME_ZONE = "Asia/Shanghai"
编辑/etc/httpd/conf.d/openstack-dashboard.conf,在第四行添加以下内容:
WSGIApplicationGroup %{GLOBAL}
重启服务httpd和memcached:
systemctl restart httpd.service memcached.service
二、验证
打开浏览器,访问网站http://192.168.59.20/dashboard/,如下图:
用户admin,密码123456,登录:
如下所示,安装完成。