Step 15 - Build and Bake Eureka
Eureka is a mid-tier service discovery server, optmized for the cloud. Using Eureka we can register our services and, almost as importantly as the service, be able to call registered services directly without incurring the cost of going through a Load Balancer. Changes to instances take effect very rapidly, unlike DNS. It is designed for resiliency in the likely occurance of major catastrophies, further making it a better choice than DNS or Load Balancer when applicable.
cd ~/zerotocloud
./gradlew :eureka:bake
By now, you might be noticing a pattern, we build a DEB and bake it. This has become very routine and easily automated.
Once again, we're going to repeat the Asgard deployment but for Eureka. Return to Step 13 and perform the "Create Application", "Create an ELB", "Create Auto Scaling Group", and "View instance" pieces. Everything from the Health Check URL to the port numbers can stay the same, just use the name "eureka".
- Naviate to Asgard. This can be done by finding the DNS Name from the end of Step 13 or finding the Asgard ELB and using the DNS Name.
- Follow "Create Application", using the name "eureka" instead of "asgard".
- Follow "Create an ELB", using the name "eureka" instead of "asgard".
- Follow "Create Auto Scaling Group" using the name "eureka" instead of "asgard".
- Follow "View instance" to get the DNS Name for eureka's ELB, i.e. eureka--frontend. It can Eureka quite a few minutes to start up, because it is trying find other instances.
- Using that DNS Name, visit http://ELB DNS name/.
Review Eureka's REST API for further documentation.
When it's initially started, nothing has registered with it.