I’ve been trying to figure out how to build a collector-sidecar package, since I’ve had some changes merged in and would like to deploy to my environment. It looks like it uses fpm-cook to build the package, per the Makefile but when i try make package-linux I get:
This suggests to me that i should be running make package-linux from a different directory, but there aren’t any directions. If i move the build directory to a location it wants, then it fails because there’s an issue finding …/…/collectors/filebeat/linux/x86_64/filebeat
How is the collector-sidecar package built usually?
Thanks for your response. I did have some problems initially with building the binary because I was using “go build” without any flags, but then did look at the .travis.yml like you mentioned and got a working binary.
What I was actually asking was how the package was built – as in the deb/rpm itself. There is a package-build step in the Makefile, but like I mentioned this seems to require being run from a certain path?
$ cd /path/to/collector-sidecar
$ export GO15VENDOREXPERIMENT=1
$ ln -s `pwd` $GOPATH/src/github.com/Graylog2/collector-sidecar
$ cd $GOPATH/src/github.com/Graylog2/collector-sidecar
$ glide install
$ make test
$ make build-linux
$ make build-linux32
$ make build-windows
$ make build-windows32
$ make package-all
Thanks @marius! I appreciate it. We probably still want to host this locally so we don’t have to have all our hosts reach out to github to install the package - but we did get the package bit figured out.
@jochen the issue was that running make package-linux doesn’t run the prepare-package step that puts everything into the right place so that fpm-cook works as expected.
I may do a PR on documentation to mention this for other people. Thanks everyone.