SlideShare a Scribd company logo
ERLANG
BUILD TOOLS
HELLO!
I am Akhil Agrawal
Doing Erlang development for last five years
Doing Ejabberd development for last eight months now
Started BIZense in 2008 & Digikrit in 2015
Overview
Different build tools available for Erlang and
simple examples for each
1
BUILD TOOLS SUMMARY
It is an include file for GNU Make, meaning
including it in a Makefile allows building project,
fetching/building dependencies and more
Erlang.mk
rebar is a self-contained Erlang script, easy to
distribute or embed in a project, provides dependency
management, rebar3 has lot of improvements over 2.x
rebar & rebar3
Mix is a command-line utility that manages
Elixir projects but can be used for managing
erlang projects as well
Mix
A make utility for erlang providing set of functions
similar to unix style make funtions. Packaged with
erlang distribution, popular & default build tool
Emakefile
Emakefile - Referenced from http://learnyousomeerlang.com/building-otp-applications
1. Creating a folder for your project
$ mkdir emakefile_project
$ cd emakefile_project
2. Creating erlang project structure
$ mkdir src include priv test
3. Creating Emakefile
$ vim Emakefile
{"src/*", [debug_info,
{i,"include/"}, {outdir,
"ebin/"}]}.
{"test/*", [debug_info,
{i,"include/"}, {outdir,
"ebin/"}]}.
4. Compiling erlang code
$ erl -make
$ erl -pa ebin/
1> make:all([load]).
5. Reload code on known nodes
$ erl -pa ebin/
1> make:all([netload]).
6. Compiling specific modules
$ erl -pa ebin/
1> make:files([“src/module1”,
“src/module2”]).
Rebar - Referenced from https://github.com/rebar/rebar
1. Installing from binary
$ wget
https://github.com/rebar/rebar/
wiki/rebar && chmod +x rebar
2. Installing from source
$ git clone
https://github.com/rebar/rebar.
git
$ cd rebar
$ ./bootstrap
3. Create new app
$ mkdir rebar_app
$ cd rebar_app
$ ./rebar create-app
4. Creating new lib
$ mkdir rebar_lib
$ cd rebar_lib
$ ./rebar create-lib
5. Configuration
$ vim rebar.config
6. Dependency Management
$ vim rebar.config
{deps,[
%% Source Dependencies
{meck, "0.8.*", {git,
"https://github.com/eproxus/meck.git"}},
%% rsync
{mod_useful, "1.0.1", {rsync, "modules/mod_useful"}}
]}.
$ rebar get-deps
Rebar3 - Referenced from http://www.rebar3.org/docs
1. Installing from binary
$ wget
https://s3.amazonaws.com/rebar3
/rebar3 && chmod +x rebar3
2. Installing from source
$ git clone
https://github.com/erlang/rebar
3.git
$ cd rebar3
$ ./bootstrap
3. rebar3 local install & upgrade
$ ./rebar3 local install
$ ./rebar3 local upgrade
4. Creating new project
$ rebar3 new release rebar3_project
$ cd rebar3_project
$ rebar3 compile
5. Configuration
$ vim rebar.config
6. Dependency Management
$ vim rebar.config
{deps,[
%% Packages (hex.pm) cowboy
{cowboy,"1.0.4"},
%% Source Dependencies
{cowboy, {git, "git://github.com/ninenines/cowboy.git"}},
%% Legacy
{cowboy, “1.*",
{git,"git://github.com/ninenines/cowboy.git"}}
]}.
$ rebar3 deps
Erlang.mk - Referenced from https://erlang.mk/guide/getting_started.html
1. Creating a folder for your project
$ mkdir emk_project
$ cd emk_project
2. Downloading Erlang.mk
$ wget
https://raw.githubusercontent.c
om/ninenines/erlang.mk/master/e
rlang.mk
-- or --
$ curl
https://raw.githubusercontent.c
om/ninenines/erlang.mk/master/e
rlang.mk > erlang.mk
3. Getting started with OTP applications
$ make -f erlang.mk bootstrap
$ make
4. Getting started with OTP libraries
$ make –f erlang.mk bootstrap-lib
$ make
5. Getting started from scratch
$ mkdir emk_scratch $ cd emk_scratch
$ wget
https://raw.githubusercontent.com/nin
enines/erlang.mk/master/erlang.mk
$ echo "include erlang.mk" > Makefile
$ make
Mix - Referenced from http://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html
1. Creating a folder for your project
$ mkdir mix_project
$ cd mix_project
2. Downloading Elixir & adding to path
$ wget
https://github.com/elixir-
lang/elixir/releases/download/v
1.1.1/Precompiled.zip
$ unzip Precompiled.zip –d
elixir
$ mv elixir /opt/
$ export
PATH=$PATH:/opt/elixir/bin
3. Creating new project
$ mix new kv --module KV
$ cd kv
$ mix compile
$ mix test
4. Different environments
$ MIX_ENV=dev mix compile
$ MIX_ENV=prod mix compile
5. Configuration
$ vim mix.exs
defmodule KV.Mixfile do
use Mix.Project
…
end
BUILD TOOL REQUIREMENTS
Packaging the erlang runtime to create the
release build which can run independently
Packaging & Releases
Creating/updating documentation, concept
of environments, umbrella projects etc
Documentation & More
Compilation of source code files, running
tests (unit & functional) & static analysis
Compilation & Tests
Manage source dependencies as well as
handle build artifacts, paths & libraries
Dependency Management
Erlang Build
Tools
SOME REFERENCES
◉ http://ninenines.eu/articles/erlang.mk-and-relx/
◉ http://learnyousomeerlang.com/building-otp-applications
◉ http://rustyrazorblade.com/2010/09/smarter-erlang-programming-with-
emakefile-options-and-user_default/
◉ http://featurebranch.com/using-mix-to-compile-your-erlang-projects/
◉ http://kelly-mclaughlin.com/blog/2014/12/12/building-an-erlang-project-with-
mix/
THANKS!
Any questions?
You can find me at
@digikrit / akhil@digikrit.com
Special thanks to all the people who made and released these awesome resources for free:
 Presentation template by SlidesCarnival
 Presentation models by SlideModel
 Erlang by Ericsson, Erlang/Elixir projects by ProcessOne, Basho, Apache, Pivotal, NineNines & others
