Devops trends from MongoDB, Grafana and spammed mailbox. Update #1

Hi all!

this is the first update from my new Big data experimental project…

How can I be updated with devops trend technologies without reading tons of blog?

I started to collect raw data from Twitter timeline and Gmail spammed mailbox that receives messages from websites for job seekers and others like Stack Exchange…

This is the result and the first day of data collecting…I am curious to see what happens with tons of data and some adjustments…

Link to Grafana dashboard

http://www.congruit.io/

screen-shot-2017-03-06-at-11-11-20

Advertisements

A simple recipe for MongoDB clusters

Hi everybody!

my task of today, was to configure a MongoDB with redundancy and high availability…

I decided to write my own Chef cookbook to configure “replica”

Below the most important parts:

Install MongoDB packages

Screen Shot 2016-10-14 at 21.13.03.png

Use template for the main configuration file

screen-shot-2016-10-14-at-21-15-04

Enable Linux service of MongoDB at the boot

screen-shot-2016-10-14-at-21-15-57

What about the replica’s configuration?

I suggest to use a custom LWRP that execute rs.initiate() to declare the replica set, rs.add(); to add primary and secondary servers, rs.addArb() to add arbiter servers. You can loop over hashes like this:

foobar => { “secondaries” => [“mynode01:27017″,”mynode02:27017”]}

and a Chef provider like this

screen-shot-2016-11-09-at-21-38-31

I need to test my cluster, so let’s prepare a Vagrant file like this in order to manage all virtual machines concurrently

screen-shot-2016-10-14-at-21-23-16

Finally, Haproxy as reverse proxy and load balancer! Use autodiscovery (https://github.com/hw-cookbooks/haproxy) in order to find automatically the backends and “health check” to point to the right node after a new primary server’s promotion.

screen-shot-2016-10-14-at-21-25-20

 

Ad maiora!