Pre-requisites for development

We describe how to create a developer environment to build Asqatasun locally on an Ubuntu 20.04 / Linux Mint 20

Pre-requisites

  • Maven 3.6
  • jdk8
  • Mysql 5.7
  • Firefox + Gecko Driver

Jdk 8

sudo apt install openjdk-8-jdk
sudo update-alternatives --config java
java -version

Maven

sudo apt install maven

Firefox + Gecko Driver

Note: it is important to stick to the specified version of Firefox

FIREFOX_VERSION="91.4.1esr"
GECKODRIVER_VERSION="v0.30.0"
FIREFOX_URL_PREFIX="https://download-installer.cdn.mozilla.net/pub/firefox/releases/"
GECKODRIVER_URL_PREFIX="https://github.com/mozilla/geckodriver/releases/download/"
FIREFOX_URL="${FIREFOX_URL_PREFIX}${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2"
GECKODRIVER_URL="${GECKODRIVER_URL_PREFIX}${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz"

cd /opt
sudo wget "${FIREFOX_URL}"
sudo wget "${GECKODRIVER_URL}"
sudo tar xf "firefox-${FIREFOX_VERSION}.tar.bz2"
sudo tar xf "geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz"

Mysql

(MariaDB is not yet supported. See Allow using MariaDB with JDBC MariaDB driver)

We decide to use a Docker container

docker run \
  --name mysql \
  -e MYSQL_ROOT_PASSWORD=my-secret-pw \
  -e MYSQL_USER=asqatasunDatabaseUserLogin \
  -e MYSQL_PASSWORD=asqatasunDatabaseUserP4ssword \
  -e MYSQL_DATABASE=asqatasun \
  -p 3307:3306 \
  -d mysql:5.7

Notes:

  • In this snippet, we choose to launch Mysql on port 3307 in case another Mysql is already running on 3306
  • The values asqatasunDatabaseUserLogin, asqatasunDatabaseUserP4ssword and asqatasun are the default ones and defined in application.yml (webapp) and application.yml (API)

Get Asqatasun source code

git clone https://github.com/Asqatasun/Asqatasun.git
cd Asqatasun