Created
December 5, 2013 11:15
-
-
Save phpfour/7803709 to your computer and use it in GitHub Desktop.
ElasticSearch in Vagrant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo locale-gen en_US | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.5.deb | |
sudo dpkg -i elasticsearch-0.90.5.deb | |
sudo service elasticsearch start | |
sudo apt-get install build-essential openjdk-7-jre-headless | |
sudo service elasticsearch start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :private_network, ip: "192.168.56.115" | |
config.vm.network :forwarded_port, guest: 80, host: 81 #for Kibana3 | |
config.vm.network :forwarded_port, guest: 5601, host: 5601 #for Kibana2, if you prefer | |
config.vm.network :forwarded_port, guest: 9200, host: 9201 #for ElasticSearch Master | |
config.ssh.forward_agent = true | |
config.vm.provider :virtualbox do |v| | |
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
v.customize ["modifyvm", :id, "--memory", 1024] | |
v.customize ["modifyvm", :id, "--name", "elasticsearch"] | |
end | |
config.vm.provision :shell, :inline => | |
"if [[ ! -f /apt-get-run ]]; then sudo apt-get update && sudo touch /apt-get-run; fi" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment