All Projects → newaperio → revista

newaperio / revista

Licence: MIT License
☂️ Reference Elixir umbrella project deployed to AWS ECS with Docker and Terraform.

Programming Languages

SCSS
7915 projects
elixir
2628 projects
HCL
1544 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to revista

leafblower
Play Cards Against Humanity online with friends!
Stars: ✭ 29 (+61.11%)
Mutual labels:  elixir-phoenix
phx raws
Raw websocket server on top of Phoenix.
Stars: ✭ 27 (+50%)
Mutual labels:  elixir-phoenix
vim-ide-elixir
Highly opininated setup of vim plugins for Elixir development
Stars: ✭ 28 (+55.56%)
Mutual labels:  elixir-phoenix
terraform-aws-route53
A Terraform module to create a Route53 Domain Name System (DNS) on Amazon Web Services (AWS). https://aws.amazon.com/route53/
Stars: ✭ 39 (+116.67%)
Mutual labels:  terraform-aws
hippo game live
Elixir & Phoenix LiveView game
Stars: ✭ 43 (+138.89%)
Mutual labels:  elixir-phoenix
autoform
🤖📝 AutoForm is the simplest way to automatically generate fast, beautiful and standards/WCAG compliant HTML forms based on an Ecto Schema in a Phoenix Web Application to *significantly* speed up Web App Development. 🚀
Stars: ✭ 18 (+0%)
Mutual labels:  elixir-phoenix
page object
Page Objects for Hound / Elixir
Stars: ✭ 19 (+5.56%)
Mutual labels:  elixir-phoenix
terraform-aws-account
🌳 A sustainable Terraform Package which creates Account & IAM resources on AWS
Stars: ✭ 18 (+0%)
Mutual labels:  terraform-aws
NLW-Together-Elixir
Wabanex - Gerencie e acompanhe seus treinos na academia! Evento NLW Together organizado pela @Rocketseat 🚀
Stars: ✭ 15 (-16.67%)
Mutual labels:  elixir-phoenix
terraform-tuesdays
Demo files for various Terraform Tuesday Examples
Stars: ✭ 211 (+1072.22%)
Mutual labels:  terraform-aws
terraform-aws-cognito-user-pool
A Terraform module to create and manage Cognito User Pools (Simple and Secure User Sign-Up, Sign-In, and Access Control) on Amazon Web Services (AWS). https://aws.amazon.com/cognito
Stars: ✭ 46 (+155.56%)
Mutual labels:  terraform-aws
terraform-aws-lambda-function
A Terraform module for deploying and managing Lambda functions on Amazon Web Services (AWS). https://aws.amazon.com/lambda/
Stars: ✭ 37 (+105.56%)
Mutual labels:  terraform-aws
estimator-elixir
Elixir side-project: Collaboratively estimate Jira stories (for remote teams)
Stars: ✭ 44 (+144.44%)
Mutual labels:  elixir-phoenix
audioslides.io
Use Amazon Polly, Google Slides and FFMpeg to create videos that can be updated at anytime by anyone. This project is written in Elixir.
Stars: ✭ 19 (+5.56%)
Mutual labels:  elixir-phoenix
igthorn
Cryptocurrency trading platform
Stars: ✭ 86 (+377.78%)
Mutual labels:  elixir-phoenix
suomi.dev
Like Hacker News, but for Finns!
Stars: ✭ 27 (+50%)
Mutual labels:  elixir-phoenix
cloud-tileserver
Serve mapbox vectortiles via AWS stack
Stars: ✭ 48 (+166.67%)
Mutual labels:  terraform-aws
pryin
PryIn is an Application Performance Monitoring platform for your Elixir/Phoenix application.
Stars: ✭ 25 (+38.89%)
Mutual labels:  elixir-phoenix
mindwendel
Create a challenge. Ready? Brainstorm. mindwendel helps you to easily brainstorm and upvote ideas and thoughts within your team.
Stars: ✭ 22 (+22.22%)
Mutual labels:  elixir-phoenix
terraform-aws-iam-user
A Terraform module to create and manage Identity and Access Management (IAM) Users on Amazon Web Services (AWS). https://aws.amazon.com/iam
Stars: ✭ 17 (-5.56%)
Mutual labels:  terraform-aws

