Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: deis/monitor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.9.0
Choose a base ref
...
head repository: deis/monitor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 15 commits
  • 14 files changed
  • 5 contributors

Commits on May 2, 2017

  1. Verified

    This commit was signed with the committer’s verified signature.
    vdice Vaughn Dice
    Copy the full SHA
    de49c15 View commit details

Commits on May 11, 2017

  1. ref(LICENSE): switch to MIT license

    We are changing the project's license from Apache 2.0 to the MIT license. The MIT license is compatible not only with the Kubernetes and commercial community licensing communities, but also with the Linux and other copyleft licensed projects. MIT is also the most common OSS license on GitHub. Thanks for your continuing interest in our project.
    mboersma committed May 11, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    mboersma Matt Boersma
    Copy the full SHA
    cf5c393 View commit details

Commits on May 12, 2017

  1. RBAC support

    With this change deis-monitor-telegraf became available to work in RBAC-only clusters
    
    Works with both Kubernetes 1.5 and 1.6 (see templates/_helpers.tmpl for details)
    Actually tested with 1.5.7 and 1.6.2
    
    ClusterRole allows deis-monitor-telegraf:
    - pods: get
    Bregor committed May 12, 2017
    Copy the full SHA
    ff4058d View commit details

Commits on May 19, 2017

  1. Merge pull request #197 from mboersma/mit

    ref(LICENSE): switch to MIT license
    mboersma authored May 19, 2017
    Copy the full SHA
    e1d2bad View commit details

Commits on May 24, 2017

  1. Merge pull request #194 from vdice/feat/add-rolling-update-telegraf-ds

    feat(charts): add rollingUpdate functionality to telegraf daemonset
    vdice authored May 24, 2017
    Copy the full SHA
    b55a45a View commit details
  2. fix(telegraf/Dockerfile): Update telegraf download to 1.3.0

    Jonathan Chauncey committed May 24, 2017
    Copy the full SHA
    ab68699 View commit details
  3. feat(deploy.mk): Add deploy.mk for using the chart to upgrade/install…

    … monitor
    Jonathan Chauncey committed May 24, 2017
    Copy the full SHA
    ccf1364 View commit details
  4. Merge pull request #199 from jchauncey/telegraf-binary

    Telegraf binary
    Jonathan Chauncey authored May 24, 2017
    Copy the full SHA
    ba10a4f View commit details

Commits on May 31, 2017

  1. Merge pull request #195 from Bregor/features/rbac

    RBAC support
    vdice authored May 31, 2017
    Copy the full SHA
    b4b3aef View commit details

Commits on Jun 29, 2017

  1. Copy the full SHA
    516a529 View commit details

Commits on Jul 3, 2017

  1. Merge pull request #200 from avi-jain/master

    chore(Dockerfile): update Grafana to 4.3.2
    vdice authored Jul 3, 2017
    Copy the full SHA
    9cdf5bb View commit details

Commits on Aug 22, 2017

  1. Verified

    This commit was signed with the committer’s verified signature.
    mboersma Matt Boersma
    Copy the full SHA
    9e637e4 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    mboersma Matt Boersma
    Copy the full SHA
    f5ab740 View commit details

Commits on Feb 27, 2018

  1. Verified

    This commit was signed with the committer’s verified signature.
    mboersma Matt Boersma
    Copy the full SHA
    c9d8d65 View commit details

Commits on Mar 1, 2018

  1. Merge pull request #201 from mboersma/no-longer-maintained

    docs(README.md): update for end of maintenance
    mboersma authored Mar 1, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3dc9bcb View commit details
28 changes: 18 additions & 10 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
Copyright 2013, 2014, 2015, 2016 Engine Yard, Inc.
The MIT License (MIT)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Copyright (c) Microsoft Corporation. All rights reserved.

http://www.apache.org/licenses/LICENSE-2.0
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
61 changes: 27 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@

