1. Asimio
  2. asimio-cloud
  3. DiscoveryServer

Source

DiscoveryServer /

Filename Size Date modified Message
.settings
src
1.2 KB
Changed - Updated IDE config files [No ticket]
9 B
Changed - Removing multi-module POM setup [No ticket]
947 B
Changed - Updated IDE files [No ticket]
1.9 KB
README.md edited online with Bitbucket
1.9 KB
Changed - IDE-only, added standalone profile launch file
1.7 KB
Changed - Removing multi-module POM setup [No ticket]
1.7 KB
Changed - Removing multi-module POM setup [No ticket]
6.8 KB
Changed - Updated pom for Shippable to build and upload to Docker Hub
858 B
Changed - Building and uploading Docker image using Shippable

README

Discovery Server's accompanying source code for blog entry at http://tech.asimio.net/2016/11/14/Microservices-Registration-and-Discovery-using-Spring-Cloud-Eureka-Ribbon-and-Feign.html

Requirements

  • Java 8
  • Maven 3.3.x
  • Docker host or Docker machine

Building and executing application from command line

mvn clean package
java -jar target/discovery-server.jar
or
java -Dspring.profiles.active=standalone -jar target/discovery-server.jar
or
java -Dspring.profiles.active=standalone -DappPort=8001 -jar target/discovery-server.jar
or multiple instances:
java -Dspring.profiles.active=peerAware -DhostName=localhost -DappPort=8001 -DdataCenter=local-dev -Denvironment=dev -DpeerUrls=http://localhost:8001/eureka/,http://localhost:8002/eureka/ -jar target/discovery-server.jar
java -Dspring.profiles.active=peerAware -DhostName=localhost -DappPort=8002 -DdataCenter=local-dev -Denvironment=dev -DpeerUrls=http://localhost:8001/eureka/,http://localhost:8002/eureka/ -jar target/discovery-server.jar

Open http://localhost:8001 or http://localhost:8002 in a browser

How do I get set up using Docker?

sudo docker pull asimio/discovery-server

Multiple containers:

sudo docker run -idt -p 8001:8001 -e appPort=8001 -e spring.profiles.active=peerAware -e hostName=localhost -e dataCenter=local-dev -e environment=dev -e peerUrls=http://localhost:8001/eureka/,http://localhost:8002/eureka/ asimio/discovery-server:latest
sudo docker run -idt -p 8002:8002 -e appPort=8002 -e spring.profiles.active=peerAware -e hostName=localhost -e dataCenter=local-dev -e environment=dev -e peerUrls=http://localhost:8001/eureka/,http://localhost:8002/eureka/ asimio/discovery-server:latest

Open http://localhost:8001 or http://localhost:8002 in a browser

Who do I talk to?