Docker datacenter is a Container-as-a-Service (CaaS) platform that provides an IT managed and secured application environment of content and infrastructure where developers can build and deploy applications in a self-service manner. CoScale is a full stack monitoring solution for containers and microservices. In this blogpost we want to demonstrate how to automatically deploy, manage and scale a Docker Datacenter environment using CoScale.
Docker Datacenter solutions overview
The following diagram depicts the Docker Datacenter solution, which is monitored by the SaaS-based monitoring platform Co-scale.
Define and Automate a Docker Datacenter
Utilizing Nubera’s service delivery platform, we are able to quickly build a fully-distributed Docker Datacenter solution in minutes. First, we define the desired state of our Docker Datacenter service. The solution consists of a set of separate service definitions for each of the application components to form the entire stack. Next, we create an Ansible Playbook per service component responsible for executing the service definitions and in doing so deploy Docker Datacenter.
To interact with the service delivery platform, Nubera created a Slack chatbot that talks to the REST-API of the service delivery platform.
2. Next we deploy a Docker datacenter environment as per defined in our stack definition (consisting of three Docker datacenter controller nodes and a single Docker datacenter node). We do this by executing the following command"deploy DockerDatacenter docker”.
3. After a couple of minutes our distributed Docker Datacenter environment has been provisioned and users can log in on the Docker Datacenter web interface and deploy Docker containers.
4. As part of the deployment, we also ensured that CoScale agents were deployed and configured on the Docker datacenter nodes (the nodes that will be running our containers), to allow users to have a fully monitored Docker environment using the SAAS-based Co-scale platform.
5. Immediately after deployment, CoScale will receive metrics from the agents. Application performance can be easily monitored via the dynamic and flexible dashboards CoScale offers out-of-the-box.
6. In order to demonstrate a scale-up / scale-down scenario, we created a simple alert (high CPU usage) in CoScale. Once an alert is triggered, CoScale has the possibility to forward this alert external systems as such remediation actions can be executed. In our case, we forwarded the alert to our slack channel which will automatically trigger a scale-up of the Docker Datacenter by adding an extra node.
7. In a matter of minutes, the new Docker node will be up and running. In the Docker Datacenter we also see that there are now two active workers and the application has scaled up successfully. Because we utilize configuration management tools like Ansible in the backend, not only will a new node be created but the configuration of the existing nodes will also be verified and will be turned into a compliant state if needed. This is what is called “idempotency” in the world of configuration management tools and automation.