|
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
|
|