Giter Site home page Giter Site logo

vaprobash's Introduction

Vaprobash

Vagrant Provisioning Bash Scripts

View the site and extended docs.

Build Status

Goal

The goal of this project is to create easy to use bash scripts in order to provision a Vagrant server.

  1. This targets Ubuntu LTS releases, currently 12.04.*
  2. This project will give users various popular options such as LAMP, LEMP
  3. This project will attempt some modularity. For example, users might choose to install a Vim setup, or not.

Some further assumptions and self-imposed restrictions. If you find yourself needing or wanting the following, then other provisioning tool would better suited (Chef, Puppet, Ansible).

  • If other OSes need to be used (CentOS, Redhat, Arch, etc).
  • If dependency management becomes complex. For example, installing Laravel depends on Composer. Setting a document root for a project will change depending on Nginx or Apache. Currently, these dependencies are accounted for, but more advanced dependencies will likely not be.

Dependencies

  • Vagrant 1.4.3+
    • Use vagrant -v to check your version
  • Vitualbox or VMWare Fusion

Instructions

First, Copy the Vagrantfile from this repo. You may wish to use curl or wget to do this instead of cloning the repository.

# curl
$ curl -L http://bit.ly/vaprobash > Vagrantfile

# wget
$ wget -O Vagrantfile http://bit.ly/vaprobash

The bit.ly link will always point to the master branch version of the Vagrantfile.

Second, edit the Vagrantfile and uncomment which scripts you'd like to run. You can uncomment them by removing the # character before the config.vm.provision line.

You can indeed have multiple provisioning scripts when provisioning Vagrant.

Third and finally, run:

$ vagrant up

Screencast

Here's a quickstart screencast!

Vaprobash Quickstart

Windows Users:

By default, NFS won't work on Windows. I suggest deleting the NFS block so Vagrant defaults back to its default file sync behavior.

However, you can also try the "vagrant-winnfsd" plugin. Just run vagrant plugin install vagrant-winnfsd to try it out!

Vagrant version 1.5 will have more file sharing options to explore as well!

Docs

View the site and extended docs.

What You Can Install

  • Base Packages
    • Base Items (Git and more!)
    • Oh-My-ZSH
    • PHP (php-fpm)
    • Vim
    • PHP MsSQL (ability to connect to SQL Server)
    • Screen
  • Web Servers
    • Apache
    • HHVM
    • Nginx
  • Databases
    • Couchbase
    • CouchDB
    • MariaDB
    • MongoDB
    • MySQL
    • PostgreSQL
    • SQLite
  • In-Memory Stores
    • Memcached
    • Redis
  • Search
    • ElasticSearch and ElasticHQ
  • Utility
    • Beanstalkd
    • Supervisord
  • Additional Languages
    • NodeJS via NVM
    • Ruby via RVM
  • Frameworks / Tooling
    • Composer
    • Laravel
    • Symfony
    • PHPUnit
    • MailCatcher

The Vagrantfile

The vagrant file does three things you should take note of:

  1. Gives the virtual machine a static IP address of 192.168.33.10. This IP address is again hard-coded (for now) into the LAMP, LEMP and Laravel/Symfony installers. This static IP allows us to use xip.io for the virtual host setups while avoiding having to edit our computers' hosts file.
  2. Uses NFS instead of the default file syncing. NFS is reportedly faster than the default syncing for large files. If, however, you experience issues with the files actually syncing between your host and virtual machine, you can change this to the default syncing by deleting the lines setting up NFS:
config.vm.synced_folder ".", "/vagrant",
          id: "core",
          :nfs => true,
          :mount_options => ['nolock,vers=3,udp,noatime']
  1. Offers an option to prevent the virtual machine from losing internet connection when running on Ubuntu. If your virtual machine can't access the internet, you can solve this problem by uncommenting the two lines below:
  #vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  #vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]

Don't forget to reload your Vagrantfile running vagrant reload --no-provision, in case your virtual machine already exists.

Contribute!

Do it! Any new install or improvement on existing ones are welcome! Please see the contributing doc, which only asks that pull requests be made to the develop branch.

vaprobash's People

Contributors

berpcor avatar bgetsug avatar bretterer avatar briankiewel avatar dbpolito avatar dhrrgn avatar driesvints avatar dwightwatson avatar erocanti avatar fideloper avatar hosmelq avatar hskrasek avatar huglester avatar ilyes512 avatar indosean avatar jaspur avatar jeremyworboys avatar jpbetley avatar jpscharf avatar ke20 avatar limeblast avatar lunohodov avatar manavo avatar mikeerickson avatar mrdevries avatar niallobrien avatar pedroborges avatar pleckey avatar rtablada avatar stormpat avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.