Last active
November 15, 2016 23:11
-
-
Save diegopacheco/1f3d19f9645288febf83 to your computer and use it in GitHub Desktop.
Vagrant JVM: Java 8, Scala 2.11, Groovy 2.4, Clojure 1.6, Maven 3.3, Gradle 2.4, Sbt 0.13 and Lein
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "private_network", ip: "55.55.55.102" | |
config.vm.synced_folder ".", "/home/vagrant/shared/" | |
#config.vm.provision "file", source: "conf/sbt.sh", destination: "/home/vagrant/bin/sbt" | |
config.vm.provision "shell", inline: <<-SHELL | |
# | |
# Update and install basic linux programs for development | |
# | |
sudo apt-get update | |
sudo apt-get install -y wget | |
sudo apt-get install -y curl | |
sudo apt-get install -y vim | |
sudo apt-get install -y git | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y unzip | |
# | |
# Install Java 8 | |
# | |
cd /opt | |
sudo wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz" | |
sudo tar -xzvf jdk-8u45-linux-x64.tar.gz | |
sudo rm -rf jdk-8u45-linux-x64.tar.gz | |
# | |
# Install Maven 3.3 | |
# | |
sudo wget http://mirror.nbtelecom.com.br/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz | |
sudo tar -xzvf apache-maven-3.3.3-bin.tar.gz | |
sudo rm -rf apache-maven-3.3.3-bin.tar.gz | |
# | |
# Install Groovy 2.4 | |
# | |
sudo wget http://dl.bintray.com/groovy/maven/groovy-binary-2.4.3.zip | |
sudo unzip groovy-binary-2.4.3.zip -d /opt/ | |
sudo rm -rf groovy-binary-2.4.3.zip | |
# | |
# Install Gradle 2.4 | |
# | |
sudo wget https://services.gradle.org/distributions/gradle-2.4-bin.zip | |
sudo unzip gradle-2.4-bin.zip -d /opt/ | |
sudo rm -rf gradle-2.4-bin.zip | |
# | |
# Install Clojure 1.6 | |
# | |
sudo wget http://repo1.maven.org/maven2/org/clojure/clojure/1.6.0/clojure-1.6.0.zip | |
sudo unzip clojure-1.6.0.zip -d /opt/ | |
sudo rm -rf clojure-1.6.0.zip | |
sudo cp /home/vagrant/shared/conf/clojure.sh /opt/clojure-1.6.0/clojure | |
sudo chmod +x /opt/clojure-1.6.0/clojure | |
# | |
# Install Lein | |
# | |
sudo mkdir /home/vagrant/bin | |
cd /home/vagrant/bin/ | |
sudo wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein | |
sudo chmod a+x /home/vagrant/bin/lein | |
# | |
# Install Scala 2.11 | |
# | |
sudo wget http://downloads.typesafe.com/scala/2.11.6/scala-2.11.6.tgz | |
sudo tar -xzvf scala-2.11.6.tgz | |
sudo rm -rf scala-2.11.6.tgz | |
# | |
# Install SBT 0.13 | |
# | |
cd /home/vagrant/bin/ | |
sudo wget https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar | |
sudo cp /home/vagrant/shared/conf/sbt.sh /home/vagrant/bin/sbt | |
sudo chmod u+x /home/vagrant/bin/sbt | |
sudo chmod +x /home/vagrant/bin/sbt | |
# | |
# Source the new bashrc | |
# We also need finish install lein, it will self install thats why we do lein for last | |
# | |
sudo cat /home/vagrant/shared/conf/bashrc.txt >> /home/vagrant/.bashrc | |
source /home/vagrant/.bashrc | |
SHELL | |
end |
sudo wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u77-b03/jdk-8u77-linux-i586.tar.gz"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
complete files and dependencies here https://github.com/diegopacheco/Diego-Pacheco-Sandbox/tree/master/DevOps/vagrant-jvm