|![](https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Warning.svg/156px-Warning.svg.png) | Deis Workflow is no longer maintained.<br />Please [read the announcement](https://deis.com/blog/2017/deis-workflow-final-release/) for more detail. |
|---:|---|
| 09/07/2017 | Deis Workflow [v2.18][] final release before entering maintenance mode |
| 03/01/2018 | End of Workflow maintenance: critical patches no longer merged |
| | [Hephy](https://github.com/teamhephy/workflow) is a fork of Workflow that is actively developed and accepts code contributions. |

# Deis Monitor v2
[![Build Status](https://ci.deis.io/job/monitor/badge/icon)](https://ci.deis.io/job/monitor)
[![Docker Repository on Quay](https://quay.io/repository/deisci/grafana/status "Docker Repository on Quay")](https://quay.io/repository/deisci/grafana)
@@ -23,51 +30,37 @@ Lastly, Grafana is a stand alone graphing application. It natively supports Infl
# Architecture Diagram

```
┌────────┐
┌────────┐
│ Router │ ┌────────┐
└────────┘ │ Logger │
│ └────────┘
Log file │
│ │
▼ ▼
Log file │
│ │
▼ ▼
┌────────┐ ┌─────────┐ logs/metrics ┌─────┐
│App Logs│──Log File──▶│ fluentd │───────topics─────▶│ NSQ │
└────────┘ └─────────┘ └─────┘
┌─────────────┐ │
│ HOST │ ▼
┌─────────────┐ │
│ HOST │ ▼
│ Telegraf │───┐ ┌────────┐
└─────────────┘ │ │Telegraf│
│ └────────┘
┌─────────────┐ │ │
│ HOST │ │ ┌───────────┐ │
│ Telegraf │───┼───▶│ InfluxDB │◀────Wire ─────────┘
└─────────────┘ │ └───────────┘ Protocol
│ ▲
┌─────────────┐ │ │
│ HOST │ │ ▼
│ Telegraf │───┘ ┌──────────┐
└─────────────┘ │ Grafana │
└──────────┘
┌─────────────┐ │ │
│ HOST │ │ ┌───────────┐ │
│ Telegraf │───┼───▶│ InfluxDB │◀────Wire ─────────┘
└─────────────┘ │ └───────────┘ Protocol
│ ▲
┌─────────────┐ │ │
│ HOST │ │ ▼
│ Telegraf │───┘ ┌──────────┐
└─────────────┘ │ Grafana │
└──────────┘
```


## License
Copyright 2013, 2014, 2015, 2016 Engine Yard, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

[k8s-home]: http://kubernetes.io/
[issues]: https://github.com/deis/monitor/issues
[prs]: https://github.com/deis/monitor/pulls
[v2.18]: https://github.com/deis/workflow/releases/tag/v2.18.0

Original file line number Diff line number Diff line change
@@ -7,6 +7,10 @@ metadata:
annotations:
component.deis.io/version: {{ .Values.docker_tag }}
spec:
{{- if ge .Capabilities.KubeVersion.Minor "6" }}
updateStrategy:
type: RollingUpdate
{{- end }}
template:
metadata:
labels:
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if (.Values.global.use_rbac) -}}
{{- if (.Capabilities.APIVersions.Has (include "rbacAPIVersion" .)) -}}
kind: Role
apiVersion: {{ template "rbacAPIVersion" . }}
metadata:
name: deis-monitor-telegraf
labels:
app: deis-monitor-telegraf
heritage: deis
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get"]
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if (.Values.global.use_rbac) -}}
{{- if (.Capabilities.APIVersions.Has (include "rbacAPIVersion" .)) -}}
kind: RoleBinding
apiVersion: {{ template "rbacAPIVersion" . }}
metadata:
name: deis-monitor-telegraf
labels:
app: deis-monitor-telegraf
heritage: deis
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: deis-monitor-telegraf
subjects:
- kind: ServiceAccount
name: deis-monitor-telegraf
{{- end -}}
{{- end -}}
10 changes: 10 additions & 0 deletions charts/monitor/templates/_helpers.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{/*
Set apiVersion based on Kubernetes version
*/}}
{{- define "rbacAPIVersion" -}}
{{- if ge .Capabilities.KubeVersion.Minor "6" -}}
rbac.authorization.k8s.io/v1beta1
{{- else -}}
rbac.authorization.k8s.io/v1alpha1
{{- end -}}
{{- end -}}
2 changes: 2 additions & 0 deletions charts/monitor/values.yaml
Original file line number Diff line number Diff line change
@@ -49,3 +49,5 @@ global:
# - on-cluster: Run Redis within the Kubernetes cluster
# - off-cluster: Run Redis outside the Kubernetes cluster (configure in loggerRedis section)
logger_redis_location: "on-cluster"
# Role-Based Access Control for Kubernetes >= 1.5
use_rbac: false
29 changes: 13 additions & 16 deletions default.mk
Original file line number Diff line number Diff line change
@@ -8,37 +8,34 @@ IMAGE_PREFIX ?= deis

include ../includes.mk
include ../versioning.mk
include ../deploy.mk

TEST_ENV_PREFIX := docker run --rm -v ${CURDIR}:/bash -w /bash quay.io/deis/shell-dev

build: docker-build
push: docker-push
deploy: check-kubectl docker-build docker-push upgrade
deploy: check-kubectl docker-build docker-push install

docker-build:
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs
docker tag ${IMAGE} ${MUTABLE_IMAGE}

clean: check-docker
docker rmi $(IMAGE)

KD = kubectl --namespace=deis
upgrade:
${KD} patch ${RESOURCE_TYPE} deis-monitor-${SHORT_NAME} \
--type='json' \
-p='[ \
{"op": "replace", "path": "/spec/strategy", "value":{"type":"Recreate"}}, \
{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"$(IMAGE)"}, \
{"op": "replace", "path": "/spec/template/spec/containers/0/imagePullPolicy", "value":"Always"} \
]'
@if [ "${RESOURCE_TYPE}" == "daemonset" ]; then \
echo "Deleting daemonset pods as they aren't yet recreated when daemonset is patched..."; \
${KD} delete $$(${KD} get pod -o name | grep "${SHORT_NAME}"); \
fi


test: test-style

test-style:
${TEST_ENV_PREFIX} shellcheck $(SHELL_SCRIPTS)

.PHONY: build push docker-build clean upgrade deploy test test-style

build-all:
docker build ${DOCKER_BUILD_FLAGS} -t ${DEIS_REGISTRY}${IMAGE_PREFIX}/grafana:${VERSION} ../grafana/rootfs
docker build ${DOCKER_BUILD_FLAGS} -t ${DEIS_REGISTRY}${IMAGE_PREFIX}/influxdb:${VERSION} ../influxdb/rootfs
docker build ${DOCKER_BUILD_FLAGS} -t ${DEIS_REGISTRY}${IMAGE_PREFIX}/telegraf:${VERSION} ../telegraf/rootfs

push-all:
docker push ${DEIS_REGISTRY}${IMAGE_PREFIX}/grafana:${VERSION}
docker push ${DEIS_REGISTRY}${IMAGE_PREFIX}/influxdb:${VERSION}
docker push ${DEIS_REGISTRY}${IMAGE_PREFIX}/telegraf:${VERSION}
9 changes: 9 additions & 0 deletions deploy.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
install:
helm upgrade monitor ../charts/monitor --install --namespace deis --set grafana.org=${IMAGE_PREFIX},grafana.docker_tag=${VERSION},influxdb.org=${IMAGE_PREFIX},influxdb.docker_tag=${VERSION},telegraf.org=${IMAGE_PREFIX},telegraf.docker_tag=${VERSION}


upgrade:
helm upgrade monitor ../charts/monitor --namespace deis --set grafana.org=${IMAGE_PREFIX},grafana.docker_tag=${VERSION},telegraf.org=${IMAGE_PREFIX},telegraf.docker_tag=${VERSION},influxdb.org=${IMAGE_PREFIX},influxdb.docker_tag=${VERSION}

uninstall:
helm delete monitor --purge
1 change: 0 additions & 1 deletion grafana/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
SHORT_NAME ?= grafana
RESOURCE_TYPE := deployment
SHELL_SCRIPTS = rootfs/usr/share/grafana/start-grafana

include ../default.mk
2 changes: 1 addition & 1 deletion grafana/rootfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ RUN apt-get update && \
apt-get install -y libfontconfig && \
curl -fsSL -o /usr/share/grafana/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 && \
chmod +x /usr/share/grafana/envtpl && \
curl -fsSo /tmp/grafana.deb https://grafanarel.s3.amazonaws.com/builds/grafana_4.0.2-1481203731_amd64.deb && \
curl -fsSo /tmp/grafana.deb https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.3.2_amd64.deb && \
dpkg -i /tmp/grafana.deb && \
rm /tmp/grafana.deb && \
rm /etc/grafana/grafana.ini && \
1 change: 0 additions & 1 deletion influxdb/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
SHORT_NAME ?= influxdb
RESOURCE_TYPE := deployment
SHELL_SCRIPTS = rootfs/home/influxdb/start-influx

include ../default.mk
1 change: 0 additions & 1 deletion telegraf/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
SHORT_NAME ?= telegraf
RESOURCE_TYPE := daemonset
SHELL_SCRIPTS = rootfs/start-telegraf

include ../default.mk
10 changes: 4 additions & 6 deletions telegraf/rootfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -4,12 +4,10 @@ COPY . /

RUN mkdir -p /usr/local/bin/ \
# This will come back once the kuberentes plugin is release in November
# && curl -fsSL -o /tmp/telegraf.deb https://dl.influxdata.com/telegraf/releases/telegraf_1.0.0_amd64.deb \
# && dpkg -i /tmp/telegraf.deb \
# && rm /tmp/telegraf.deb \
&& curl -fsSL -o /usr/bin/telegraf https://storage.googleapis.com/telegraf/telegraf \
&& chmod +x /usr/bin/telegraf \
&& curl -fsSL -o /usr/bin/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \
&& curl -fsSL -o /tmp/telegraf.deb https://dl.influxdata.com/telegraf/releases/telegraf_1.3.0-1_amd64.deb \
&& dpkg -i /tmp/telegraf.deb \
&& rm /tmp/telegraf.deb \
&& curl -fsSL -o /usr/bin/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \
&& chmod +x /usr/bin/envtpl \
&& curl -fsSL -o /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 \
&& chmod +x /usr/bin/jq