How to pack mybeat to mybeat.rpm?


(Panda) #1

I am based on https://www.elastic.co/guide/en/beats/devguide/current/beater-interface.html to build my own beat. Then I wrote my codes. Finally I go build main.go and Now i have ./main and *.yml , nothing else.

I want to make my own beat to build a rpm package.

so I used "rpm2cpio rpm_pack_name.rpm | cpio -div" to unzip filebeat.rpm, It gets the list of files as
'etc/' 'lib/' 'usr'

  1. I will be based on the /etc, lib/, usr/ to add mybeat.service, mybeat.sh, init.d/mybeat, if I just want the program to run in the background, Can i not write mybeat.sh ?
  1. What is the role of the import_dashboards and migrate_beat_config_1_x_to_5_0.py´╝čIn my beat, can i not write it?
  1. If you did it, please tell me what else should I pay attention to?

(Andrew Kroh) #2

If you used the beat generator to bootstrap your beat with the boilerplate code then you can run make package (requires Docker) to build RPM/Deb/Zip/Tar.gz. We use the same process to package the Beats we release.


(Panda) #3

OK, Thanks.


(system) #4

This topic was automatically closed after 21 days. New replies are no longer allowed.