-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
64 lines (51 loc) · 2 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
# Check minimum Vagrant version
Vagrant.require_version ">= 2.0.1"
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "debian/buster64"
config.vm.provider "parallels"
config.vm.provider "virtualbox"
if !Vagrant.has_plugin?('vagrant-hostmanager')
puts "The vagrant-hostmanager plugin is required. Please install it with \"vagrant plugin install vagrant-hostmanager\""
exit
end
if Vagrant.has_plugin?('vagrant-vbguest')
config.vbguest.auto_update = false
end
config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.customize ['modifyvm', :id, '--memory', 2048]
vb.customize ["modifyvm", :id, "--cpus", 2]
vb.customize ["modifyvm", :id, "--name", "gitlab-testing-environment"]
end
config.vm.provider "parallels" do |v|
v.memory = 2048
v.cpus = 2
end
# Configure the VM
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
config.hostmanager.aliases = 'gitlab.test'
config.vm.hostname = 'gitlab-testing-environment'
config.vm.network :private_network, ip: "192.168.56.152"
# Run the provisioning
## Install Ansible
config.vm.provision "shell", path: "ansible/tools/install_ansible_in_Vagrantbox.sh"
## Install and configure software
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = "ansible/playbook.yml"
ansible.become = true
ansible.verbose = ""
end
# Post-up message
config.vm.post_up_message = "See https://github.com/neikei/gitlab-testing-environment for help and bug reports."
end