danschultzer

danschultzer

Pow Core Team

Terraform, AWS ECS, Github Actions, clustering, and more DevOps fun!

TLDR

This repo got all Terraform IaC files to setup AWS ECS for Elixir apps that includes web server(s) and database. It includes auto deployment with Github Actions, and shows how to deal with exposing multiple ports and blue-green deployment strategy.

https://github.com/danschultzer/elixir-terraform-aws-ecs-example

Background

AWS is an insane timesink. There are only few articles that detail full Terraform setups and all were missing different pieces that I needed to have a full production setup. I spend so much time trying to understand how to setup infrastructure properly and deploy to ECS. To save others from this pain I’ve put it all together in a repo detailing step by step with git commits how to set up an Elixir project with Terraform code for continuous delivery.

In our company we use it for umbrella projects with multiple Phoenix apps. Unfortunately AWS is very microservice happy so it’s not an ideal setup with multiple task files and deployment steps. But it works!

Furthermore I’ve enabled CI testing of this repo using LocalStack simulating AWS. So you can be sure that the IaC files in the repo actually works.

I’ve also tried to set up logic that creates a phoenix app from scratch and deploys it right there in Github Actions validating that it connects to db and other nodes :exploding_head: Unfortunately LocalStack has a bunch of issues around this so won’t work for a while.

I’ll keep updating the the repo as I learn from dealing with AWS. Let me know what you think!

Most Liked

Raees678

Raees678

This is awesome!

soyjeansoy

soyjeansoy

woot lots to learn!

Where Next?

Popular in Other Resources Top

zkessin
I have released a free email course on how to build releases in Elixir with Distillery, The course is text based. You can subscribe here...
New
krishna_vaguelyright
Hi I am new to Elixir, just started learning 3 weeks back. I am building a Chat App with Elixir/Phoenix as backend & React-Native on ...
New
ErlangSolutions
This month we’re excited to host Tyr Chen, VP of Engineering at ArcBlock, on our webinar. ArcBlock are founding sponsors of the Erlang E...
New
Morzaram
Hey guys, I went through Chris McCords Twitter clone video and made the code that shows the 1.6 version, along with doing a broadcast del...
New
jramnani
Hello, I am almost done going through the book, Programming Phoenix 1.4, again after a hiatus from using Elixir for a few years. It see...
New
luckywatcher
I’ve been working in Elixir for two years this month. I’ve enjoyed the community and the help I’ve received and want to give back in a sm...
New
hectorperez
Hi, I found that a great way to learn is: play with existing livebook notebooks create new notebooks — completely new or just changing ...
New
ErlangSolutions
If anyone is interested in joining our next webinar with Bruce Tate :backhand_index_pointing_right:registration is now open! RSVP and lea...
New
dimitarvp
Hello, While coding tests for a hobby project of mine, I stumbled upon something odd when directly comparing Decimals – which is a bad i...
New
Timtonix
A tous les français de la communauté Elixir, J’ai découvert hier ce livre traitant d’élixir Elixir - Un langage de programmation 100 %...
New

Other popular topics Top

jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

We're in Beta

About us Mission Statement