Top 5 Tools To Improve Your Docker Workflow
Docker is one of the hottest technologies in the system administration space however many professionals don’t know the secrets to get the most from this technology. Originally focused around uniform code deployment, the Docker ecosystem is now filled with a variety of solutions to enhance the versatility of such solutions.
As discussed previously,~the biggest benefits of embracing container technologies in your company are decreased overhead and increased system capacity.
Although knowing the basics of containers is sufficient for many system administrators, you can stand out from the crowd by using the tools below:
Minimalist Operating Systems
Docker is built with performance in mind but most traditional operating systems aren’t as performance oriented. Using a traditional operating system means you’ll have excessive dependencies and applications which aren’t necessary. To overcome these issues, minimalist operating systems have been taking center stage with DevOps and SysAdmin professionals due to them being designed to leverage Docker technology.
Minimalist operating systems are ultra-compact allowing system administrators to pack more data on servers without sacrificing performance. Boot2Docker for example is a Linux based operating system made specifically for running Docker containers. At only ~27 MB and with a boot time of ~5 seconds it’s one of the leanest operating systems you can use on your server.
DevOps professionals benefit from Boot2Docker as it allows them to install a local instance through virtualization. When running Boot2Docker through virtualization, some power user capabilities aren’t available.
Other minimalist operating systems you can choose from are Core OS, Project Atomic, and Snappy Ubuntu core. For more details on these systems, Site24x7 has an extensive guide on this topic.
Kubernetes
A tool created by Google, Kubernetes is designed for deploying containers across clusters of servers in more efficient ways. By using terms such as “labels” and “pods,” system administrators are able to manage containers through a simple to use system. The biggest benefit of this tool is that professionals are able to manage an entire cluster of containers as a single instance.
The tool also adds networking capabilities to Docker without the need for opening ports or configuring a firewall. Since Kubernetes is written in the same language as Docker, you can easily customize the tool to fit your needs.
Dockersh
For those times when internal users need shell access to your containers, Dockersh is the solution for you. When a user launches Dockersh, they’re provided with their own container where they can have a secure SSH session with minimal configuration on their end. Within the container, users have their home directory mounted but with its own kernel namespaces for processes and networking.
Despite the built in isolation layers, this tool should only be used for development environments due to the fact permission suppression isn’t completely guaranteed. When Docker allows namespaces, then this issue will be resolved.
Docker Compose
Compose is a tool designed for defining complex applications and deploying them rapidly within Docker. Compose allows users to create a multi-container application in a single file. After executing the code through a single command, users can automate the process of deploying a server cluster.
Using Docker Compose is a three step process. First define your application in a Dockerfile such as the one below:
FROM python:2.7
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code
CMD python app.py
Then define the services for the container, as shown below:
web:
build: .
links:
- db
ports:
- "8000:8000"
db:
image: postgres
Then run docker-compose up to build your system. For full details on Compose, the Docker documentation contains a complete guide. Keep in mind that this tool is only intended development environments, staging servers, and Cl settings.
Logspout
Although Docker is a great tool for improving system performance, one of its biggest weaknesses is a lack of log management for programs inside containers. Logspout aims to solve this problem by providing system administrators with a simple way to view essential system data from a central location. At only 14MB it’s designed to run without affecting general system performance.
A major caveat with Logsprout is that logging is limited to stdout and stderr output from containers. Additional logging capabilities are currently in the works. They should be available soon after Docker provides additional hooks within their code.
The Universal Management Tool
Regardless of how you incorporate Docker within your company, using a quality system monitoring tool is essential to keeping overhead in check. System monitoring tools are essential for proactive maintenance as they allow system administrators to ensure resources are distributed efficiently across your clusters.
Monitoring solutions also can pay for themselves by improving your hardware cycles. Through effective resource tracking, you can better predict the amount of power needed for projects.
For those times when you encounter issues, monitoring tools allow you to pinpoint trouble spots to keep system failure from slowing down operations. Rather than being limited to internal monitoring, these tools also allow you to test your networks externally. This ensures both customers and employees are able to use your services effectively.