Install's a mini monitoring environment based on vagrant. Intended for development and monitoring of the monitoring infrastructure.
Usage
Get the Code
git clone https://git.hpcloud.net/mon/mini-mon.git
Setup Vagrant
Install Vagrant
Assumes you have home homebrew installed, if not download and install VirtualBox and Vagrant from their websites then continue with Setup Berkshelf.
brew tap phinze/cask
brew install brew-cask
brew cask install virtualbox
brew cask install vagrant
Setup Berkshelf
vagrant plugin install vagrant-berkshelf
gem install berkshelf or gem install --http-proxy <http://some-proxy.foo.com:8088> berkshelf
Using mini-mon
- Your home dir is synced to
/vagrant_homeon each vm - Vms created
apiat192.168.10.4kafkaat192.168.10.10- mon-notification runs on this box alsomysqlat192.168.10.6persisterat192.168.10.12threshat192.168.10.14verticaat192.168.10.8- The management console is at https://192.168.10.8:5450
- Run
vagrant helpfor more info - Run
vagrant ssh <vm name>to login to a particular vm - Can also run
ssh vagrant@<ip address>to login- password is
vagrant
- password is
Start mini-mon
Berkshelf will download some cookbooks from the community so http_proxy and https_proxy environment variables must be set if applicable.
From within the mini-mon directory, to start all the vms run:
bin/vup
The standard vagrant commands can also be used, the vup script just starts things up in a dependency order using parallel startup.
Halt mini-mon
In some cases halting mini-mon can result in certain vms being left in an odd state, to avoid this a script has been made to halt boxes in the correct order
bin/vhalt
Updating a VM
When someone updates the config for a vm this process should allow you to bring up an updated vm.
git pullberks updatevagrant destroy vm- Where vm is the name of the vm being updated, for example 'vertica'vagrant up vm
Improving Provisioning Speed
The slowest part of the provisioning process is the downloading of deb packages. To speed this up a local apt-cacher-ng can be used. To install on a mac
brew install apt-cacher-ng
Run apt-cacher-ng -c /usr/local/etc/apt-cacher-ng/ or optionally follow the instructions from brew to start up the cache automatically.
That is all that is needed from now on the cache will be used.
A report from the cache is found at http://localhost:3142/acng-report.html
Creating a new hLinux box
The hLinux box used in mini-mon is created via a veewee template in the templates directory.
- Follow the instructions at the veewee site to install veewee.
- Copy
templates/Veeweefileto your VeeWee directory and edit the file, updating the path to your mini-mon. - At this point the template assumes you need an hp proxy setup, if not edit base.sh and comment out the .curlrc lines at the bottom
- From your veewee directory run:
bundle exec veewee vbox define hlinux hlinux-amd64-netbootbundle exec veewee vbox build hlinuxbundle exec veewee vbox validate hlinuxNote: puppet is not installed.bundle exec veewee vbox export hlinux
- Copy
- From the mini-mon directory run
vagrant box add hlinux ../veewee/hlinux.boxor other appropriate path, also upload to a server for others to download.- If you have an existing hLinux box you man need to first remove it
vagrant box remove hlinux
- If you have an existing hLinux box you man need to first remove it