Earlier this year I put together a post on installing and configuring a Cassandra Cluster in order to meet the requirements for vCloud SP 5.6.x Metric Reporting. In that post I went through the deployment of a Cassandra Cluster and promised a follow up on installing KairosDB. In my labs we are currently working with the vCD Metric APIs and I needed a quick way to stand up the Cassandra/KairosDB environment the vCD Metrics requires. Given the availability and sizing requirements in the lab are not representative of Production I decided to create a Single Node instance.
I also streamlined the Cassandra install by adding the Debian repositories for easier install and management. Watch the video below (suggest 2x speed) and check out the key commands listed after the video.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
#SETUP JAVA java -version apt-get install default-jre apt-get install default-jdk update-alternatives --config java echo $JAVA_HOME vi /etc/environment source /etc/environment #ADD CASSANDRA REPOS TO APT cd /etc/apt deb http://www.apache.org/dist/cassandra/debian 21x main vi sources.list gpg --keyserver pgp.mit.edu --recv-keys F758CE318D77295D gpg --export --armor F758CE318D77295D | sudo apt-key add - gpg --keyserver pgp.mit.edu --recv-keys 2B5C1B00 gpg --export --armor 2B5C1B00 | sudo apt-key add - gpg --keyserver pgp.mit.edu --recv-keys 0353B12C gpg --export --armor 0353B12C | sudo apt-key add - apt-get update #INSTALL AND START CASSANDRA apt-get install cassandra cd /etc/cassandra/ vi cassandra.yaml service cassandra start service cassandra status #DOWNLOAD KAIROSDB SOURCE AND START wget https://github.com/kairosdb/kairosdb/releases/download/v0.9.4/kairosdb-0.9.4-6.tar.gz tar -xzf kairosdb-0.9.4-6.tar.gz kairosdb/conf vi kairosdb.properties cd bin/ ./kairosdb.sh start |
One of the Key settings to configure thats not shown above is changing the KairosDB datastore location from the default In Memory H2 Module to the local Cassandra location. After KairosDB has been started you are ready to point vCloud Director at the endpoint to start exporting VM Metrics to…the post showing that is still to come.