Skip to content

aker/microservices-demo-consul

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

microservices-demo-consul

Demo application to go with Microservices Blog on the spring.io website.

I just modify it to run on consul.

Running the sample

  1. Install Consul, Please see the installation documentation for instructions on how to install Consul.
  2. In each window, change to the directory where you cloned the demo
  3. In the first window, run: ./src/main/bash/local_run_consul.sh and wait for it to start up
  4. In the second window, build the application using mvn clean package
  5. In the same window run: java -jar target/microservice-demo-consul-1.1.0.RELEASE.jar accounts and wait for it to start up
  6. In the third window run: java -jar target/microservice-demo-consul-1.1.0.RELEASE.jar web
  7. In your favorite browser open the same two links: http://localhost:8500 and http://localhost:3333

You should see servers being registered in the log output of the first (registration) window. As you interact with the web-application (http://localhost:3333) you should logging appear in the second and third windows.

  1. In a new window, run up a second account-server using HTTP port 2223:
    • java -jar target/microservice-demo-consul-1.1.0.RELEASE.jar accounts 2223
  2. Allow it to register itself
  3. Kill the first account-server and see the web-server switch to using the new account-server - no loss of service.

About

From microservices-demo but running on consul

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published