Name: janitor
Owner: 2GIS
Description: null
Created: 2016-11-11 10:37:14.0
Updated: 2016-11-14 01:44:16.0
Pushed: 2016-11-14 01:44:15.0
Homepage: null
Size: 10
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Janitor - an open-source GC tool for docker images in DEIS environment.
features:
Clone repository:
clone https://github.com/2gis/janitor.git
anitor
Edit REGISTRY
and REGISTRY_PATH
in makefile:
makefile
Build docker image:
build
Push image to your docker registry
push
Install systemd-unit on DEIS node. Templates in systemd
directory.
Pre-change Environment='IMAGE=my/janitor'
to you docker image path in systemd-unit.
|Variable|Description|Default value| | ————- |:————-:|:—–:| |CRON_DAY|day for cron job start|| |CRON_WEEK|week for cron job start|| |CRON_DAY_OF_WEEK|day of week for cron job start|| |CRON_HOUR|hour for cron job start|| |CRON_MINUTE|minute for cron job start|0| |DELETE_IMAGES|Remove docker image or not. 0 is no|0| |VERSION_MAX_COUNT|the number of releases to save application-specific images|3| |DELETE_CONTAINERS|Remove docker containers or not. 0 is no|0| |CP_NODE|True, if run on the ControlPlane node|False| |ETCD_HOST|entrypoint for connection to etcd2|'127.0.0.1'| |DOCKER_URL|entrypoint for connection to Docker|'unix:///var/run/docker.sock'| |DOCKER_VERSION|your version of Docker|'auto'| |DOCKER_TIMEOUT|timeout for connection to Docker|300|
Default exclude images described in EXCLUDE_IMAGES_LIST. You can change it in janitor.py:
UDE_IMAGES_LIST = ['deis/(registry|publisher|builder|controller)',
'janitor',
'alpine']
Do not set the CP_NODE = True
on Data Plane nodes. Because in this case, the janitor remove all docker images on the node.