Is it right to use container for database?

Container has changed the way applications are developed and deployed. The ease of packaging dependencies and the ability to freeze the contents of the container has given the power of deploying repeatable environments. Developers can now confidently echo “What works on my machine can work everywhere”. Containers go hand in hand with DevOps process. In fact, it is a right fit for the DevOps. With Infrastructure defined as a Code (IaC), an entire application image can be built using a code and deployed on the platform of choice. Since containers require very less time to start compared to the Virtual Machine startup, deploying a new release or rollback can be done easily. But what about a state of an application? A majority of the applications require a state to be maintained for preserving either user data or actions. Due to ephemeral nature of containers, it is recommended for packaging application source code, but what about a database?

Continue reading

Spring boot and docker

Spring boot has eased the life of developer by reducing boilerplate configuration and reduced project bootstrap time by declaring defaults. Those who are already working on Spring projects and are leveraging Spring boot must have realized productivity gains. In addition to that, Maven build script (pom.xml) has been shortened due to single dependencies made available by Spring boot for a specific purpose. For example including spring-boot-jpa-starter dependency in Maven script ensures that all the required dependencies for interacting with a database are available with a single declaration. While there are many benefits of spring boot, one of the major benefits is to run the application quickly with embedded tomcat instead of having need of a separate server. This has definitely shortened the development cycle and developers can now focus more on building solution for business requirements. Being able to easily deploy the application and that too with speed container approach is on the rise. Spring boot application can be easily be bundled along with container solutions like Docker.
Continue reading