blob: b339074ab62e91252a6b8d762217a6b5513eef3e [file] [log] [blame]
Akron228cfa12018-10-01 16:14:41 +02001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
Akrona7b661d2018-10-09 19:13:45 +02004# The "2" in Vagrant.configure configures the configuration version.
5# Please don't change it unless you know what you're doing.
Akron228cfa12018-10-01 16:14:41 +02006Vagrant.configure(2) do |config|
Akron228cfa12018-10-01 16:14:41 +02007 # https://docs.vagrantup.com.
8
Akrona7b661d2018-10-09 19:13:45 +02009 # More at https://vagrantcloud.com/search.
10 config.vm.box = "ubuntu/trusty64"
Akron228cfa12018-10-01 16:14:41 +020011
Akrona7b661d2018-10-09 19:13:45 +020012 config.vm.provider "virtualbox" do |vb|
13 vb.customize ["modifyvm", :id, "--memory", "1024"]
14 end
15
16 config.vm.box_download_insecure = true
17
18 # Provisioning of KorAP with a Shell script
19 config.vm.provision "shell", privileged: false, inline: <<-SHELL
Akron228cfa12018-10-01 16:14:41 +020020
Akrona7b661d2018-10-09 19:13:45 +020021 ###############################################
22 echo "Install Packages"
Akron228cfa12018-10-01 16:14:41 +020023
Akrona7b661d2018-10-09 19:13:45 +020024 # Add repository for OpenJDK
25 sudo add-apt-repository ppa:openjdk-r/ppa
Akron228cfa12018-10-01 16:14:41 +020026
Akrona7b661d2018-10-09 19:13:45 +020027 sudo apt-get update
Akron228cfa12018-10-01 16:14:41 +020028
Akrona7b661d2018-10-09 19:13:45 +020029 echo "Install dependencies"
30 sudo apt-get install -qq git
31 sudo apt-get install -qq openjdk-8-jdk
32 sudo apt-get install -qq perlbrew
33 sudo apt-get install -qq emacs
34 sudo apt-get install -qq maven
35 # sudo apt-get install -qq nodejs
36 # sudo apt-get install -qq npm
37 # sudo apt-get install -qq ruby
Akron228cfa12018-10-01 16:14:41 +020038
Akrona7b661d2018-10-09 19:13:45 +020039 # Workaround for https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1396760
40 sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
Akron228cfa12018-10-01 16:14:41 +020041
Akrona7b661d2018-10-09 19:13:45 +020042
43 ###############################################
44 echo "Install Koral"
45 cd ~/
46 if [ -e ./Koral ] && [ -d ./Koral ]
47 then
48 cd Koral
49 git pull origin master
50 else
51 git clone https://github.com/KorAP/Koral.git Koral
52 cd Koral
53 fi
54 mvn clean install -Dhttps.protocols=TLSv1.2
55
56
57 ###############################################
58 echo "Install Krill"
59 cd ~/
60 if [ -e ./Krill ] && [ -d ./Krill ]
61 then
62 cd Krill
63 git pull origin master
64 else
65 git clone https://github.com/KorAP/Krill.git Krill
66 cd Krill
67 fi
68 mvn clean install
69
70
71 ###############################################
72 echo "Install Kustvakt"
73 cd ~/
74 if [ -e ./Kustvakt ] && [ -d ./Kustvakt ]
75 then
76 cd Kustvakt
77 git pull origin master
78 else
79 git clone https://github.com/KorAP/Kustvakt.git Kustvakt
80 cd Kustvakt
81 fi
82
83 cd ~/Kustvakt/core
84 mvn clean install
85
86 cd ~/Kustvakt/lite
87 mvn clean package
88
89
90 ###############################################
91 echo "Install Perlbrew + CPANminus"
92 cd ~/
93
94 perlbrew init
95 echo "source ~/perl5/perlbrew/etc/bashrc" >> ~/.bashrc
96
97 source ~/perl5/perlbrew/etc/bashrc
98
99 perlbrew self-upgrade
100 perlbrew install -q perl-5.24.0
101
102 perlbrew switch perl-5.24.0
103 perlbrew install-cpanm
104
105
106 ###############################################
107 echo "Install Kalamar server-side dependencies"
108 cpanm git://github.com/Akron/Mojolicious-Plugin-Search.git
109 cpanm git://github.com/Akron/Mojolicious-Plugin-Localize.git
110 cpanm git://github.com/Akron/Mojolicious-Plugin-TagHelpers-ContentBlock.git
111
112
113 ###############################################
114 echo "Install Kalamar"
115
116 if [ -e ./Kalamar ] && [ -d ./Kalamar ]
117 then
118 cd Kalamar
119 git pull origin master
120 else
121 git clone git://github.com/KorAP/Kalamar.git Kalamar
122 cd Kalamar
123 fi
124
125 cpanm --installdeps .
126
127 ###############################################
128 # echo "Install Kalamar client-side dependencies"
129 # sudo gem install sass
130
131 SHELL
Akron228cfa12018-10-01 16:14:41 +0200132end