What now?

Did we finish with self-adaptation applied to services? We're not even close. The exercises we passed through should give you only the base you'll need to extend and adapt to your specific use-cases. I hope that now you know what to do. What you need now, more than anything else, is time. Instrument your services, start scraping metrics, create alerts based both on exporters and instrumentation, start receiving notifications, and observe the patterns. The system should start small and grow organically.

Do not create a project out of the lessons you learned but adopt continuous improvement. Every alert is not only a potential problem but also an opportunity to make the system better and more robust.

The following figure provides a high-level overview of the system we built so far. Use it as a way to refresh your memory with everything we learned by now:

Figure 12-12: Self-healing and self-adapting system (so far)

The time has come to take another rest. Destroy the cluster and recharge your batteries. There's still a lot left to do.

docker-machine rm \  
    -f swarm-1 swarm-2 swarm-3