forked from siemens/codeface
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Vagrantfile
executable file
·63 lines (48 loc) · 1.96 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Copyright Roger Meier <[email protected]>
# SPDX-License-Identifier: Apache-2.0 BSD-2-Clause GPL-2.0+ MIT WTFPL
$build = <<SCRIPT
cd /vagrant
integration-scripts/install_repositories.sh
integration-scripts/install_common.sh
integration-scripts/install_codeface_R.sh
integration-scripts/install_codeface_node.sh
integration-scripts/install_codeface_python.sh
integration-scripts/install_cppstats.sh
integration-scripts/setup_database.sh
# Ensure that logs can actually be written to the log directory
sudo chmod a+rw log
SCRIPT
# Uncomment the Ubuntu 16.04/Xenial lines, and comment out the trusty related
# lines to base the installation on Ubuntu 16.04 (Xenial) instead of 14.04 (Trusty)
Vagrant.configure("2") do |config|
# Hmm... no Debian image available yet, let's use a derivate
# Ubuntu 12.04 LTS (Precise Pangolin)
config.vm.provider :virtualbox do |vbox, override|
#config.vm.box = "ffuenf/ubuntu-16.04.2-server-amd64"
config.vm.box = "ubuntu/trusty64"
vbox.customize ["modifyvm", :id, "--memory", "4096"]
vbox.customize ["modifyvm", :id, "--cpus", "2"]
end
config.vm.provider :lxc do |lxc, override|
#override.vm.box = "vagrant-lxc-xenial-amd64.box"
#override.vm.box_url = "http://terminal.lfd.sturhax.de/~wolfgang/vagrant-lxc-xenial-amd64.box"
override.vm.box = "fgrehm/trusty64-lxc"
end
# Forward main web ui (8081) and testing (8100) ports
config.vm.network :forwarded_port, guest: 8081, host: 8081
config.vm.network :forwarded_port, guest: 8100, host: 8100
config.vm.provision "fix-no-tty", type: "shell" do |s|
s.privileged = true
s.inline = "sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile"
end
config.vm.provision "build", type: "shell" do |s|
s.privileged = false
s.inline = $build
end
config.vm.provision "test", type: "shell" do |s|
s.privileged = false
s.inline = "cd /vagrant && integration-scripts/test_codeface.sh"
end
end