Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Di 335 #554

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e137e39
From fork
mthoretton Jun 11, 2018
c0e5a0b
Add sasl config
mthoretton Jun 11, 2018
163f1c5
Sasl as dedicated secret
mthoretton Jun 11, 2018
1faa55c
Whole config in secret
mthoretton Jun 11, 2018
ff184b5
Rename secret file
mthoretton Jun 12, 2018
5f84f34
Fix secrets
mthoretton Jun 12, 2018
219fd7d
Update kafka endpoint
mthoretton Jun 12, 2018
7900c67
Sete logging to debug level
mthoretton Jun 12, 2018
a037401
Verbose logging for sarama
mthoretton Jun 12, 2018
b67e1cf
Enable hanshake
mthoretton Jun 12, 2018
c39eae3
Update samara helper and log to info
mthoretton Jun 12, 2018
e6e4eb9
Expose burrow HTTP backend
mthoretton Jun 12, 2018
b40e9fe
Add dd annotations
mthoretton Jun 12, 2018
cc70def
Fix annotations
mthoretton Jun 12, 2018
ff034b4
Fix annotations
mthoretton Jun 12, 2018
d076441
Make service compliant
mthoretton Sep 24, 2018
07832b6
hotfix typo (Make service compliant)
mthoretton Sep 24, 2018
f0938a7
[OPS-2576] set resource limits
cainelli Oct 3, 2018
238ac39
Update Dockerfile
mthoretton Jan 24, 2019
b0e6a47
Update kafka-version to 2.1.0
mthoretton Jan 24, 2019
1e8e647
Update datadog annotations
mthoretton Jan 24, 2019
0c35ba5
Expose burrow HTTP backend
mthoretton Jan 24, 2019
6673895
Incread memory resources
mthoretton Jan 24, 2019
a2fb8ef
[DI-189] Increase CPU and set minimum-complete to 0.20 (#2)
mthoretton Mar 28, 2019
54ab691
[DI-189] Set minimum-complete to 1
mthoretton Mar 29, 2019
0b7686a
[DI-189] More cpu and config udpate
mthoretton Mar 29, 2019
2959b0e
[SKIP CI] Add readme to rebase fork
mthoretton Apr 4, 2019
b156df6
trigger build
mthoretton Apr 4, 2019
a767bf7
Add details config (#3)
ebrard Apr 4, 2019
d4f34d8
Add test-burrow sidecar
mthoretton Apr 4, 2019
86f4049
Fix container name
mthoretton Apr 4, 2019
3572c8e
Fix container name
mthoretton Apr 4, 2019
e0f2b2b
[DI-189] Make burrow start consuming __consumer_offsets from latest f…
ebrard Apr 4, 2019
82ecac0
[DI-189] Remove debugging sidecar
ebrard Apr 4, 2019
880570c
[DI-269] Move kafka secret within service repo (#4)
mthoretton Jun 18, 2019
6c76ce1
[DI-317] Change owner to di
mthoretton Jul 24, 2019
22fd8d2
[DI-335] Make burrow more compliant
ebrard Aug 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file was generated by gygdev. Do not manually modify it
pipeline:
build-image:
image: hub.gyg.io/drone-plugins/gyg-registry
privileged: true
context: .
dockerfile: ./Dockerfile
repo: hub.gyg.io/service/burrow
tags:
- ${DRONE_BUILD_NUMBER}.${DRONE_COMMIT_SHA:0:7}
when:
event: push
register-dss:
image: hub.gyg.io/drone-plugins/dss
privileged: true
tags:
- ${DRONE_BUILD_NUMBER}.${DRONE_COMMIT_SHA:0:7}
when:
event: push
16 changes: 4 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
burrow-src
.*.swp
!config
dist
log
.idea
*.cov
Burrow
Burrow.exe
Burrow.iml
tmp
vendor
/.gygdev-dc.yml
/.gygdev_generated
/.config
/.secrets
10 changes: 10 additions & 0 deletions DESIGN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Burrow

## Description

This repo is a fork from the linkedin project. It analyses and exposes metrics
over http. Then a custom datadog check is consuming it an produces `burrow.*`
metrics.

As it's just a fork turned into a gygservice, if you want to know more about how
it works, please read the readme or [developers documentation](https://github.com/linkedin/Burrow/wiki).
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ FROM golang:1.11-alpine as builder

ENV DEP_VERSION="0.5.0"
RUN apk add --no-cache git curl gcc libc-dev && \
curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep && \
chmod +x $GOPATH/bin/dep && \
mkdir -p $GOPATH/src/github.com/linkedin/Burrow
curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep && \
chmod +x $GOPATH/bin/dep && \
mkdir -p $GOPATH/src/github.com/linkedin/Burrow

ADD . $GOPATH/src/github.com/linkedin/Burrow/
RUN cd $GOPATH/src/github.com/linkedin/Burrow && \
dep ensure && \
go build -o /tmp/burrow .
dep ensure && \
go build -o /tmp/burrow .

FROM iron/go
LABEL maintainer="LinkedIn Burrow https://github.com/linkedin/Burrow"
Expand All @@ -18,4 +18,6 @@ WORKDIR /app
COPY --from=builder /tmp/burrow /app/
ADD /docker-config/burrow.toml /etc/burrow/

CMD ["/app/burrow", "--config-dir", "/etc/burrow"]
EXPOSE 8000

CMD ["/app/burrow", "--config-dir", "/etc/burrow"]
2 changes: 1 addition & 1 deletion config/burrow.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ root-path="/burrow"

[client-profile.test]
client-id="burrow-test"
kafka-version="0.10.0"
kafka-version="2.1.0"

[cluster.local]
class-name="kafka"
Expand Down
9 changes: 9 additions & 0 deletions core/internal/helpers/sarama.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
"crypto/tls"
"crypto/x509"
"io/ioutil"
"log"
"os"

"github.com/Shopify/sarama"
"github.com/spf13/viper"
Expand Down Expand Up @@ -78,6 +80,13 @@ func GetSaramaConfigFromClientProfile(profileName string) *sarama.Config {
saramaConfig.Version = parseKafkaVersion(viper.GetString(configRoot + ".kafka-version"))
saramaConfig.Consumer.Return.Errors = true

if (viper.IsSet("logging")) {
viper.SetDefault("logging.level", "info")
if (viper.GetString("logging.level") == "debug") {
sarama.Logger = log.New(os.Stdout, "[sarama] ", log.LstdFlags)
}
}

// Configure TLS if enabled
if viper.IsSet(configRoot + ".tls") {
tlsName := viper.GetString(configRoot + ".tls")
Expand Down
1 change: 1 addition & 0 deletions core/internal/httpserver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func (hc *Coordinator) configEvaluatorDetail(w http.ResponseWriter, r *http.Requ
Module: httpResponseConfigModuleEvaluator{
ClassName: viper.GetString(configRoot + ".class-name"),
ExpireCache: viper.GetInt64(configRoot + ".expire-cache"),
MinimumComplete: viper.GetInt64(configRoot + ".minimum-complete"),
},
Request: requestInfo,
})
Expand Down
1 change: 1 addition & 0 deletions core/internal/httpserver/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ type httpResponseConfigModuleConsumer struct {
type httpResponseConfigModuleEvaluator struct {
ClassName string `json:"class-name"`
ExpireCache int64 `json:"expire-cache"`
MinimumComplete int64 `json:"minimum-complete"`
}

type httpResponseConfigModuleNotifierHTTP struct {
Expand Down
3 changes: 3 additions & 0 deletions gyg-how-to-update.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
git remote add upstream https://github.com/linkedin/Burrow.git
git fetch upstream
git rebase v1.2.2 # replace by the release, dont take master
36 changes: 36 additions & 0 deletions gygservice.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: '1'
service:
name: burrow
owner: di
image_name: service/burrow
level: office hours
containers:
web:
resources:
requests:
memory: 256Mi
cpu: 1500m
limits:
memory: 256Mi
cpu: 1500m
dockerfile: Dockerfile
needs:
- kafka
secret_files:
burrow: /etc/burrow/
ports:
- name: http
container: 8000
livenessProbe:
httpGet:
path: burrow/admin
port: 8000
periodSeconds: 60
initialDelaySeconds: 60
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 15
annotations:
ad.datadoghq.com/web.check_names: ["burrow"]
ad.datadoghq.com/web.init_configs: [{}]
ad.datadoghq.com/web.instances: [{"burrow_uri": "http://%%host%%:8000", "clusters": ["kafka1"]}]
10 changes: 10 additions & 0 deletions secrets/production/burrow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"data": {
"burrow.toml": {
"iv": "zoLTLFEmReExIuxbSLW6RA==",
"edk": "AQIDAHiwVn67IJeh/zLC2ECLGkH+6xwCXfpNOUv/P9B/e8pXtAEoC+eSBIaBtxd8g1Dbri8AAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMHv95qqtigawXIGfCAgEQgDv++32NNEMD2I8ToDPouTw14NL0/y+PVIGjrPashxiijiA4y59kPqe4faR7k78ZkLneqS8Xy3YQIxgocg==",
"data": "wCeuH8fzE1GdGoQ34JycuysPwTroq2WsIq6NThKawxKsaWSxFO0v7tXwh9fN+UwdqvusMWb9sDGp9z8wxix+yVCL3kSHR7Y520iPh4nBCZYZE6gVADDnRSdwaUIW5vA+v4n3tLIqQcGVW58rxDT87iOkgy9df6Pv0pjmAN19g7SA+wxWCwaq4ZsvaoI6h5ov3vAL2DimOk+9fIEscpV3diQrJH3eQVcUsKNtt5o7bv3Q1OXER44jnYBfB3zs8Nja/H/4BRflwSSDrolH542YnwntCXL/XvNPpgzSB+Bcw03O0HbdEo0ACp/3mgAPjPGACXs4b5d6lNcO06pq8xIwFcFiMIQjfdyrH64cR18vsfqQELYOllH3MlvC9zdt5585op8Gx2wEkZv7DRiMxtt5AQX6DGmUvUAT+NJU9tdp2dKMMfHyElr5QQXi5zAP102gg0kXRu/4beZp2P9WOEczAJDtYzEa8Eawf5fBbEuDIkWPfLE+8O68M2juQAWdaWZb8qDIcejm+RauaeuvHyEshIWVeksfXila7AiefS+vWmi79zlFuFmW9iR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r2TPNx3GKYAWMR/t2uUZQsvxq+ihOpvncDGjn41RiROEra0Zj+CdL46Y2AxLwdeFkZocnoI7hlDB1mpmvnZEzj4ws7lq51/5UF9zsNZmI84Z2iRxAaofrYqNQQVTodwsy+RTqJ7gvGG7n/ZXtq/vu8YetCS7UFRRcgZNFDm6ekBEQ7U1N725by+zOUolzu82xby6ThojHo4OVjZeRbcXcphqeszFW8YUDZ2+KjJ7la7uJblgshgMeGEsn4tPs+oT0SeEVvLXLX/QwrmGbyhiP9GTvy8qbsVEp15Ia89PgtBbFKigcTZA1JThCgTzc8QJe6k4tLDt65c9gGeuD8ACHc/u3YaTqXran6iW+3QRT/vVXyUI50V1WBCMDQseSrlSGX7nSZotalnejB4dAq1LOfyU5Frajqksn2w6sRzwUlOl/iPFkRoUlXElj0Ct68PvLgDTFLC9DEJikCgBPTUA2ADkrca945ASOQMKCOvO4QPX7yXqoyElVyhVitciGNxYnE4xZ+gmqwBTnqZ5UPUC28v2Q7ofKxtFnFtQfOs+35nrjyLOQ1tOHb4qJPIAMyUseo0b3ByVMC4QqOHwer7N5D5ojZYZm8Z1mqBfPEkEHuvMEOBjzvs+WLk39afUfLK1tdC/2B+HqymoA1hu7LIJlMOmBLN4vIxlrMYQZfiEFa4mPmFJyzmPoJ2UBA0GItmTcd+6DRDUO3IuVpZmIJA8RJbAheYZyKc2H6rN6qIOT2rAQDt8xfIuXHLTBftfwwg/soEHIbR940dn/CWzcOBASIETuaBE8T3f8BvvEZ5lxibZTVmNQo6WDbQpBcN1UwKldu/AgtyB2zfnPey56OhcA5C+jEm6x0eEr4aRVagg=="
}
},
"key": "burrow"
}
25 changes: 25 additions & 0 deletions secrets/production/kafka.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"data": {
"security_protocol": {
"iv": "wKEDOI0MV82LtkmgIMPiuw==",
"edk": "AQIDAHiwVn67IJeh/zLC2ECLGkH+6xwCXfpNOUv/P9B/e8pXtAEULjtozvRKe90xxXb8yABfAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMtRLJ/AmBsmhbx0NhAgEQgDtvNHyBVnBEWMReMNR784R9MFCv8oDCOp7MLkZxFTXbDIDvyI6hqg9q7xALRlLumMd0rKwngtYbI64V8Q==",
"data": "/1K7hf2bbtyfsUyII/nT/Q=="
},
"sasl_mechanism": {
"iv": "PWam3Z9KEL5HN1zd0qDR2g==",
"edk": "AQIDAHiwVn67IJeh/zLC2ECLGkH+6xwCXfpNOUv/P9B/e8pXtAH+AUh06+FQhCdR184bra+KAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMffZ4d39tk+x8+Y+vAgEQgDuX1QyYyR9IeoNmADna5snv+Z5zqgdLZwDULqK5gpQjb9EjVjobyvZ89YuhyOIFGXKXX4CjbpybWnRgxA==",
"data": "6H5SQX242lAvOI8ldbyMvw=="
},
"sasl_plain_username": {
"iv": "Px+YLaw3mA/AmaTgS1f6/g==",
"edk": "AQIDAHiwVn67IJeh/zLC2ECLGkH+6xwCXfpNOUv/P9B/e8pXtAE9OIbxJfGy4NQkCuC3nwjEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMaD2KAyFywMnDXN7oAgEQgDvAk3dIBtdE4hhLx+xtdnCtOlGW6PRtZWYT+cDWP1hWfaqUOPdTuF97QIyD+fxH9l+30ADj+kEGnisa2Q==",
"data": "8m8pdEy6w/Z+47WiSL23Hg=="
},
"sasl_plain_password": {
"iv": "6lQwpK1bZX1Rh1ec3URXmA==",
"edk": "AQIDAHiwVn67IJeh/zLC2ECLGkH+6xwCXfpNOUv/P9B/e8pXtAHwlZ/Ia2qv8S5EH+Q5g9lrAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQM7j9C8bKS8kM9mcuLAgEQgDtKmwZ54fFY64tgIISAmmY10eXMoB39spcK7ICXHBTngCYQvF0UOQ29+s6OXPv2aR6Rs4HO63T+tHr/Qw==",
"data": "obW1c96OC2g9QPHrCjpN1g=="
}
},
"key": "burrow"
}