• Stars
    star
    1,929
  • Rank 24,029 (Top 0.5 %)
  • Language
    Shell
  • Created almost 11 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Vagrant Provisioning Bash Scripts

Vaprobash

Va​grant Pro​visioning 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 14.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.5.0+
    • 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!)
    • PHP (php-fpm)
    • Vim
    • PHP MsSQL (ability to connect to SQL Server)
    • Screen
    • Docker
  • Web Servers
    • Apache
    • HHVM
    • Nginx
  • Databases
    • Couchbase
    • CouchDB
    • MariaDB
    • MongoDB
    • MySQL
    • Neo4J
    • PostgreSQL
    • SQLite
  • In-Memory Stores
    • Memcached
    • Redis
  • Search
    • ElasticSearch and ElasticHQ
  • Utility
    • Beanstalkd
    • Supervisord
    • Kibana
  • Additional Languages
    • NodeJS via NVM
    • Ruby via RVM
  • Frameworks / Tooling
    • Composer
    • Laravel
    • Symfony
    • PHPUnit
    • MailCatcher
    • Ansible
    • Android

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.22.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.

Connecting to MySQL from Sequel Pro:

Change your IP address as needed. The default IP address is now 192.168.22.10

sequel pro vaprobash

Contribute!

Do it! Any new install or improvement on existing ones are welcome! Please see the contributing doc.

More Repositories

1

TrustedProxy

Laravel Proxy Package for handling sessions when behind load balancers or other intermediaries.
PHP
7,355
star
2

docker-nginx-php

An Ubuntu, Nginx and PHP stack Built in Docker
Shell
361
star
3

Implementing-Laravel

Companion application to the e-book Implementing Laravel
CSS
173
star
4

hexagonal-php

Code to support my talk on Hexagonal PHP and Laravel
PHP
109
star
5

docker-mysql

A Docker container for MySQL
Shell
95
star
6

CI-Mandrill

A Codeigniter library for the Mandrill email platform
PHP
50
star
7

larvel

The little emoji framework.
PHP
38
star
8

l4-api

Example Laravel 4 API with ETags
PHP
29
star
9

fideloper.com

My Site
PHP
28
star
10

Queue-Image-Processing

Image processing offline using Queues in Laravel
PHP
26
star
11

UniversalAnalytics

PHP Implementation of Google's Measurement Protocol
PHP
21
star
12

Generic-Facebook-App

For Great Copy-Pasta Justice!
PHP
16
star
13

vaprobash12

Vagrant Provisioning Bash Scripts for Ubuntu 12.04
Shell
15
star
14

Mailman

A CodeIgniter library for using third-party email systems.
PHP
15
star
15

dotfiles

My Dotfiles
Shell
13
star
16

myproxy

This is my proxy. There are many like it, but this one is mine.
Go
12
star
17

livewire-global-notifications

See https://fly.io/laravel-bytes/global-notifications-with-livewire/
PHP
12
star
18

ConditionalRequest

Handle Validation Cacheing and Concurrency Control (Etags/Modified Dates), geared towards Laravel 4/Symfony
PHP
10
star
19

entity-mapper

An Entity Mapping ORM
PHP
9
star
20

How-EE-Works

A brief explanation of How Expression Engine Works - Content organization and Templates
PHP
8
star
21

CI-Hook

Namespaced Observer pattern with some PubSub flavor for CodeIgniter
PHP
8
star
22

ResourceCache

Handle Validation Cacheing and Concurrency Control (Etags/Modified Dates) in Laravel 4
PHP
7
star
23

Learnix

Notes while learning *nix system admin
7
star
24

Laravel-Architecture

Experimenting with code Architecture in Laravel
PHP
6
star
25

recipeplz

Parse some recipes
PHP
6
star
26

deploy-me

Example deploy setup
PHP
6
star
27

Porter

Extendable link-parser and meta-data obtainer for various services such as Vimeo and Youtube
PHP
5
star
28

Design-Patterns

Exploring design patterns and their uses. See the readme for more information.
PHP
5
star
29

jQuery-Infinite-Carousel

Adaption of the jQuery Infinite Carousel
4
star
30

node-remotecontrol

Control a Vimeo video with Socket.io
JavaScript
3
star
31

Earthquake

Tracking tweets related to #earthquake and their locations. Google maps display over time, and database of tweets.
JavaScript
3
star
32

on-demand-compute

On-demand compute using Fly.io Machines API
PHP
2
star
33

Markdown-web

Website supporting Markdown-API
PHP
2
star
34

livewire-browser-stream

Streaming content to your browser with Laravel Echo and Livewire
PHP
2
star
35

saas-starter

Shell Application for a SaaS Application. Will it be abandoned, like so many other projects? Who knows.
CSS
2
star
36

Timely

Tools for handling time and timezones
PHP
2
star
37

Articles

Markdown Articles
2
star
38

punctual

Because already-read-it > read-it-later
PHP
2
star
39

Markdown-api

A Node-based [simple] Markdown API. Send Markdown, get HTML
JavaScript
1
star
40

Create-H5BP-project--CLI

I'm lazy, and h5bp is awesome.
Shell
1
star
41

chipperci-failing-project

Generate some logs and screenshot files
PHP
1
star
42

Testable-Maintainable

Code for "Writing Testable & Maintainable PHP" presentation
PHP
1
star
43

Me

JavaScript
1
star
44

Cookbook

Laravel 4 Cookbook Sample Project
PHP
1
star
45

Learnpythonthehardway

Keeping track of lesson files.
Python
1
star
46

Shooter

JS Bookmarklet, destroy DOM elements
JavaScript
1
star
47

cli-browser-register

Example of using a CLI command to kick off registration and magically get an API key back
PHP
1
star
48

larvel-example

Example use of the Larvelâ„¢ Framework
PHP
1
star
49

ExpressionEngine---Dev-Tools

Some development tools for EE2
PHP
1
star
50

ExpressionEngine---Youtube-field

Grabs the youtube video ID and gives you options on using it for display.
PHP
1
star
51

expediatedwaf

For Mike
Dockerfile
1
star
52

fideloper.github.io

HTML
1
star
53

max-children.com

https://max-children.com
PHP
1
star