Getting started
Version: 4.3.x
Welcome to EDDI!
This article will help to get you easily started with EDDI.
You have two Options on how to run EDDI. The most convenient way is to run EDDI as Docker Service. Alternatively, of course, you can run EDDI also from the source by checking out the git repository and building the project with maven.
Prerequisites:
- Download and Install MongoDB (Version >= 3.x)
- Run MongoDB on default port
27017 (this step is important before your run EDDI)
mongod --dbpath [ABS_PATH_TO_DATA]
Option 1 - EDDI as Docker Service
Prerequisites: You need an up and running Docker environment. (For references, see: https://docs.docker.com/learn/)
run docker command:
Run using docker, you can set the environment to development or production by introducing the EDDI_ENVdocker run -it -e "EDDI_ENV=development" labsai/eddi
- Visit http://localhost:7070
- You should see Listing of all available APIs
Option 2 - Run from Source
Prerequisites
- Checkout from Github
- Java 8
- Maven 3
Building Project with Maven
- Go to the root directory and execute
Execute maven command:
maven build commandmvn clean install
Important for eclipse users
If you are planning to browse and build EDDI's code from eclipse, You must take in consideration that EDDI uses project Lombok, so you must add it to eclipse classpath, this can be done easily by executing this jar .m2\repository\org\projectlombok\lombok\1.16.18\lombok-1.16.18.jar
Start Servers locally from Class File
1 - Launch EDDI's ApiServer
class with VM options
-DEDDI_ENV=[development/production] -Xbootclasspath/p:[PATH_TO_MAVEN_DIR].m2\repository\org\mortbay\jetty\alpn\alpn-boot\8.1.11.v20170118\alpn-boot-8.1.11.v20170118.jar
Example :
-DEDDI_ENV=development -Xbootclasspath/p:C:\.m2\repository\org\mortbay\jetty\alpn\alpn-boot\8.1.11.v20170118\alpn-boot-8.1.11.v20170118.jar
3- set the working directory to apiserver
- Go to Browser --> http://localhost:7070
You can overwrite all configs within eddi either by altering the configs itself or - for convenience reasons (especially when running as the container) - by passing on VM params.
Example:
-Xbootclasspath/p:'.:lib/alpn-boot-8.1.11.v20170118.jar'
-DEDDI_ENV=[development/production] -Dmongodb.hosts=somehost -Duser.dir=[LOCAL_PATH_TO_EDDI]\apiserver ai.labs.api.ApiServer
Start Servers from ZIP
- launch EDDI's
ApiServer
from the packaged ZIP file apiserver/target/apiserver-4.3-package.zip with VM options-Xbootclasspath/p:'.:lib/alpn-boot-8.1.11.v20170118.jar'
-DEDDI_ENV=[development/production] -Duser.dir=[LOCAL_PATH_TO_EDDI]\apiserver ai.labs.api.ApiServer
or use.\apiserver\ApiServerStartup.bat
resp. ./apiserver/ApiServerStartup.sh
- Go to Browser --> http://localhost:7070
Passing it on to a Docker container (either plain/docker-compose/kubernetes), every environment variable name starting with "EDDI_JAVA_ENV_" will be automatically used.
Example: EDDI_JAVA_ENV_MONGODB_HOSTS=mongodb.hosts=somehost would end up as VM param in eddi (-Dmongodb.hosts=somehost)
Related articles