This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
forked from CiscoCloud/distributive
-
Notifications
You must be signed in to change notification settings - Fork 2
Working with Frameworks
Travis Rowland edited this page Apr 21, 2017
·
1 revision
Distributive was designed with Consul in mind. They work well together naturally!
Here's an example configuration file for a Distributive/Consul health check:
{
"service": {
"name": "Distributive",
"check": {
"script": "/path/to/distributive -f /path/to/checklist.json -d ''",
"interval": "10m"
}
}
}
After properly configuring Consul, simply ensure that Distributive is installed (as outlined in the README) at the appropriate path and that your checklist file gets copied to your nodes.
Here's an example configuration for Kubernetes, taken from their documentation and modified slightly.
apiVersion: v1
kind: Pod
metadata:
labels:
test: liveness
name: liveness-exec
spec:
containers:
- args:
- /bin/sh
- -c
- sleep 600
# assuming this image has distributive installed
image: your-website.com/your-image
livenessProbe:
exec:
command:
- distributive
- -f
- /path/to/your/checklist.json
- -d
- ""
- --verbosity
- info
initialDelaySeconds: 15
timeoutSeconds: 20
name: liveness