Your SlideShare is downloading. ×
EUC 2013 - Erlang in a *NIX World
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

EUC 2013 - Erlang in a *NIX World

362
views

Published on

How to get Erlang to Integrate With Your Environment

How to get Erlang to Integrate With Your Environment

Published in: Technology, News & Politics

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
362
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ERLANG IN A *NIX WORLDHow to get Erlang to Integrate With Your EnvironmentWednesday, June 12, 13
  • 2. Meta GoalsMake it easy to integrate into a standard unix environmentMake it easy to integrate into a continuous deployment systemRemove the need for a custom tool chain for ErlangWednesday, June 12, 13
  • 3. GoalsHow to build releases with RelxHow to integrate those releases under your system managementtoolsHow to build native packages (rpms, debs, etc for your releases)Wednesday, June 12, 13
  • 4. Tools We Will UseRelx - Release Buildinghttp://relx.orgErlnixify - Erlang Node Shimhttp://erlware.github.io/erlnixify/Fpm - Native Package Creation Toolhttps://github.com/jordansissel/fpmWednesday, June 12, 13
  • 5. Basic EnvironmentA Unix Environment (either in a VM or native on your laptop)ErlangRuby 1.9.3 (yea, yea)GitWednesday, June 12, 13
  • 6. Installing DependenciesInstall Gems -gem install erlnixifygem install fpmDownload the codehttps://github.com/ericbmerritt/EUC2013Wednesday, June 12, 13
  • 7. Relx - Creating A ReleaseA tool to build releasesConvention over configurationAbsolutely minimal configurationTalk tomorrow that will go into more detailWednesday, June 12, 13
  • 8. Relx - Creating A Release>relxStarting relx build process ...Resolving OTP Applications from directories:/Users/emerrit/workspace/EUC2013/echo_get/ebin/Users/emerrit/workspace/EUC2013/echo_get/deps/usr/local/Cellar/erlang/R16B/lib/erlang/libResolving available releases from directories:/Users/emerrit/workspace/EUC2013/echo_get/ebin/Users/emerrit/workspace/EUC2013/echo_get/deps/usr/local/Cellar/erlang/R16B/lib/erlang/libResolved echo_get-0.0.1release successfully created!Wednesday, June 12, 13
  • 9. Erlnixify - Running ReleaseA simple ruby appTraps Unix Signals and propagates them to the running Releasein an OTPish wayMonitors the running Release and crashes if the Release crashesWednesday, June 12, 13
  • 10. FPM - Trivial Package BuildingCan build packages most platforms (rpms, debs)Can build packages based an a directory layoutCan have before/after scripts etcWednesday, June 12, 13
  • 11. Running FPM> relx> mkdir -p _dist/opt/echo_get> mkdir -p _dist/etc/init.d> cp -r _rel _dist/opt/echo_get> cp ./bin/ _dist/etc/init.d> cd _dist> fpm -s dir -t rpm -d esl-erlang -n echo_get -v 0.0.1 --rpm-rpmbuild-define __prelink_undo_cmd %{nil} ./Wednesday, June 12, 13
  • 12. Running FPM - Makefilerelease: compile@rm -rf $(DISTDIR) $(REL)@$(REBAR) skip_deps=true releaserm -rf $(DISTDIR)/optmkdir -p $(DISTDIR)/optmkdir -p $(DISTDIR)/etc/init.dmkdir -p $(DISTDIR)/etc/apollomkdir -p $(DISTDIR)/var/log/apollocp -r rel $(DISTDIR)/opt/apollocp -r $(CURDIR)/etc/* $(DISTDIR)/etc/rpm: release$(eval $@_NAME := $(shell atbx print-git-vsn | cut -d "," -f 1))$(eval $@_VSN := $(shell atbx print-git-vsn | cut -d "," -f 2))cd $(DISTDIR); fpm -s dir -t rpm -d esl-erlang -n $($@_NAME) -v $($@_VSN) --before-remove ../bin/before-remove --rpm-rpmbuild-define __prelink_undo_cmd %{nil} ./Wednesday, June 12, 13
  • 13. Taking Things a Step FurtherContinuous Integration (Jenkins, etc)Inotify - http://inotify.aiken.czAnsible, Puppet or ChefWednesday, June 12, 13
  • 14. August 30th - 31sthttp://erlangcamp.comWednesday, June 12, 13
  • 15. October 11th - 12thhttp://erlangcamp.comWednesday, June 12, 13