elpd

elpd

Ten years ago I got curious: what would a Chef/Ansible-like tool look like built entirely in Elixir? One that uses Erlang distribution instead of agents installed on remote machines.

I got most of it working — SSH tunnels, remote BEAM bootstrap, transparent clustering. But in the last piece, full code loading I run out of time. Life happened. The project sat.

A few weeks ago I picked it back up. Finished the bytecode pushing and dependency resolution with some AI assist, cleaned it up to newer utilities and shipped it in a day.

What it does

Connect to a remote server over SSH, push your modules, run them. No deployment. No pre-installed app on the remote. Just SSH access and Elixir.

target = %Fusion.Target{
  host: "10.0.1.5",
  port: 22,
  username: "deploy",
  auth: {:key, "~/.ssh/id_ed25519"}
}

{:ok, manager} = Fusion.NodeManager.start_link(target)
{:ok, remote_node} = Fusion.NodeManager.connect(manager)

# Run your own modules remotely — dependencies are pushed automatically
{:ok, result} = Fusion.run(remote_node, MyApp.Worker, :process, [data])

When you call MyApp.Worker remotely, Fusion reads the BEAM bytecode, walks the dependency tree, and pushes everything the module needs. No manual tracking.

Why build this

Back then it was mainly for curiosity. The idea was that instead of python or ruby, you can run Elixir on remote machines without a full deployment pipeline. Ad-hoc tasks across a fleet. Provisioning. One-off diagnostics. Interactive remote exploration.

Fusion gives you that without leaving Elixir.

How it works (the short version)

  • 3 SSH tunnels bridge Erlang distribution through firewalls — two reverse, one forward
  • Remote BEAM bootstrap starts Elixir on the remote with flags that route all traffic through the tunnels
  • Bytecode pushing transfers compiled .beam binaries (not source) with automatic dependency resolution

Zero runtime dependencies. ~700 lines of Elixir.

Deep dive articles

I wrote a three-part series covering the internals:

  1. Running Elixir on Remote Servers with Fusion — hands-on tutorial
  2. How Fusion Works: Tunnels and Distribution — SSH tunnel architecture
  3. How Fusion Works: Bytecode Pushing — dependency resolution and code loading

Links

https://github.com/elpddev/fusion

Feedback welcome

This is a POC. I do not plan using it in prod anytime soon. If someone find this interesting I’d love to hear your thoughts. API design, use cases I haven’t considered, rough edges. Maybe someone will find this useful.

Showing Posts 1 to 2

adam12

adam12

This looks great!

I rewrote one of my older applications just recently which is an IaaS platform similar to Linode/DO/etc. I originally had it as Ruby orchestrator + a Go sidecar deployed to each hypervisor, but when I brought it over to Elixir/Phoenix I ended up using SSH as the transport for simplicity, with nothing running on the hypervisor.

I looked at doing something similar to Fusion but I couldn’t completely crack the problem. I wanted to keep things simple, but I definitely made a few compromises in the journey.

I’m going to check this out in depth once I get a free moment.

AndyL

AndyL

I dislike Ansible but have not been able to find a better replacement. So I’m rooting for you!

For design inspiration, you might like to review the work done on JetPorch, a deploy tool by Michael DeHaan, the original Ansible developer. DeHaan worked on this project for a year-ish, then abandoned the project. But IMO his design was very good! You can find the archived JetPorch repo here: ~mpdehaan/jetporch - the Jet Enterprise Professional Orchestrator - sourcehut git

— All posts loaded —

Where Next? Top

Trending in Announcing Top

type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
kip
I’ll shortly be launching Text, a nascent text analysis library. Current functionality In this early version (not ready for prime time) ...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews