The importance of logging is second to none in a solution. If we need to debug any issues with any code/infrastructure, the logs are the first place to go. In the container world, this is no different. In one of the previous chapters, we built the ELK stack. We are going to use that again to process all the logs from our containers. In this solution, we will use a fair chunk of the knowledge that we got so far. We will use a scheduler, a Docker network, and lastly, service discovery with Consul. So, let's look at the solution, and like we did in the past chapters, we will get to coding.
As I mentioned in the introduction of this chapter, we will be using Docker Swarm for this solution. The reason for this choice is that I want to highlight some of the features of Swarm as it has come on leaps and bounds in the last few releases. For the logging portion of this chapter, we are going to deploy our three containers and let Swarm schedule them. We will use a combination of...