-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
50 lines (39 loc) · 1.36 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "sunside/playerstage"
config.vm.network "forwarded_port", guest: 6080, host: 8080
config.vm.network "forwarded_port", guest: 5900, host: 5800
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get -y install --no-install-recommends \
libopencv-dev libopencv-highgui-dev \
xserver-xorg-video-dummy x11vnc \
fluxbox xterm \
supervisor \
git-core \
bc
# stop supervisord
service supervisor stop
# patch the hostname
echo "young-playerstage" > /etc/hostname
hostname "young-playerstage"
# the default display
echo "export DISPLAY=:1" >> /etc/profile
# noVNC
rm -rf /srv/noVNC 2> /dev/null
git clone --single-branch --branch v0.5.1 --depth 1 https://github.com/kanaka/noVNC.git /srv/noVNC
# fetch config
rm -rf /opt/vagrant-config 2> /dev/null
git clone --single-branch --branch vagrant/config --depth 1 https://github.com/sunsided/bht-ams-playerstage.git /opt/vagrant-config
chmod -R +rX /opt/vagrant-config
# wire up xorg.conf
rm -f /etc/X11/xorg.conf 2> /dev/null
ln -s /opt/vagrant-config/X11/xorg.conf /etc/X11/xorg.conf
# wire up supervisord
rm -rf /etc/supervisor/conf.d
ln -s /opt/vagrant-config/supervisor /etc/supervisor/conf.d
# start supervisord
service supervisor start
SHELL
end