axelson

axelson

Scenic Core Team

Can you use nerves to deploy a cloud-based server?

So from watching all the elixirconf2017 videos I’ve gotten very interested in playing with Nerves but haven’t had an opportunity yet. But a user on reddit mentioned that Nerves supports x86_64 machines now and was wondering if it would be possible to use Nerves to deploy to a cloud-based server: https://www.reddit.com/r/elixir/comments/79x71y/how_do_you_deploy_your_elixir_phoenix_applications/dp66uuv/

I think the idea is really tantalizing, does anyone have an idea as to the feasibility? I’m sure it would work on a co-located server but something like AWS probably wouldn’t support it.

Most Liked

axelson

axelson

Scenic Core Team

For anyone interested in this thread/topic there was some discussion in the Elixir Slack nerves channel about a project to get this exact idea working with EC2 (by @jakemorrison):

https://github.com/cogini/nerves_system_ec2
https://github.com/cogini/hello_nerves_ec2

I’ll definitely be following these projects intently.

jakemorrison

jakemorrison

I did some more work on this and documented it here Running Nerves on Amazon EC2
It is now getting ssh keys for the console from the instance.

fhunleth

fhunleth

Co-author of Nerves

I played around with deploying Nerves “firmware” to the cloud a while back. My notes are here: GitHub - fhunleth/vultr_example: Experiment in using Nerves to deploy to the clouds · GitHub. I originally looked at deploying to AWS, and it seemed feasible but I got a little lost in Amazon terminology. Getting something to work on Vultr was easy so I went there instead.

Some takeaways from doing this were:

  1. It’s definitely possible.
  2. Server hardware and networking are simpler than what we have to deal with in the embedded use cases, so there are opportunities to streamline the tooling and base libraries for ease-of-use.
  3. Bootstrapping servers to work with Nerves needs work. For Vultr, I have an iPXE script to load the first image, but it’s really tedious to use. From there on, you can update it via nerves_firmware_ssh which is easier.
  4. I don’t know enough about server deployment and operations to know what should be in the base Nerves image and what all is expected in the tooling. For example, it’s possible to put Postgres in the base image (per the reddit post), but I’m not sure that’s desirable. It seems easier (to me) to have a dedicated server for the database rather than combining it.

Anyway, Nerves in the cloud hasn’t been a focus for me, but if others want to pursue it, I certainly would help on low level details.

Frank

Where Next?

Popular in Questions Top

marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
JulienCorb
I am trying to implement my new.html.eex file to create new posts on my website. new.html.eex: <h1>Create Post</h1> <%= ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42920 311
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement