Tweet At OpenSky I wanted a way to put config files into git. I started using gitosis for the git server. This was all great but for each new server I had to add the following
`Tweet
At OpenSky I wanted a way to put config files into git. I started using gitosis for the git server. This was all great but for each new server I had to add the following
Tweet At my job at OpenSky we have a common NFS share that is failed over to a slave nfs node if the master dies. It was setup so that the slave would just rsync from the master. This was done to save time. Not that I have some time, I decided to finally setup drbd on the two nodes to keep the files always in sync.
So below are my nodes with hostnames/ips and drive information
Tweet I am in the middle of writing a MongoDB plugin for cacti using pymongo and ran into a little issue.
In the Mongo shell this works
> db.stats() { "collections" : 19, "objects" : 145971, "dataSize" : 64785380, "storageSize" : 129544960, "numExtents" : 75, "indexes" : 69, "indexSize" : 25403392, "ok" : 1 } So in pymongo I tried
info = db.command("stats")
Then I got the following traceback
Tweet I needed to turn a string into an array to loop through it. It is pretty simple
SOLR_CORES="core1,core2,core3" declare -a CORES CORES=(`echo $SOLR_CORES | tr ',' ' '`) for CORE in ${CORES[@]} do stuff here done
Tweet There’s a lot of buzz right no for noSQL solutions and one of the big ones is MongoDB. I was lucky enough to be sent to MongoNYC conference a month or so ago and it opened my eyes to why noSQL is the way to go for most web applications. As the web is more and more based on user contributions our databases are getting more writes put into them which doesn’t scale well in MySQL.
Tweet I have created a MongoDB plugin for Nagios. I also put it in a GitHub project so if you want to make changes you can easily fork the project and push changes right to my project
http://github.com/mzupan/nagios-plugin-mongodb
Tweet I’ve been creating Nagios plugins for MongoDB and I needed to stimulate some network latency for testing my connect test. I wanted to simulate a 2 second connection lag so I ran the following command
tc qdisc add dev eth0 root netem delay 1000ms
When you are done you can delete it like
tc qdisc del root dev eth0
I am sure there is a better tc command you can run to get better results but this worked.
Tweet I am recently getting into MongoDB. Thanks to my company (OpenSky) sending me to MongoNYC event. I am also tasked with setting up infrastructure to run MongoDB. So we are starting off with a simple master/slave MongoDB setup.
I always thought MySQL was easy to setup replication on but MongoDB proves it just gets easier. This will expect you are using the official MongoDB provided RPMs from their repository.
Tweet I was trying to auto login a user if I had their user object and was getting this error when I just called something like
login(request, user)
Well this is due to Django wanting to make sure you auth the user first. If you want to bypass this you can just use the following before login
user.backend = 'django.contrib.auth.backends.ModelBackend'
This might not be the best solution but it works
Tweet I found a nice query on the mysql mailing list for getting the total size of each database.
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB", sum( data_free )/ 1024 / 1024 "Free Space in MB" FROM information_schema.TABLES GROUP BY table_schema;