# How to pack mybeat to mybeat.rpm?

**URL:** https://discuss.elastic.co/t/how-to-pack-mybeat-to-mybeat-rpm/100655
**Category:** Beats
**Created:** [September 15, 2017, 8:43am UTC](https://discuss.elastic.co/t/how-to-pack-mybeat-to-mybeat-rpm/100655 "2017-09-15T08:43:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![caibaoying](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@caibaoying](https://discuss.elastic.co/u/caibaoying)
#### Post date: [September 15, 2017, 8:43am UTC](https://discuss.elastic.co/t/how-to-pack-mybeat-to-mybeat-rpm/100655/1 "2017-09-15T08:43:27Z")

</div>

I am based on [https://www.elastic.co/guide/en/beats/devguide/current/beater-interface.html](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?

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [September 15, 2017, 12:19pm UTC](https://discuss.elastic.co/t/how-to-pack-mybeat-to-mybeat-rpm/100655/2 "2017-09-15T12:19:37Z")

</div>

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.

- Beat Dev Guide: [https://www.elastic.co/guide/en/beats/devguide/current/new-beat.html](https://www.elastic.co/guide/en/beats/devguide/current/new-beat.html)
- Generator source: [https://github.com/elastic/beats/tree/master/generator/beat](https://github.com/elastic/beats/tree/master/generator/beat)
- Source for the packaging scripts/tool used when running `make package`: [https://github.com/elastic/beats/tree/master/dev-tools/packer](https://github.com/elastic/beats/tree/master/dev-tools/packer)

---

<div class="post-metadata">

### Author: ![caibaoying](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@caibaoying](https://discuss.elastic.co/u/caibaoying)
#### Post date: [September 18, 2017, 1:51am UTC](https://discuss.elastic.co/t/how-to-pack-mybeat-to-mybeat-rpm/100655/3 "2017-09-18T01:51:51Z")

</div>

OK, Thanks.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 6, 2017, 8:43am UTC](https://discuss.elastic.co/t/how-to-pack-mybeat-to-mybeat-rpm/100655/4 "2017-10-06T08:43:27Z")

</div>

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