Ad

More Related Content

What's hot (20)

What's new in Ansible v2.10?
What's new in Ansible v2.10?What's new in Ansible v2.10?
What's new in Ansible v2.10?
Ompragash Viswanathan
 
Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer Workshop
Vivek Krishnakumar
 
Running your Jenkins Infrastructure with ClusterHQ
Running your Jenkins Infrastructure with ClusterHQRunning your Jenkins Infrastructure with ClusterHQ
Running your Jenkins Infrastructure with ClusterHQ
ClusterHQ
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components Introduction
Eugenio Romano
 
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Lemi Orhan Ergin
 
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Lemi Orhan Ergin
 
Git Anti Patterns - XP Days Ukraine 2017
Git Anti Patterns - XP Days Ukraine 2017Git Anti Patterns - XP Days Ukraine 2017
Git Anti Patterns - XP Days Ukraine 2017
Lemi Orhan Ergin
 
Deploying phalcon on heroku
Deploying phalcon on herokuDeploying phalcon on heroku
Deploying phalcon on heroku
Tung Ns
 
Rails 3
Rails 3Rails 3
Rails 3
Diego Pacheco
 
Apache Zeppelin and Helium @ApacheCon 2017 may, FL
Apache Zeppelin and Helium  @ApacheCon 2017 may, FLApache Zeppelin and Helium  @ApacheCon 2017 may, FL
Apache Zeppelin and Helium @ApacheCon 2017 may, FL
Ahyoung Ryu
 
