# -*- mode: ruby -*- # vi: set ft=ruby : # 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 project = "eox-release" # # You should not need to change anything below this line! # 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. # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "centos-6.4-x86_64" # The url from where the 'config.vm.box' box will be fetched if it # doesn't already exist on the user's system. config.vm.box_url = "http://downloads.eox.at/boxes/centos-6.4-x86_64.box" config.vm.hostname = "builder-rpm-vagrant" # 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 # 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" # 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 # 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" # Use package caching https://github.com/fgrehm/vagrant-cachier config.cache.auto_detect = true # 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. 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 end # 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