SlideShare a Scribd company logo
1 of 12
Download to read offline
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

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 WorkshopVivek Krishnakumar
 
Running your Jenkins Infrastructure with ClusterHQ
Running your Jenkins Infrastructure with ClusterHQRunning your Jenkins Infrastructure with ClusterHQ
Running your Jenkins Infrastructure with ClusterHQClusterHQ
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components IntroductionEugenio 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 2017Lemi 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 2017Lemi Orhan Ergin
 
Deploying phalcon on heroku
Deploying phalcon on herokuDeploying phalcon on heroku
Deploying phalcon on herokuTung 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, FLAhyoung 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 WorkshopEddie Lau
 
Akeebalize Your Extensions
Akeebalize Your ExtensionsAkeebalize Your Extensions
Akeebalize Your ExtensionsAlan Hartless
 
Rails Engine Patterns
Rails Engine PatternsRails Engine Patterns
Rails Engine PatternsAndy Maleh
 
Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2Vikas Chauhan
 
Panoramic view of web APIs
Panoramic view of web APIsPanoramic view of web APIs
Panoramic view of web APIsKaren 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 meetupmdxp
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular applicationmirrec
 

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 windowsDocker, Inc.
 
Microservice Composition with Docker and Panamax
Microservice Composition with Docker and PanamaxMicroservice Composition with Docker and Panamax
Microservice Composition with Docker and PanamaxMichael 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 2012alexismidon
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorialRohit Jagtap
 
Get started with AAR
Get started with AARGet started with AAR
Get started with AARRené Mertins
 
Makefile for python projects
Makefile for python projectsMakefile for python projects
Makefile for python projectsMpho 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 ProfessionalKellyn Pot'Vin-Gorman
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014Rafe 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 tryingAlex Rupérez
 
Makefile
MakefileMakefile
MakefileIonela
 
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_ComposeYeong 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, SollianceDocker, Inc.
 
BBL Premiers pas avec Docker
BBL Premiers pas avec DockerBBL Premiers pas avec Docker
BBL Premiers pas avec Dockerkanedafromparis
 

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

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

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

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