Last active
December 25, 2015 05:59
-
-
Save rmmeans/6929154 to your computer and use it in GitHub Desktop.
Vagrant sample for setting up a very a basic Play framework DEV only environment on a CentOS 6.4 box. NOTE: before beginning, make sure you have the jdk-7u40-linux-x64.rpm file downloaded from oracle and placed in the same directory as this vagrant file
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
$script = <<SCRIPT | |
wget -nv -P /tmp http://repo.scala-sbt.org/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.13.0/sbt.rpm | |
wget -nv -P /tmp http://downloads.typesafe.com/play/2.2.0/play-2.2.0.zip | |
sudo rpm -Uvh /vagrant/jdk-7u40-linux-x64.rpm | |
sudo rpm -Uvh /tmp/sbt.rpm | |
sudo yum -y install unzip | |
unzip /tmp/play-2.2.0.zip -d /tmp | |
sudo mv /tmp/play-2.2.0 /opt | |
sudo ln -s /opt/play-2.2.0/ /opt/play | |
sudo ln -s /opt/play/play /usr/local/bin/play | |
sudo chmod 777 -R /opt/play #only because this is a dev box... | |
sudo service iptables save | |
sudo service iptables stop | |
sudo chkconfig iptables off | |
SCRIPT | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "centos6.4" | |
config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box" | |
config.vm.network "forwarded_port", guest: 9000, host: 9010 | |
config.vm.provision "shell", inline: $script | |
# config.vm.provider :virtualbox do |vb| | |
# # Don't boot with headless mode | |
# vb.gui = true | |
# | |
# # Use VBoxManage to customize the VM. For example to change memory: | |
# vb.customize ["modifyvm", :id, "--memory", "1024"] | |
# end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment