Coder Social home page Coder Social logo

microservices-template's Introduction

Microservices Template

++ Note: This project is still WIP ++

This repo contains a skeleton template for creating new microservices.

It is an opinionated template where certain technology/tool/framework have been chosen...

High Level Architecture

microservices-template

Programming Language

  • Java 8

Application Framework

  • Spring Boot 2.0+

Build

Both Maven and Gradle are supported. However, Maven is currently the main build system used for this project to manage the release.

Maven
Maven wrapper is used so that no need to install Maven on your machine beforehand. Lets maven wrapper take care of maven.

Gradle
Just like Maven, Gradle offers the Gradle wrapper is used so that no need to install Gradle on your machine beforehand.

Continuous Integration (CI)

See Jenkinsfile which is a config file for defining build settings on Jenkins 2.0+ (with the use of Pipelines).

Only Jenkins 2.0+ is supported.

Continuous Delivery (CD)

Every commit/merge is a RC (Release Candidate).

See Jenkinsfile's section on Continous Delivery.

Continuous Deployment (CD)

Mainly it is about the automated deployment from a testing environment (Staging) onto live Production. Normally, or historically, this would be a manual process done by the Operations Team (Ops).

See Jenkinsfile's section on Continous Deployment.

CD is facilitated by the shell script deploy.sh which you can use and edit to define the steps and behaviours for doing the deployment. In Jenkins pipeline, we have a sanity check stage which governs or acts as a gate prior for the software to be deloyed onto Production. (Artifact/Pipeline promotion).

Infrastructure As Code

To implement IAC, Terraform is used. You can place your terraform files in the terraform directory. This template assumes the project will be deployed onto the Cloud or to any other infrastructure that is supported by Terraform.

If deploying to a bare metal physical server machine or to Virtual Machines, one might decide to use a configuration management tool such as Ansible, Puppet, or Chef a like to automate the provisioning of the infrastructure instead. Currently this template does not offer support for this. As normally, these deployment methods normally reside in a separate source code repository hence this subject matter is out of the scope of this template project.

Deploymemt

Docker

See Dockerfile in the root of the project directory.

Building a Docker container

./mvnw clean package

or execute Docker directly:

docker build -t microservices-template:1.0.0-SNAPSHOT .

Kubernetes

Using an container orchestration framework to manage the containers. This template project is opinionated towards Kubernetes. It is to note that other container orchestration platforms exists (Docker Swarm, Nomad with Consul, Apache Mesos on DC/OS etc).

kubectl apply -f deployment/microservices-template.yml

API Documentation

Use of Swagger to document our microservice's API REST endpoints.

Access Swagger on:

http://{microservices-template-service-url}:{port}/swagger-ui.html

microservices-template's People

Contributors

colinbut avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.