Skip to content

Commit f8313df

Browse files
author
Jonathan Chauncey
committed
feat(chronograf): Add chronograf for graphing data from influxdb
1 parent f7fa307 commit f8313df

9 files changed

Lines changed: 157 additions & 0 deletions

chronograf/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
manifests/

chronograf/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ubuntu:14.04
2+
MAINTAINER Jonathan Chauncey "<jchauncey@deis.com>"
3+
4+
ENV CHRONOGRAF_HOME /chronograf
5+
6+
RUN \
7+
apt-get update && \
8+
apt-get install -y -q wget && \
9+
groupadd chronograf && \
10+
useradd --create-home -g chronograf chronograf && \
11+
wget -q https://s3.amazonaws.com/get.influxdb.org/chronograf/chronograf_0.10.0_amd64.deb && \
12+
dpkg -i chronograf_0.10.0_amd64.deb
13+
14+
COPY config.toml /opt/chronograf/config.toml
15+
16+
USER chronograf
17+
CMD ["/opt/chronograf/chronograf", "-config", "/opt/chronograf/config.toml"]

chronograf/Makefile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
SHORT_NAME ?= chronograf
2+
BUILD_TAG ?= git-$(shell git rev-parse --short HEAD)
3+
DEIS_REGISTRY ?= ${DEV_REGISTRY}
4+
IMAGE_PREFIX ?= deis
5+
IMAGE_LATEST := ${DEIS_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:latest
6+
IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${BUILD_TAG}
7+
8+
info:
9+
@echo "Build tag: ${BUILD_TAG}"
10+
@echo "Registry: ${DEIS_REGISTRY}"
11+
@echo "Image: ${IMAGE}"
12+
13+
docker-build:
14+
docker build -t $(IMAGE_LATEST) .
15+
docker tag -f $(IMAGE_LATEST) $(IMAGE)
16+
17+
docker-push:
18+
docker push ${IMAGE}
19+
20+
kube-delete: update-manifests
21+
-kubectl delete -f manifests/deis-monitor-chronograf-svc.yaml
22+
-kubectl delete -f manifests/deis-monitor-chronograf-proxy-pod.yaml
23+
-kubectl delete -f manifests/deis-monitor-chronograf-rc.tmp.yaml
24+
25+
kube-create: update-manifests
26+
kubectl create -f manifests/deis-monitor-chronograf-svc.yaml
27+
kubectl create -f manifests/deis-monitor-chronograf-rc.tmp.yaml
28+
kubectl create -f manifests/deis-monitor-chronograf-proxy-pod.yaml
29+
30+
kube-update: update-manifests
31+
kubectl delete -f manifests/deis-monitor-chronograf-rc.tmp.yaml
32+
kubectl create -f manifests/deis-monitor-chronograf-rc.tmp.yaml
33+
34+
update-manifests:
35+
sed 's#\(image:\) .*#\1 $(IMAGE)#' manifests/deis-monitor-chronograf-rc.yaml > manifests/deis-monitor-chronograf-rc.tmp.yaml

chronograf/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Chronograf
2+
3+
This is an ubuntu based image for running [Chronograf](https://docs.influxdata.com/chronograf/v0.10/) which is the graphing portion of the [TICK](https://influxdata.com/time-series-platform/) stack.
4+
5+
## Description

chronograf/config.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Chronograf configuration
2+
3+
# TCP address that Chronograf should bind to.
4+
# Bind to localhost by default, so that Chronograf should be inaccessible from the public internet.
5+
# If you do want Chronograf to be accessible to the public internet on port 10000, use the next line:
6+
# Bind = "0.0.0.0:10000" # <- This will expose Chronograf to the public internet. Use with caution!
7+
# Can be overridden with environment variable CHRONOGRAF_BIND.
8+
Bind = "0.0.0.0:10000"
9+
10+
# Path to local database file to use or create for storing Chronograf application data.
11+
# Can be overridden with environment variable CHRONOGRAF_LOCAL_DATABASE.
12+
## NOTE - This means that if a container dies we lose everything
13+
LocalDatabase = "/opt/chronograf/chronograf.db"
14+
15+
# Maximum response size in bytes, for queries that pass through Chronograf.
16+
# Setting this to a reasonable value will ensure that your browser does not crash
17+
# if a query results in an excessively large response.
18+
# If you do have a query that is too large, you will see an error message about the
19+
# query response being too large.
20+
# Can be overridden with environment variable CHRONOGRAF_QUERY_RESPONSE_BYTES_LIMIT.
21+
QueryResponseBytesLimit = 2500000
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: deis-monitor-chronograf-proxy
5+
namespace: deis
6+
labels:
7+
heritage: deis
8+
spec:
9+
containers:
10+
- name: http-ui
11+
image: gcr.io/google_containers/proxy-to-service:v2
12+
args: [ "tcp", "10000", "deis-monitor-chronograf.deis.svc.cluster.local" ]
13+
ports:
14+
- name: http-ui
15+
protocol: TCP
16+
containerPort: 10000
17+
hostPort: 10000
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: v1
2+
kind: ReplicationController
3+
metadata:
4+
name: deis-monitor-chronograf
5+
namespace: deis
6+
labels:
7+
heritage: deis
8+
spec:
9+
replicas: 1
10+
selector:
11+
app: deis-monitor-chronograf
12+
template:
13+
metadata:
14+
labels:
15+
app: deis-monitor-chronograf
16+
spec:
17+
containers:
18+
- name: deis-monitor-chronograf
19+
image: quay.io/jchauncey/chronograf:git-e7ac6e5
20+
imagePullPolicy: Always
21+
ports:
22+
- containerPort: 10000
23+
name: admin
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: v1
2+
kind: ReplicationController
3+
metadata:
4+
name: deis-monitor-chronograf
5+
namespace: deis
6+
labels:
7+
heritage: deis
8+
spec:
9+
replicas: 1
10+
selector:
11+
app: deis-monitor-chronograf
12+
template:
13+
metadata:
14+
labels:
15+
app: deis-monitor-chronograf
16+
spec:
17+
containers:
18+
- name: deis-monitor-chronograf
19+
image: quay.io/deis/chronograf:v2-beta
20+
imagePullPolicy: Always
21+
ports:
22+
- containerPort: 10000
23+
name: admin
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: deis-monitor-chronograf
5+
namespace: deis
6+
labels:
7+
heritage: deis
8+
app: deis-monitor-chronograf
9+
spec:
10+
ports:
11+
- port: 10000
12+
name: admin
13+
targetPort: admin
14+
selector:
15+
app: deis-monitor-chronograf

0 commit comments

Comments
 (0)