Skip to content

This is the master repository for containing git submodules for the microservices of the scrum demo application. In addition, this repository contains scripts that will build environments for developers, testers and entire delivery teams.

License

Notifications You must be signed in to change notification settings

Estafet-LTD/estafet-microservices-scrum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Openshift Microservices Scrum Demo Application

The scrum demo application is composed of microservices and provides a example of how microservices implement common application aspects, such as data management, stateful domain objects and reporting in a distributed architecture. It is a useful starting point for a Java engineer who is interesting in understanding how microservices are built.

The application is designed to be deployed within an Openshift cluster and provides a convenient platform for demonstrating aspects such as logging, monitoring, release management and testing for microservices.

Contents

Project Structure

One thing to note is that each microservice has its own git repository. Separate repositories means that each service be released independently.

Repository Description
estafet-microservices-scrum-api-project Microservices for managing scrum projects.
estafet-microservices-scrum-api-project-burndown Microservices for aggregating and generating project burndown reports.
estafet-microservices-scrum-api-sprint Microservices for managing sprints.
estafet-microservices-scrum-api-sprint-board Microservices for aggregating and rendering a sprint board.
estafet-microservices-scrum-api-sprint-burndown Microservices for aggregating and generating sprint burndown reports.
estafet-microservices-scrum-api-story Microservices for managing stories.
estafet-microservices-scrum-api-task Microservices for managing tasks.
estafet-microservices-scrum-basic-ui Basic User Interface that uses the scrum microservices.
estafet-microservices-scrum-qa Cross cutting Quality Assurance tests.
estafet-microservices-scrum-qa-prod Tests that are performed in the production staging environment.

Getting started

There are a couple of installation options for the demo application:

Prerequisites

Please review the prerequisites below before continuing with the deployment steps:

Ansible

Ansible is installed as a linux application, but it is possible to install it on Windows 10 and Mac OS X machines.

Windows Users

Windows users will need to install ansible using Windows Subsytem for Linux (WSL). For instructions on how to install anisble on a Window 10 machine, please refer to this excellent article.

https://www.jeffgeerling.com/blog/2017/using-ansible-through-windows-10s-subsystem-linux

MAC OS X Users

Mac users can easily install ansible provided homebrew isinstalled. For a comprehensive description, please consult this article.

https://hvops.com/articles/ansible-mac-osx/

Additional Python Library

The ansible playbook requires a python module that is not always installed with the standard ansible distributions.

sudo apt-get install python-jmespath

Openshift

The ansible playbook assumes that you have installed Openshift on your local development machine. If this is not the case, you will need to amend the ansible create-local-environment-vars.yml or create-devops-environments-vars.yml file (depending on which environment you are installing) and modify the openshift: 192.168.99.100:8443 directive.

Openshift CLI (oc)

The playbook also assumes that the Openshift CLI oc is installed on the same machine that you have installed Ansible on. If this is not the case, you will need to amend the Ansible microservices-scrum.yml file and modify the hosts: localhost directive.

Windows Users

Windows users will need to install the Openshift CLI onto WSL for linux so that the ansible scripts can run. They will also need to copy the kuberenetes credentials from the windows to WSL. This will alllow the ansible script perform certain operations as the system administrator.

cp /mnt/c/Users/<Windows User>/.kube/config ~/.kube

Local Environment Setup

Installing and configuring the scrum demo application to openshift manually is a lengthy process. There are 13 applications in total (8 microservices + db + jaeger + message broker). Fortunately this process has been automated using Ansible.

Steps

Step #1

Clone the master repository to a directory of your choice.

git clone https://github.com/Estafet-LTD/estafet-microservices-scrum.git
Step #2

Run the playbook. The playbook takes about 15 mins complete.

Note:- If you are using minishift, it might be advisible to tweak the resources available (see below).

$ cd estafet-microservices-scrum/ansible
$ ansible-playbook create-local-environment-playbook.yml
Minishift specifics (Linux Only)

To remove your minshift installation in preparation to rebuild:

$ minishift delete && rm -rf ~/.minishift

To build minishift and get the scrum demo up and running:

$ minishift start --memory 6GB && ansible-playbook create-local-environment-playbook.yml [email protected]

Note:- The default 4GB of ram is not sufficient to get all up and running, also the '[email protected]' is required for versions of Openshift > 3.0 (this relates to the command for setting env vars only)

The IP of the minishift instance is detected in the Ansible playbook 'create-local-environment-playbook.yml' if the 'openshift' variable is not provided. To override this, supply the 'openshift' variable in file create-local-environment-vars.yml by uncommenting the 'openshift' variable definition line and supplying the correct ip address.

Reseting application data

You can reset the application data by executing the following playbook. This will redeploy all of database dependent microservices so it takes about a 30 seconds to complete.

ansible-playbook reset-data-playbook.yml

Test Environment Setup

Click here to find the test environment setup details.

DevOps Environment Setup

The local environment setup allows a developer start using the microservices application, but in order to set up a project, we'll need to create a development, test, continuous integration and project environment. These environments will need CICI pipelines, artifact repositories, code analysis and all of the automation associated with DevOps. Fortunately, this can be setup with running a single script.

Steps

Step #1

Clone the master repository to a directory of your choice.

git clone https://github.com/Estafet-LTD/estafet-microservices-scrum.git
Step #2

Run the playbook. The playbook takes about 30 mins complete.

Note:- If you are using minishift, it might be advisible to tweak the resources available.

$ cd estafet-microservices-scrum/ansible
$ ansible-playbook create-devops-environments-playbook.yml
Step #3

Jenkins setup tbc...

Setting Up Maven Locally to Use Nexus

tbc...

Environments

tbc...

Architecture

The application consists of 9 microservices + the user interface. These are deployed to openshift as pods. The postgres pod instance contains 6 databases, each "owned" by a microservice. The A-MQ broker processes messages sent to topics and distributes these to microservices that have subscribedtothose topics.

alt tag

Domain Model

Here's the overall business domain model.

alt tag

Distributed Monitoring

Here's a short summary of the Opentracing and Jaeger with microservices.

IMAGE ALT TEXT HERE

This is a more detailed walkthrough of the scrum demo application and it's integration with Jaeger.

IMAGE ALT TEXT HERE

About

This is the master repository for containing git submodules for the microservices of the scrum demo application. In addition, this repository contains scripts that will build environments for developers, testers and entire delivery teams.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published