This guide will provide the necessary steps to install and configure VCL software. It covers the set up of the database, web portal, and management node.
{{% toc %}}
VCL currently supports the use of mysql database.
Download and Extract the Apache VCL Source
If you have not already done so, follow the instructions on the download page to download and verify apache-VCL-2.3.2.tar.bz2, and put it in /root
Extract the files:
tar -jxvf apache-VCL-2.3.2.tar.bz2
Install MySQL Server
Install MySQL Server 5.x
yum install mysql-server -y
Configure the MySQL daemon (mysqld) to start automatically:
/sbin/chkconfig --level 345 mysqld on
Start the MySQL daemon:
/sbin/service mysqld start
If the iptables firewall is being used and the web server and management nodes will be on different machines, port 3306 should be opened up. Add the following to your iptables config and restart iptables service.
Note: Insert your web server and management node IP address in the right locations.
vi /etc/sysconfig/iptables
Add these rules:
-A RH-Firewall-1-INPUT -m state --state NEW -s <web server IP> -p tcp --dport 3306 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -s <management node IP> -p tcp --dport 3306 -j ACCEPT
Restart iptables:
service iptables restart
Create the VCL Database
Run the MySQL command-line client:
mysql
Create a database:
CREATE DATABASE vcl;
Create a user with SELECT, INSERT, UPDATE, DELETE, and CREATE TEMPORARY TABLES privileges on the database you just created:
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE TEMPORARY TABLES ON vcl.* TO 'vcluser'@'localhost' IDENTIFIED BY 'vcluserpassword';
Exit the MySQL command-line client
exit
Import the vcl.sql file into the database. The vcl.sql file is included in the mysql directory within the Apache VCL source code
mysql vcl < apache-VCL-2.3.2/mysql/vcl.sql
Prerequisites
Web Server:
Required Linux Packages:
Required PHP Modules:
Install the Required Linux Packages & PHP Modules
If your web server is running a Red Hat-based OS, the required components can be installed with:
For RHEL / CentOS 6
yum install httpd mod_ssl php php-gd php-mysql php-xml php-xmlrpc php-ldap php-process -y
For RHEL / CentOS 5
yum install httpd mod_ssl php php-gd php-mysql php-xml php-xmlrpc php-ldap -y
Configure the web server daemon (httpd) to start automatically:
/sbin/chkconfig --level 345 httpd on
Start the web server daemon
/sbin/service httpd start
If SELinux is enabled, run the following command to allow the web server to connect to the database:
/usr/sbin/setsebool -P httpd_can_network_connect=1
If the iptables firewall is being used, port 80 and 443 should be opened up in the iptables config file:
vi /etc/sysconfig/iptables
Add these rules:
-A RH-Firewall-1-INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT
Restart iptables
service iptables restart
Install the VCL Frontend Web Code
If you have not already done so, follow the instructions on the download page to download and verify apache-VCL-2.3.2.tar.bz2, and put it in /root
Extract the files:
tar -jxvf apache-VCL-2.3.2.tar.bz2
Copy the web directory to a location under the web root of your web server and navigate to the destination .ht-inc subdirectory:
cp -r apache-VCL-2.3.2/web/ /var/www/html/vcl cd /var/www/html/vcl/.ht-inc
Copy secrets-default.php to secrets.php:
cp secrets-default.php secrets.php
Edit the secrets.php file:
vi secrets.php
Run the genkeys.sh
./genkeys.sh
Copy conf-default.php to conf.php:
cp conf-default.php conf.php
Modify conf.php to match your site
vi conf.php
Set the owner of the .ht-inc/maintenance directory to the web server user (normally ‘apache’):
chown apache maintenance
Open the testsetup.php page in a web browser:
Log In to the VCL Website
Open the index.php page in your browser (https://my.server.org/vcl/index.php)
Set the admin user password:
Add a Management Node to the Database
Install & Configure phpMyAdmin (Optional): phpMyAdmin is a free and optional tool which allows MySQL to be administered using a web browser. It makes administering the VCL database easier. This tool can be installed on the VCL web server. To install phpMyAdmin, follow the instructions on: phpMyAdmin Installation & Configuration
Prerequisites The following management node installation instructions assume the instructions in these previous sections have been completed:
Supported Operating Systems:
The VCL management node daemon (vcld) has been developed to run on an operating system based on Red Hat Enterprise Linux (RHEL). It has been tested on the following:
Required Linux Packages:
The VCL management node daemon (vcld) requires the following Linux packages and Perl modules in order to run (see step 2 below for installation instructions):
Required Perl Modules:
The VCL management node daemon (vcld) is written in Perl and has been tested on Perl 5.8.x. The following Perl modules available from CPAN are also required (see step 2 below for installation instructions):
Install the VCL Management Node Code - Perl Daemon
If you have not already done so, follow the instructions on the download page to download and verify apache-VCL-2.3.2.tar.bz2, and put it in /root
Extract the files:
tar -jxvf apache-VCL-2.3.2.tar.bz2
Copy the managementnode directory to the location where you want it to reside (typically /usr/local):
cp -r apache-VCL-2.3.2/managementnode /usr/local/vcl
Install the Required Linux Packages & Perl Modules
Run the install_perl_libs.pl script located in the bin directory:
perl /usr/local/vcl/bin/install_perl_libs.pl
The last line of the install_perl_libs.pl script output should be:
COMPLETE: installed all components
Note: The script will hang or terminate if it encounters a problem. If this occurs, you will need to troubleshoot the problem by looking at the output.
The install_perl_libs.pl script included in the VCL distribution will attempt to download and install the required Linux packages and Perl modules. It uses the yum utility to install the required Linux packages. The required Perl modules are available from CPAN - The Comprehensive Perl Archive Network. The install_perl_libs.pl script attempts to download and install the required Perl modules by using the CPAN.pm module which is included with most Perl distributions.
The yum utility should exist on any modern Red Hat-based Linux distribution (Red Hat, CentOS, Fedora, etc). If yum isn't available on your management node OS, you will need to download and install the required Linux packages manually or by using another package management utility. After installing the required Linux packages, attempt to run the install_perl_libs.pl script again.
Configure vcld.conf
Create the /etc/vcl directory:
mkdir /etc/vcl
Copy the stock vcld.conf file to /etc/vcl:
cp /usr/local/vcl/etc/vcl/vcld.conf /etc/vcl
Edit /etc/vcl/vcld.conf:
vi /etc/vcl/vcld.conf
The following lines must be configured in order to start the VCL daemon (vcld) and allow it to check in to the database:
Save the vcld.conf file
Configure the SSH Client
The SSH client on the management node should be configured to prevent SSH processes spawned by the root user to the computers it controls from hanging because of missing or different entries in the known_hosts file.
Edit the ssh_config file:
vi /etc/ssh/ssh_config
Set the following parameters:
Note: If you do not want these settings applied universally on the management node the SSH configuration can also be configured to only apply these settings to certain hosts or only for the root user. Consult the SSH documentation for more information.
Install and Start the VCL Daemon (vcld) Service
Copy the vcld service script to /etc/init.d and name it vcld:
cp /usr/local/vcl/bin/S99vcld.linux /etc/init.d/vcld
Add the vcld service using chkconfig:
/sbin/chkconfig --add vcld
Configure the vcld service to automatically run at runtime levels 3-5:
/sbin/chkconfig --level 345 vcld on
Start the vcld service:
/sbin/service vcld start
Check the vcld service by monitoring the vcld.log file:
tail -f /var/log/vcld.log
You should see the following being added to the log file every few seconds if the management node is checking in with the database:
2012-05-15 13:23:45|25494|vcld:main(167)|lastcheckin time updated for management node 1: 2012-05-15 13:23:45
Set the vclsystem account password for xmlrpc api
Using the vcld -setup tool, set the vclsystem account. This is needed to properly use the block allocation features.
/usr/local/vcl/bin/vcld -setup
Select the options listed below to set the password. When prompted paste or type the password from xmlrpc_pass variable in the vcld.conf file and hit enter.
Select 1. VCL Base Module Select 2. Set Local VCL User Account Password Select 2. vclsystem
Install & Configure the DHCP Service
DHCP service is needed for the private network to provide address to provisioned machines.
Install dhcp if it is not already installed:
yum install dhcp -y
Configure the dhcpd service to automatically start at runlevels 3-5:
/sbin/chkconfig dhcpd on
Configure the dhcpd.conf file.
vi /etc/dhcpd.conf # -or- vi /etc/dhcp/dhcpd.conf
Configure your dhcpd.conf file according to your network configuration. The contents of the dhcpd.conf file will vary based on how your network is configured. Below is an example of a basic dhcpd.conf file:
ddns-update-style none; shared-network eth0 { subnet 10.100.0.0 netmask 255.255.255.0 { ignore unknown-clients; } }
You will add host definitions to the dhcpd.conf file after you add computers to VCL using the website. The website will display the dhcpd.conf host definitions after the computers have been added to VCL, which can be copied and pasted into the dhcpd.conf file.
Start the dhcpd service:
/sbin/service dhcpd start
After you have installed the VCL components, you need to do some initial administration of your new VCL install.
Add Computers
Configure Authorization (follow links appropriate to your site)