CuBoulder/ELKinaBox

Name: ELKinaBox

Owner: University of Colorado Boulder

Description: null

Created: 2015-06-17 19:50:05.0

Updated: 2016-05-11 20:02:20.0

Pushed: 2015-06-21 02:00:46.0

Homepage: null

Size: 156

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Ansible Vagrant profile for ELK (Elasticsearch, Logstash, Kibana)

Background

Vagrant and VirtualBox (or some other VM provider) can be used to quickly build or rebuild virtual servers.

This Vagrant profile configures two servers:

  1. A server with the ELK stack (Elasticsearch, Logstash, and Kibana) using the Ansible provisioner.
  2. A server with the Nginx and Logstash Forwarder using the Ansible provisioner, which routes Nginx access logs to the first server.
Getting Started

This README file is inside a folder that contains a Vagrantfile (hereafter this folder shall be called the [vagrant_root]), which tells Vagrant how to set up your virtual machine in VirtualBox.

To use the vagrant file, you will need to have done the following:

  1. Download and Install VirtualBox
  2. Download and Install Vagrant
  3. Install Ansible (guide for installing Ansible)
  4. Open a shell prompt (Terminal app on a Mac) and cd into the folder containing the Vagrantfile

Once all of that is done, you can simply type in vagrant up, and Vagrant will create both new VMs and configure them.

Once the VMs are up and running (after vagrant up is complete and you're back at the command prompt), you can log into either one via SSH if you'd like by typing in vagrant ssh [name] (either logs for the ELK server, or webs for the Nginx server). Otherwise, the next steps are below.

Setting up your hosts file

You need to modify your host machine's hosts file (Mac/Linux: /etc/hosts; Windows: %systemroot%\system32\drivers\etc\hosts), adding the lines below:

192.168.9.90  logs
192.168.9.91  webs

(Where logs/webs is the hostname you have configured in the Vagrantfile).

After that is configured, you could visit http://logs/ in a browser, and you'll see the Kibana dashboard, and you can visit http://webs/, and you'll see Nginx's default index page. Nice!

If you'd like additional assistance editing your hosts file, please read How do I modify my hosts file? from Rackspace.

Author Information

Created in 2014 by Jeff Geerling, author of Ansible for DevOps.

Updated in 2015 by Erin Corson


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.