Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Elixir Deployment
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
tetiana12345678
January 29, 2017
Programming
440
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Elixir Deployment
Talk given at Elixir London meetup 2017.
tetiana12345678
January 29, 2017
More Decks by tetiana12345678
See All by tetiana12345678
Types in Elixir
tetiana12345678
0
84
The Age of Elixir
tetiana12345678
1
490
Building "learn to touch type" glove with Elixir and Arduino
tetiana12345678
1
1.6k
Using effective learning technique to learn Elixir.
tetiana12345678
1
160
elixir flashcards
tetiana12345678
1
340
Other Decks in Programming
See All in Programming
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
4
3.5k
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
Next.js: The final boss of Web Performance
guaca
0
250
Railsバージョンを4倍にした話
optim
0
350
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2k
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
JIS keyboard support in Omarchy
lef237
0
110
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
ChromeでローカルLLM
ryu1013
0
140
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
The Curious Case for Waylosing
cassininazir
1
570
Ruling the World: When Life Gets Gamed
codingconduct
0
400
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Designing for humans not robots
tammielis
254
26k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
KATA
mclloyd
PRO
35
16k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Transcript
DEPLOYING ELIXIR BY TETIANA DUSHENKIVSKA
None
HEROKU VS USING RELEASES
DEPLOYING USING RELEASES
PICK RELEASE MANAGER EXRM DISTILLERY REBAR3
None
WHERE SHOULD WE BUILD A RELEASE?
None
None
CREATING A RELEASE OF OTP APP WITH DISTILLERY
ADD DISTILLERY DEPS TO MIX.EXS {:distillery, "~> 1.0"}
FETCH DEPS $ mix deps.get
RELEASE IT! $ mix release ==> You are missing a
release config file. Run the release.init task first
DO AS DISTILLERY TOLD YOU $ mix release.init
GENERATED REL/CONFIG.EXS
None
REL/CONFIG.EXS #/rel/config file content ... include_ertc: false #needs to have
erlang installed. ... release :app_name do set version: current_version(:app_name) end
PRODUCE A RELEASE MIX_ENV=prod mix compile mix release --env=prod --verbose
option for more info
YOU CAN FIND YOUR RELEASES AT _BUILD/PROD/REL/APP_NAME/RELEASES/0.0.1/
AND TARBALL IS PRODUCED! .TAR.GZ
AND YOU HAVE BUILT YOUR RELEASE!
None
...BUT SOMETIMES THINGS GO WRONG
None
None
SOLUTION 1 SHORTEN LONG MODULE NAMES $ find . -type
f -print| awk -F/ ' length($NF) > 99 '
SOLUTION 2 PRODUCE TARBAL MANUALLY MIX_ENV=prod mix compile mix release
--env=prod --no-tar cd /my_app/_build/prod tar -cvzf my_app.tar.gz
GOT IT SORTED!
DEPLOYING
POSSIBILITY 1 MANUALLY COPY .TAR.GZ TO THE PROD SERVER #
copy release to prod server $ scp -i _build/prod/rel/my_app/releases/0.0.1\ /my_app.tar.gz user_name@server_name:/home/my_app/releases/0.0. my_app.tar.gz
UNTAR IT # ssh to the server ssh user_name@server_name #
untar your release on prod server tar -xzf ~/my_app.tar.gz
CHECK IT'S WORKING # start it on prod server my_app/bin/my_app
console # you should see the logs # start it as a daemon on prod server my_app/bin/my_app start my_app/bin/my_app ping # > pong
A BIT OF AUTOMATION
None
GET TO KNOW YOUR SERVER
.TAR.GZ VS .DEB?
.DEB CONTAIN DEBIAN-BINARY CONTROL.TAR.GZ DATA.TAR.GZ
DEBIAN-BINARY 2.0/n
CONTROL.TAR.GZ ARCHIVED CONTROL FILE Package: my.app Version: 1.0.0 Architecture: amd64
Maintainer: Inflowmatix Priority: optional Description: Packaged on debian server
DATA.TAR.GZ THIS IS WHERE OUR APP BINARIES GO (FROM _BUILD
DIR)
LET'S SEE THE EXAMPLE
None
CIRCLECI(2.0) BUILD RELEASE(NO TAR) cd my_app if [ "${CIRCLE_BRANCH}" ==
"master" ]; then MIX_ENV=prod mix compile mix release --env=prod --no-tar --verbose ...
PREPARE DATA.TAR.GZ ... cd /my_app chmod 755 _build/prod/rel/my_app/bin/my_app ... mkdir
-p /my_app/package/ cd /my_app/_build/prod/ tar --xform="s%^%/home/my_app/%"\ -cvzf /my_app/package/data.tar.gz rel/
PREPARE DEBIAN-BINARY ... echo "2.0" >> package/debian-binary
PREPARE CONTROL.TAR.GZ ... mkdir -p package/control cd package/control printf "Package:
..." >> control; tar -zcf /my_app/package/control.tar.gz .
CREATE .DEB PACKAGE ... cd /my_app/ version=$(git describe | sed
's/v//'); mkdir releases ar -rc releases/my_app_$version.deb\ package/debian-binary package/control.tar.gz\ package/data.tar.gz rm -rf package/ fi
STORE .DEB IN ARTIFACTS(CIRCLECI) - type: artifacts-store path: /my_app/releases destination:
releases
DOWNLOAD RELEASE SSH TO THE SERVER $dpkg my_app_0.0.1.deb $/home/my_app/bin/my_app start
SUMMARY LOT'S OF OPTIONS 3 PIECES NEEDED TO PRODUCE .DEB
PACKAGE COULD BE FRUSTRATING, BUT DON'T GIVE UP! CHECK WHERE YOU ARE BUILDING A RELEASE