-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathVagrantfile
37 lines (31 loc) · 1.21 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# This Vagrant file contains a set of predefined virtual machines,
# that can be used for test and deploy purposes.
Vagrant.configure("2") do |config|
UBUNTU_IMAGE = 'generic/ubuntu1804'
# Absolutely default ubuntu image, without any software installed.
# Can be used for curl-bash installation script testing.
config.vm.define 'test_ubuntu_empty' do |machine|
machine.vm.box = UBUNTU_IMAGE
machine.vm.network 'forwarded_port', guest: 80, host: 8080
end
# Base ubuntu image with preinstalled docker.
# Most often is used to debug and test issues with docker-compose.
config.vm.define 'test_ubuntu_docker_preinstalled' do |machine|
machine.vm.box = UBUNTU_IMAGE
script = <<SCRIPT
sudo apt-get -qqy update
sudo apt-get -qqy install docker.io docker-compose
sudo su vagrant
sudo usermod -aG docker vagrant
SCRIPT
machine.vm.network 'forwarded_port', guest: 80, host: 8080
machine.vm.synced_folder '.', '/vagrant'
machine.vm.provision :shell, inline: script
end
# TODO: add configuration of single AWS machine
# TODO: add configuration of single GCE machine
# TODO: add configuration of single Digital Ocean machine
end