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

More Related Content

What's hot

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
 

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?
 
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
 
Running your Jenkins Infrastructure with ClusterHQ
Running your Jenkins Infrastructure with ClusterHQRunning your Jenkins Infrastructure with ClusterHQ
Running your Jenkins Infrastructure with ClusterHQ
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components Introduction
 
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...
 
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
 
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
 
Deploying phalcon on heroku
Deploying phalcon on herokuDeploying phalcon on heroku
Deploying phalcon on heroku
 
Rails 3
Rails 3Rails 3
Rails 3
 
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
 
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
 
Akeebalize Your Extensions
Akeebalize Your ExtensionsAkeebalize Your Extensions
Akeebalize Your Extensions
 
Rails Engine Patterns
Rails Engine PatternsRails Engine Patterns
Rails Engine Patterns
 
Presentation laravel 5 4
Presentation laravel 5 4Presentation laravel 5 4
Presentation laravel 5 4
 
IT Automation with Chef
IT Automation with ChefIT Automation with Chef
IT Automation with Chef
 
Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2
 
Catalyst MVC
Catalyst MVCCatalyst MVC
Catalyst MVC
 
Panoramic view of web APIs
Panoramic view of web APIsPanoramic view of web APIs
Panoramic view of web APIs
 
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
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
 

Similar to Erlang Build Tools

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
 

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
 
Microservice Composition with Docker and Panamax
Microservice Composition with Docker and PanamaxMicroservice Composition with Docker and Panamax
Microservice Composition with Docker and Panamax
 
Hello elixir (and otp)
Hello elixir (and otp)Hello elixir (and otp)
Hello elixir (and otp)
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorial
 
Get started with AAR
Get started with AARGet started with AAR
Get started with AAR
 
Makefile for python projects
Makefile for python projectsMakefile for python projects
Makefile for python projects
 
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...
 
Vagrant
VagrantVagrant
Vagrant
 
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
 
Autotools
AutotoolsAutotools
Autotools
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014
 
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
 
Docker for dev
Docker for devDocker for dev
Docker for dev
 
Makefile
MakefileMakefile
Makefile
 
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...
 
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
 
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
 
Javascript mynotes
Javascript mynotesJavascript mynotes
Javascript mynotes
 
BBL Premiers pas avec Docker
BBL Premiers pas avec DockerBBL Premiers pas avec Docker
BBL Premiers pas avec Docker
 

More from 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
 

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
 
Erlang Supervision Trees
Erlang Supervision TreesErlang Supervision Trees
Erlang Supervision Trees
 
AngularJS Anatomy & Directives
AngularJS Anatomy & DirectivesAngularJS Anatomy & Directives
AngularJS Anatomy & Directives
 
Master Meta Data
Master Meta DataMaster Meta Data
Master Meta Data
 
Erlang latest version & opensource projects
Erlang latest version & opensource projectsErlang latest version & opensource projects
Erlang latest version & opensource projects
 
Digikrit Company Profile
Digikrit Company ProfileDigikrit Company Profile
Digikrit Company Profile
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

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 / 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