vCloud Director SP: VM Metrics Database Configuration Part 1
vCloud Director SP 5.6.3 was initially released in October 2014 was the first of the SP Editions that had been forked from the Enterprise 5.x builds that came before it. VMware delivered on their promise to release vCloud Air Features to Network Partners. One of those features was VM Metrics.
- Virtual machine monitoring: Expose current and historical VM performance metrics to tenants through this tenant visible, multi-tenant safe API. Using the API, tenants can troubleshoot application performance problems, auto-scale their applications, and perform capacity planning.
To facilitate the storing of those VM Metrics a separate database needs to be deployed and and then have vCloud configured to use the new database instance.
No worries right?
The catch here is that VMware have decided to use a linearly scalable and fault tolerant database called KairosDB backed by a Cassandra cluster. To satisfy the requirements as set by the vCloud Director team you need to deploy a three node Cassandra Cluster.
While initially a little annoyed that we would have to deploy and manage another group of servers and services I do understand the decision for the vCloud Dev Team to go with a highly scalable database platform…after all development is done for the vCloud Air Service and then handed down to SPs after. At scale it makes sense to use something like this, however it would have been nice to have the option to use a “light” database option like MSSQL or similar…that would have made sense but lets move on!
There isn’t a lot of sizing around the VM Requirements for this Cassandra cluster so I went with three VMs with 1vCPU and 4GB of vRAM with 100GB of storage to start with. The is no guidance on the growth projections so at this point it’s a case of wait and see. Would be good to have someone from the team give estimates on the size of the cluster relative to the number of VMs in an environment.
In the lab I’m using Ubuntu 14.10 but this would apply to the current 14.04.1 LTS release as well. I’ve linked to the Debian install and config at the end of this post…Below are the quick and nasty steps to download the Cassandra tarball and the required packages to build and run a single server Cassandra instance. In production I would spend a bit more time tweaking the config however it gives you an instance to wrap your head around.
apt-get install python-software-properties
apt-get install oracle-jdk7-installer
apt-get install ant ant-optional
tar -xvf apache-cassandra-2.1.2-src.tar.gz
mkdir -p /var/log/cassandra
mkdir -p /var/lib/cassandra
--- hit CTRLX ---
pas ax | grep cassandra
The Video below shows the whole process end to end.
To satisfy the three node Cassandra Requirement we need to repeat the steps on the next two VMs and configure for HA.
Go to the extracted location and the to /conf/cassandra.yaml and edit the config file entries listed below. For the seeds, there is no need to enter in the master IP. For an explanation on the config options the config file is well commented.
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
- seeds: "10.10.10.2,10.10.10.3"
Once that’s been configured on every node in the cluster, restart the Cassandra Services. To validate the cluster status use the nodetool command under the bin folder and you should see the following:
root@host:~/apache-cassandra-2.1.2-src/bin# ./nodetool status
-- Address Load Tokens Owns (effective) Host ID Rack
UN 10.10.10.2 154.86 KB 256 68.0% fb625004-02f1-440c-8bf2-c5b369e0257b 0
UN 10.10.10.3 116.25 KB 256 69.9% 8e7e4b8e-846c-4a58-a847-63efd2801bbc 0
DN 10.10.10.4 67.59 KB 256 62.1% fc8ae45a-24da-46ed-be5c-aecbbe5848a9 0
In the next post I’ll work through the KairosDB install and configuration as well as tying it all together with vCloud Director and I’ll even attempt to pull some VM stats via the API.
Cassandra Debian Install Guide: http://www.datastax.com/documentation/cassandra/2.0/cassandra/install/installDeb_t.html
VMware vCD SP 5.6.3 Document Link: http://pubs.vmware.com/vcd-56/index.jsp#com.vmware.vcloud.install.doc_56/GUID-E5B8EE30-5C99-4609-B92A-B7FAEC1035CE.html