Skip to content

Getting started a development

Mariusz Kumor edited this page Nov 26, 2016 · 26 revisions

#Setup development IDE This tutorial aims at showing you, how to setup a development IDE in order to start development process. For development work may start all microservices in the development environment, following below steps. Since we uses InteliJ IDEA, the all instructions are prepared using this software. However you can do it similarly in other IDE, i. e. Netbeans and Eclipse.

##Build the project At the first open the project in IntelliJ IDEA.

###Set Maven version InteliJ IDEA by default uses Maven in version 3.0.5. The Abixen Platform project requires version 3.1.0 or newest. Let's configure the Maven version in InteliJ IDEA. Open preferences window:

Abixe Platform architecture

Go to the Maven section and indicate location to Maven's directory on your system.

Abixe Platform architecture

###Install In the Lifecycle section click on position of creation a new configuration like in the below screenshot:

Abixe Platform architecture

There are two ways to build the project. The first one is with docker images, because Abixen Platform has been dockerized. However in order to build with docker images you must have installed and running docker's daemon. If you don't have Docker or don't want to build its images, add a flat -DskipDocker in the command line field, like in the below screenshot:

Abixe Platform architecture

Click Apply and OK. Now click run button showed in the below screenshot:

Abixe Platform architecture

Maven should download all required dependencies, both java libraries and using Maven Frontend Plugin triggering the bower ones downloading process.

##Run particular microservices

###Run Eureka

Abixe Platform architecture

In a browser go to address http://localhost:8761 and if you can see the Eureka's page, go to the next step. ###Run Configuration Server Go to the abixen-platform-core.yml in the abixen-platform-configuration microservice. Set a correct absolute path of the imageLibraryDirectory property. In the future this config will be improvement. In example like this:

imageLibraryDirectory: /Users/MariuszKumor/workspace/projects/github/abixen-platform/data/image-library/

Similarly as Eureka, start Abixen Platform Configuration microservice. Refresh the Eureka's page and check if the ABIXEN-PLATFORM-CONFIGURATION has been registered. (the section Instances currently registered with Eureka) If yes, go to the next step. ###Run Hystrix Dashboard This microservice is not required and may be omitted, taking into account the Hystrix Dashboard allows to monitor a network traffic between microservices.

Similarly as Eureka, start Abixen Platform Hystrix Dashboard microservice. Refresh the Eureka's page and check if the ABIXEN-PLATFORM-HYSTRIX-DASHBOARD has been registered. If yes, go to the next step. ###Run Gateway

Gateway requires Redis installed and running. On the below URL address there is a sample how to install Redis on Mac OS X http://jasdeep.ca/2012/05/installing-redis-on-mac-os-x And here there is a source of Redis for Windows https://github.com/MSOpenTech/redis/releases

Click the right mouse button on the spring-boot:run option and select create abixen-platform-gateway one:

IDEA gateway create

In the opened window put VM option -Dspring.profiles.active=dev

IDEA gateway config

Save changes, and run:

IDEA gateway run

Refresh the Eureka's page and check if the ABIXEN-PLATFORM-GATEWAY has been registered. If yes, go to the next step.

###Run Modules

Go to similar steps as Abixen Platorm Gateway. Set JVM variables -Dspring.profiles.active=dev -DcreateDbSchema=true

Refresh the Eureka's page and check if the ABIXEN-PLATFORM-MODULES has been registered. If yes, go to the next step.

###Run Core

Go to similar steps as Abixen Platorm Gateway. Set JVM variables -Dspring.profiles.active=dev -DcreateDbSchema=true

Refresh the Eureka's page and check if the ABIXEN-PLATFORM-CORE has been registered. If yes, go to the next step. ###Run Web Client

Go to similar steps as Abixen Platorm Gateway. Set JVM variables -Dspring.profiles.active=dev

Refresh the Eureka's page and check if the ABIXEN-PLATFORM-WEB-CLIENT has been registered. If yes, in a browser go to the address http://localhost:8080 and sign in to the platform. There are three initial users:

  • username admin and password password
  • username user and password password
  • username editor and password password

#Dealing with static resources The are static resources in the Web Client and the Modules microservices. A developer have to modify files in the web directory. Once some changes has been done, running the grunt task from the Maven Frontend Plugin, resources are processing and putting into static directory. Don't modify a content of the static directory - it is overwritten every time, once the grunt task is performed. Refresh a browser after the grunt task is finished.

IDEA gateway create