# Package a beat built from source for deploying to other servers running on same platform

**URL:** <https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351>\
**Category:** Beats\
**Created:** [February 28, 2019, 1:24pm UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351 "2019-02-28T13:24:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tabalchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabalchi/32/41738_2.png) [@tabalchi](https://discuss.elastic.co/u/tabalchi)\
**Post date:** [February 28, 2019, 1:24pm UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351/1 "2019-02-28T13:24:58Z")

</div>

I built MetricBeat from source on an ARMv7 device running Debian Stretch. To do this, I installed Go, then downloaded the Beats source code from GitHub, switched to the matching version for my ElasticSearch and Kibana installations, and successfully ran 'make' under metricbeat, then 'make update'. All this was successful, and I am able to run the metricbeat executable with default configuration.

Question is - How can I create a tarball to deploy this to several other servers running on the same platform (and include all the metricbeat modules and any kibana-related stuff as well)?

---

<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:** [February 28, 2019, 2:48pm UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351/2 "2019-02-28T14:48:38Z")

</div>

The `make package` target produces .tar.gz, .rpm, and .deb. It requires an x86\_64 machine because it uses Docker to cross-compile for all targets. To get it to produce armv7 artifacts use.

```auto
cd metricbeat
git checkout v6.6.1 # for example
PLATFORMS='+all linux/armv7' make package
ls -la build/distributions

```

FYI: I have snapshots built from master that include the "armhf" artifacts for ARMv7 at [https://beats-ci.elastic.co/job/elastic+beats+master+multijob-package-linux/lastSuccessfulBuild/gcsObjects/](https://beats-ci.elastic.co/job/elastic+beats+master+multijob-package-linux/lastSuccessfulBuild/gcsObjects/).

---

<div class="post-metadata">

**Author:** ![tabalchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabalchi/32/41738_2.png) [@tabalchi](https://discuss.elastic.co/u/tabalchi)\
**Post date:** [February 28, 2019, 7:48pm UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351/3 "2019-02-28T19:48:56Z")

</div>

Hi Andrew,

Thanks so much for your quick response. I'll give it a try and post the outcome here.

Will I be able to use your snapshots even though my Kibana and ElasticSearch version is behind (6.5.1)? Snapshots are v6.7.0 or later only.

---

<div class="post-metadata">

**Author:** ![tabalchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabalchi/32/41738_2.png) [@tabalchi](https://discuss.elastic.co/u/tabalchi)\
**Post date:** [March 2, 2019, 2:29pm UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351/4 "2019-03-02T14:29:18Z")

</div>

Hi @andrewkroh - Is the "make package" command to be run after a plain "make"? Right now when I run it I get a "make: Nothing to be done for 'package'." message.

I also tried to do a plain "make" on an x86\_64 machine and am getting out of memory errors with the Go linker.

Is there a manual way to package the build into a .tar? I could simply do that for now if I knew what would need to be packaged.

Thanks!

---

<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:** [March 4, 2019, 1:05am UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351/5 "2019-03-04T01:05:51Z")

</div>

> [@tabalchi](#):
>
> Is the "make package" command to be run after a plain "make"?

No, that's not necessary. `make package` should do everything that is required to produce the packages. Doing a `make clean` before hand is generally a good practice though.

> [@tabalchi](#):
>
> Will I be able to use your snapshots even though my Kibana and Elasticsearch version is behind (6.5.1)?

They should work, but I would only use them for testing purposes (non-production). The latest 6.x release tag is what I would use.

> [@tabalchi](#):
>
> I also tried to do a plain "make" on an x86\_64 machine and am getting out of memory errors with the Go linker.

The package target takes a lot resources. It's running multiple compiles inside of Docker. I'm curious how much memory you had available on this host?

I started a package build from v6.6.1 for armv7. When the build finishes this should have some packages (none of them signed since this isn't our official build) [https://beats-ci.elastic.co/job/elastic+beats+master+multijob-package-linux/368/gcsObjects/](https://beats-ci.elastic.co/job/elastic+beats+master+multijob-package-linux/368/gcsObjects/).

---

<div class="post-metadata">

**Author:** ![tabalchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabalchi/32/41738_2.png) [@tabalchi](https://discuss.elastic.co/u/tabalchi)\
**Post date:** [March 4, 2019, 1:47am UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351/6 "2019-03-04T01:47:21Z")

</div>

Thanks @andrewkroh. Seems like my AWS instance might indeed be too small to handle the full-blown build. Since you are doing the v6.6.1 build for armv7, I'll simply use that instead, after upgrading my ELK stack to v6.6.1.

Thanks so much for doing that, btw. Good to have a build that matches the latest GA version of the stack.

---

<div class="post-metadata">

**Author:** ![tabalchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabalchi/32/41738_2.png) [@tabalchi](https://discuss.elastic.co/u/tabalchi)\
**Post date:** [March 10, 2019, 1:40am UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351/7 "2019-03-10T01:40:51Z")

</div>

Hi @andrewkroh ,

Tried to download the armv7 package but I'm getting the following error:

```
$ gunzip metricbeat-6.6.1-linux-armv7.tar.gz

gzip: metricbeat-6.6.1-linux-armv7.tar.gz: not in gzip format 

```

😧

---

<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:** [March 12, 2019, 12:17am UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351/8 "2019-03-12T00:17:23Z")

</div>

I just downloaded that same file and it unzipped fine for me. We also provide sha512 checksums of the file contents. And it verifies for me:

```auto
$ shasum -a 512 -c ./metricbeat-6.6.1-linux-armv7.tar.gz.sha512 
metricbeat-6.6.1-linux-armv7.tar.gz: OK

```

If you're `curl`'ing the file URLs try changing the domain to `storage.googleapis.com`.

---

<div class="post-metadata">

**Author:** ![tabalchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabalchi/32/41738_2.png) [@tabalchi](https://discuss.elastic.co/u/tabalchi)\
**Post date:** [March 23, 2019, 3:39am UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351/9 "2019-03-23T03:39:29Z")

</div>

@andrewkroh - I was able to test this out and I can confirm that it works fine. Something must have gone wrong during my previous download attempt. Thanks again for making packages from the latest stable release available.

Just out of curiosity, I see a `modules.d` sub-directory but not a separate `modules` sub-directory. I'm assuming they are all integrated with the `metricbeat` executable now?

---

<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:** [April 20, 2019, 5:39am UTC](https://discuss.elastic.co/t/package-a-beat-built-from-source-for-deploying-to-other-servers-running-on-same-platform/170351/10 "2019-04-20T05:39:31Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
