EOX GitLab Instance

Vagrantfile 3.25 KB
Newer Older
1
2
3
# -*- mode: ruby -*-
# vi: set ft=ruby :

4
5
6
# Change me! (every time you want to build a different RPM) And make sure somebody
# wrote a identically named puppet module. See puppet/modules for a list of 
# available modules
7
project = "eox-release"
8
9
10
11
12

#
# You should not need to change anything below this line!
#

13
14
15
16
Vagrant.configure("2") do |config|
	# All Vagrant configuration is done here. The most common configuration
	# options are documented and commented below. For a complete reference,
	# please see the online documentation at vagrantup.com.
17

18
	# Every Vagrant virtual environment requires a box to build off of.
19
	config.vm.box = "centos-6.4-x86_64"
20

21
22
	# The url from where the 'config.vm.box' box will be fetched if it
	# doesn't already exist on the user's system.
23
	config.vm.box_url = "http://downloads.eox.at/boxes/centos-6.4-x86_64.box"
24

25
26
	config.vm.hostname = "builder-rpm-vagrant"

27
28
29
30
	# Create a forwarded port mapping which allows access to a specific port
	# within the machine from a port on the host machine. In the example below,
	# accessing "localhost:8080" will access port 80 on the guest machine.
	# config.vm.network :forwarded_port, guest: 80, host: 8080
31

32
33
34
	# Create a private network, which allows host-only access to the machine
	# using a specific IP.
	# config.vm.network :private_network, ip: "192.168.33.10"
35

36
37
38
39
	# Create a public network, which generally matched to bridged network.
	# Bridged networks make the machine appear as another physical device on
	# your network.
	# config.vm.network :public_network
40

41
42
43
44
45
46
47
48
49
	# Share an additional folder to the guest VM. The first argument is
	# the path on the host to the actual folder. The second argument is
	# the path on the guest to mount the folder. And the optional third
	# argument is a set of non-required options.
	# config.vm.synced_folder "../data", "/vagrant_data"
	config.vm.synced_folder "build/SPECS", "/home/vagrant/rpmbuild/SPECS"
	config.vm.synced_folder "build/SOURCES", "/home/vagrant/rpmbuild/SOURCES"
	config.vm.synced_folder "build/RPMS", "/home/vagrant/rpmbuild/RPMS"
	config.vm.synced_folder "build/SRPMS", "/home/vagrant/rpmbuild/SRPMS"
50

51
52
53
	# Use package caching https://github.com/fgrehm/vagrant-cachier
	config.cache.auto_detect = true

54
55
56
57
	# Provider-specific configuration so you can fine-tune various
	# backing providers for Vagrant. These expose provider-specific options.
	# View the documentation for the provider you're using for more
	# information on available options.
58
59
60
61
62
63
64
65
66
67
68
	config.vm.provider "virtualbox" do |v|
		# Custom name
		v.name = "builder_rpm"

		# Increase memory and cpus
		v.customize ["modifyvm", :id, "--memory", 1024, "--cpus", 2]
		# Increase performance i.e. don't use swap extensively 
		v.customize ["modifyvm", :id, "--ioapic", "on", "--largepages", "off", "--vtxvpid", "off"]

		# Use GUI for debugging purposes
		#v.gui = true
69
	end
70

71
72
73
74
75
76
77
78
79
80
81
82
	# Enable provisioning with Puppet stand alone.  Puppet manifests
	# are contained in a directory path relative to this Vagrantfile.
	# You will need to create the manifests directory and a manifest in
	# the file ..pp in the manifests_path directory.
	config.vm.provision :puppet, :facter => { "project" => project } do |puppet|
		puppet.manifests_path = "puppet/manifests"
		puppet.manifest_file  = "rpmbuild.pp"
		puppet.module_path = "puppet/modules"
		puppet.facter
	end

end