Closed mrkschan closed 8 years ago
I guess I need to modify https://github.com/elastic/beats-packer/blob/master/Makefile to pack this beat. Am I going to right direction? @ruflin?
@mrkschan Yes. But we moved this repo also into the beats repo here: https://github.com/elastic/beats/tree/master/dev-tools/packer
Also have a look at https://github.com/elastic/beats/issues/849
@ruflin I just find that there's a cross compile section in the libbeat/scripts/Makefile
. Should I use that or should I use dev-tools/packer
to make multi-platform binaries?
I depends on what you need: Crosscompile will just generate the binariees, packer is able to generate .deb and .rpm packages.
@mrkschan i'm hoping to find the time soon to improve the way dev-tools/packer
can be used to build rpm/debs for all Beats. Currently you'd have to mock around quite a bit, but @cyrilleverrier apparently managed it :-).
If your beat doesn't require Cgo (and I'm pretty sure it doesn't) it might be easier to use the cosscompile Makefile target to build the binaries and then fpm directly to transform them in debs/rpms. You can have a look in packer for the fpm command line to use and the init scripts / unit files.
@mrkschan I just duplicated dev-tools/packer
into my own folder and modified the paths wherever needed. It works well now that @tsg pushed the updated docker images to cross compile the code.
I guess I would keep things simple first. make crosscompile
is working great so far :)
:+1: