/integration

A simple integrational PoC app for the AppDirect platform

Primary LanguageJava

integration PoC

Intro

Sample app to demonstrate some integration based on Java 8, MongoDB and Spring Boot.

How to build

Prerequisites: The application needs to be built with Maven 3.0.4++, Java 8, MongoDB and uses Lombok to generate setter/getters etc. Please have a look on https://projectlombok.org/ to see how is your IDE supported.

To build:

    $ mvn clean package

Building the Docker image

    cd app
    docker build -t <your repo>/imaginarium .

Deploy

The maven packaged app jar could be started directly, but also available as Docker image to run it without any preparation

Preparation

Java app is available on localhost:8080 and the passed java.security.egd settings are mandatory for some virtualized environment (e.g. Digital Ocean), otherwise the startup takes 30 mins o.O.

To run the app you could configure your MongoDB access or use the following I generated for reviewers (that differs from my dev instance):

  mongodb://appdirect:Test-2015@ds027698.mongolab.com:27698/imaginarium-dev

Credentials

The consumer key and secret is already provided in /app/src/main/resources/application.yml

Delivery pipeline

The app has a fully automated build pipeline on: /not available anymore/

Pipeline screenshot:

alt tag

Run

    java -DMONGO_URI=<mongodb connection string> -Djava.security.egd=file:/dev/urandom -jar imaginarium.jar

Docker image exposes the app port 8080 internally and you just need to pull it from the public hub and assign port 80 to the exposed one:

    docker pull lexandro/imaginarium // optional
    docker run -dt --name 'imaginarium' -e MONGO_URI=<mongodb connection string> -p 80:8080 lexandro/imaginarium java -Djava.security.egd=file:/dev/urandom -jar imaginarium.jar

Here's the app's screenshot

alt tag

At the moment the sonar step is demonstrational to show how the automated code quality check could be integrated into the process. The pipeline is autogenerated from DSL script as a bootstrap job and depending only on some settings, but not a dedicated jenkins server. The pipeline source code could be found here:

https://github.com/lexandro/integration-bootstrap

Integration endpoints /not available anymore!!!/

Subscription:

User management: