Code Monkey home page Code Monkey logo

webapp-microservices's Introduction

Consul

pull consul

docker pull consul

run in docker

docker run -d --name=c1 -p 8500:8500 consul agent -dev -client=0.0.0.0 -bind=0.0.0.0

Open Consul Dashboard

http://localhost:8500

Configure properties

(Currently the projects use the configuration of consul) in key/value add this property

key or folder = config/export-service/test
value = ANY_VALUE 
  • config:base path
  • export-service: Service name
  • test: Property

in projects it is used like this

@Value("${test}")
String value;

If you want run Consul in another location, check bootstrap.yml in both projects(api-gateway, export-service) and configure the host and port

Run Api-Gateway

(run in port 9000, check health in consul dashboard)

check zuul configuration in application.yml

Run export-service1

(run in port 8000, check health in consul dashboard)

Run export-service2

exec with vm option

-Dserver.port=8001

(run in port 8001, check health in consul dashboard)

Test

http://localhost:9000/export-service/hola-mundo

If both instances are running correctly, the port shown in each request must change(8000,8001)

Hystrix

Hystrix Stream

Hystrix Dashboard

http://localhost:9000/hystrix

check with any hystrix stream

Hystrix Command error

(check in hystrix dashboard with export-service1 or export-service2 stream)

webapp-microservices's People

Contributors

jorgevillada avatar

Stargazers

 avatar

Watchers

 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.