Revista

Revista is a reference Elixir umbrella project deployed to AWS ECS with Docker and Terraform. It was originally created for demonstration purposes in two talks given by NewAperio:

  1. Internal lunch and learn on umbrella apps
  2. Big Elixir talk on deploying Elixir to AWS

Umbrella App

Nick to add

Docker

This repo contains a production-ready Docker container. It uses a multi-stage build to keep the final image as small as possible.

Building

To build the image, first, make sure you have Docker installed locally. Then run the following from the root of the repo:

docker build .

Terraform

This repo contains Terraform configuration to manage the resources that comprise the infrastructure on AWS necessary to run the app. It makes use of such resources as Route53, RDS, EC2, ECS and more.

File structure

The configuration is split across several Terraform modules. It follows the Gruntwork file layout. A directory structure with explanations is below.

infra
├── _base
├── global
│   ├── ecr
│   ├── iam
│   └── route53
└── prod
    ├── data-storage
    │   ├── auth
    │   └── cms
    ├── services
    │   └── web
    └── vpc
  • _base/ is a base Terraform module that holds defaults and can be duplicated to set up additional modules
  • global/ holds modules for resources that are not particular to any environment (including ECR, IAM, and Route53)
  • prod/ holds modules for production resources (the only environment in this example)
    • data-storage/ holds modules for any data storage resources, such as the two RDS databases we use here
    • services/ holds modules for any of the services in the environment, such as the single Elixir app on ECS
    • vpc/ holds configuration for the networking resources

Deploying

To deploy changes to the infrastructure, change into any of the module directories and run the Terraform commands.

terraform init  # if you haven't already
terraform plan  # to see changes Terraform will make
terraform apply # to execute changes

Best Practices

When writing Terraform configuration files, here are our recommended best practices.

  • Group similar infrastructure into separate folders
  • Use a combination of main.tf, variables.tf, and outputs.tf in every folder
  • Always include README.md in every folder
    • Include a section to document the inputs (variables) and outputs
  • Always include version declaration in the provider block (e.g. ~> 1.38)
  • Since Terraform is deterministic, try to keep lists alphabetized
  • Run terraform fmt after every change to ensure consistent formatting
  • Name resources using kebab-case (e.g. foo-bar)
    • Use snake_case when naming Terraform resource blocks to make it easy to reference later (e.g. foo_bar)
  • Tag resources appropriately for easier organization
    • Add at the very least a Name tag in the format {namespace}-{stage}-{name}-{extras}
    • Also consider adding an Env tag if the resource is for a particular environment, such as prod, stage, or qa
  • Use this as a name for resources when there's only one

Advanced Topics

The talk on deployment and infrastructure was limited by time. There are many more topics to explore. An excerpted list of other items you might need to explore to get a production-grade deployment of Elixir on AWS is presented below.

  • Cluster Elixir containers (e.g. to make use of distributed ETS)
  • Set up SSH forwarding to allow remote Observer sessions for debugging
  • Docker Compose for local orchestration of containers
  • Configure AWS short-lived tokens locally for secure CLI usage
  • Reuse containers to set up CI/CD pipelines
  • Use Terraform remote state module to allow seamless provisioning by multiple developers
  • Duplicate resources in AWS to set up multiple environments (staging, QA, etc)
  • Deploy additional infrastructure to secure your AWS resources (bastion instances, VPN, etc)
  • Set up Kubernetes for multi-service discovery and orchestration
  • Plus more!

License

Copyright (c) 2017 NewAperio, LLC. It is licensed under the terms in the LICENSE file.

About NewAperio

Revista is built by NewAperio, LLC.

NewAperio is a web and mobile design and development studio with offices in Baton Rouge, LA and Denver, CO.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].