Giter Club home page Giter Club logo

ecs-pipeline's Introduction

ECS Simple Pipeline - Easy way to deploy Containers on AWS

Create environment and deployment pipelines using ECS, ECR, CodePipeline and Git with Terraform

Check this repo if you need to ship more services to production - ECS Microservices Orchestration

Architecture

Arch

Deploy Pipeline

Steps

How to Deploy

Edit your preferences

Edit variables.tf file to customize application preferences like Github account, repo and owner, Load Balancer ports and cluster preferences.

# Customize the Cluster Name
variable "cluster_name" {
  description = "ECS Cluster Name"
  default     = "web-app"
}

# Customize your ECR Registry Name
variable "app_repository_name" {
  description = "ECR Repository Name"
  default     = "web-app"
}

###### APPLICATION OPTIONS  ######
variable "container_name" {
  description = "Container app name"
  default     = "micro-api"
}

Edit the Github preferences in the same file to specify infos like repo, owner or organization, branches e etc.

# Github Repository Owner
variable "git_repository_owner" {
  description = "Github Repository Owner"
  default     = "msfidelis"
}

# Github Repository Project Name
variable "git_repository_name" {
  description = "Project name on Github"
  default     = "micro-api"
}

# Default Branch
variable "git_repository_branch" {
  description = "Github Project Branch"
  default     = "master"
}

Edit Auto Scaling Metrics

# Number of containers
variable "desired_tasks" {
  description = "Number of containers desired to run app task"
  default     = 2
}

variable "min_tasks" {
  description = "Minimum"
  default     = 2
}

variable "max_tasks" {
  description = "Maximum"
  default     = 4
}

variable "cpu_to_scale_up" {
  description = "CPU % to Scale Up the number of containers"
  default     = 80
}

variable "cpu_to_scale_down" {
  description = "CPU % to Scale Down the number of containers"
  default     = 30
}

Edit your Build steps

This demo build, dockerize and deploy a simple Node.JS application. Customize your build steps on modules/pipeline/templates/buildspec.yml file.

How to Deploy

1) Github Access Token

export GITHUB_TOKEN=YOUR_TOKEN

2) Terraform

  • Initialize Terraform
terraform init
  • Plan our modifications
terraform plan
  • Apply the changes on AWS
terraform apply

References

ecs-pipeline's People

Contributors

msfidelis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ecs-pipeline's Issues

bitbucket como source

Fala cara acho teu trabalho sensacional, queria ver como vc se tu me ajuda a dar suporte para o bitbucket como source, achei algumas paradas mas nada muito conclusivo.
tipo isso
cloudtools/troposphere#951

mas nao achei uma forma de colocar OAUTH ou alguma variavel com algum token pro meu repositorio privado

Achei ateh essa parada mas parece que precisa do meu usuario e senha
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-access-tokens.html

acho que é um beco sem saida
hashicorp/terraform-provider-aws#7025

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.