====== Vagrant ======
==== Getting Started ====
1. Create/go to a working directory
2. Find a pre-built box to use on https://app.vagrantup.com/boxes/search
3. ''vagrant init debian/stretch64''
4. ''vagrant up''
5. ''vagrant ssh''
==== Customizing a Vagrantfile ====
1. Start with your own file or modify a Vagrantfile as created by ''vagrant init''
=== Examples ===
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provision "ansible" do |ansible|
ansible.playbook = "myplaybook.yml"
end
end
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/stretch64"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.memory = "2048"
end
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provision "file", source: "./etc_files", destination: "/tmp"
config.vm.provision "shell", inline: <<-SHELL
cp /tmp/sources.list /etc/apt/
apt-get update
apt-get install -y apache2 mariadb
SHELL
end