Skip to content

heavywater/sensu-lxc-demo

Repository files navigation

Sensu demo using LXC

This is at a very alpha stage currently

This repo contains a fully functioning sensu demo. This demo uses a combination of tools:

Essentially vagrant will bootstrap a working vagabond environment and vagabond will bring up a cluster of LXC containers to test the sensu monitoring framework. This is meant to be a vagabond playground for those using vagrant as well as something practical, sensu, to play with.

Usage

First off:

$ bundle install && bundle exec librarian-chef install

Next start up the vagrant instance:

$ vagrant up

and log in to the instance:

$ vagrant ssh

Now we can jump to the mounted directory and load in all the vagabond bits:

$ cd /vagrant
$ bundle install --path=vendor --binstubs

Everything is now ready to build the cluster:

$ ./bin/vagabond cluster sensu --delay 30

This will take some time to run as the required base lxc instance is created and the chef server instance is built. If you want to see all the action as it is happening, add the --debug flag.

Dashboard

  • Dashboard will be available at: http://localhost:8080

Available commands

cd /vagrant and run ./bin/vagabond to get a list of commands

We could automate this, but part of our goal is to also introduce you to vagabond. We think you'll like it.

Experiment with the various vagabond commands and report back what breaks, github issues are great.

Note that lxc commands are run under the hood, so vagabond uses sudo to do it's thing.

From here it's containers all the way down.

Have fun.

A note about Vagrant

The base box used in the Vagrantfile is Ubuntu 12.04 with the lxc packages pre-installed as well as the initial cache of the Ubuntu 12.04 files for the containers.

Base boxes are also available with Ubuntu 12.04 + Chef 11.4, built using the excellent bento definitions. It's publicly hosted on s3 by Heavy Water, feel free to use it or substitute your own.

A 12.10 box is also available, but is currently untested

Note that provisioning these other boxes will take longer as the lxc packages and the initial precise cache files will have to be downloaded.

A note about roles

Roles are only used by the lxc containers, not the vagrant provision step. Everything needed for vagrant provision is handled by librarian-chef and the Vagrantfile

A note about sensu_lxc

The sensu_lxc cookbook shipped in this repo was only written to assist minimal bootstrapping for this demo, it has no other purpose and thus is not distributed elsewhere.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages