SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Dernier (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

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