diff --git a/Vagrantfile b/Vagrantfile index 7de09bfa..4f8208ae 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,9 +2,9 @@ # vi: set ft=ruby : # Config Github Settings -github_username = "fideloper" +github_username = "n3r0-ch" github_repo = "Vaprobash" -github_branch = "1.4.1" +github_branch = "develop" github_url = "https://raw.githubusercontent.com/#{github_username}/#{github_repo}/#{github_branch}" # Because this:https://developer.github.com/changes/2014-12-08-removing-authorizations-token/ @@ -100,6 +100,8 @@ Vagrant.configure("2") do |config| config.hostmanager.manage_host = true config.hostmanager.ignore_private_ip = false config.hostmanager.include_offline = false + else + warn "The recommeded plugin 'vagrant-hostmanager' is currently not installed. You can install it by executing: 'vagrant plugin install vagrant-hostmanager'" end # Create a hostname, don't forget to put it to the `hosts` file @@ -141,10 +143,22 @@ Vagrant.configure("2") do |config| # to sleep for instance, then some 3rd party services will reject requests. vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000] + # Allow symlinks inside shared folders + vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] + # Prevent VMs running on Ubuntu to lose internet connection # vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] # vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] + # Automatically update VirtualBox Guest Additions + if Vagrant.has_plugin?("vagrant-vbguest") + # set auto_update to false, if you do NOT want to check the correct + # additions version when booting this machine + config.vbguest.auto_update = true + else + warn "The recommeded plugin 'vagrant-vbguest' is currently not installed. You can install it by executing: 'vagrant plugin install vagrant-vbguest'" + end + end # If using VMWare Fusion @@ -167,6 +181,8 @@ Vagrant.configure("2") do |config| type: :nfs, mount_options: ['rw', 'vers=3', 'tcp', 'nolock'] } + else + warn "The recommeded plugin 'vagrant-cachier' is currently not installed. You can install it by executing: 'vagrant plugin install vagrant-cachier'" end # Adding vagrant-digitalocean provider - https://github.com/smdahlen/vagrant-digitalocean @@ -205,6 +221,10 @@ Vagrant.configure("2") do |config| # Provision Docker # config.vm.provision "shell", path: "#{github_url}/scripts/docker.sh", args: "permissions" + # Provision docker-compose + # config.vm.provision "shell", path: "#{github_url}/scripts/docker-compose.sh" + + #### # Web Servers ########## @@ -247,6 +267,7 @@ Vagrant.configure("2") do |config| # Provision Neo4J # config.vm.provision "shell", path: "#{github_url}/scripts/neo4j.sh" + #### # Search Servers ########## @@ -304,6 +325,7 @@ Vagrant.configure("2") do |config| # Install RabbitMQ # config.vm.provision "shell", path: "#{github_url}/scripts/rabbitmq.sh", args: [rabbitmq_user, rabbitmq_password] + #### # Additional Languages ########## @@ -317,6 +339,10 @@ Vagrant.configure("2") do |config| # Install Go Version Manager (GVM) # config.vm.provision "shell", path: "#{github_url}/scripts/go.sh", privileged: false, args: [go_version] + # Install Oracle Java 8 + # config.vm.provision "shell", path: "#{github_url}/scripts/oracle-java.sh" + + #### # Frameworks and Tooling ########## @@ -346,6 +372,19 @@ Vagrant.configure("2") do |config| # Install Android # config.vm.provision "shell", path: "#{github_url}/scripts/android.sh" + # Install Maven + # config.vm.provision "shell", path: "#{github_url}/scripts/maven.sh" + + # Install M4 + # config.vm.provision "shell", path: "#{github_url}/scripts/m4.sh" + + # Install Puppet Client + # config.vm.provision "shell", path: "#{github_url}/scripts/puppet-client.sh" + + # Install wkhtml2pdf + # config.vm.provision "shell", path: "#{github_url}/scripts/wkhtmltopdf.sh" + + #### # Local Scripts # Any local scripts you may want to run post-provisioning. @@ -353,4 +392,5 @@ Vagrant.configure("2") do |config| ########## # config.vm.provision "shell", path: "./local-script.sh" + end diff --git a/readme.md b/readme.md index f3a065f6..84361a72 100644 --- a/readme.md +++ b/readme.md @@ -76,6 +76,7 @@ Here's a quickstart screencast! * PHP MsSQL (ability to connect to SQL Server) * Screen * Docker + * docker-compose * Web Servers * Apache * HHVM @@ -101,6 +102,7 @@ Here's a quickstart screencast! * Additional Languages * NodeJS via NVM * Ruby via RVM + * Orcale Java 8 * Frameworks / Tooling * Composer * Laravel @@ -109,6 +111,10 @@ Here's a quickstart screencast! * MailCatcher * Ansible * Android + * Maven + * M4 + * Puppet Client + * wkhtmltopdf ## The Vagrantfile @@ -132,6 +138,14 @@ The vagrant file does three things you should take note of: Don't forget to reload your Vagrantfile running `vagrant reload --no-provision`, in case your virtual machine already exists. +## Recommended Plugins + +For an optimal experience we are recommending the installation of the following Vagrant plugins: + +* [vagrant-hostmanager](https://github.com/smdahlen/vagrant-hostmanager) +* [vagrant-cachier](https://github.com/fgrehm/vagrant-cachier) +* [vagrant-vbguest](https://github.com/dotless-de/vagrant-vbguest) (VirtualBox users only) + ## Connecting to MySQL from Sequel Pro: Change your IP address as needed. The default IP address is now `192.168.22.10` diff --git a/scripts/base.sh b/scripts/base.sh index 9f94f8ac..4cd54e46 100644 --- a/scripts/base.sh +++ b/scripts/base.sh @@ -21,7 +21,7 @@ sudo apt-get update # Install base packages # -qq implies -y --force-yes -sudo apt-get install -qq curl unzip git-core ack-grep software-properties-common build-essential +sudo apt-get install -qq curl unzip git-core ack-grep software-properties-common build-essential telnet dnsutils echo ">>> Installing *.xip.io self-signed SSL" @@ -79,3 +79,16 @@ fi # Enable case sensitivity shopt -u nocasematch + +# Edit MOTD +echo ' +__ __ _ _ +\ \ / / | | | | + \ \ / /_ _ _ __ _ __ ___ | |__ __ _ ___| |__ + \ \/ / _ | _ \| __/ _ \| _ \ / _ / __| _ \ + \ / (_| | |_) | | | (_) | |_) | (_| \__ \ | | | + \/ \__,_| .__/|_| \___/|_.__/ \__,_|___/_| |_| + | | + |_| + +' > /etc/motd diff --git a/scripts/docker-compose.sh b/scripts/docker-compose.sh new file mode 100644 index 00000000..7f11bbad --- /dev/null +++ b/scripts/docker-compose.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +echo ">>> Installing docker-compose" + +#Install docker-compose +curl -L -s https://github.com/docker/compose/releases/download/1.3.3/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose +chmod +x /usr/local/bin/docker-compose diff --git a/scripts/m4.sh b/scripts/m4.sh new file mode 100644 index 00000000..dd932c3d --- /dev/null +++ b/scripts/m4.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +echo ">>> Installing m4" + +#Install maven +apt-get install -qq m4 diff --git a/scripts/maven.sh b/scripts/maven.sh new file mode 100644 index 00000000..127ce112 --- /dev/null +++ b/scripts/maven.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +echo ">>> Installing Maven" + +# Install maven +apt-get install -qq maven diff --git a/scripts/oracle-java.sh b/scripts/oracle-java.sh new file mode 100644 index 00000000..4593162c --- /dev/null +++ b/scripts/oracle-java.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +echo ">>> Installing Oracle Java 8" + +# Install Oracle Java 8 +add-apt-repository ppa:webupd8team/java +apt-get update +echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections +apt-get install -qq oracle-java8-installer >> /dev/null 2>&1 diff --git a/scripts/php.sh b/scripts/php.sh index e72d9416..d6cf425f 100644 --- a/scripts/php.sh +++ b/scripts/php.sh @@ -46,7 +46,7 @@ else # Install PHP # -qq implies -y --force-yes - sudo apt-get install -qq php5-cli php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl php5-gd php5-gmp php5-mcrypt php5-memcached php5-imagick php5-intl php5-xdebug + sudo apt-get install -qq php5-cli php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl php5-gd php5-gmp php5-mcrypt php5-memcached php5-imagick php5-intl php5-xdebug php5-common php5-cgi php5-imap php5-ldap php5-json # Set PHP FPM to listen on TCP instead of Socket sudo sed -i "s/listen =.*/listen = 127.0.0.1:9000/" /etc/php5/fpm/pool.d/www.conf diff --git a/scripts/puppet-client.sh b/scripts/puppet-client.sh new file mode 100644 index 00000000..d0127835 --- /dev/null +++ b/scripts/puppet-client.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +echo ">>> Installing Puppet Client" + +#Add puppetlabs sources +cd ~; wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb +dpkg -i puppetlabs-release-trusty.deb +apt-get update +rm puppetlabs-release-trusty.deb + +#Install puppet +#Puppet installation returns wrong error code +apt-get -qq install puppet || true diff --git a/scripts/wkhtmltopdf.sh b/scripts/wkhtmltopdf.sh new file mode 100644 index 00000000..7bab4560 --- /dev/null +++ b/scripts/wkhtmltopdf.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +echo ">>> Installing wkhtmltopdf" + +# Installwkhtmltopdf +apt-get install -qq wkhtmltopdf xvfb xfonts-75dpi +wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb +dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb +rm wkhtmltox-0.12.2.1_linux-trusty-amd64.deb