mastermind0001 / Micro-communication-Pattern

Microservices Frontend Communication Pattern

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Boot - Micro-Communication And BFF Backend

Introduction

This Project contains the cloud native components for building a system with two microservices.

  1. A Spring Cloud Config server that is deployed as Docker container and can manage a services configuration information using a file system/ classpath or GitHub-based repository.
  2. A Eureka server running as a Spring-Cloud based service. This service will allow multiple service instances to register with it. Clients that need to call a service will use Eureka to lookup the physical location of the target service.
  3. A API Gateway. All of our microservices can be routed through the gateway and have pre, response and post policies enforced on the calls.
  4. A organization service that will manage organization data used within Ostock.
  5. A licensing service that will manage licensing data used within Ostock.
  6. A Postgres SQL database used to hold the data.

Initial Configuration

  1. Apache Maven (http://maven.apache.org) All of the code examples in this book have been compiled with Java version 11.
  2. Git Client (http://git-scm.com)
  3. Docker(https://www.docker.com/products/docker-desktop)

How To Use

To clone and run this application, you'll need Git, Maven, Java 11. From your command line:

# Clone this repository
$ git clone https://github.com/ihuaylupo/manning-smia

# Go into the repository, by changing to the directory where you have downloaded it
$ cd [Project main folder]

# To build the code as a docker image, open a command-line 
# window and execute the following command:
$ mvn clean package dockerfile:build

# Now we are going to use docker-compose to start the actual image.  To start the docker image, stay in the directory containing the source code and Run the following command: 
$ docker-compose -f docker/docker-compose.yml up

The build command

Will execute the Spotify dockerfile plugin defined in the pom.xml file.

Running the above command at the root of the project directory will build all of the projects. If everything builds successfully you should see a message indicating that the build was successful.

The Run command

This command will run our services using the docker-compose.yml file located in the /docker directory.

If everything starts correctly you should see a bunch of Spring Boot information fly by on standard out. At this point all of the services needed for the chapter code examples will be running.

Database

You can find the database script as well in the docker directory.

Contact

I'd like you to send me an email on illaryhs@gmail.com about anything you'd want to say about this software.

Contributing

Feel free to file an issue if it doesn't work for your code sample. Thanks.

About

Microservices Frontend Communication Pattern


Languages

Language:Java 93.8%Language:Dockerfile 6.2%