Women Who Code - RSpec JSON API Workshop
Women Who Code - RSpec JSON API WorkshopWomen Who Code - RSpec JSON API Workshop
Women Who Code - RSpec JSON API Workshop
Eddie Lau
 
Akeebalize Your Extensions
Akeebalize Your ExtensionsAkeebalize Your Extensions
Akeebalize Your Extensions
Alan Hartless
 
Rails Engine Patterns
Rails Engine PatternsRails Engine Patterns
Rails Engine Patterns
Andy Maleh
 
Presentation laravel 5 4
Presentation laravel 5 4Presentation laravel 5 4
Presentation laravel 5 4
Christen Gjølbye Christensen
 
IT Automation with Chef
IT Automation with ChefIT Automation with Chef
IT Automation with Chef
Anuchit Chalothorn
 
Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2
Vikas Chauhan
 
Catalyst MVC
Catalyst MVCCatalyst MVC
Catalyst MVC
Sheeju Alex
 
Panoramic view of web APIs
Panoramic view of web APIsPanoramic view of web APIs
Panoramic view of web APIs
Karen Immanuel
 
Chef Intro @ SF Bay Area LSPE meetup
Chef Intro @ SF Bay Area LSPE meetupChef Intro @ SF Bay Area LSPE meetup
Chef Intro @ SF Bay Area LSPE meetup
mdxp
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
mirrec
 
Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer Workshop
Vivek Krishnakumar
 
Running your Jenkins Infrastructure with ClusterHQ
Running your Jenkins Infrastructure with ClusterHQRunning your Jenkins Infrastructure with ClusterHQ
Running your Jenkins Infrastructure with ClusterHQ
ClusterHQ
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components Introduction
Eugenio Romano
 
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Lemi Orhan Ergin
 
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Lemi Orhan Ergin
 
Git Anti Patterns - XP Days Ukraine 2017
Git Anti Patterns - XP Days Ukraine 2017Git Anti Patterns - XP Days Ukraine 2017
Git Anti Patterns - XP Days Ukraine 2017
Lemi Orhan Ergin
 
Deploying phalcon on heroku
Deploying phalcon on herokuDeploying phalcon on heroku
Deploying phalcon on heroku
Tung Ns
 
Apache Zeppelin and Helium @ApacheCon 2017 may, FL
Apache Zeppelin and Helium  @ApacheCon 2017 may, FLApache Zeppelin and Helium  @ApacheCon 2017 may, FL
Apache Zeppelin and Helium @ApacheCon 2017 may, FL
Ahyoung Ryu
 
Women Who Code - RSpec JSON API Workshop
Women Who Code - RSpec JSON API WorkshopWomen Who Code - RSpec JSON API Workshop
Women Who Code - RSpec JSON API Workshop
Eddie Lau
 
Akeebalize Your Extensions
Akeebalize Your ExtensionsAkeebalize Your Extensions
Akeebalize Your Extensions
Alan Hartless
 
Rails Engine Patterns
Rails Engine PatternsRails Engine Patterns
Rails Engine Patterns
Andy Maleh
 
Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2
Vikas Chauhan
 
Panoramic view of web APIs
Panoramic view of web APIsPanoramic view of web APIs
Panoramic view of web APIs
Karen Immanuel
 
Chef Intro @ SF Bay Area LSPE meetup
Chef Intro @ SF Bay Area LSPE meetupChef Intro @ SF Bay Area LSPE meetup
Chef Intro @ SF Bay Area LSPE meetup
mdxp
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
mirrec
 

Similar to Erlang Build Tools (20)

Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
Docker, Inc.
 
Microservice Composition with Docker and Panamax
Microservice Composition with Docker and PanamaxMicroservice Composition with Docker and Panamax
Microservice Composition with Docker and Panamax
Michael Arnold
 
Hello elixir (and otp)
Hello elixir (and otp)Hello elixir (and otp)
Hello elixir (and otp)
Abel Muíño
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012
alexismidon
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorial
Rohit Jagtap
 
