Skip to content

frenzyfriday/serratus-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup serratus-api development environment on MacOSX or Linux (Fedora, RHEL, CentOS)

Install Ansible dependencies on Linux

sudo yum install -y git python3 python3-pip python3-virtualenv python3-libselinux python3-libsemanage python3-policycoreutils

Install Ansible dependencies on MacOSX

brew install git python gnu-tar
pip3 install virtualenv

Install the latest Python and setup a new Python virtualenv

# This step might be virtualenv-3 for you. 
virtualenv ~/python

source ~/python/bin/activate
echo "source ~/python/bin/activate" | tee -a ~/.bash_profile

Install the latest Ansible

pip install setuptools_rust wheel
pip install --upgrade pip
pip install ansible selinux setools

Install dependencies on Linux

sudo yum install -y maven

Install dependencies on MacOSX

brew install maven

Setup Ansible

Install python3 application dependencies

sudo pip3 install psycopg2-binary

Setup the directory for the project and clone the git repository into it

sudo install -d -o $USER -g $USER /usr/local/src/serratus-api
git clone [email protected]:team19hackathon2021/serratus-api.git /usr/local/src/serratus-api

Setup the environment using the requirements.yml file

ansible-galaxy install -r /usr/local/src/serratus-api/ansible/roles/requirements.yml

Install the 4 required roles using the main ansible playbook

cd /usr/local/src/serratus-api && ansible-playbook install.yml -K

Configure Eclipse

Install the Maven plugin for Eclipse

  • In Eclipse, go to Help -> Eclipse Marketplace...
  • Install "Maven Integration for Eclipse"

Import the serratus-api project into Eclipse

  • In Eclipse, go to File -> Import...
  • Select Maven -> Existing Maven Projects
  • Click [ Next > ]
  • Browse to the directory: /usr/local/src/serratus-api
  • Click [ Finish ]

Setup an Eclipse Debug/Run configuration to run and debug serratus-api

  • In Eclipse, go to File -> Debug Configurations...
  • Right click on Java Application -> New Configuration
  • Name: serratus-api QuarkusApp
  • Project: serratus-api
  • Main class: io.serratus.api.enus.vertx.QuarkusApp

In the "Arguments" tab

Setup the following VM arguments to disable caching for easier web development:

-DfileResolverCachingEnabled=false -Dvertx.disableFileCaching=true

In the Environment tab

Setup the following variables to setup the Vert.x verticle.

  • CLUSTER_PORT: 10991
  • CONFIG_PATH: /usr/local/src/serratus-api/config/serratus-api.yml
  • SITE_INSTANCES: 5
  • VERTXWEB_ENVIRONMENT: dev
  • WORKER_POOL_SIZE: 2
  • ZOOKEEPER_HOST_NAME: localhost
  • ZOOKEEPER_PORT: 2181

Click [ Apply ] and [ Debug ] to debug the application.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%