1. Home
  2. Developers
  3. Deployment Documentation

Deployment Documentation

Solution Deployment

The entire solution consists of the 6 micro-services (v1.9.0)

  1. Key Management.
  2. Audit.
  3. Token Management.
  4. Main (Contains web representation).
  5. Admin Portal (Contains web representation).
  6. EcigMedia Portal (Contains web representation).

Required tool to build and deploy solution:

  1. Java v1.8
  2. Maven v3.3.9
  3. NodeJS v8.11.4
  4. NPM v5.6.0
  5. Docker v18 and higher
  6. Docker Compose v1.22.0 and higher


The solution data is stored in the three databases: Key Management, Token Management and Main. So description for these services will include instructions for the DB migration. DB migration is performed using a docker container, – at first, docker image should be built using build.sh  then docker container should be started and migration executed using run-daemon.sh  script.

  1. First of all, correspond schema should be created in the DB. Default name may be found in the application configuration file: applcation.properties . Obviously, schema name may be changed for the deployment needs.
  2. Docker image should be built using sh. A path to the bash file to build docker image for the DB migration: ../provisioning/liquibase/build.sh
  3. Docker container should be started and migration executed using run-daemon.sh Path to the bash file: ../provisioning/liquibase/run-daemon.sh


All micro-services uses KMS protection of the configuration files. For the application deployment, Docker is used as well.

  1. Token Management and Main micro-service depend on adbank-schedulerlock  It must be built using mvn clean install  command in the very beginning to achieve artifact which will be used before mentioned micro-services.
  2. Before application deployment, file application.properties  should be updated with the properties for the corresponding environment. Then config file should be encrypted. For the details, refer to the: documentation\AWS_KMS_configuration.md   Then encrypted file may be safely placed on the instance. Path to the folder with encrypted properties file must be set up during container running using -v  flag: -v /home/ubuntu/provisioning/main/app/ext-config:/ext-config
  3. Services with web representation contain in service root folder package.sh  which should be executed in the very beginning of the micro-service deployment.
  4. To build docker image execute: mvn clean install -Pdocker . This command will package prepared web file in the executable jar file.
  5. Then run docker container using command run for the application start. Like:
    docker run -d -t -i -p 8080:8080 \
           --name adbank-main-service \
           --restart always \
           -v /home/ubuntu/provisioning/main/app/ext-config:/ext-config \
           adbank-main-service:1.0 /opt/startup.sh

Here we configuring:

  • Microservice port using p  flag -p 8080:8080 ;
  • Docker container name: –name adbank-main-service ;
  • Path to the volume to mount: -v /home/ubuntu/provisioning/main/app/ext-config:/ext-config – used to mount encrypted configuration file to the instance;
  • If needed script which should be executed during the startup:


Docker Compose used for the Revive deployment. Navigate to the: revive-adserver-4.1.3-docker  and execute: docker-compose up -d . This will run MySQL DB and the Revive application containers. For more information regarding Revive configuration and plugins installation refer to: revive-adserver-4.1.3-docker/README.md


For the detailed information, refer to:

  • monitoring/README.md
  • monitoring/add-new-service.md
Updated on October 8, 2018

Was this article helpful?