Get started with AAR
Get started with AARGet started with AAR
Get started with AAR
René Mertins
 
Makefile for python projects
Makefile for python projectsMakefile for python projects
Makefile for python projects
Mpho Mphego
 
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
Eric Smalling
 
Vagrant
VagrantVagrant
Vagrant
Denys Kurets
 
Pass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalPass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft Professional
Kellyn Pot'Vin-Gorman
 
Autotools
AutotoolsAutotools
Autotools
Thierry Gayet
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014
Rafe Colton
 
Gigigo Workshop - Create an iOS Framework, document it and not die trying
Gigigo Workshop - Create an iOS Framework, document it and not die tryingGigigo Workshop - Create an iOS Framework, document it and not die trying
Gigigo Workshop - Create an iOS Framework, document it and not die trying
Alex Rupérez
 
Docker for dev
Docker for devDocker for dev
Docker for dev
Yusuf Found
 
Makefile
MakefileMakefile
Makefile
Ionela
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
Docker, Inc.
 
Phoenix 1.3 Umbrella App deployment via Distillery-Docker-Docker_Compose
Phoenix 1.3 Umbrella App deployment via Distillery-Docker-Docker_ComposePhoenix 1.3 Umbrella App deployment via Distillery-Docker-Docker_Compose
Phoenix 1.3 Umbrella App deployment via Distillery-Docker-Docker_Compose
Yeong Sheng Tan
 
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, SollianceDocker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker, Inc.
 
Javascript mynotes
Javascript mynotesJavascript mynotes
Javascript mynotes
AntoniaSymeonidou1
 
BBL Premiers pas avec Docker
BBL Premiers pas avec DockerBBL Premiers pas avec Docker
BBL Premiers pas avec Docker
kanedafromparis
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
Docker, Inc.
 
Microservice Composition with Docker and Panamax
Microservice Composition with Docker and PanamaxMicroservice Composition with Docker and Panamax
Microservice Composition with Docker and Panamax
Michael Arnold
 
Hello elixir (and otp)
Hello elixir (and otp)Hello elixir (and otp)
Hello elixir (and otp)
Abel Muíño
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012
alexismidon
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorial
Rohit Jagtap
 
Get started with AAR
Get started with AARGet started with AAR
Get started with AAR
René Mertins
 
Makefile for python projects
Makefile for python projectsMakefile for python projects
Makefile for python projects
Mpho Mphego
 
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
Eric Smalling
 
Pass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalPass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft Professional
Kellyn Pot'Vin-Gorman
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014
Rafe Colton
 
Gigigo Workshop - Create an iOS Framework, document it and not die trying
Gigigo Workshop - Create an iOS Framework, document it and not die tryingGigigo Workshop - Create an iOS Framework, document it and not die trying
Gigigo Workshop - Create an iOS Framework, document it and not die trying
Alex Rupérez
 
Makefile
MakefileMakefile
Makefile
Ionela
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
Docker, Inc.
 
Phoenix 1.3 Umbrella App deployment via Distillery-Docker-Docker_Compose
Phoenix 1.3 Umbrella App deployment via Distillery-Docker-Docker_ComposePhoenix 1.3 Umbrella App deployment via Distillery-Docker-Docker_Compose
Phoenix 1.3 Umbrella App deployment via Distillery-Docker-Docker_Compose
Yeong Sheng Tan
 
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, SollianceDocker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker, Inc.
 
BBL Premiers pas avec Docker
BBL Premiers pas avec DockerBBL Premiers pas avec Docker
BBL Premiers pas avec Docker
kanedafromparis
 
Ad

More from Digikrit (6)

Tech Disruption - Technology Disrupting Different Sectors
Tech Disruption - Technology Disrupting Different SectorsTech Disruption - Technology Disrupting Different Sectors
Tech Disruption - Technology Disrupting Different Sectors
Digikrit
 
Erlang Supervision Trees
Erlang Supervision TreesErlang Supervision Trees
Erlang Supervision Trees
Digikrit
 
AngularJS Anatomy & Directives
AngularJS Anatomy & DirectivesAngularJS Anatomy & Directives
AngularJS Anatomy & Directives
Digikrit
 
Master Meta Data
Master Meta DataMaster Meta Data
Master Meta Data
Digikrit
 
Erlang latest version & opensource projects
Erlang latest version & opensource projectsErlang latest version & opensource projects
Erlang latest version & opensource projects
Digikrit
 
Digikrit Company Profile
Digikrit Company ProfileDigikrit Company Profile
Digikrit Company Profile
Digikrit
 
Tech Disruption - Technology Disrupting Different Sectors
Tech Disruption - Technology Disrupting Different SectorsTech Disruption - Technology Disrupting Different Sectors
Tech Disruption - Technology Disrupting Different Sectors
Digikrit
 
Erlang Supervision Trees
Erlang Supervision TreesErlang Supervision Trees
Erlang Supervision Trees
Digikrit
 
AngularJS Anatomy & Directives
AngularJS Anatomy & DirectivesAngularJS Anatomy & Directives
AngularJS Anatomy & Directives
Digikrit
 
Master Meta Data
Master Meta DataMaster Meta Data
Master Meta Data
Digikrit
 
Erlang latest version & opensource projects
Erlang latest version & opensource projectsErlang latest version & opensource projects
Erlang latest version & opensource projects
Digikrit
 
Digikrit Company Profile
Digikrit Company ProfileDigikrit Company Profile
Digikrit Company Profile
Digikrit
 
Ad

Recently uploaded (20)

What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5..."Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
Fwdays
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5..."Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
Fwdays
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
 

