原创|NO.C.0007——OpenStack.Dashboard|Horizon仪表盘套件|安装仪表盘套件|通过IE登录|
Posted Java BBS
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了原创|NO.C.0007——OpenStack.Dashboard|Horizon仪表盘套件|安装仪表盘套件|通过IE登录|相关的知识,希望对你有一定的参考价值。
一、先决条件
1、安装OpenStack compute (nova) 和identity(keystone)service
2、安装Python2.6或2.7,并必须支持Django(增加了一套网页模板)
3、你的浏览器必须支持html5并启用cookies和javascript功能(常规浏览器都支持)
BS结构的访问体系
二、代码构建(在openstack-controller节点部署)
——>环境检查<——
//1、检查环境是否正常
[root@controller ~]# source admin-openrc.sh
[root@controller ~]# nova service-list
+----+------------------+---------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+---------------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-consoleauth | controller.nice.com | internal | enabled | up | 2021-01-11T16:30:54.000000 | - |
| 2 | nova-cert | controller.nice.com | internal | enabled | up | 2021-01-11T16:30:52.000000 | - |
| 3 | nova-conductor | controller.nice.com | internal | enabled | up | 2021-01-11T16:30:55.000000 | - |
| 4 | nova-scheduler | controller.nice.com | internal | enabled | up | 2021-01-11T16:30:53.000000 | - |
| 5 | nova-compute | compute1.nice.com | nova | enabled | up | 2021-01-11T16:30:53.000000 | - |
+----+------------------+---------------------+----------+---------+-------+----------------------------+-----------------+
//检查neutron的代理端
[root@controller ~]# neutron agent-list
+--------------------------------------+--------------------+-------------------+-------+----------------+---------------------------+
| id | agent_type | host | alive | admin_state_up | binary |
+--------------------------------------+--------------------+-------------------+-------+----------------+---------------------------+
| 25122ee3-54d0-4013-9e32-c752bb444874 | Metadata agent | network.nice.com | :-) | True | neutron-metadata-agent |
| 29e66a01-d01a-4bdb-8231-9adcf062b29b | Open vSwitch agent | network.nice.com | :-) | True | neutron-openvswitch-agent |
| 36e27e39-8e6b-4673-914b-ca3dd6ebf5ec | L3 agent | network.nice.com | :-) | True | neutron-l3-agent |
| 82964596-8d90-4001-b52a-6aa1e183c92a | DHCP agent | network.nice.com | :-) | True | neutron-dhcp-agent |
| a6cdf9f1-426a-4614-ab81-659168f846cf | Open vSwitch agent | compute1.nice.com | :-) | True | neutron-openvswitch-agent |
+--------------------------------------+--------------------+-------------------+-------+----------------+---------------------------+
OpenStack Dashboard(Horizon)
1、先决条件
安装OpenStack compute(nova)和identity(keystone)service
安装Python2.6或2.7,并必须支持Django
你的浏览器必须支持HTML5并启用cookies和JavaScript功能。
2、安装和配置
安装仪表盘组件
配置仪表盘
完成安装
OpenStack Dashboard(Horizon)安装(在openstack-controller节点部署)(也可以单独选择一个节点安装)
1、安装仪表盘组件
//openstack-dashboard :openstack仪表盘套件
//httpd:apache服务
//mod_wsgi:代理Python模块
//memcached: Django模板的缓冲作用
//python-memcached:memcached代理工具
[root@controller ~]# yum install openstack-dashboard httpd mod_wsgi memcached python-memcached
Install 4 Packages (+44 Dependent packages)
Total download size: 15 M
Installed size: 58 M
Is this ok [y/d/N]: y
Installed:
httpd.x86_64 0:2.4.6-18.el7.centos memcached.x86_64 0:1.4.15-9.el7 mod_wsgi.x86_64 0:3.4-12.el7_0 openstack-dashboard.noarch 0:2014.2-3.el7.centos
Dependency Installed:
apr.x86_64 0:1.4.8-3.el7 apr-util.x86_64 0:1.5.2-6.el7 fontawesome-fonts.noarch 0:4.1.0-1.el7
fontawesome-fonts-web.noarch 0:4.1.0-1.el7 httpd-tools.x86_64 0:2.4.6-18.el7.centos libevent.x86_64 0:2.0.21-4.el7
mailcap.noarch 0:2.1.41-2.el7 python-XStatic.noarch 0:1.0.1-1.el7 python-XStatic-Angular.noarch 0:1.2.1.1-1.el7
python-XStatic-Angular-Cookies.noarch 0:1.2.1.1-2.el7 python-XStatic-Angular-Mock.noarch 0:1.2.1.1-2.el7 python-XStatic-Bootstrap-Datepicker.noarch 0:1.3.1.0-1.el7.centos
python-XStatic-Bootstrap-SCSS.noarch 0:3.2.0.0-1.el7.centos python-XStatic-D3.noarch 0:3.1.6.2-2.el7 python-XStatic-Font-Awesome.noarch 0:4.1.0.0-1.el7.centos
python-XStatic-Hogan.noarch 0:2.0.0.2-2.el7 python-XStatic-JQuery-Migrate.noarch 0:1.2.1.1-2.el7 python-XStatic-JQuery-TableSorter.noarch 0:2.14.5.1-2.el7
python-XStatic-JQuery-quicksearch.noarch 0:2.0.3.1-2.el7 python-XStatic-JSEncrypt.noarch 0:2.0.0.2-2.el7 python-XStatic-Jasmine.noarch 0:1.3.1.1-2.el7
python-XStatic-QUnit.noarch 0:1.14.0.2-2.el7 python-XStatic-Rickshaw.noarch 0:1.5.0.0-3.el7 python-XStatic-Spin.noarch 0:1.2.5.2-2.el7
python-XStatic-jQuery.noarch 0:1.10.2.1-1.el7.centos python-XStatic-jquery-ui.noarch 0:1.10.4.1-1.el7 python-ceilometerclient.noarch 0:1.0.12-1.el7.centos
python-dateutil.noarch 0:1.5-7.el7 python-django.noarch 0:1.6.5-1.el7 python-django-appconf.noarch 0:0.6-1.el7
python-django-bash-completion.noarch 0:1.6.5-1.el7 python-django-compressor.noarch 0:1.3-1.el7 python-django-horizon.noarch 0:2014.2-3.el7.centos
python-django-openstack-auth.noarch 0:1.1.7-1.el7.centos python-django-pyscss.noarch 0:1.0.5-2.el7 python-heatclient.noarch 0:0.2.12-2.el7.centos
python-lesscpy.noarch 0:0.9j-4.el7 python-lockfile.noarch 1:0.9.1-4.el7 python-ply.noarch 0:3.4-4.el7
python-saharaclient.noarch 0:0.7.4-1.el7.centos python-scss.x86_64 0:1.2.1-1.el7.centos python-troveclient.noarch 0:1.0.7-1.el7.centos
python-versiontools.noarch 0:1.9.1-4.el7 web-assets-filesystem.noarch 0:5-1.el7
Complete!
//4个工具,48个包
2、配置仪表盘
//1、编辑/etc/openstack-dashboard/local_settings文件并完成下列配置
[root@controller ~]# vim /etc/openstack-dashboard/local_settings
//1.1、配置dashboard使用controller节点上的OpenStack服务
OPENSTACK_HOST = "controller.nice.com" //告诉它本机地址是
ALLOWED_HOSTS = ['controller.nice.com', '*'] //设置主机地址,只允许本地访问localhost改为*号,全局访问
//1.2、设置允许来自所有网络的主机访问dashboard
ALLOWED_HOSTS=['*']
//1.3、配置memcached会话存储服务(将原有CACHES区域注释)
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211', //地址是127.0.0.1:11211
} //Python中空格是有严格限制的,注意
}
//1.4、(可选)配置时区
TIME_ZONE="TIME_ZONE"
//地球人一般设置成:
TIME_ZONE = "Asia/Shanghai" //设置时区为亚洲上海
3、完成安装
//1、在RHEL或CentOS上,配置SElinux去允许web服务器访问OpenStack服务(如果你没关SElinux):
[root@controller ~]# setsebool -P httpd_can_network_connect on //此环境已关闭了selinux,不执行
//2、修改相关文件归属,使dashboard CSS可以被加载
[root@controller ~]# chown -R apache:apache /usr/share/openstack-dashboard/static //修改网页文件的属主属组权限
//3、启动web服务和会话保存服务,并设置开机自动启动。
[root@controller ~]# systemctl enable httpd.service memcached.service
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
ln -s '/usr/lib/systemd/system/memcached.service' '/etc/systemd/system/multi-user.target.wants/memcached.service'
[root@controller ~]# systemctl start httpd.service memcached.service
[root@controller ~]# systemctl status httpd.service memcached.service
4、修改本地电脑的hosts文件
C:WindowsSystem32driversetchosts
192.168.222.5 controller.nice.com //添加解析地址
5、验证:
1、访问dashboard在Chrome输入:
http://controller.nice.com/dashboard(建议Chrome浏览器访问)
2、使用admin或demo用户登录
用户名:admin
ADMIN_PASS
仪表盘套件
三、故障解决
1、检查构建环境发现nova-compute服务down的重新启动服务即可
[root@controller ~]# source admin-openrc.sh
//故障现象
[root@controller ~]# nova service-list
+----+------------------+---------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+---------------------+----------+---------+-------+----------------------------+-----------------+
| 5 | nova-compute | compute1.nice.com | nova | enabled | down | 2021-01-11T16:30:53.000000 | - |
+----+------------------+---------------------+----------+---------+-------+----------------------------+-----------------+
//解决方案:
[root@compute1 ~]# systemctl enable libvirtd.service openstack-nova-compute.service
[root@compute1 ~]# systemctl start libvirtd.service openstack-nova-compute.service
辅助文本
二、代码构建
OpenStack Dashboard(Horizon)
1、先决条件
安装OpenStack compute(nova)和identity(keystone)service
安装Python2.6或2.7,并必须支持Django
你的浏览器必须支持HTML5并启用cookies和JavaScript功能。
2、安装和配置
安装仪表盘组件
配置仪表盘
完成安装
OpenStack Dashboard(Horizon)安装(yuanjian)
1、安装仪表盘组件
yum install openstack-dashboard httpd mod_wsgi memcached python-memcached
2、配置仪表盘
//1、编辑/etc/openstack-dashboard/local_settings文件并完成下列配置
//1.1、配置dashboard使用controller节点上的OpenStack服务
OPENSTACK_HOST="controller.nice.com"
//1.2、设置允许来自所有网络的主机访问dashboard
ALLOWED_HOSTS=['*']
//1.3、配置memcached会话存储服务(将原有CACHES区域注释)
CACHES={
'default':{
'BACKEND':'django.core.cache.backends.memcached.
MemcachedCache',
'LOCATINON':'127.0.0.1:11211',
}
}
//1.4、(可选)配置时区
TIME_ZONE="TIME_ZONE"
//地球人一般设置成:
TIME_ZONE="Asia/Shanghai"
3、完成安装
//1、在RHEL或CentOS上,配置SElinux去允许web服务器访问OpenStack服务(如果你没关SElinux):
setsebool -P httpd_can_network_connect on
//2、修改相关文件归属,使dashboard CSS可以被加载
chown -R apache:apache /usr/share/openstack-dashboard/static
//3、启动web服务和会话保存服务,并设置开机自动启动。
systemctl enable httpd.service memcached.service
systemctl start httpd.service memcached.service
4、验证:
1、访问dashboard,在Chrome下输入:
http://controller.nice.com/dashboard
2、使用admin或demo用户登录
END
声明:JavaBBS论坛主要用于IT技术专题的交流学习,为开源技术爱好者提供广泛、权威的技术资料。若您在技术专题有更好的想法或者建议,欢迎交流!!!
推荐阅读
Recommended reading
Git JavaBBS
→
JavaBBS大数据
/dsj
JavaBBS云存储
/ycc
JavaBBS数据库
→
/sjk
JavaBBS云计算
/yjs
JavaBBSIT.Log
→
JavaBBSnginx
→
/ngx
JavaBBSzabbix
→
/zbx
JavaBBSJavaSE
→
/jse
JavaBBS社区文章
→
/bwz
JavaBBS社区资料
→
/bzl
以上是关于原创|NO.C.0007——OpenStack.Dashboard|Horizon仪表盘套件|安装仪表盘套件|通过IE登录|的主要内容,如果未能解决你的问题,请参考以下文章