Docker orchestration, service discovery, Vagrant
Create a small web application which on request retrieves several rows of data from the database of your choice.
Dockerize the web app and the database. The application should resolve database configuration using the service discovery tool of your choice.
Web application and database should run on different virtual nodes, configured by Vagrant.
Architecture
Initially, a virtual machine is create on VirtualBox, dockerHostVM. On top of this VM, three docker containers are built:
- dataContainer used to store the data for the database and logs for the application
- mysqlContainer used for the MySQL installation
- applicationContainer used for hosting the application
Service discovery is performed with simple docker links.
Run
vagrant up --no-parallel
GET Request
cURL http://localhost:8888/simpleproject/rest/StudentService/students