forked from DataDog/datadog-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.PHONY: dep build generate clean | ||
|
||
GOOS = linux | ||
GOARCH = amd64 | ||
TAG = $(shell git describe --tags --always --abbrev=0) | ||
COMMIT = $(shell git rev-parse --short HEAD) | ||
CODENAME = hotwings | ||
|
||
dep: | ||
dep ensure | ||
|
||
build: | ||
GOOS=$(GOOS) GOARCH=$(GOARCH) go build \ | ||
-ldflags "-X github.com/DataDog/datadog-agent/pkg/version.Commit=$(COMMIT) \ | ||
-X github.com/DataDog/datadog-agent/pkg/version.AgentVersion=$(TAG)+$(CODENAME)" \ | ||
-o cmd/dogstatsd/dist/dogstatsd_$(GOOS)_$(GOARCH) \ | ||
cmd/dogstatsd/{main.go,main_nix.go} | ||
|
||
build-darwin: GOOS=darwin | ||
build-darwin: build | ||
|
||
generate: | ||
go generate cmd/dogstatsd/*.go | ||
|
||
clean: | ||
rm -rf cmd/dogstatsd/dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Standalone Dogstatsd Forwarder | ||
============================== | ||
This repo extends the DataDog/datadog-agent to build a standalone forwarder. | ||
|
||
## Prerequisites | ||
Ensure you have all required dependencies. This requires `dep` to fulfill the | ||
dependencies. With `dep` installed, and on your PATH you can use Makefile: | ||
|
||
$ make dep | ||
|
||
## Build | ||
Building can be done with the via the Makefile. To build a linux release: | ||
|
||
$ make build | ||
|
||
To build a darwin binary: | ||
|
||
$ make build-darwin | ||
|
||
A default config file can be generated with via the Makefile: | ||
|
||
$ make generate | ||
|
||
Note that all build artifacts can be found under the `cmd/dogstatsd/dist/` | ||
directory. | ||
|
||
## Update Code | ||
This repo just follows the upstream DataDog/datadog-agent repo with some added | ||
files to ease building a standalone forwarder, the code can be updated with git: | ||
|
||
$ git fetch upstream master | ||
$ git merge --ff-only upstream/master | ||
$ git push origin | ||
|
||
The `upstream` is configured with git: | ||
|
||
$ git remote add upstream https://github.com/DataDog/datadog-agent.git | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters