Microservices with NetflixOSS: Building and Running Eureka part 2

On the previous posts i was talking about the NetflixOSS stack if you did not read it you can check it here:

*NetflixOSS the DevOps Stack for Microservices
*Microservices with NetflixOSS: Karyon, Ribbon and Eureka part 1

We will download build and run eureka in a local environment this could be done in any OS like windows or Linux.

So you need to have java instaled. Them you will need to get a java web server - could be a simple tomcat 8. Once you have tomcat 8 you just need to download latest eureka and install it into tomcat. So you will need to have git installed as well.

Download and Build Eureka from Github

$ git clone https://github.com/Netflix/eureka.git
$ cd eureka/
$ ./gradlew clean build

IF buils okay them you will need to rename the war file to eureka.war. The build will take some time you also can skip the tests if you want build it faster - do $ ./gradlew clean build -x test
If the build fail because of a test you can try build skipping the tests as well. Even with the skip test the build is kind of slow.

Gradle will build eureka client and server - we gonna need just the server for now - its just a war file it should be located at $EUREKA_SRC_FOLDER/eureka-server/build/libs/eureka-server-n.n.n-SNAPSHOT.war dont forget tpo rename it to eureka.war.

Copy the eureka.war to $TOMCAT_HOME/webapps/ and start tomcat $TOMCAT_HOME/bin/catalina.sh start

Them you can go: http://localhost:8080/eureka/ 

You also can check all aps registered in eureka if you go: http://localhost:8080/eureka/v2/apps

Congratz you have eureka running :-)

Diego Pacheco

Popular posts from this blog

Kafka Streams with Java 15

Rust and Java Interoperability

HMAC in Java