Skip to content

Docker container manager that relies on etcd to provide relevant configuration details. It watches for changes in configuration and automatically stops, removes, recreates, and starts your Docker containers.

License

CloudBrewery/docrane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docrane

docrane

docrane is a Docker container manager that relies on etcd to provide relevant configuration details. It watches for changes in configuration and automatically stops, removes, recreates, and starts your Docker containers.

Installation

Installation is as simple as running pip install -r requirements.txt && python setup.py install.

Usage

usage: docrane [-h -v] /etcd/path

positional arguments:
  /etcd/path  etcd key directory storing config.

optional arguments:
  -h, --help  show this help message and exit
  -v, --verbose  set log level to INFO for more verbose logging

etcd Key Structure##

The etcd key directory structure is crucial to ensure that docrane can properly read configuration details for Docker.

Here is the general layout:

/docrane
   /container_name1
      /image
      /tag
      /ports
   /container_name2
      /image
      /tag
      /volumes

Since docrane uses docker-py to interact with Docker, etcd value formatting should be consistent with what docker-py expects. For example, to attach a volume to a container, the following structure should be used:

$ etcdctl mk /docrane/mycontainer/volumes "['/mnt']"

Likewise, to map ports:

$ etcdctl mk /docrane/mycontainer/ports "{'3306': '3306'}"

The /image and /tag keys are used to create a combined image name in the format of image:tag. This enables you to simply change the tag when pushing a new version, rather than updating the entire image string every time.

Issues / Feature Requests

Let us know if you run into any issues, or have any feature requests by using GitHub's issue tracker. We always welcome community feedback!

About

Docker container manager that relies on etcd to provide relevant configuration details. It watches for changes in configuration and automatically stops, removes, recreates, and starts your Docker containers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages