Data center infrastructure management (DCIM) is a growing challenge for data center managers, and a hot market for software vendors. The openDCIM project offers an open source alternative for companies seeking to improve their asset tracking and capacity planning. OpenDCIM is used for managing the infrastructure of a data center, no matter how small or large. DCIM means many different things to many different people, and there is a multitude of commercial applications available but openDCIM does not contend to be a function by function replacement for commercial applications. It was Initially developed in-house at Vanderbilt University Information Technology Services by Scott Milliken. The software is released under the GPL v3 license that is free to modify it, and share it with others, as long as you acknowledge where it came from.
The main goal for openDCIM is to eliminate the excuse for anybody to ever track their data center inventory using a spreadsheet or word processing document again. It provide complete physical inventory of the data center.
Features of OpenDCIM:
Following are some of its other useful features of OpenDCIM.
- Support for Multiple Rooms (Data Centers)
- Computation of Center of Gravity for each cabinet
- Template management for devices, with ability to override per device
- Optional tracking of cable connections within each cabinet, and for each switch device
- Archival functions for equipment sent to salvage/disposal
- Management of the three key elements of capacity management - space, power, and cooling
- Basic contact management and integration into existing business directory via UserID
- Fault Tolerance Tracking - run a power outage simulation to see what would be affected as each source goes down
In order to install OpenDCIM on CentOS 7, we need to compete the following requirements on our server.
- Web host running Apache 2.x (or higher) with an SSL Enabled site
- MySQL 5.x (or higher) database
- PHP 5.x (or higher)
- User Authentication
- Web Based Client
Installing Apache, PHP, MySQL
Our first step is to make sure that the complete LAMP stack has been properly configured with Apache/PHP and MySQL/MariaDB running.
To do let's run the following command on your CentOS 7 server to install Apache, PHP with few of its required modules and MySQL-MariaDB server.
# yum install httpd php php-mysql php-mbstring mariadb-server
After resolving dependencies the following number of shown packages will be installed on your system after you type 'y' and hit Enter key.
Start and Enable Apache/MySQL services:
Once the packages are installed then using the following commands start and enable the services of Apache and Mysql server and check their status that should be active and running.
# systemctl enable httpd.service # systemctl start httpd.service
# systemctl enable mariadb.service # systemctl start mariadb.service
Create database for openDCIM
Before creating the database for OpenDCIM, Secure your MySQL/MariaDB server by doing the following tasks after running the command as shown.
- Set a root password
- Remove anonymous users
- Disallow root login remotely
- Remove test database and access to it
- Reload privilege tables
Now create a database for openDCIM after conecting to the MariaDB.
# mysql -u root -p
MariaDB [(none)]> create database dcim; MariaDB [(none)]> grant all privileges on dcim.* to 'dcim' identified by 'password'; MariaDB [(none)]> exit
Run the command below to install 'mod_ssl' package on your CentOS 7 server
# yum -y install mod_ssl
Once the package installed, generate the necessary keys and copy them to the proper directories using below commands.
# cd /root
# openssl genrsa -out ca.key 1024
# openssl req -new -key ca.key -out ca.csr
# openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
# cp ca.crt /etc/pki/tls/certs
# cp ca.key /etc/pki/tls/private/ca.key
# cp ca.csr /etc/pki/tls/private/ca.csr
Setup Server Name:
To set the server name of your server open the default web configuration in your editor by searching the 'ServerName' in it and add the following line.
# vim +/ServerName /etc/httpd/conf/httpd.conf
Save and close the configuration file using ':wq!' and then restart apache web services.
# systemctl restart httpd.service
New Virual Host for OpenDCIM:
Create a new configuration file for the openDCIM VirtualHost and put the following configuration in it.
# vim /etc/httpd/conf.d/opendcim_server_name.conf
After save and closing the file now we need to enable basic user authentication to protect the openDCIM web directory by configuring the files we mentioned in above configuration file.
Let's run below commands to create a user after create a new file as shown.
# mkdir -p /opt/openDCIM/opendcim
# touch /opt/openDCIM/opendcim/.htpasswd
# htpasswd /opt/openDCIM/opendcim/.htpasswd Administrator
Let's open Web Access on firewall as on CentOS 7 FirewallD is enabled by default, and blocks access to HTTPS port on 443.
# firewall-cmd --zone=public --add-port=443/tcp --permanent success
# firewall-cmd --reload success
Download and Install openDCIM
After finishing the configuration of the server, now we need to download the openDCIM package from their Office Web Page.
Use below commands to get the package on your server.
# cd /opt/openDCIM/
# curl -O http://opendcim.org/packages/openDCIM-4.2.tar.gz
Extract the archive and create a symbolic link by flowing below commands.
# tar zxf openDCIM-4.2.tar.gz
# ln -s openDCIM-4.2-release opendcim
You can also rename the directory openDCIM-4.2-release to 'opendcim' in case if you don't want to create the symbolic link.
Now, prepare the configuration file for access to the database we have created earlier.
# cd /opt/openDCIM/opendcim
# cp db.inc.php-dist db.inc.php
# vim db.inc.php
$dbhost = 'localhost'; $dbname = 'dcim'; $dbuser = 'dcim'; $dbpass = 'dcimpassword';
# systemctl restart httpd.service
Access OpenDCIM Web Portal:
Now open openDCIM in your browser to proceed with the web based installation.
You will be asked for authentication and after proving the user name and Password you will be directed to OpenDCIM web page where you will be asked to create new Department as shown.
After completing these parameters, switch to the Data Center and give your new Data Center details.
Once you have created an Data center then you will be able to create its cabinet inventory.
You have done, and finished the basic configurations of OpenDCIM .
Thank you for being with us, we have successfully setup OpenDCIM on our CentOS 7 server. Now you can easily manage your Data centers no matter how small or large environment you have. Do share your experience and leave your valuable comments.