Install the backend server
diff --git a/Vagrantfile b/Vagrantfile
index e1524f7..b339074 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -1,64 +1,132 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
-# All Vagrant configuration is done below. The "2" in Vagrant.configure
-# configures the configuration version (we support older styles for
-# backwards compatibility). Please don't change it unless you know what
-# you're doing.
+# The "2" in Vagrant.configure configures the configuration version.
+# Please don't change it unless you know what you're doing.
Vagrant.configure(2) do |config|
- # The most common configuration options are documented and commented below.
- # For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
- # Every Vagrant development environment requires a box. You can search for
- # boxes at https://vagrantcloud.com/search.
- config.vm.box = "KorAP/KorAP-Vagrant"
+ # More at https://vagrantcloud.com/search.
+ config.vm.box = "ubuntu/trusty64"
- # Disable automatic box update checking. If you disable this, then
- # boxes will only be checked for updates when the user runs
- # `vagrant box outdated`. This is not recommended.
- # config.vm.box_check_update = false
+ config.vm.provider "virtualbox" do |vb|
+ vb.customize ["modifyvm", :id, "--memory", "1024"]
+ end
+
+ config.vm.box_download_insecure = true
+
+ # Provisioning of KorAP with a Shell script
+ config.vm.provision "shell", privileged: false, inline: <<-SHELL
- # Create a forwarded port mapping which allows access to a specific port
- # within the machine from a port on the host machine. In the example below,
- # accessing "localhost:8080" will access port 80 on the guest machine.
- # config.vm.network "forwarded_port", guest: 80, host: 8080
+ ###############################################
+ echo "Install Packages"
- # Create a private network, which allows host-only access to the machine
- # using a specific IP.
- # config.vm.network "private_network", ip: "192.168.33.10"
+ # Add repository for OpenJDK
+ sudo add-apt-repository ppa:openjdk-r/ppa
- # Create a public network, which generally matched to bridged network.
- # Bridged networks make the machine appear as another physical device on
- # your network.
- # config.vm.network "public_network"
+ sudo apt-get update
- # Share an additional folder to the guest VM. The first argument is
- # the path on the host to the actual folder. The second argument is
- # the path on the guest to mount the folder. And the optional third
- # argument is a set of non-required options.
- # config.vm.synced_folder "../data", "/vagrant_data"
+ echo "Install dependencies"
+ sudo apt-get install -qq git
+ sudo apt-get install -qq openjdk-8-jdk
+ sudo apt-get install -qq perlbrew
+ sudo apt-get install -qq emacs
+ sudo apt-get install -qq maven
+ # sudo apt-get install -qq nodejs
+ # sudo apt-get install -qq npm
+ # sudo apt-get install -qq ruby
- # Provider-specific configuration so you can fine-tune various
- # backing providers for Vagrant. These expose provider-specific options.
- # Example for VirtualBox:
- #
- # config.vm.provider "virtualbox" do |vb|
- # # Display the VirtualBox GUI when booting the machine
- # vb.gui = true
- #
- # # Customize the amount of memory on the VM:
- # vb.memory = "1024"
- # end
- #
- # View the documentation for the provider you are using for more
- # information on available options.
+ # Workaround for https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1396760
+ sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
- # Enable provisioning with a shell script. Additional provisioners such as
- # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
- # documentation for more information about their specific syntax and use.
- # config.vm.provision "shell", inline: <<-SHELL
- # sudo apt-get update
- # sudo apt-get install -y apache2
- # SHELL
+
+ ###############################################
+ echo "Install Koral"
+ cd ~/
+ if [ -e ./Koral ] && [ -d ./Koral ]
+ then
+ cd Koral
+ git pull origin master
+ else
+ git clone https://github.com/KorAP/Koral.git Koral
+ cd Koral
+ fi
+ mvn clean install -Dhttps.protocols=TLSv1.2
+
+
+ ###############################################
+ echo "Install Krill"
+ cd ~/
+ if [ -e ./Krill ] && [ -d ./Krill ]
+ then
+ cd Krill
+ git pull origin master
+ else
+ git clone https://github.com/KorAP/Krill.git Krill
+ cd Krill
+ fi
+ mvn clean install
+
+
+ ###############################################
+ echo "Install Kustvakt"
+ cd ~/
+ if [ -e ./Kustvakt ] && [ -d ./Kustvakt ]
+ then
+ cd Kustvakt
+ git pull origin master
+ else
+ git clone https://github.com/KorAP/Kustvakt.git Kustvakt
+ cd Kustvakt
+ fi
+
+ cd ~/Kustvakt/core
+ mvn clean install
+
+ cd ~/Kustvakt/lite
+ mvn clean package
+
+
+ ###############################################
+ echo "Install Perlbrew + CPANminus"
+ cd ~/
+
+ perlbrew init
+ echo "source ~/perl5/perlbrew/etc/bashrc" >> ~/.bashrc
+
+ source ~/perl5/perlbrew/etc/bashrc
+
+ perlbrew self-upgrade
+ perlbrew install -q perl-5.24.0
+
+ perlbrew switch perl-5.24.0
+ perlbrew install-cpanm
+
+
+ ###############################################
+ echo "Install Kalamar server-side dependencies"
+ cpanm git://github.com/Akron/Mojolicious-Plugin-Search.git
+ cpanm git://github.com/Akron/Mojolicious-Plugin-Localize.git
+ cpanm git://github.com/Akron/Mojolicious-Plugin-TagHelpers-ContentBlock.git
+
+
+ ###############################################
+ echo "Install Kalamar"
+
+ if [ -e ./Kalamar ] && [ -d ./Kalamar ]
+ then
+ cd Kalamar
+ git pull origin master
+ else
+ git clone git://github.com/KorAP/Kalamar.git Kalamar
+ cd Kalamar
+ fi
+
+ cpanm --installdeps .
+
+ ###############################################
+ # echo "Install Kalamar client-side dependencies"
+ # sudo gem install sass
+
+ SHELL
end