Slide 1

Slide 1 text

Deploying Elixir πŸš€ Two strategies for publishing Elixir applications to the world Carlos Souza - @caike

Slide 2

Slide 2 text

Elixir + React Native + Agile Development [email protected]

Slide 3

Slide 3 text

Demo repository github.com/idopterlabs/guitar_store Branches main and deploy-container.

Slide 4

Slide 4 text

Compiled vs. Interpreted

Slide 5

Slide 5 text

Compiled vs. Interpreted

Slide 6

Slide 6 text

Compiled vs. Interpreted No run time needed. ALL of the runtime needed. Some of the runtime.

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

● Some ops work ● Visibility into the build process ● Control over the prod. artifact ● Portability: β€œBuild once, run anywhere” ● NO ops 😌 ● Focus on development ● Watch the magic happen σ°¨Έ ● More abstractions between source code and prod. artifact ● Vendor lock-in σ°€… Heroku Buildpacks ⛏ Containers 🐳 The 2 Strategies:

Slide 10

Slide 10 text

Heroku Dashboard

Slide 11

Slide 11 text

Strategy #1 Buildpacks ⛏

Slide 12

Slide 12 text

Heroku Concepts: ● Buildpacks ⛏ Scripts that transform source code into slugs. ● Slugs πŸ› Production artifact made for running in Dynos. ● Dynos πŸ¦– Lightweight-containers. Vary by type, RAM and feature$

Slide 13

Slide 13 text

● Language versions: β—‹ Erlang β—‹ Elixir β—‹ Node.js * ● App config: β—‹ SSL β—‹ Websocket Buildpacks 󰟲 -> ⛏ -> πŸ› -> πŸ¦–

Slide 14

Slide 14 text

...Coming up in Phoenix 1.6 πŸ₯³ https://github.com/evanw/esbuild

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

[demo]

Slide 19

Slide 19 text

Strategy #2 Container Image 🐳

Slide 20

Slide 20 text

Actual work WHYYYY IS MY ENV NOT BEING SET !?!?!!11

Slide 21

Slide 21 text

https://gist.github.com/caike/ca6d82c4b47093f3c2b9ac5403268e5f

Slide 22

Slide 22 text

● Language versions ● Build Tools ● Build Processes ● Architectures ● Exact replica of a release ● Portability Containers

Slide 23

Slide 23 text

1- Test your strategy by running a local release πŸ πŸš€ 2- DO NOT let your Dockerfile turn into πŸ’© Takeaways for using containers:

Slide 24

Slide 24 text

β€œSingle stage” Multi-stage

Slide 25

Slide 25 text

[demo]

Slide 26

Slide 26 text

● Some ops work ● Visibility into the build process ● Control over the prod. artifact ● Portability: β€œBuild once, run anywhere” ● NO ops 😌 ● Focus on development ● Watch the magic happen σ°¨Έ ● More abstractions between source code and prod. artifact ● Vendor lock-in σ°€… Heroku Buildpacks ⛏ Containers 🐳 The 2 Strategies:

Slide 27

Slide 27 text

Elixir + React Native + Agile Development [email protected]