diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..ad776f1 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,5 @@ +Vagrant.configure("2") do |config| + config.vm.box = "ubuntu/trusty64" + config.vm.provision :shell, path: "bootstrap.sh" + config.vm.network "forwarded_port", guest: 4567, host: 4567 +end \ No newline at end of file diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 0000000..16aa4f5 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# This file is ran during vagrant provision +add-apt-repository ppa:webupd8team/java +apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 +echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.6.list +apt-get update +echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections +apt-get install -y git maven oracle-java8-installer mongodb-org-server +cd /vagrant/ +mvn clean +mvn install +cd target +java -jar server-1.4a.jar \ No newline at end of file