Design considerations for a microservice architecture with Docker Swarm Introduction When designing a microservice architecture there are various design considerations needs to be taken care of especially in terms of scalability, high availability, resilience and loose coupling. Recently we went live with our application which is based on microservices architecture and hosted on Docker Swarm. […]
How to read different properties file based on Spring Profile in a Spring MVC project
How to read different properties file based on Spring Profile in a Spring MVC project Introduction This tutorial aims towards providing a solution for selecting properties file based on the profile injected for a Spring MVC application at run time. Technologies used Spring 3.1 Java 8 How to inject Spring profile Spring profiles can be […]
How to Automate Docker Swarm Service deployment using Jenkins
How to Automate service deployment to Docker Swarm using Jenkins Introduction Jenkins is a wonderful tool for continuous integration and continuous deployment. The plethora of plugins available makes it really powerful. In this tutorial, I will show you how to use Jenkins to automate swarm deployment. How to do it To do a Docker Swarm […]
How to use Spring Profiles with Docker Containers
How to use Spring Profiles with Docker Containers Introduction Spring Profiles are an effective way of implementing environment independent code. The properties file or @Beans can be selected dynamically at run time based on the profile injected. Assuming that you are quite familiar with the spring profiles and looking for injecting profiles in a […]
Part 3 :Authorising user using Spring Social (Google, Facebook, LinkedIn) and Spring Security
Part-3: Authorising user using Spring Social (Google, Facebook, LinkedIn) and Spring Security Introduction In Part-1, We discussed how to authenticate with social providers like Facebook, Google, and LinkedIn. Along with that, we changed the default page flow for spring social, enabled it to be used by multiple users and provided support for Google. In Part-2, […]
Installing Docker Images from private repositories in Docker Swarm
Installing Docker Images from private repositories in Docker Swarm Introduction On a Docker Swarm you can deploy only those images which come from a Docker repository as all the manager/worker nodes need to pull them separately. When the Docker images are pulled from public repository like DockerHub they can be easily deployed using a simple […]
Docker Swarm : How to Collect logs from multiple containers and write to a single file
Write multiple docker container logs into a single file in Docker Swarm Introduction So recently I had deployed scalable micro services using Docker stack deploy on Docker swarm. Now I had multiple micro services running on multiple nodes. To analyse any micro service I had to log on to the manager node and find out […]
How to Create a Docker Swarm and deploy stack of services
Create Docker Swarm and install services to Docker swarm using docker stack deploy Introduction Setting up of cluster node topology and managing nodes have always been a pain for any developer or infrastructure engineers. Docker swarm makes it ridiculously easy to create a node cluster topology and get a service up and running in a […]
How to install Nginx as a reverse proxy server with Docker
How to install Nginx as a reverse proxy server with Docker Introduction On a single docker host machine, we can run 100’s of containers and each container can be accessed by exposing a port on the host machine and binding it to the docker port. This is the most standard practice which is used and […]
How to convert JSON schema to Java classes using maven plugin
Convert JSON schema to Java classes using maven plugin Introduction We often need to convert JSON schema’s to Java classes, there is a jsonschema2pojo-maven-plugin which helps in generating POJO(plain old java objects) from JSON or JSON schema. To use it all we need is add this plugin, update dependencies and run mvn generate Add jsonschema2pojo-maven-plugin […]