Skip to content

Commit f247aa3

Browse files
committed
chore(monitor): update grafana influxdb telegraf
1 parent 5b60283 commit f247aa3

9 files changed

Lines changed: 26 additions & 64 deletions

File tree

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# Drycc Monitor v2
33

44
[![Build Status](https://travis-ci.org/drycc/monitor.svg?branch=master)](https://travis-ci.org/drycc/monitor)
5-
[![Docker Repository on Quay](https://quay.io/repository/drycc/grafana/status "Docker Repository on Quay")](https://quay.io/repository/drycc/grafana)
6-
[![Docker Repository on Quay](https://quay.io/repository/drycc/influxdb/status "Docker Repository on Quay")](https://quay.io/repository/drycc/influxdb)
7-
[![Docker Repository on Quay](https://quay.io/repository/drycc/telegraf/status "Docker Repository on Quay")](https://quay.io/repository/drycc/telegraf)
85

96
Drycc (pronounced DAY-iss) Workflow is an open source Platform as a Service (PaaS) that adds a developer-friendly layer to any [Kubernetes](http://kubernetes.io) cluster, making it easy to deploy and manage applications on your own servers.
107

default.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include ../includes.mk
1010
include ../versioning.mk
1111
include ../deploy.mk
1212

13-
TEST_ENV_PREFIX := docker run --rm -v ${CURDIR}:/bash -w /bash quay.io/drycc/go-dev:v0.22.0
13+
TEST_ENV_PREFIX := docker run --rm -v ${CURDIR}:/bash -w /bash drycc/go-dev
1414

1515
build: docker-build
1616
push: docker-push

grafana/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Grafana
2-
[![Docker Repository on Quay](https://quay.io/repository/drycc/grafana/status "Docker Repository on Quay")](https://quay.io/repository/drycc/grafana)
32

43
## Description
54
[Grafana](https://grafana.org/) is a graphing application built for time series data. It natively supports influxdb and provides great dashboarding support. This project is focused on provided a grafana installation that can be run within a kubernetes installation. The grafana application is agnostic to [Workflow](https://github.com/drycc/workflow) and can be installed as a stand alone system with the monitoring suite.
@@ -120,4 +119,4 @@ There are a few key environment variables you should be aware of when interactin
120119
* `make push` - Push docker image to a registry
121120
* `make upgrade` - Replaces the running grafana instance with a new one
122121

123-
The typical workflow will look something like this - `DRYCC_REGISTRY=quay.io/ IMAGE_PREFIX=foouser make build push upgrade`
122+
The typical workflow will look something like this - `DRYCC_REGISTRY= IMAGE_PREFIX=foouser make build push upgrade`

grafana/rootfs/Dockerfile

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,14 @@
1-
FROM quay.io/drycc/base:v0.3.6
1+
FROM alpine:3.12
22

33
COPY . /
44

5-
RUN apt-get update && \
6-
apt-get install -y libfontconfig && \
7-
curl -fsSL -o /usr/share/grafana/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 && \
8-
chmod +x /usr/share/grafana/envtpl && \
9-
curl -fsSo /tmp/grafana.deb https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.3.2_amd64.deb && \
10-
dpkg -i /tmp/grafana.deb && \
11-
rm /tmp/grafana.deb && \
12-
rm /etc/grafana/grafana.ini && \
13-
chmod +x /usr/share/grafana/start-grafana && \
14-
chmod 644 /usr/share/grafana/grafana.ini.tpl && \
15-
# cleanup
16-
apt-get autoremove -y && \
17-
apt-get clean -y && \
18-
rm -rf \
19-
/usr/share/doc \
20-
/usr/share/man \
21-
/usr/share/info \
22-
/usr/share/locale \
23-
/var/lib/apt/lists/* \
24-
/var/log/* \
25-
/var/cache/debconf/* \
26-
/etc/systemd \
27-
/lib/lsb \
28-
/lib/udev \
29-
/usr/lib/x86_64-linux-gnu/gconv/IBM* \
30-
/usr/lib/x86_64-linux-gnu/gconv/EBC* && \
31-
bash -c "mkdir -p /usr/share/man/man{1..8}"
5+
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
6+
&& echo "https://mirrors.aliyun.com/alpine/edge/testing" >> /etc/apk/repositories \
7+
&& apk add --update bash fontconfig curl grafana \
8+
&& curl -fsSL -o /usr/share/grafana/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \
9+
&& chmod +x /usr/share/grafana/envtpl \
10+
&& chmod +x /usr/share/grafana/start-grafana \
11+
&& chmod 644 /usr/share/grafana/grafana.ini.tpl
3212

3313
WORKDIR /usr/share/grafana
3414
CMD ["./start-grafana"]

grafana/rootfs/usr/share/grafana/start-grafana

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ echo "###########################################"
2828
echo "###########################################"
2929

3030
GF_PATHS_PLUGINS=${PLUGINS_PATH:-"/var/lib/grafana/plugins"}
31-
if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then
31+
if [ -n "${GF_INSTALL_PLUGINS}" ]; then
3232
echo "Installing Grafana plugins..."
3333
OLDIFS=$IFS
3434
IFS=','
@@ -81,7 +81,7 @@ curl -i -XPOST -H "${HEADER_ACCEPT}" -H "${HEADER_CONTENT_TYPE}" "http://${GRAFA
8181

8282
echo ""
8383
echo "Importing default dashboards..."
84-
for filename in ${DASHBOARD_LOCATION}/*.json; do
84+
for filename in "${DASHBOARD_LOCATION}"/*.json; do
8585
echo "Importing ${filename} ..."
8686
curl -i -XPOST --data "@${filename}" -H "${HEADER_ACCEPT}" -H "${HEADER_CONTENT_TYPE}" "http://${GRAFANA_USER}:${GRAFANA_PASSWD}@localhost:${GRAFANA_PORT}/api/dashboards/db"
8787
echo ""

influxdb/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# InfluxDB
2-
[![Docker Repository on Quay](https://quay.io/repository/drycc/influxdb/status "Docker Repository on Quay")](https://quay.io/repository/drycc/influxdb)
32

43
## Configuration
54
Right now the configuration is completely static but eventually I hope to use the [envtpl](https://github.com/arschles/envtpl) project to help provide a more robust solution.
@@ -21,7 +20,7 @@ There are a few key environment variables you should be aware of when interactin
2120
* `make push` - Push docker image to a registry
2221
* `make upgrade` - Replaces the running grafana instance with a new one
2322

24-
The typical workflow will look something like this - `DRYCC_REGISTRY=quay.io/ IMAGE_PREFIX=foouser make build push upgrade`
23+
The typical workflow will look something like this - `DRYCC_REGISTRY= IMAGE_PREFIX=foouser make build push upgrade`
2524

2625
### Accessing Admin UI
2726
Included is a proxy pod that proxies the UI ports so they are accessible when doing local development. These ports are `8086` and `8083`. You can access the UI by going to the `http://<host_ip>:8083`.

influxdb/rootfs/Dockerfile

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
1-
FROM quay.io/drycc/base:v0.3.6
2-
3-
RUN adduser --system \
4-
--shell /bin/bash \
5-
--disabled-password \
6-
--home /home/influxdb \
7-
--group \
8-
influxdb
1+
FROM alpine:3.12
92

103
COPY . /
114

12-
RUN curl -SL -o /home/influxdb/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \
5+
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
6+
&& echo "https://mirrors.aliyun.com/alpine/edge/community" >> /etc/apk/repositories \
7+
&& apk add --update bash fontconfig curl influxdb \
8+
&& curl -SL -o /home/influxdb/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \
139
&& chmod +x /home/influxdb/envtpl \
14-
&& curl -SL -o /tmp/influxdb.deb https://dl.influxdata.com/influxdb/releases/influxdb_1.1.1_amd64.deb \
15-
&& dpkg -i /tmp/influxdb.deb \
16-
&& rm /tmp/influxdb.deb \
1710
&& mkdir -p /data \
18-
&& chown influxdb:influxdb /data \
19-
&& chown -R influxdb:influxdb /home/influxdb \
2011
&& chmod +x /home/influxdb/start-influx
2112

2213
VOLUME /data
2314

24-
USER influxdb
2515
WORKDIR /home/influxdb
2616
CMD ["./start-influx"]
2717

telegraf/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# [Telegraf](https://influxdata.com/time-series-platform/telegraf/)
2-
[![Docker Repository on Quay](https://quay.io/repository/drycc/telegraf/status "Docker Repository on Quay")](https://quay.io/repository/drycc/telegraf)
32

43
## Description
54
Telegraf is a metrics collection daemon from InfluxData. It contains numerous input and output plugins that allows the user to customize what data they collect and where it is sent. This image is based on the official [drycc base image](https://github.com/drycc/docker-base).
@@ -45,4 +44,4 @@ There are a few key environment variables you should be aware of when interactin
4544
* `make push` - Push docker image to a registry
4645
* `make upgrade` - Replaces the running grafana instance with a new one
4746

48-
The typical workflow will look something like this - `DRYCC_REGISTRY=quay.io/ IMAGE_PREFIX=foouser make build push upgrade``
47+
The typical workflow will look something like this - `DRYCC_REGISTRY= IMAGE_PREFIX=foouser make build push upgrade``

telegraf/rootfs/Dockerfile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
FROM quay.io/drycc/base:v0.3.6
1+
FROM alpine:3.12
22

33
COPY . /
44

5-
RUN mkdir -p /usr/local/bin/ \
6-
# This will come back once the kuberentes plugin is release in November
7-
&& curl -fsSL -o /tmp/telegraf.deb https://dl.influxdata.com/telegraf/releases/telegraf_1.3.0-1_amd64.deb \
8-
&& dpkg -i /tmp/telegraf.deb \
9-
&& rm /tmp/telegraf.deb \
10-
&& curl -fsSL -o /usr/bin/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \
5+
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
6+
&& echo "https://mirrors.aliyun.com/alpine/edge/testing" >> /etc/apk/repositories \
7+
&& apk add --update bash fontconfig curl telegraf \
8+
&& curl -fsSL -o /usr/bin/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \
119
&& chmod +x /usr/bin/envtpl \
12-
&& curl -fsSL -o /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 \
13-
&& chmod +x /usr/bin/jq
10+
&& curl -fsSL -o /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 \
11+
&& chmod +x /usr/bin/jq
1412

1513
CMD ["/start-telegraf"]

0 commit comments

Comments
 (0)