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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
apt-get install python-software-properties add-apt-repository ppa:webupd8team/java apt-get update apt-get install oracle-jdk7-installer apt-get install ant ant-optional wget http://psg.mtu.edu/pub/apache/cassandra/2.1.2/apache-cassandra-2.1.2-src.tar.gz tar -xvf apache-cassandra-2.1.2-src.tar.gz cd apache-cassandra-2.1.2-src/ ant mkdir -p /var/log/cassandra mkdir -p /var/lib/cassandra bin/cassandra -f bin/cassandra --- hit CTRLX --- pas ax | grep cassandra 3108 pts/0 SLl 9:32 java -ea -javaagent:bin/../lib/jamm-0.2.8.jar -XX:+CMSClassUnloadingEnabled -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms1024M -Xmx1024M -Xmn100M -XX:+HeapDumpOnOutOfMemoryError -Xss256k -XX:StringTableSize=1000003 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseTLAB -XX:CompileCommandFile=bin/../conf/hotspot_compiler -XX:CMSWaitDuration=10000 -XX:+UseCondCardMark -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.rmi.port=7199 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dlogback.configurationFile=logback.xml -Dcassandra.logdir=bin/../logs -Dcassandra.storagedir=bin/../data -cp bin/../conf:bin/../build/classes/main:bin/../build/classes/thrift:bin/../lib/airline-0.6.jar:bin/../lib/antlr-runtime-3.5.2.jar:bin/../lib/commons-cli-1.1.jar:bin/../lib/commons-codec-1.2.jar:bin/../lib/commons-lang3-3.1.jar:bin/../lib/commons-math3-3.2.jar:bin/../lib/compress-lzf-0.8.4.jar:bin/../lib/concurrentlinkedhashmap-lru-1.4.jar:bin/../lib/disruptor-3.0.1.jar:bin/../lib/guava-16.0.jar:bin/../lib/high-scale-lib-1.0.6.jar:bin/../lib/jackson-core-asl-1.9.2.jar:bin/../lib/jackson-mapper-asl-1.9.2.jar:bin/../lib/jamm-0.2.8.jar:bin/../lib/javax.inject.jar:bin/../lib/jbcrypt-0.3m.jar:bin/../lib/jline-1.0.jar:bin/../lib/jna-4.0.0.jar:bin/../lib/json-simple-1.1.jar:bin/../lib/libthrift-0.9.1.jar:bin/../lib/logback-classic-1.1.2.jar:bin/../lib/logback-core-1.1.2.jar:bin/../lib/lz4-1.2.0.jar:bin/../lib/metrics-core-2.2.0.jar:bin/../lib/netty-all-4.0.23.Final.jar:bin/../lib/reporter-config-2.1.0.jar:bin/../lib/slf4j-api-1.7.2.jar:bin/../lib/snakeyaml-1.11.jar:bin/../lib/snappy-java-1.0.5.2.jar:bin/../lib/stream-2.5.2.jar:bin/../lib/stringtemplate-4.0.2.jar:bin/../lib/super-csv-2.1.0.jar:bin/../lib/thrift-server-0.3.7.jar org.apache.cassandra.service.CassandraDaemon |
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.
1 2 3 4 5 6 7 8 9 10 |
cluster_name: 'SomeClusterName' num_tokens: 256 seed_provider: - class_name: org.apache.cassandra.locator.SimpleSeedProvider parameters: - seeds: "10.10.10.2,10.10.10.3" listen_address: 10.10.10.1 rpc_address: 0.0.0.0 broadcast_rpc_address: 10.10.10.1 endpoint_snitch: RackInferringSnitch |
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:
1 2 3 4 5 6 7 8 9 |
root@host:~/apache-cassandra-2.1.2-src/bin# ./nodetool status Datacenter: 17 ============== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- 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