This page provides the guide for setting up the development environment for developers
Edit me

Pre-requisites

  • IntelliJ Idea 14.1.7 or higher
  • Maven 3.2.3 or higher
  • Git
  • Jdk 1.8.0_112 or higher
  • Hadoop 2.3.0 or higher
  • Mariadb 10.1.22
  • Activemq 5.14.5 or higher
  • Redis 2.8.14 or higher
  • Zookeeper (Optional)
  • Docker
  • Callisto
  • Node & NPM

Installing Hadoop

$ docker run --name some-hadoop -it -p 50070:50070 -p 50010:50010 -p 9000:9000 -p 50075:50075 logistimo/hadoop:latest
  • Map the hostname to 127.0.0.1 ip in /etc/hosts.
    • This is required for Mac. Other Operating systems where docker supports network in host mode, one could choose to run the container in host mode.
  • Ensure that the container is running
    $ docker ps
    
  • Restart docker container
    $ docker restart some-hadoop
    

Installing Zookeeper

$ docker run --name some-zookeeper --restart always -p 2181:2181 -p 2888:2888 -p 3888:3888 -d zookeeper

Installing Activemq

$ docker run --name='some-activemq' -it --rm -p 8161:8161 -p 61616:61616 -p 61613:61613 webcenter/activemq:latest

Installing Mariadb

  • Run docker container
    $ docker run -p 3306:3306 --name some-maria -e MYSQL_ROOT_PASSWORD=root -d logistimo/mariadb:latest
    

Installing Redis

docker run --name some-redis -p 6379:6379 -d redis redis-server --appendonly yes

Installing MongoDB

docker run --name some-mongo -p 27017:27017 -d mongo

Logistimo Service

Installation of Logistimo service for developers

Instructions to setup Callisto

  • Bootstrap mongo with logistimo-web-service’s schema
    • Navigate to schema
      $ cd logistimo-web-service/schema
      
    • Install nodejs, if already exists skip this step.
      $ brew install node
      
  • Install mongo client
    $ npm install mongo
    
  • Execute the callisto-schema node application
    $ node mongo-schema.js -u
    

Installing Callisto

docker run --net=host -e SERVER_PORT="9080" -e MONGODB_HOST="reports1" -e MONGODB_PORT="27017" -e CALLISTO_DATABASE="callisto" --name logi-callisto -d logistimo/callisto-service:latest

Installing Locations service

  • Follow the instructions provided in the Locations service for the locations microservice development.

  • To run the existing docker image, please run the below command

docker run --net=host -e SPRING_PROFILES_ACTIVE="dev" \
-e SERVER_PORT="9090" \
-e MYSQL_LOGI_HOST="jdbc:mariadb://reports1:3306/logistimo?useUnicode=true&characterEncoding=UTF-8" \
-e MYSQL_LOC_HOST="jdbc:mariadb://reports1:3306/locations?useUnicode=true&characterEncoding=UTF-8" \
-e MYSQL_LOC_USER="logistimo" \
-e MYSQL_LOC_PASS="logistimo" \
-e MYSQL_LOGI_USER="logistimo" \
-e MYSQL_LOGI_PASS="logistimo" \
-e APP_START="true" \
--name locations-service -d logistimo/locations-service:latest

Installing Approvals service

  • Follow the instructions provided in the Approvals service for the approvals microservice development.

  • To run the existing docker image, please run the below command

docker run --net=host \
-e SERVER_PORT="6400" \
-e MYSQL_HOST="jdbc:mariadb://reports1:3306/approval_service?useUnicode=true&characterEncoding=UTF-8" \
-e MYSQL_USER="logistimo" \
-e MYSQL_PASSWORD="logistimo" \
-e CONVERSATION_SERVICE_URL="http://reports1:8082" \
-e ACTIVEMQ_BROKER_URL="tcp://reports1:61616" \
-e ACTIVEMQ_USER="admin" \
-e ACTIVEMQ_PASSWORD="password" \
-e TASK_MACHINE="true" \
--name approval-service -d logistimo/approvals-service:latest

Installing Mobile-api

  • Follow the instructions provided in the Mobile api service for the mobile api service development.

  • To run the existing docker image, please run the below command

docker run --net=host \
-e LOGI_HOST="http://<logistimo_app_host>:8082/s2/api" \
-e TEMP_HOST="http://<ams_app_host>:8082 \
-e AMS_USER="<ams_app_user>" \
-e AMS_PASS="<ams_app_password>" \
--name ls-mobile-api -d logistimo/ls-mobile-api:latest

Installing Collaboration service

  • Follow the instructions provided in the Collaboration service for the collaboration service development.

  • To run the existing docker image, please run the below command

docker run --net=host \
-e MYSQL_SOCIAL_HOST="jdbc:mariadb://mysqldb:3306/social?useUnicode=true&characterEncoding=UTF-8" \
-e MYSQL_SOCIAL_USER="logistimo" \
-e MYSQL_SOCIAL_PASS="logistimo" \
-e ACTIVEMQ_BROKER_URL="tcp://<activemq_host>:61616" \
--name collaboaration-service -d logistimo/collaboration-service:latest

Installing Communication service

  • Follow the instructions provided in the Communication service for the communications service development.

  • To run the existing docker image, please run the below command

docker run --net=host \
-e SERVER_PORT="9020" \
-e MYSQL_COMM_HOST ="jdbc:mariadb://<mariadb_host>:3306/communications?useUnicode=true&characterEncoding=UTF-8" \
-e MYSQL_COMM_USER ="<mysql_user>" \
-e MYSQL_COMM_PASS ="<mysql_password>" \
-e ACTIVEMQ_URL ="tcp://<activemq_host>:61616" \
-e ACTIVEMQ_USER="<activemq_user>" \
-e ACTIVEMQ_PASS ="<activemq_password>"  \
-e REDIS_HOST ="<redis_host>" \
-e SENTINEL_HOST = "<sentinel_host>" \
-e ISSENTINEL = "<true>" \
-e GOOGLE_APPLICATION_CREDENTIALS = "<google_application_credentials>" \
-e FIREBASE_CONFIG = "<firebase_config>" \
-e TASK_MACHINE="true" --name communication-service \
-d logistimo/communication-service:latest

Instructions to setup on IntelliJ Idea

  • Open project
    • Click File -> Open
    • Choose scm/pom.xml
  • Run maven install
    • Open terminal
    • From the project root directory, run
      $ mvn clean install -DskipTests -Dfindbugs.skip=true -Dpmd.skip=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip 
      
  • Define run configurations in IntelliJ as shown in the screen shot below.
    • Menu –> Run –> Edit Configurations
    • Click + on the top left
    • Choose Tomcat –> Local
    • Provide following options in the form
      • name : Logistimo service
      • VM Options : -Xmx1G
      • Choose deployments tab -> add external artificat scm/modules/web/target/logi-2.4.0.SNAPSHOT-bin.war
    • Click apply/ok

  • Run the service
  • Click Run –> Logistimo service

Default accounts

Username Password Role
superuser admin Super user
country_admin admin Administrator
state_admin admin Administrator
state_mngr admin Manager
state_opr admin Operator

Asset Monitoring Service

Installation of asset monitoring service for developers

Instructions to setup on IntelliJ Idea