mrkschan / nginxbeat

Superseded by https://github.com/elastic/beats/tree/master/metricbeat
Apache License 2.0
58 stars 7 forks source link

binary packages??? #23

Closed mrkschan closed 8 years ago

sebastienbonami commented 8 years ago

:+1:

mrkschan commented 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?

ruflin commented 8 years ago

@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

mrkschan commented 8 years ago

@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?

ruflin commented 8 years ago

I depends on what you need: Crosscompile will just generate the binariees, packer is able to generate .deb and .rpm packages.

tsg commented 8 years ago

@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.

cyrilleverrier commented 8 years ago

@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.

mrkschan commented 8 years ago

I guess I would keep things simple first. make crosscompile is working great so far :)