Last active
August 29, 2015 14:25
-
-
Save mpaleo/f9a4c18c95ebd41a6665 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "########################################" | |
echo "Update the box" | |
echo "########################################" | |
# Update apt cache | |
sudo apt-get update | |
echo "########################################" | |
echo "Git" | |
echo "########################################" | |
# Install Git | |
sudo apt-get install -y git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "########################################" | |
echo "PHP" | |
echo "########################################" | |
# Install PHP packages | |
sudo apt-get install -y php5-cli php5-mcrypt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
box: "ubuntu/trusty32" | |
vm_name: "vagrant_quickstart" | |
ip: "192.168.10.10" | |
memory: 512 | |
cpus: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
Vagrant.configure("2") do |config| | |
# Load specs | |
specs = YAML::load(File.open('Specs.yml')) | |
# VM | |
config.vm.define specs["vm_name"] do |server| | |
# Box | |
server.vm.box = specs["box"] | |
# Private network | |
server.vm.network :private_network, ip: specs["ip"] | |
end | |
# Provider settings | |
config.vm.provider :virtualbox do |v| | |
v.name = specs["vm_name"] | |
v.memory = specs["memory"] | |
v.cpus = specs["cpus"] | |
end | |
# Provision | |
config.vm.provision :shell, :path => "Provision/Common.sh" | |
config.vm.provision :shell, :path => "Provision/Php.sh" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment