Skip to content

Building EdgeOS for cloud and edge

Winston Tan edited this page Nov 13, 2023 · 3 revisions

This page explains how EdgeOS cloud and edge are built.

EdgeOS Cloud

EdgeOS Cloud is built with elixir Phoenix Framework. The main reason for using elixir here is for it's the OTP (Open Telecom Platform) libraries that ships with it's Erlang code under the hood. It makes cluster management and IO so easy.

Elixir and mix on your build machine

To build EdgeOS Cloud from source, you need to use mix, which comes with standard elixir installation on your build machine.

For OS like ubuntu, you can use the following commands to install elixir.

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install esl-erlang
sudo apt-get install elixir

After it's done, try this command to see if your mix is working.

mix --version

building EdgeOS Cloud

With mix installed, building EdgeOS Cloud because super simple.

  1. cd into edge-os/cloud
  2. do mix deps.get to download all dependencies in under the folder above
  3. finally, do MIX_ENV=prod mix release to build EdgeOS Cloud for production environment
  4. your built binaries will be in edge-os/cloud/_build/prod/rel/edge_os_cloud folder

Please refer to the following post to know how to use it.

EdgeOS Edge

EdgeOS Edge built with Rust. The main reason why Rust is chosen, instead of Golang, is because I like it better and I would like to work on it more. Rust is also a very mature system software language. It compiles to native code, it's makes code safe, and it's super fast.

Rust and cargo on your build machine

To build EdgeOS Edge from source, we need to use cargo, which comes with standard Rust installation too. A simple command below should get your environment:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

After it's done, try this command to see if your cargo is working.

cargo --version

building EdgeOS Edge

With cargo working, building EdgeOS Edge because super simple too.

  1. cd into edge-os/edge
  2. do cargo build --release to build EdgeOS Cloud for production environment
  3. your built binaries will be in edge-os/edge/target/ folder. If you follow the instructions above, the location of your executable file will be at edge-os/edge/target/edge-os-edge.

Please refer to the following post to know how to use it.