Overview
With RightLink 10.4.0 and later, integration with Docker 1.9.1 and above allows it to report the existence of Docker hosts, running containers, and images on RightLink-enabled instances and also provides basic monitoring for those containers. The reporting about Docker hosts, containers, and images is implemented as RightScale tags on the RightLink-enabled instance while the monitoring information uses the existing monitoring system provided by RightScale. The RightScale Container Manager in Cloud Management leverages all of this information and provides a container-centric view of your infrastructure.
Note: The minimum requirement for Docker is kernel 3.10. CentOS 6 does not satisfy this prerequisite and is therefore not supported. For more information on Docker minimum requirements on CentOS, please see Docker: Installation on CentOS.
Details
Inventory
In order to keep track of what Docker hosts exist, what containers are running on them, and what images are available on them, RightScale Tags are added and removed dynamically to the instance. The tag structure is as follows:
Tag | Description |
---|---|
rs_docker:host |
The host tag has a value that is a JSON encoded list with the Docker engine ID, total memory, and number of CPUs. A RightScale instance will have this tag if it has the RightLink 10 Docker integration running. Here is an example of the host tag: rs_docker:host=["XFFA:LPC3:7PJX:AEA5:DATR:ADDZ:AQGT:5N6S:WKK7:WNSI:6GI3:LZDE",3700,1] . |
rs_docker:c-<container_id> |
The container tag has a predicate starting with c- and followed by the Docker container ID and the value is a JSON encoded list with the Docker container name, Docker image ID, committed memory, and CPU allocation. After completing the setup procedure, a RightScale instance will have a container tag for each Docker container that is currently running on it. The start and die Docker container events will add and remove container tags. Here is an example of a container tag: rs_docker:c-860f61b2621568556442b1c13eafba0f0f01f4654c4e86407982cd8dfbf4e65b=["/naughty_morse","eb4a127a1188a3e274eb38f079c5e11680b942927956a38b9b6b6c6736e14fd2",0,0] . |
rs_docker:i-<image_id> |
The image tag has a predicate starting with i- and followed by the Docker image ID and the value is a JSON encoded list with the Docker image name. After completing the setup procedure, a RightScale instance will have an image tag for each Docker image that has been downloaded to it. The import , pull , and tag Docker image events will add image tags while untag and delete will remove them. Here is an example of an image tag: rs_docker:i-eb4a127a1188a3e274eb38f079c5e11680b942927956a38b9b6b6c6736e14fd2=["nginx:latest"] . |
Monitoring
The monitoring portion of the RightLink 10 Docker integration adds basic per container metrics. These metrics are
prefixed with the name of the container that they are for; for example, a container with an autogenerated Docker
container name would have metrics with names like: naughty_morse-cpu/cpu-total
, naughty_morse-memory/memory-usage
,
naughty_morse-net/if_octets
, etc. These metrics match those provided by the Collectd CPU, Memory, and Interface
plugins, but they only report the details pertaining to their respective Docker containers.
Setup Procedure
The procedure for enabling the RightLink 10 Docker integration is to include the RL10 Linux Enable Docker Support
RightScript on your ServerTemplate as either a boot or operational script, set the RIGHTLINK_DOCKER
input as desired,
and boot your server if it is a boot script or run the operational script otherwise. This script will check if Docker is
installed (you will need to install Docker in a seperate RightScript if necessary), add the rightlink
user to the
docker
group so the Docker integration can talk to the Docker socket in order access information about Docker on the
instance, and tells RightLink 10 to enable the Docker integration to the level specified in the RIGHTLINK_DOCKER
input via the /rll/docker/control local API call. RightLink 10 will automatically restart itself if it was not already
in the docker
group so that it can access the Docker socket. The following are valid values for the RIGHTLINK_DOCKER
input:
Input Value | Description |
---|---|
none |
This disables the RightLink 10 Docker integration completely so that no Docker related tags will be added and no Docker monitoring metrics will be recorded. |
tags |
This enables only the RightLink 10 Docker tags portion of the integration so that tags will be added and removed according to the Docker images and containers on the instance, but no Docker monitoring metrics will be recorded. |
all |
This enables both the RightLink 10 Docker tags and monitoring portions of the integrations so that tags will be added and removed according to the Docker images and containers on the instance and monitoring metrics for running containers will be recorded. |