summaryrefslogtreecommitdiffstats
path: root/vagrant/Vagrantfile
blob: aa7688570ffb3e4f4362dc64ee9b16200e850885 (plain) (blame)
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
# -*- mode: ruby -*-
# vi: set ft=ruby :

# For a complete reference, please see the online documentation at https://docs.vagrantup.com.
Vagrant.configure("2") do |config|

  config.vm.box = "TODO"
  config.vm.box_url = "TODO"

  config.ssh.forward_agent = true

  config.vm.synced_folder "../dist", "/vagrant/dist"

  config.vm.provider "virtualbox" do |vb|
    # Display the VirtualBox GUI when booting the machine
    vb.gui = true
    vb.name = "vespa-dev"

    vb.memory = "8192"
    vb.cpus = 4
  end
  
  # Install required and nice-to-have packages
  config.vm.provision "shell", inline: <<-SHELL
    yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/g/vespa/vespa/repo/epel-7/group_vespa-vespa-epel-7.repo
    yum -y install epel-release
    yum -y install centos-release-scl
    yum -y install yum-utils
    yum -y install git \
        ccache \
        maven \
        rpm-build \
        valgrind \
        sudo \
        firefox \
        vim
    yum-builddep -y /vagrant/dist/vespa.spec
    echo -e "* soft nproc 409600\n* hard nproc 409600" > /etc/security/limits.d/99-nproc.conf
    echo -e "* soft nofile 262144\n* hard nofile 262144" > /etc/security/limits.d/99-nofile.conf
    echo -e "fs.inotify.max_user_watches = 524288" > /etc/sysctl.d/clion.conf
    wget -q -O - https://download.jetbrains.com/cpp/CLion-2017.3.3.tar.gz | tar -C /opt -zx
    ln -sf /opt/clion-2017.3.3/bin/clion.sh /usr/bin/clion
    yum update -y
  SHELL
end