Erlang Build Tools

  • 2. HELLO! I am Akhil Agrawal Doing Erlang development for last five years Doing Ejabberd development for last eight months now Started BIZense in 2008 & Digikrit in 2015
  • 3. Overview Different build tools available for Erlang and simple examples for each 1
  • 4. BUILD TOOLS SUMMARY It is an include file for GNU Make, meaning including it in a Makefile allows building project, fetching/building dependencies and more Erlang.mk rebar is a self-contained Erlang script, easy to distribute or embed in a project, provides dependency management, rebar3 has lot of improvements over 2.x rebar & rebar3 Mix is a command-line utility that manages Elixir projects but can be used for managing erlang projects as well Mix A make utility for erlang providing set of functions similar to unix style make funtions. Packaged with erlang distribution, popular & default build tool Emakefile
  • 5. Emakefile - Referenced from http://learnyousomeerlang.com/building-otp-applications 1. Creating a folder for your project $ mkdir emakefile_project $ cd emakefile_project 2. Creating erlang project structure $ mkdir src include priv test 3. Creating Emakefile $ vim Emakefile {"src/*", [debug_info, {i,"include/"}, {outdir, "ebin/"}]}. {"test/*", [debug_info, {i,"include/"}, {outdir, "ebin/"}]}. 4. Compiling erlang code $ erl -make $ erl -pa ebin/ 1> make:all([load]). 5. Reload code on known nodes $ erl -pa ebin/ 1> make:all([netload]). 6. Compiling specific modules $ erl -pa ebin/ 1> make:files([“src/module1”, “src/module2”]).
  • 6. Rebar - Referenced from https://github.com/rebar/rebar 1. Installing from binary $ wget https://github.com/rebar/rebar/ wiki/rebar && chmod +x rebar 2. Installing from source $ git clone https://github.com/rebar/rebar. git $ cd rebar $ ./bootstrap 3. Create new app $ mkdir rebar_app $ cd rebar_app $ ./rebar create-app 4. Creating new lib $ mkdir rebar_lib $ cd rebar_lib $ ./rebar create-lib 5. Configuration $ vim rebar.config 6. Dependency Management $ vim rebar.config {deps,[ %% Source Dependencies {meck, "0.8.*", {git, "https://github.com/eproxus/meck.git"}}, %% rsync {mod_useful, "1.0.1", {rsync, "modules/mod_useful"}} ]}. $ rebar get-deps
  • 7. Rebar3 - Referenced from http://www.rebar3.org/docs 1. Installing from binary $ wget https://s3.amazonaws.com/rebar3 /rebar3 && chmod +x rebar3 2. Installing from source $ git clone https://github.com/erlang/rebar 3.git $ cd rebar3 $ ./bootstrap 3. rebar3 local install & upgrade $ ./rebar3 local install $ ./rebar3 local upgrade 4. Creating new project $ rebar3 new release rebar3_project $ cd rebar3_project $ rebar3 compile 5. Configuration $ vim rebar.config 6. Dependency Management $ vim rebar.config {deps,[ %% Packages (hex.pm) cowboy {cowboy,"1.0.4"}, %% Source Dependencies {cowboy, {git, "git://github.com/ninenines/cowboy.git"}}, %% Legacy {cowboy, “1.*", {git,"git://github.com/ninenines/cowboy.git"}} ]}. $ rebar3 deps
  • 8. Erlang.mk - Referenced from https://erlang.mk/guide/getting_started.html 1. Creating a folder for your project $ mkdir emk_project $ cd emk_project 2. Downloading Erlang.mk $ wget https://raw.githubusercontent.c om/ninenines/erlang.mk/master/e rlang.mk -- or -- $ curl https://raw.githubusercontent.c om/ninenines/erlang.mk/master/e rlang.mk > erlang.mk 3. Getting started with OTP applications $ make -f erlang.mk bootstrap $ make 4. Getting started with OTP libraries $ make –f erlang.mk bootstrap-lib $ make 5. Getting started from scratch $ mkdir emk_scratch $ cd emk_scratch $ wget https://raw.githubusercontent.com/nin enines/erlang.mk/master/erlang.mk $ echo "include erlang.mk" > Makefile $ make
  • 9. Mix - Referenced from http://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html 1. Creating a folder for your project $ mkdir mix_project $ cd mix_project 2. Downloading Elixir & adding to path $ wget https://github.com/elixir- lang/elixir/releases/download/v 1.1.1/Precompiled.zip $ unzip Precompiled.zip –d elixir $ mv elixir /opt/ $ export PATH=$PATH:/opt/elixir/bin 3. Creating new project $ mix new kv --module KV $ cd kv $ mix compile $ mix test 4. Different environments $ MIX_ENV=dev mix compile $ MIX_ENV=prod mix compile 5. Configuration $ vim mix.exs defmodule KV.Mixfile do use Mix.Project … end
  • 10. BUILD TOOL REQUIREMENTS Packaging the erlang runtime to create the release build which can run independently Packaging & Releases Creating/updating documentation, concept of environments, umbrella projects etc Documentation & More Compilation of source code files, running tests (unit & functional) & static analysis Compilation & Tests Manage source dependencies as well as handle build artifacts, paths & libraries Dependency Management Erlang Build Tools
  • 11. SOME REFERENCES ◉ http://ninenines.eu/articles/erlang.mk-and-relx/ ◉ http://learnyousomeerlang.com/building-otp-applications ◉ http://rustyrazorblade.com/2010/09/smarter-erlang-programming-with- emakefile-options-and-user_default/ ◉ http://featurebranch.com/using-mix-to-compile-your-erlang-projects/ ◉ http://kelly-mclaughlin.com/blog/2014/12/12/building-an-erlang-project-with- mix/
  • 12. THANKS! Any questions? You can find me at @digikrit / [email protected] Special thanks to all the people who made and released these awesome resources for free:  Presentation template by SlidesCarnival  Presentation models by SlideModel  Erlang by Ericsson, Erlang/Elixir projects by ProcessOne, Basho, Apache, Pivotal, NineNines & others