Skip to content

spring boot application deployed and scaled in a docker container registrator and Consul.io used for service discover and nginx used as a load balance

Notifications You must be signed in to change notification settings

simholte/ansible-docker-vagrant-centos

Repository files navigation

Spring Boot Application inside of a Docker container Deployed with Ansible##

###Pre-reqs for Mac OSX###

  1. brew cask install virtualbox
  2. brew cask install vagrant
  3. brew cask install vagrant-manager Vagrant-Manager helps you manage all your virtual machines in one place directly from the menubar.
  4. brew install Ansible

This is my first attempt at creating a simple Spring Boot application and putting it inside of a docker container, deployed using Ansible.

Next step is to scale the Spring Boot Application, then add service discovery and load balancing To do that I used nginx as a reverse proxy load balance, https://consul.io/ as a service registry. I also used registrator https://github.com/gliderlabs/registrator to monitor docker and perform the register action on Consul. Another project Consul-Template https://github.com/hashicorp/consul-template ran on the lb, received signals from Consul and updated the lb config with any docker destroy or creation.

To run the application simply type vagrant up

Once complete the following sites will be available:
The consul UI can be found http://localhost:8500/ui/
The Docker UI can be found http://localhost:9000/
The actual SpringBoot Rest call can be executed by going to http://localhost:8080/

About

spring boot application deployed and scaled in a docker container registrator and Consul.io used for service discover and nginx used as a load balance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published