Skip to content

Development Environment Setup

Carlos Botelho edited this page Dec 19, 2019 · 3 revisions

Required Software

Java

POGS is written in Java. You will need to install JDK 8 if you don't already have it, you can get it here.

Redis

POGS uses Redis as an in-memory data cache and it needs to be running in order for the platform to run.

sudo apt install redis-server

Once it's installed, run it.

redis-server

MySQL

In order to run the XCoLab locally, you will need to install MySQL. If you're on macOS with homebrew, see below for instructions, otherwise see MySQL's getting started guide.

  1. Install MySQL

    brew install mysql

    1.1 Check version

    ### MySQL >= 8.0
    mysqld --initialize-insecure --user=`whoami` --datadir=/usr/local/var/mysql --tmpdir=/tmp
    
    ### MySQL >= 5.6 && < 8
    mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
  2. Make sure MySQL is running

    # Install the brew services utility
    brew tap homebrew/services
    
    # now you can start/stop/restart mysql easily (persists across restarts)
    brew services start mysql

If you are running Linux or Mac, make sure that you can connect to the database using your current user without superuser privileges (without using sudo).

Setup for Development

  1. Clone the POGS GitHub repository: https://github.com/CCI-MIT/POGS.

  2. Create a database in mySQL:

    CREATE SCHEMA pogs;
  3. Open file application-database-config.yml Adjust the username and password to the ones you configured during the mysql database installation

    username: DB_USERNAME_HERE
    password: DB_PASSWORD_HERE 
    
  4. Compile the sources. This will also build the database schema. From the project root directory, run:

    mvn clean compile package install 
    

Running a build and starting the servers

Instead of building and running the servers from the command line, we recommend you use an IDE. We use IntelliJ IDEA, so here's a guide how to work with it:

Clone this wiki locally