您的位置:首页 > 运维架构

Install andConfigure OpenStack Dashboard Service (Horizon)

2014-03-21 11:34 561 查看
Based on OpenStack Havana release

Install and Configure OpenStack Dashboard Service (Horizon)
on controller node or any hosts that running dashboard:
yum -y install memcached python-memcached mod_wsgi openstack-dashboard

vi /etc/openstack-dashboard/local_settings
#ALLOWED_HOSTS = ['horizon.example.com', 'localhost']
OPENSTACK_HOST = "controller"
TIME_ZONE = "Asia/Shanghai"
# no space on left side for CACHES

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

#CACHES = {
# 'default': {
# 'BACKEND' : 'django.core.cache.backends.locmem.LocMemCache'
# }
#}

vi /etc/httpd/conf/httpd.conf
# must match OPENSTACK_HOST = "controller"
ServerName controller:80

service httpd start; chkconfig httpd on
service memcached start; chkconfig memcached on

on anything hosts, login with http://controller/dashboard (vi /etc/hosts to add items)





for changing above items value, please edit nova.conf on nova controller node




To use HTTPS:
cd /etc/pki/tls/certs

# Generate private key
openssl genrsa -out server.key 2048

# Generate CSR
openssl req -new -days 3650 -key server.key -out server.csr
Common Name; controller

# Generate Self Signed Key
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt

yum -y install mod_ssl

vi /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/certs/server.key

vi /etc/httpd/conf/httpd.conf
or

vi /etc/httpd/conf.d/openstack-dashboard.conf
# add at the last
RewriteEngine On
RewriteCond %{SERVER_PORT} ^80$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

service httpd restart
and
service memcached restart

now login with http://controller/dashboard will redirect to https://controller/dashboard

本文出自 “Ilovecat(个人笔记)” 博客,请务必保留此出处http://hj192837.blog.51cto.com/655995/1380841
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: