OpenNMS Dev Jam 2013

At the office we work with OpenNMS monitoring solution. It is really great and it is open source.

Since last year we attended the Dev Jam that happens once a year in June and this is a pretty good week where you can chat with the real developpers behind this application.

These guys are amazing, they help you understand how to code or how their software is structured. It helps a lot, for us that have to modified the application to fit our need. Plus we entend to publish back all our code so you gain the feeling that you are participating to something great.

This year we publish a chrome extension using their rest api. Later this year we will try to develop the dynamic ip monitoring, so we will have to code that feature since it is not present at the moment.

Hope we will be there next year.

The Chrome extension we released on day two

Tarus Balog post about Dev Jam 2013

Install your Puppetmaster server on Debian Wheezy 7.0

Puppet is a configuration management tool. It is open source and I am a big fan of this tool to configure all my servers. I will show you the really quick and easy way to get your puppet server setup. First of all you need a basic install of a Debian Wheezy 7.0 server, once it is setup you can start.

1. Enable puppet repository to get latest Puppet packages

dpkg -i puppetlabs-release-wheezy.deb

2. Update the packages list

apt-get update

3. Install puppetmaster packages

apt-get install -y puppet puppet-common puppet-el puppet-testsuite \
puppetmaster puppetmaster-common vim-puppet

4. Stop puppetmaster daemon and disable it on startup

kill -9 $(ps aux | grep puppet | grep -v grep | awk '{print $2}')
sed -i "s/START=yes/START=no/g" /etc/default/puppetmaster

5. Install passenger dependency to hook puppetmaster with apache web server

apt-get install -y puppetmaster-passenger

6. Check puppet version

puppet --version

7. Ensure puppetmaster is running

netstat -a | grep 8140
# You should see the line like:  
# tcp        0      0 *:8140                  *:*             LISTEN

You can also go at the address https://your_server_ipaddress:8140/
You will see the message: The environment must be purely alphanumeric, not ” that confirms that your puppetmaster server is running.

It’s done, you are now running your own Puppetmaster server. All the configuration files and your node definition need to be done into the /etc/puppet/ folder. There is also the folder /var/lib/puppet/ that can contain some information like your SSL certificates.

Have fun!

Install puppet client and connect to your puppet master

VMware Tools installation on Debian Squeeze

To make it easy to install the VMware tools in a Debian Squeeze 6.0.6 server. Follow these simples steps:

  • From VMware vSphere click Inventory –> Guest –> Install/upgrade VMware tools
  • Mount the iso into Debian 
    mount /dev/scd0 /mnt
  • Copy the Vmware tools tarbal to your home folder 
    cp /mnt/VMwareTools-*.tar.gz ~
  • Install the dependencies 
    apt-get install build-essential linux-headers-$(uname -r)
  • Untar the archive 
    tar zxf VMwareTools-*.tar.gz
  • Move to the VMware tools instalation folder 
    cd vmware-tools-distrib/
  • Install the VMware tools
    • For default option 
      yes "" | ./
    • For custom option 

Have fun with VMware.

OpenVZ keep history of your bash shell

I use intensively OpenVZ for my development environment and I was looking for a way to keep track of the history of the bash command I am writing at the console from OpenVZ. I found this pretty neat hack.

Command line fun time!

# Record the bash history using vzctl enter UID
echo 'HISTFILE=~/.bash_history' >> ~/.bashrc
source ~/.bashrc
# Get in your home folder after entering the container using vzctl enter UID
echo 'cd' >> ~/.bashrc
source ~/.bashrc

What these to little lines do is pretty cool.

  • First we are redirecting the HISTFILE variable to .bash_history to ensure we can keep track of our command lines.
  • Second when you enter the command vzctl enter 101 you would normally get into the container at the “/” folder. I don’t like it I prefer getting in the home folder of the user. That why by issuing the “cd” within the “.bashrc” file, you are redirected into your home folder.