Skip to content
This repository has been archived by the owner on Jun 22, 2018. It is now read-only.

Commit

Permalink
Debian vagrant box. Ready to run minimesos
Browse files Browse the repository at this point in the history
  • Loading branch information
sadovnikov committed May 4, 2016
1 parent ec1bdfc commit ee03079
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ minimesosFile
.gradle/
build/

# Vagrant working files
.vagrant

# Build system
.gradle/
build/
Expand Down
13 changes: 13 additions & 0 deletions opt/vagrant/debian/jessie64/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Vagrant.configure(2) do |config|

config.vm.box = "debian/contrib-jessie64"

config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
end

config.vm.network "private_network", ip: "192.168.123.11"

config.vm.provision :shell, :path => "provision.sh"

end
42 changes: 42 additions & 0 deletions opt/vagrant/debian/jessie64/provision.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env bash

###
### JDK and Gradle
###

echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/openjdk.list && \
apt-get update -qq && apt-get install -qqy \
apt-transport-https \
curl \
unzip \
openjdk-8-jdk

curl https://downloads.gradle.org/distributions/gradle-2.12-bin.zip --output /tmp/gradle-2.12-bin.zip --silent
unzip -q /tmp/gradle-2.12-bin.zip -d /usr/share

echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre" >> /home/vagrant/.profile
echo "export GRADLE_HOME=/usr/share/gradle-2.12" >> /home/vagrant/.profile
echo "export PATH=\$JAVA_HOME/bin:\$GRADLE_HOME/bin:\$PATH" >> /home/vagrant/.profile

update-ca-certificates -f

###
### Getting Docker installed
###
echo ""
echo "Getting Docker"

echo "deb https://apt.dockerproject.org/repo debian-jessie main" > /etc/apt/sources.list.d/docker.list && \
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \
apt-get update -qq && \
apt-get -qqy install docker-engine=1.9.1-0~jessie

echo "Enabling non-sudo access to docker"
gpasswd -a vagrant docker

service docker start

echo ''
echo 'Apply command below on the host machine'
echo 'sudo route delete 172.17.0.0/16; sudo route -n add 172.17.0.0/16 192.168.123.11'

0 comments on commit ee03079

Please sign in to comment.