Fl4m3Ph03n1x

Fl4m3Ph03n1x

Setup to develop using elixir

Background

Recently I took upon a personal project to help someone very close to me. This project will be done in Elixir, but there is an issue - the machines I have access to are not strong enough to have a Linux VM (via VirtualBox or VMWare) on top of their installation and run Elixir.

I mention a VM, because I don’t want to install Elixir on the host, which most likely won’t even be my machine.

Options

The first thing that jumped to my mind was to use a cloud provider. However I have to pay them a monthly fee and I don’t feel comfortable with that idea.

The other option I can think of is using Docker. I have read some articles where people mention developer images for Elixir programmers. Ideally, I would be able to have all my code and environment in a docker image and then use an online editor to code and do the work.

Questions

But I have no experience with docker images for development. So naturally I have some questions:

  1. what is your current setup for developing elixir?
  2. Do you use a docker image for development?
  3. Do you install things directly into your machine?
  4. Do you recommend any cloud provider or online IDE that I could try?

Most Liked Responses

NobbZ

NobbZ

What operating system is your host driven by? If it’s not Linux, you’ll end up installing a VM which runs the docker anyway…

eahanson

eahanson

I do my elixir work directly on macOS, but I also work on a larger JVM-based project and we decided to do development on Google Cloud Platform.

We spin up a preemptible instance whenever we want to do work and use Mutagen to sync local files to the remote machine and to forward ports. We then edit files locally and use local web browsers to hit the local ports which get forwarded to the remote machine. An ansible script for setup and few simple bash scripts for starting and stopping everything keeps it all pretty simple.

A 4 CPU machine with 15GB RAM is USD$0.04 per hour (pro-rated to the minute and only accruing charges when the machine is running) which is pretty cheap especially if you’re not going to be using it 24x7. Google might choose to shut your machine down if they need it back (that’s the preemptible part, and the reason why it’s only 20% the price of a regular server) but because all of our work is written to our local disk before being synced up to the remote machine, there’s no risk of data loss.

NobbZ

NobbZ

Docker is not a VM!

But it runs in a linux VM if your host system is windows.

If you use docker4windows then the MS hypervisor is used, it will allocate the necessary memory for the VM on creation, and even if enough is available in the system, chance is that creation of the machine will fail. I had a lot of trouble using it. It never properly worked for me.

Docker Toolbox though uses VirtualBox and memory for the VM is allocated in a more host friendly way, and in general my experience using it was much better than with docker4windows.

So, your best bet is probably USB-boot into a Linux2Go.

This also solves your “I don’t want to install anything” problem.

Where Next?

Popular in Questions Top

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
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
Tee
can someone please explain to me how Enum.reduce works with maps
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> somethi...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New

Other popular topics Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
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
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
Lets say i have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => "XXX...
New

We're in Beta

About us Mission Statement