openstack怎么修改仪表盘

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstack怎么修改仪表盘相关的知识,希望对你有一定的参考价值。

参考技术A How To Custom Brand The OpenStack “Horizon” Dashboard
by preston.lee on May 9th, 2012
I’m deploying OpenStack “Essex”on Ubuntu Server12.04, and have the openstack-dashboardpackage installed to provide the web-based “Horizon” GUI component newly added for the Essex release. Canonical also provides an openstack-dashboard-ubuntu-themepackage that brands the Python-based Django GUI. Despite that the last major Canonical-maintained packages based on the OpenStack “Diablo” release in Ubuntu 11.10 did notinclude an administrative GUI, Horizon — as a standalone component — has been very stable for a mainstream debut. In the future, though, I’d like to see a quick and easy way to change the default branding to use your own logo, colors, and titles using only the GUI’s administrative screens.
The horizon documents briefly mention branding customizationto give you a head start, but you probably want more specific steps. Here’s my custom-branded Horizon dashboard with custom colors, logo, and site title:

Once you know where to make the appropriate changes, it’s super simple. Step-by-step:
Create a graphical logo with a transparent background. The text “TGen Cloud” in this example is actually rendered via .png files of multiple sizes I created with a graphics program. I used a 200×27 for the logged-in banner graphic, and 365×50 for the login screen graphic.
Set the html title (shown at the top of the browser window) by adding the following line to /etc/openstack-dashboard/local_settings.pySITE_BRANDING = "Example, Inc. Cloud"
Upload your new graphic files to:/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/img/
Create a new CSS stylesheet — we’ll call ours custom.css — in the directory:/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/css/
Edit your CSS file using the following as a starting point for customization, which simply overrides the Ubuntu customizations made in the ubuntu.css file. Change the colors and image file names as appropriate, though the relative directory paths should be the same./** New theme colors for dashboard that override the defaults:* dark blue: #355796 / rgb(53, 87, 150)* light blue: #BAD3E1 / rgb(186, 211, 225)** By Preston Lee <plee@tgen.org>*/h1.brand background: #355796 repeat-x top left;border-bottom: 2px solid #BAD3E1;h1.brand a background: url(../img/my_cloud_logo_small.png) top left no-repeat;#splash .login background: #355796 url(../img/my_cloud_logo_medium.png) no-repeat center 35px;#splash .login .modal-header border-top: 1px solid #BAD3E1;.btn-primary background-image: none !important;background-color: #355796 !important;border: none !important;box-shadow: none;.btn-primary:hover,.btn-primary:active border: none;box-shadow: none;background-color: #BAD3E1 !important;text-decoration: none;

OpenStack牛顿仪表板无法访问CentOS 7

我正在尝试在centos 7服务器上安装OpenStack newton。一切正常但我无法连接仪表板。

这是我的全部观察。

[root@controller hpchost1]# service httpd status -l
Redirecting to /bin/systemctl status  -l httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─openstack-dashboard.conf
   Active: active (running) since Wed 2017-01-04 05:46:13 UTC; 20s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 4113 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
  Process: 4157 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force (code=exited, status=0/SUCCESS)
  Process: 4133 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=exited, status=0/SUCCESS)
 Main PID: 4180 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─4180 /usr/sbin/httpd -DFOREGROUND
           ├─4182 /usr/sbin/httpd -DFOREGROUND
           ├─4183 (wsgi:keystone- -DFOREGROUND
           ├─4184 (wsgi:keystone- -DFOREGROUND
           ├─4185 (wsgi:keystone- -DFOREGROUND
           ├─4186 (wsgi:keystone- -DFOREGROUND
           ├─4187 (wsgi:keystone- -DFOREGROUND
           ├─4188 (wsgi:keystone- -DFOREGROUND
           ├─4189 (wsgi:keystone- -DFOREGROUND
           ├─4190 (wsgi:keystone- -DFOREGROUND
           ├─4191 (wsgi:keystone- -DFOREGROUND
           ├─4192 (wsgi:keystone- -DFOREGROUND
           ├─4193 /usr/sbin/httpd -DFOREGROUND
           ├─4194 /usr/sbin/httpd -DFOREGROUND
           ├─4195 /usr/sbin/httpd -DFOREGROUND
           ├─4196 /usr/sbin/httpd -DFOREGROUND
           └─4197 /usr/sbin/httpd -DFOREGROUND

Jan 04 05:45:59 controller python[4133]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/action-list/actions-delete-selected.template.html'
Jan 04 05:45:59 controller python[4133]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/action-list/action-list.scss'
Jan 04 05:45:59 controller python[4133]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/action-list/split-button.html'
Jan 04 05:45:59 controller python[4133]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/action-list/actions.controller.js'
Jan 04 05:45:59 controller python[4133]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/action-list/actions.directive.js'
Jan 04 05:45:59 controller python[4133]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/action-list/actions.detail.mock.html'
Jan 04 05:45:59 controller python[4133]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/action-list/actions.custom.mock.html'
Jan 04 05:45:59 controller python[4133]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/action-list/action-list.module.js'
Jan 04 05:45:59 controller python[4133]: Copying '/usr/lib/python2.7/site-packages/horizon/static/framework/widgets/action-list/button-tooltip.directive.js'
Jan 04 05:46:13 controller systemd[1]: Started The Apache HTTP Server.

我的httpd error.log

[Wed Jan 04 05:52:03.403879 2017] [core:notice] [pid 4601] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed Jan 04 05:52:03.405399 2017] [suexec:notice] [pid 4601] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jan 04 05:52:03.423890 2017] [auth_digest:notice] [pid 4601] AH01757: generating secret for digest authentication ...
[Wed Jan 04 05:52:03.424849 2017] [lbmethod_heartbeat:notice] [pid 4601] AH02282: No slotmem from mod_heartmonitor
[Wed Jan 04 05:52:03.440126 2017] [mpm_prefork:notice] [pid 4601] AH00163: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations
[Wed Jan 04 05:52:03.440161 2017] [core:notice] [pid 4601] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

我的openstack-dashboard.conf

WSGIDaemonProcess dashboard
WSGIProcessGroup dashboard
WSGISocketPrefix run/wsgi

WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
Alias /dashboard/static /usr/share/openstack-dashboard/static

<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
  Options All
  AllowOverride All
  Require all granted
</Directory>

<Directory /usr/share/openstack-dashboard/static>
  Options All
  AllowOverride All
  Require all granted
</Directory>

我无法弄清楚这个问题。一切看起来都不错。请帮我弄清问题。

预先感谢。任何形式的帮助将不胜感激。

答案

以下是openstack部署中需要注意的端口列表。对于仪表板,您只需打开端口80即可。

List of ports , openstack

另一答案

我有同样的问题。

遗憾的是,这是Centos的软件包升级引入的一个错误(我认为是Centos 7.4系列)。为了解决这个问题,您需要将“/etc/httpd/conf.d/openstack-dashboard.conf”文件更改为:

WSGIDaemonProcess dashboard
WSGIProcessGroup dashboard
WSGISocketPrefix run/wsgi
WSGIApplicationGroup %{GLOBAL}

WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
Alias /dashboard/static /usr/share/openstack-dashboard/static

<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
  Options All
  AllowOverride All
  Require all granted
</Directory>

<Directory /usr/share/openstack-dashboard/static>
  Options All
  AllowOverride All
  Require all granted
</Directory>

然后重启httpd:systemctl restart httpd

注意:缺少的项目是:WSGIApplicationGroup%{GLOBAL}

以上是关于openstack怎么修改仪表盘的主要内容,如果未能解决你的问题,请参考以下文章

Openstack Horizon 可插拔Panels 和 Groups

Openstack Horizon 可插拔Panels 和 Groups

Openstack - 更改仪表板的管理员密码

OpenStack入门——理论篇:OpenStack的节点类型和架构(含登录的仪表板界面示例)

原创|NO.C.0007——OpenStack.Dashboard|Horizon仪表盘套件|安装仪表盘套件|通过IE登录|

openstack-ocata部署安装