blob: 57197e3fe9367b0e73b4726c29419fa77f5555f0 [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|
Akroncc10f9a2018-10-09 19:57:27 +02007
Akron228cfa12018-10-01 16:14:41 +02008 # https://docs.vagrantup.com.
9
Akrona7b661d2018-10-09 19:13:45 +020010 # More at https://vagrantcloud.com/search.
11 config.vm.box = "ubuntu/trusty64"
Akron228cfa12018-10-01 16:14:41 +020012
Akrona7b661d2018-10-09 19:13:45 +020013 config.vm.provider "virtualbox" do |vb|
14 vb.customize ["modifyvm", :id, "--memory", "1024"]
15 end
16
17 config.vm.box_download_insecure = true
18
19 # Provisioning of KorAP with a Shell script
20 config.vm.provision "shell", privileged: false, inline: <<-SHELL
Akron228cfa12018-10-01 16:14:41 +020021
Akrona7b661d2018-10-09 19:13:45 +020022 ###############################################
23 echo "Install Packages"
Akron228cfa12018-10-01 16:14:41 +020024
Akrona7b661d2018-10-09 19:13:45 +020025 # Add repository for OpenJDK
26 sudo add-apt-repository ppa:openjdk-r/ppa
Akron228cfa12018-10-01 16:14:41 +020027
Akrona7b661d2018-10-09 19:13:45 +020028 sudo apt-get update
Akron228cfa12018-10-01 16:14:41 +020029
Akrona7b661d2018-10-09 19:13:45 +020030 echo "Install dependencies"
31 sudo apt-get install -qq git
32 sudo apt-get install -qq openjdk-8-jdk
33 sudo apt-get install -qq perlbrew
34 sudo apt-get install -qq emacs
35 sudo apt-get install -qq maven
Akroncc10f9a2018-10-09 19:57:27 +020036 sudo apt-get install -qq nodejs
37 sudo apt-get install -qq npm
38 sudo apt-get install -qq ruby
Akron228cfa12018-10-01 16:14:41 +020039
Akrona7b661d2018-10-09 19:13:45 +020040 # Workaround for https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1396760
41 sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
Akron228cfa12018-10-01 16:14:41 +020042
Akrona7b661d2018-10-09 19:13:45 +020043 ###############################################
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 ###############################################
Akroncc10f9a2018-10-09 19:57:27 +020091 echo "Install NodeJS"
92 # This is required unfortunately
93 mkdir ~/tmp
94 npm set ca null
95 # sudo npm install -g n
96 # sudo n stable
97 sudo npm install -g sass
98 sudo npm install -g grunt-cli
99 sudo npm install grunt
100
101
102 ###############################################
Akrona7b661d2018-10-09 19:13:45 +0200103 echo "Install Perlbrew + CPANminus"
104 cd ~/
105
106 perlbrew init
107 echo "source ~/perl5/perlbrew/etc/bashrc" >> ~/.bashrc
108
109 source ~/perl5/perlbrew/etc/bashrc
110
111 perlbrew self-upgrade
112 perlbrew install -q perl-5.24.0
113
114 perlbrew switch perl-5.24.0
115 perlbrew install-cpanm
116
117
118 ###############################################
119 echo "Install Kalamar server-side dependencies"
120 cpanm git://github.com/Akron/Mojolicious-Plugin-Search.git
121 cpanm git://github.com/Akron/Mojolicious-Plugin-Localize.git
122 cpanm git://github.com/Akron/Mojolicious-Plugin-TagHelpers-ContentBlock.git
123
124
125 ###############################################
126 echo "Install Kalamar"
Akroncc10f9a2018-10-09 19:57:27 +0200127 cd ~/
Akrona7b661d2018-10-09 19:13:45 +0200128 if [ -e ./Kalamar ] && [ -d ./Kalamar ]
129 then
130 cd Kalamar
131 git pull origin master
132 else
133 git clone git://github.com/KorAP/Kalamar.git Kalamar
134 cd Kalamar
135 fi
136
137 cpanm --installdeps .
138
139 ###############################################
140 # echo "Install Kalamar client-side dependencies"
Akroncc10f9a2018-10-09 19:57:27 +0200141 npm install
142 grunt
Akrona7b661d2018-10-09 19:13:45 +0200143
144 SHELL
Akron228cfa12018-10-01 16:14:41 +0200145end