Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpine Linux support #16

Closed
ospaarmann opened this issue Oct 6, 2016 · 11 comments
Closed

Alpine Linux support #16

ospaarmann opened this issue Oct 6, 2016 · 11 comments
Assignees

Comments

@ospaarmann
Copy link

Hey,

I’m trying out the Beta of AppSignal for Elixir and ran into an issue when using building the Docker image that I use to ship the app. It looks to me that the download of the AppSignal agent causes the problem. Maybe downloading the agent after compilation isn’t the best approach…

Anyway, here is my log dump (or part of it). Would be great if you could look into this.

Thanks

Compiling 1 file (.ex)
Generated uuid app
==> mime
Compiling 1 file (.ex)
Generated mime app
==> plug
Compiling 44 files (.ex)
Generated plug app
==> cors_plug
Compiling 1 file (.ex)
Generated cors_plug app
==> phoenix_html
Compiling 8 files (.ex)
Generated phoenix_html app
==> exrm
Compiling 11 files (.ex)
warning: function beam_imports/1 is unused
  lib/exrm/appups.ex:98

warning: variable v2_file is unused
  lib/exrm/appups.ex:84

Generated exrm app
==> phoenix
Compiling 60 files (.ex)
Generated phoenix app
==> appsignal
could not compile dependency :appsignal, "mix compile" failed. You can recompile this dependency with "mix deps.compile appsignal", update it with "mix deps.update appsignal" or clean it with "mix deps.clean appsignal"
** (FunctionClauseError) no function clause matching in Mix.Appsignal.Helper.map_arch/1
    mix_helpers.exs:88: Mix.Appsignal.Helper.map_arch('x86_64-alpine-linux-musl')
    mix_helpers.exs:13: Mix.Appsignal.Helper.ensure_downloaded/0
    mix.exs:6: Mix.Tasks.Compile.Appsignal.run/1
    (mix) lib/mix/task.ex:296: Mix.Task.run_task/3
    (elixir) lib/enum.ex:1184: Enum."-map/2-lists^map/1-0-"/2
    (mix) lib/mix/tasks/compile.all.ex:19: anonymous fn/1 in Mix.Tasks.Compile.All.run/1
    (mix) lib/mix/tasks/compile.all.ex:37: Mix.Tasks.Compile.All.with_logger_app/1
    (mix) lib/mix/task.ex:296: Mix.Task.run_task/3

The command '/bin/sh -c mix compile' returned a non-zero code: 1
@arjan
Copy link
Contributor

arjan commented Oct 6, 2016

Hi, thanks for your report. I can add the missing arch (x86_64-alpine-linux-musl) to the mapping in the helper.

However there's an underlying issue that the appsignal agent currently does not work with Alpine linux due to its dependency on musl. We're working on this, but can't give an ETA just yet unfortunately.

@arjan
Copy link
Contributor

arjan commented Oct 7, 2016

See this commit on how to add it to the mapping. However, YMMV with alpine..

@ospaarmann
Copy link
Author

Thank you for the feedback. Alpine is great for Docker containers because it is extremely lean (only roughly 6 MB for the image), has good additional security and a stable release model. So it would be great if you could support Alpine, especially since it is so popular in the Docker community.

@arjan
Copy link
Contributor

arjan commented Oct 7, 2016

I know; this has to do with the Appsignal agent being coded in Rust, and this issue prevents this.

@teamon
Copy link

teamon commented Nov 14, 2016

Have you tried compiling for musl now that rust-lang/rfcs#1721 is merged? (I just went from "hooooray phoenix monitoring that just works" into complete sadness because of this issue, so if there is anything I could try to make it work please let me know)

@arjan
Copy link
Contributor

arjan commented Nov 14, 2016

Thanks for the headsup. @thijsc is the Rust guy, he'll fill you in.

@thijsc
Copy link
Member

thijsc commented Nov 15, 2016

We're keeping close track of this. The RFC was merged, the actual implementation work is tracked in rust-lang/rust#37406. As soon as this pull has been merged we're going to work on this again.

@tombruijn
Copy link
Member

tombruijn commented Dec 21, 2016

I've been working on a very experimental Alpine Linux supported build of our agent and extension. Today I got a working build and tested it. It worked 🎉

From now on I'll be working on updating our build process to be able to ship a official alpha release.

Ping us at support@appsignal.com if you want to be in the first alpha beta users batch

Edit: I do see that #44 has to be done first.

@tombruijn tombruijn changed the title Using AppSignal with Elixir in a Docker Container: Compilation fails Alpine Linux support Jan 2, 2017
@tombruijn
Copy link
Member

Good news everyone! Version 0.11.0 was just released adding Alpine Linux support for AppSignal for Elixir.

No extra steps are needed for installation.

Try it out and let us know if you run into any problems!

@arjan
Copy link
Contributor

arjan commented Jan 17, 2017

Should we close this ticket? Or are we waiting on confirmation from @ospaarmann or @jeroenvisser101 ?

@jeroenvisser101
Copy link
Contributor

You can close it, I already confirmed it was working by running my fork yesterday 👍

@arjan arjan closed this as completed Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants