Added drone manager

This commit is contained in:
Bill Maxwell
2016-03-08 10:27:29 -08:00
parent 0cce46e66a
commit 5af5879851
5 changed files with 157 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
## Drone Rancher Node Manager
### Purpose:
This template will launch a global service and register the nodes as workers with Drone.
The manager polls Rancher metadata service every 5 minutes and adds/removes nodes. One agent will run per host, and register a single worker.
@@ -0,0 +1,24 @@
drone-agent:
labels:
io.rancher.scheduler.global: 'true'
tty: true
image: rancher/socat-docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker
stdin_open: true
dynamic-drones-mgr-0:
environment:
DRONE_TOKEN: ${DRONE_TOKEN}
DRONE_URL: http://droneserver:8000
external_links:
- ${DRONE_SERVICE}:droneserver
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:container_labe_soft_ne: io.rancher.stack_service.name=$${stack_name}/drone-agent
tty: true
entrypoint:
- /dynamic-drone-nodes
- /stacks/${STACK_NAME}/services/drone-agent
image: rancher/drone-config:v0.1.0
stdin_open: true
@@ -0,0 +1,26 @@
.catalog:
name: Drone Rancher Node Manager
version: 0.1.0-cloundautique1
description: |
(Experimental) Poll Rancher Metadata for Drone Agents
and add/remove nodes accordingly.
minimum_rancher_version: v0.56.0
maintainer: cloudnautique
questions:
- variable: DRONE_TOKEN
type: password
required: true
label: Drone API token
description: "API Token for Drone. (must have admin rights)"
- variable: DRONE_SERVICE
type: service
label: Drone Server
description: "Link to Drone server.(Not the load balancer)"
required: true
- variable: STACK_NAME
type: string
label: Stack name (should be same as above)
description: "Name of this stack, sorry for the duplication."
required: true
dynamic-drones-mgr-0:
scale: 1