Skip to content

Instantly share code, notes, and snippets.

@becw
Last active August 29, 2015 14:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save becw/06bc47ce2dc8a7205ed8 to your computer and use it in GitHub Desktop.
Save becw/06bc47ce2dc8a7205ed8 to your computer and use it in GitHub Desktop.
Elasticsearch vagrant configuration
#!/usr/bin/env bash
# Install Java 7
apt-get -yq update
apt-get -yq install git openjdk-7-jre-headless service-wrapper
# Make sure the machine is *using* Java 7
update-alternatives --set java /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java
# Install Elasticsearch
wget -nv https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.deb
dpkg -i elasticsearch-1.3.2.deb
update-rc.d elasticsearch defaults 95 10
/etc/init.d/elasticsearch start
# Install some Elasticsearch plugins
/usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head
/usr/share/elasticsearch/bin/plugin -install lukas-vlcek/bigdesk
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrant version 1.6.5
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.provision :shell, :path => "vagrant-setup.sh"
config.vm.network :forwarded_port, guest: 9200, host: 9200
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment