Today’s topic of our blog is “OpenStack Dashboard (Horizon): What is Horizon and How to install Horizon”. Dashboard Horizon is one of the components of the OpenStack. Let me give you a brief introduction of what is Horizon.
The Cloud administrators and users have permission to control the OpenStack Compute (Nova), storage and also the networking services for which they require a web-based graphical interface, this web-based graphical interface is OpenStack Horizon.
For instance, for launching VM examples, for observing the size and recent state of the installation of the OpenStack cloud, for managing the networks and also for setting the restrictions on the resources of the cloud which are available to the users, Horizon is used by administrators. And Horizon also serves as a self-serve browser for planning the cloud resources.
This OpenStack Dashboard Horizon interface functions with OpenStack compute Nova which is a compute service, with an object storage system i.e. OpenStack Swift, with the Keystone component of the OpenStack which is an identity management service and so on. All these services are accessed by the Horizon through an OpenStack APIs i.e. Application Programming Interface.
There are three versions of management dashboards which are offered by the OpenStack Horizon. These are:
1. A User Dashboard,
2. A System Dashboard, and
3. A Settings Dashboard.
There are various visual elements of the Horizon interface which contains navigation bar, alerts, tables, and some other elements, needs to be customized and these elements are customized by the Cloud admins. Any present dashboard can be extended by the developers for including extra functionalities by creating an application which combines with the dashboard.
Furthermore, it is feasible to combine with third-party management and supervising tools with the Horizon.
For installing OpenStack Horizon, the basic requirements are as follows:
- Python 2.7
- Django 1.7 or 1.8
- Neutron except for Nova network
Always remember that Horizon is considered as an optional application, and for building their own user interfaces the developers can select Horizon. The current versions of Firefox, Chrome and Internet Explorer 9 and more are the main web browsers which provide support to the Horizon.
Steps for accessing the OpenStack Dashboard
Follow the below steps for accessing the OpenStack Dashboard:
- Log in to any type of system which is capable of connecting to the OpenStack system.
- Setup your browser
- Retain cookies.
- Enter the following location, in the location or the address text box of your browser: http:// system/ horizon/
In the above command, the “system” can either be the name of the OpenStack or the IP address of the OpenStack system in which a Unified Archive of the OpenStack is installed and under the Apache web server, it is executing the OpenStack Horizon service.
The OpenStack system is called the kernel zone if a Unified archive has been installed on the kernel zone. As mentioned earlier, the “system” can either be the name of the kernel zone or the IP address of the kernel zone.
On the login screen enter the information in the following fields as:
- User name: admin
- Password: keep secrete
Depending upon the roles or the access permission of a user, you have logged in as; the functions are made available in the dashboard.
To an OpenStack environment the web browser accessible interface is provided by the Horizon, which permits the users and also the administrators of the OpenStack environment to communicate and handle the different functional elements without deploying any native client tools apart from a web browser.
Installation of Horizon and for preparing it for use you must first:
- Deploy the package of the OpenStack dashboard.
- In OpenStack Keystone generate a “Member” role.
- Enable the httpd service.
- Setup the SELinux for allowing the httpd service to generate outgoing network connections, which also gives permission to connect to the Keystone server.
- For permitting the incoming connections to the httpd service, set up the firewall.
Except in other ways, all the steps mentioned in the above procedure should be carried out when the user is logged in as a root user or as a user who has sudo access.
Steps for Installing Horizon:
Installation of the openstack-dashboard Package:
For installing the OpenStack-dashboard package Use yum install command as follows:
$ sudo yum install -y openstack-dashboard
It is important to note that users always access the dashboard with the help of HTTP in the automatically selected configuration therefore due to the security reasons, it is suggested that the HTTPS should be enabled for encrypting the communication with the dashboard. So you should install the mod-ssl package for supporting the HTTPS as follows:
$ sudo yum install -y mod_ssl
Generating a Member Role in OpenStack Keystone:
Before starting to use dashboard it is important to create an OpenStack Keystone role which is named as “Member” because the Horizon needs this role.
- Confirm as a Keystone administrator by logging in to a system upon which your keystonerc_admin file exists, use following command:
$ source ~/keystonerc_admin
- For creating a “Member” role, use the keystone role-create command as follows:
$ keystone role-create –name Member
|Property | Value |
| id | 8261ac4eabcc4da4b01610dbad6c038a |
|name | Member |
You can use the OPENSTACK_KEYSTONE_DEFAULT_ROLE configuration key if you want to construct Horizon which uses a role apart from the Member role.
The above-mentioned configuration key is stored in /etc/OpenStack-dashboard/local_settings file.
Configuration of httpd or enabling httpd service:
- For enabling the httpd service use the service command as follows:
$ sudo service httpd start
- For ensuring that the httpd service will start by default in the future, use the chkconfig command as follows:
$ sudo chkconfig httpd on
Setting up SELinux:
For checking the status of the SELinux on the system use the getenforce command as follows and this command will possibly return the values like enforcing, Permissive, and Disabled.
It is recommended that, if the SELinux is setup in Enforcing or Permissive mode then you should edit the SELinux policy for permitting the connections from the httpd service to the OpenStack Keystone service.
Now if you want to edit or modify the SELinux policy then use the setsebool command which will permit the httpd service to connect to the Keystone server.
$ sudo setsebool -P httpd_can_network_connect on
Setting up the Firewall:
As mentioned earlier, it is important to setup the system firewall for allowing the users to connect to the dashboard and also for allowing the connections. Also, we have already discussed that both the httpd service and the dashboard provide support to both the HTTP and the HTTPS connections. Due to the security reasons, it is also suggested that you should only start the HTTPS connections.
- Enabling Recommended HTTPS Connections:
Add the following firewall rule to the /etc/sysconfig/iptables configuration file which will allow the incoming connections using HTTPS to the Horizon.
-A INPUT -p tcp -m multiport –dports 443 -j ACCEPT
- Enabling HTTP Connections:
Add the following firewall rule to the /etc/sysconfig/iptables configuration file for allowing the incoming connections using HTTP to the Horizon.
-A INPUT -p tcp -m multiport –dports 80 -j ACCEPT
The above-mentioned rules permit the interaction between all the remote hosts and the system which is executing Horizon services on the ports 80 or 443.
For the changes to take effect, you should restart the iptables service using the following command:
$ sudo service iptables restart
Now you have installed the Horizon Dashboard successfully! For accessing the dashboard for the first time, use your browser and open the correct link to your configuration.
Now you are required to replace the HOSTNAME with the hostname or the IP address of the server on which you have deployed Horizon as follows:
When you are asked, log in with the help of your OpenStack user credentials.
That’s all for today! I hope you find this information helpful. Please do not forget to leave a comment in the comment section below. Thank you for reading the blog. See you soon with another blog on an interesting topic!
People also read: