SlideShare a Scribd company logo
Basic Dev Pipeline
End-to-End
Ezequiel Maraschio
> WHO?
▸ Ezequiel Maraschio > @emaraschio
▸ Software Developer > 10 years
▸ #sysarmy
▸ #nerdearla
HTTP://FSC.SYSAR.MY/
HTTPS://GITHUB.COM/
EMARASCHIO/
WORKSHOP-FULLSTACK-
CONF-2017
> PATH
▸ Create React App -> Client
▸ Ruby on Rails -> API
▸ Docker & docker-compose
▸ Terraform -> Provider AWS
> PATH
▸ Create React App -> Client
▸ Ruby on Rails -> API
▸ Docker & docker-compose
▸ Terraform -> Provider AWS
$ npm install -g create-react-app
$ create-react-app my-app
$ cd my-app/
$ npm start
CODE
> VENTAJAS DE REACT
▸ Simple de escribir y mantener
▸ Orientado a componentes
▸ Poder usarlo dentro de otros frameworks
> DESVENTAJAS DE REACT
▸ La curva de aprendizaje puede ser
grande
▸ Solo se encarga de la vista, necesitás libs
externas para el manejo de Ajax
▸ Algo volátil
> PATH
▸ Create React App -> Client
▸ Ruby on Rails -> API
▸ Docker & docker-compose
▸ Terraform -> Provider AWS
$ rails new --api notepad-api
CODE
> VENTAJAS DE RAILS
▸ Productividad
▸ Tooling
▸ Test
▸ Comunidad
> DESVENTAJAS DE RAILS
▸ Performance
▸ ORM -> Active record
> PATH
▸ Create React App -> Client
▸ Ruby on Rails -> API
▸ Docker & docker-compose
▸ Terraform -> Provider AWS
Docker permite crear (y correr
código en) contenedores
Virtualizan Hardware y
corren el SO entero
Virtualizan User Space
FROM node:6.10
RUN mkdir /app
WORKDIR /app
COPY package.json package.json
COPY . /app
RUN npm install
RUN PORT=4000 npm run build
EXPOSE 4000
CMD npm start
FROM ruby:2.3.3
RUN apt-get update -qq && apt-get install -y --no-
install-recommends build-essential libpq-dev
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
ADD Gemfile /usr/src/app/Gemfile
ADD Gemfile.lock /usr/src/app/Gemfile.lock
RUN bundle install --jobs 20 --retry 5
ADD . /usr/src/app
CMD rails s -b 0.0.0.0
EXPOSE 3000
$ docker build -t emaraschio/noteboard-api .
Sending build context to Docker daemon 109.1kB
Step 1/15 : FROM ruby:2.3.3
---> 0e1db669d557
(...)
Successfully built 385f71c63a97
Successfully tagged emaraschio/noteboard-
api:latest
$ docker run emaraschio/noteboard-api
=> Booting Puma
=> Rails 5.1.4 application starting in
development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.10.0 (ruby 2.3.3-p222), codename:
Russell's Teapot
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
DEMO
DOCKER HUB
$ docker tag api emaraschio/api:v1
$ docker push emaraschio/api:v1
version: '2'
services:
api:
build: noteboard-api
image: emaraschio/noteboard-api
volumes:
- ./noteboard-api:/usr/src/app
ports:
- "3000:3000"
client:
build: noteboard-client
image: emaraschio/noteboard-client
volumes:
- ./noteboard-client:/app
ports:
- "4000:4000"
environment:
- REACT_APP_API_URL=http://localhost:3000
DEMO
> VENTAJAS DE DOCKER
▸ Velocidad
▸ Documentación
▸ Simple de usar
▸ Containers públicos
> DESVENTAJAS DE DOCKER
▸ Storage
▸ Seguridad ~
▸ Monitoreo por default
> PATH
▸ Create React App -> Client
▸ Ruby on Rails -> API
▸ Docker & docker-compose
▸ Terraform -> Provider AWS
Terraform nos permite manejar
infraestructura como código
# Configure the AWS Provider
provider "aws" {
region = "us-east-1"
}
# Create an EC2 instance
resource "aws_instance" "example_fullstack_conf" {
# AMI ID for Amazon Linux AMI 2017.09.1 (HVM)
ami = "ami-55ef662f"
instance_type = "t2.micro" # Free Tier
}
$ terraform plan
Resource actions are indicated with the following
symbols:
+ create
Terraform will perform the following actions:
+ aws_instance.example_fullstack_conf
ami: <computed>
Plan: 1 to add, 0 to change, 0 to destroy.
$ terraform apply
aws_instance.example_fullstack_conf: Creating...
ami: "" => "ami-55ef662f"
aws_instance.example_fullstack_conf: Creation
complete after 28s (ID: i-01fca7a21257cec04)
Apply complete! Resources: 1 added, 0 changed, 0
destroyed.
# Configure the AWS Provider
provider "aws" {
region = "us-east-1"
}
# Create an EC2 instance
resource "aws_instance" "example_fullstack_conf" {
# AMI ID for Amazon Linux AMI 2017.09.1 (HVM)
ami = "ami-55ef662f"
instance_type = "t2.micro" # Free Tier
tags {
Name = "terraform-demo-fullstack-conf"
}
}
$ terraform plan
Resource actions are indicated with the following
symbols:
~ update in-place
Terraform will perform the following actions:
~ aws_instance.example_fullstack_conf
tags.%: "0" => "1"
tags.Name: "" => "terraform-demo-fullstack-conf"
Plan: 0 to add, 1 to change, 0 to destroy.
$ terraform apply
aws_instance.example_fullstack_conf: Refreshing
state... (ID: i-01f7cec04)
aws_instance.example_fullstack_conf: Modifying...
(ID: i-01f7cec04)
tags.%: "0" => "1"
tags.Name: "" => "terraform-demo-fullstack-conf"
aws_instance.example_fullstack_conf:
Modifications complete after 6s (ID: i-01f7cec04)
Apply complete! Resources: 0 added, 1 changed, 0
destroyed.
$ terraform destroy
An execution plan has been generated and is shown
below.
Resource actions are indicated with the following
symbols:
- destroy
Terraform will perform the following actions:
- aws_instance.example_fullstack_conf
Plan: 0 to add, 0 to change, 1 to destroy.
aws_instance.example_fullstack_conf: Destruction
complete after 55s
Destroy complete! Resources: 1 destroyed.
DEMO
> VENTAJAS DE TERRAFORM
▸ Muy buenas abstracciones
▸ Soporta todos los Cloud Providers del
mercado
▸ Simple y de buenas prácticas
> DESVENTAJAS DE TERRAFORM
▸ Cuidado con los state files!
▸ Constante cambio
▸ Refactor
Elastic Container service (ECS) es una
manera de correr Docker en AWS
ECS Overview
EC2 Instance
ECS Cluster
ECS Scheduler
ECS Agent
ECS Tasks
ECS Task Definition
{
"cluster": "example",
"serviceName": ”foo",
"taskDefinition": "",
"desiredCount": 2
}
ECS Service Definition
{
"name": "example",
"image": "foo/example",
"cpu": 1024,
"memory": 2048,
"essential": true,
}
several servers
ECS
EC2 Instance
ECS Cluster
ECS Cluster: Instancias manejadas
por el ECS
Each server must run the ECS
Agent
ECS Agent
EC2 Instance
ECS Cluster
ECS Agent: Permite ejecutar tareas
ECS Service: long-running ECS
Task & ELB settings
{
"name": "example",
"image": "foo/example",
"cpu": 1024,
"memory": 2048,
"essential": true,
}
{
"cluster": "example",
"serviceName": ”foo",
"taskDefinition": "",
"desiredCount": 2
}
ECS Agent
EC2 Instance
ECS Task Definition ECS Service Definition
ECS Cluster
ECS Task: Containers a montar
con los recursos necesarios
ECS Service: Controla y mantiene
las instancias de una tarea específica
ECS Scheduler: Deploys Tasks
across the ECS Cluster
{
"name": "example",
"image": "foo/example",
"cpu": 1024,
"memory": 2048,
"essential": true,
}
{
"cluster": "example",
"serviceName": ”foo",
"taskDefinition": "",
"desiredCount": 2
}
ECS Agent
ECS Tasks
EC2 Instance
ECS Task Definition ECS Service Definition ECS Scheduler
ECS Cluster
ECS Scheduler: Se encarga del
deploy de las tareas en el cluster
resource "aws_ecs_cluster" "example_cluster" {
name = "example-cluster"
}
resource "aws_autoscaling_group" "ecs_cluster_instances" {
name = "example-cluster-instances"
min_size = 4
max_size = 4
launch_configuration =
"${aws_launch_configuration.ecs_instance.name}"
}
Creando el cluster…
Creando la tarea…
resource "aws_ecs_task_definition" "noteboard_api"{
family = "noteboard-api"
container_definitions = <<EOF
[{
"name": "noteboard-api",
"image": "emaraschio/noteboard-api",
"cpu": 1024,
"memory": 768,
"portMappings": [{"containerPort": 3000,"hostPort": 3000}]
}]
EOF
}
Creando el Load Balancer…
resource "aws_elb" "noteboard_api" {
name = "noteboard_api"
listener {
instance_port = "3000"
instance_protocol = "http"
lb_port = "3000"
lb_protocol = "http"
}
}
Creando el servicio…
resource "aws_ecs_service" "noteboard_api" {
name = "noteboard-api"
cluster = "${aws_ecs_cluster.example_cluster.id}"
task_definition = "${aws_ecs_task_definition.noteboard_api.arn}"
desired_count = 1
load_balancer {
elb_name = "${aws_elb.noteboard_api.id}"
container_name = "noteboard-api"
container_port = 3000
}
}
CODE & DEMO
> VENTAJAS DE ECS
▸ No tiene costo extra
▸ Integra con los load-balancers
▸ Es de los cluster managers más simples
▸ Tiene auto-scaling
▸ Mucho por crecer con Kubernetes!
> DESVENTAJAS DE ECS
▸ El monitoreo es mínimo
▸ No tiene service discovery
▸ Cantidad de permisos de configuración
> PATH
▸ Create React App -> Client
▸ Ruby on Rails -> API
▸ Docker & docker-compose
▸ Terraform -> Provider AWS
¿PREGUNTAS?
> MUCHAS GRACIAS
https://sysarmy.com.ar/
http://maraschio.com/
HTTP://FSC.SYSAR.MY/

More Related Content

What's hot

How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
Willian Molinari
 
Fabric Python Lib
Fabric Python LibFabric Python Lib
Fabric Python Lib
Simone Federici
 
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)
Stephane Jourdan
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipeline
Anton Babenko
 
Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)
Martin Schütte
 
Test driven infrastructure
Test driven infrastructureTest driven infrastructure
Test driven infrastructure
Skills Matter Talks
 
Hashiconf EU 2019 - A Tour of Terraform 0.12
Hashiconf EU 2019 - A Tour of Terraform 0.12Hashiconf EU 2019 - A Tour of Terraform 0.12
Hashiconf EU 2019 - A Tour of Terraform 0.12
Mitchell Pronschinske
 
Rapid Infrastructure Provisioning
Rapid Infrastructure ProvisioningRapid Infrastructure Provisioning
Rapid Infrastructure Provisioning
Uchit Vyas ☁
 
Workshop Infrastructure as Code - Suestra
Workshop Infrastructure as Code - SuestraWorkshop Infrastructure as Code - Suestra
Workshop Infrastructure as Code - Suestra
Mario IC
 
DevOps with Fabric
DevOps with FabricDevOps with Fabric
DevOps with Fabric
Simone Federici
 
Terraform day02
Terraform day02Terraform day02
Terraform day02
Gourav Varma
 
Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suite
Bram Vogelaar
 
Everything as Code with Terraform
Everything as Code with TerraformEverything as Code with Terraform
Everything as Code with Terraform
All Things Open
 
Deployment with Fabric
Deployment with FabricDeployment with Fabric
Deployment with Fabric
andymccurdy
 
Terraform Immutablish Infrastructure with Consul-Template
Terraform Immutablish Infrastructure with Consul-TemplateTerraform Immutablish Infrastructure with Consul-Template
Terraform Immutablish Infrastructure with Consul-Template
Zane Williamson
 
Observability with Consul Connect
Observability with Consul ConnectObservability with Consul Connect
Observability with Consul Connect
Bram Vogelaar
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStack
Bram Vogelaar
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
tomcopeland
 
Refactoring Infrastructure Code
Refactoring Infrastructure CodeRefactoring Infrastructure Code
Refactoring Infrastructure Code
Nell Shamrell-Harrington
 
Terraform Abstractions for Safety and Power
Terraform Abstractions for Safety and PowerTerraform Abstractions for Safety and Power
Terraform Abstractions for Safety and Power
Calvin French-Owen
 

What's hot (20)

How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
 
Fabric Python Lib
Fabric Python LibFabric Python Lib
Fabric Python Lib
 
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)
Using Terraform.io (Human Talks Montpellier, Epitech, 2014/09/09)
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipeline
 
Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)
 
Test driven infrastructure
Test driven infrastructureTest driven infrastructure
Test driven infrastructure
 
Hashiconf EU 2019 - A Tour of Terraform 0.12
Hashiconf EU 2019 - A Tour of Terraform 0.12Hashiconf EU 2019 - A Tour of Terraform 0.12
Hashiconf EU 2019 - A Tour of Terraform 0.12
 
Rapid Infrastructure Provisioning
Rapid Infrastructure ProvisioningRapid Infrastructure Provisioning
Rapid Infrastructure Provisioning
 
Workshop Infrastructure as Code - Suestra
Workshop Infrastructure as Code - SuestraWorkshop Infrastructure as Code - Suestra
Workshop Infrastructure as Code - Suestra
 
DevOps with Fabric
DevOps with FabricDevOps with Fabric
DevOps with Fabric
 
Terraform day02
Terraform day02Terraform day02
Terraform day02
 
Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suite
 
Everything as Code with Terraform
Everything as Code with TerraformEverything as Code with Terraform
Everything as Code with Terraform
 
Deployment with Fabric
Deployment with FabricDeployment with Fabric
Deployment with Fabric
 
Terraform Immutablish Infrastructure with Consul-Template
Terraform Immutablish Infrastructure with Consul-TemplateTerraform Immutablish Infrastructure with Consul-Template
Terraform Immutablish Infrastructure with Consul-Template
 
Observability with Consul Connect
Observability with Consul ConnectObservability with Consul Connect
Observability with Consul Connect
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStack
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
Refactoring Infrastructure Code
Refactoring Infrastructure CodeRefactoring Infrastructure Code
Refactoring Infrastructure Code
 
Terraform Abstractions for Safety and Power
Terraform Abstractions for Safety and PowerTerraform Abstractions for Safety and Power
Terraform Abstractions for Safety and Power
 

Similar to Fullstack conf 2017 - Basic dev pipeline end-to-end

An intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSAn intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECS
Yevgeniy Brikman
 
Amazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionAmazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to production
Paolo latella
 
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Amazon Web Services
 
Monitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesMonitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar Series
Amazon Web Services
 
Cutting through the fog of cloud
Cutting through the fog of cloudCutting through the fog of cloud
Cutting through the fog of cloud
Kyle Rames
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
Ben Hall
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
PROIDEA
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker
Daniel Ku
 
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Big Data Spain
 
What Is AWS Elastic Kubernetes Service
 What Is AWS Elastic Kubernetes Service What Is AWS Elastic Kubernetes Service
What Is AWS Elastic Kubernetes Service
AMELIAOLIVIA2
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
Docker, Inc.
 
Microservices blue-green-deployment-with-docker
Microservices blue-green-deployment-with-dockerMicroservices blue-green-deployment-with-docker
Microservices blue-green-deployment-with-docker
Kidong Lee
 
TIAD 2016 : Migrating 100% of your production services to containers
TIAD 2016 : Migrating 100% of your production services to containersTIAD 2016 : Migrating 100% of your production services to containers
TIAD 2016 : Migrating 100% of your production services to containers
The Incredible Automation Day
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
Simon Su
 
Workshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure DetectionWorkshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure Detection
Vincent Composieux
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
Lindsay Holmwood
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
Ben Hall
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
Chris Bailey
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
Docker, Inc.
 

Similar to Fullstack conf 2017 - Basic dev pipeline end-to-end (20)

An intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSAn intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECS
 
Amazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionAmazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to production
 
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
 
Monitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesMonitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar Series
 
Cutting through the fog of cloud
Cutting through the fog of cloudCutting through the fog of cloud
Cutting through the fog of cloud
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker
 
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
 
What Is AWS Elastic Kubernetes Service
 What Is AWS Elastic Kubernetes Service What Is AWS Elastic Kubernetes Service
What Is AWS Elastic Kubernetes Service
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 
Microservices blue-green-deployment-with-docker
Microservices blue-green-deployment-with-dockerMicroservices blue-green-deployment-with-docker
Microservices blue-green-deployment-with-docker
 
TIAD 2016 : Migrating 100% of your production services to containers
TIAD 2016 : Migrating 100% of your production services to containersTIAD 2016 : Migrating 100% of your production services to containers
TIAD 2016 : Migrating 100% of your production services to containers
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
 
Workshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure DetectionWorkshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure Detection
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
 

More from Ezequiel Maraschio

Entendiendo a nuestro navegador web
Entendiendo a nuestro navegador webEntendiendo a nuestro navegador web
Entendiendo a nuestro navegador web
Ezequiel Maraschio
 
Hablemos de productividad
Hablemos de productividadHablemos de productividad
Hablemos de productividad
Ezequiel Maraschio
 
#Sysarmy meetup 2.1 // to-do lists - arma de doble filo
#Sysarmy meetup 2.1 // to-do lists - arma de doble filo#Sysarmy meetup 2.1 // to-do lists - arma de doble filo
#Sysarmy meetup 2.1 // to-do lists - arma de doble filo
Ezequiel Maraschio
 
Golang Arg / CABA Meetup #5 - go-carbon
Golang Arg / CABA Meetup #5 - go-carbonGolang Arg / CABA Meetup #5 - go-carbon
Golang Arg / CABA Meetup #5 - go-carbon
Ezequiel Maraschio
 
Antipatrones en la ingeniería de software
Antipatrones en la ingeniería de softwareAntipatrones en la ingeniería de software
Antipatrones en la ingeniería de software
Ezequiel Maraschio
 
Como funciona tu navegador web
Como funciona tu navegador webComo funciona tu navegador web
Como funciona tu navegador web
Ezequiel Maraschio
 
Pasan cosas, cosas pasan
Pasan cosas, cosas pasanPasan cosas, cosas pasan
Pasan cosas, cosas pasan
Ezequiel Maraschio
 
Scrum inception
Scrum inceptionScrum inception
Scrum inception
Ezequiel Maraschio
 
Web Development introduction
Web Development introductionWeb Development introduction
Web Development introduction
Ezequiel Maraschio
 
Go lang - What is that thing?
Go lang - What is that thing?Go lang - What is that thing?
Go lang - What is that thing?
Ezequiel Maraschio
 

More from Ezequiel Maraschio (10)

Entendiendo a nuestro navegador web
Entendiendo a nuestro navegador webEntendiendo a nuestro navegador web
Entendiendo a nuestro navegador web
 
Hablemos de productividad
Hablemos de productividadHablemos de productividad
Hablemos de productividad
 
#Sysarmy meetup 2.1 // to-do lists - arma de doble filo
#Sysarmy meetup 2.1 // to-do lists - arma de doble filo#Sysarmy meetup 2.1 // to-do lists - arma de doble filo
#Sysarmy meetup 2.1 // to-do lists - arma de doble filo
 
Golang Arg / CABA Meetup #5 - go-carbon
Golang Arg / CABA Meetup #5 - go-carbonGolang Arg / CABA Meetup #5 - go-carbon
Golang Arg / CABA Meetup #5 - go-carbon
 
Antipatrones en la ingeniería de software
Antipatrones en la ingeniería de softwareAntipatrones en la ingeniería de software
Antipatrones en la ingeniería de software
 
Como funciona tu navegador web
Como funciona tu navegador webComo funciona tu navegador web
Como funciona tu navegador web
 
Pasan cosas, cosas pasan
Pasan cosas, cosas pasanPasan cosas, cosas pasan
Pasan cosas, cosas pasan
 
Scrum inception
Scrum inceptionScrum inception
Scrum inception
 
Web Development introduction
Web Development introductionWeb Development introduction
Web Development introduction
 
Go lang - What is that thing?
Go lang - What is that thing?Go lang - What is that thing?
Go lang - What is that thing?
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

Fullstack conf 2017 - Basic dev pipeline end-to-end

  • 2. > WHO? ▸ Ezequiel Maraschio > @emaraschio ▸ Software Developer > 10 years ▸ #sysarmy ▸ #nerdearla
  • 3.
  • 5.
  • 6.
  • 7.
  • 8.
  • 10. > PATH ▸ Create React App -> Client ▸ Ruby on Rails -> API ▸ Docker & docker-compose ▸ Terraform -> Provider AWS
  • 11.
  • 12. > PATH ▸ Create React App -> Client ▸ Ruby on Rails -> API ▸ Docker & docker-compose ▸ Terraform -> Provider AWS
  • 13.
  • 14. $ npm install -g create-react-app $ create-react-app my-app $ cd my-app/ $ npm start
  • 15. CODE
  • 16. > VENTAJAS DE REACT ▸ Simple de escribir y mantener ▸ Orientado a componentes ▸ Poder usarlo dentro de otros frameworks
  • 17. > DESVENTAJAS DE REACT ▸ La curva de aprendizaje puede ser grande ▸ Solo se encarga de la vista, necesitás libs externas para el manejo de Ajax ▸ Algo volátil
  • 18. > PATH ▸ Create React App -> Client ▸ Ruby on Rails -> API ▸ Docker & docker-compose ▸ Terraform -> Provider AWS
  • 19.
  • 20. $ rails new --api notepad-api
  • 21. CODE
  • 22. > VENTAJAS DE RAILS ▸ Productividad ▸ Tooling ▸ Test ▸ Comunidad
  • 23. > DESVENTAJAS DE RAILS ▸ Performance ▸ ORM -> Active record
  • 24. > PATH ▸ Create React App -> Client ▸ Ruby on Rails -> API ▸ Docker & docker-compose ▸ Terraform -> Provider AWS
  • 25.
  • 26. Docker permite crear (y correr código en) contenedores
  • 27. Virtualizan Hardware y corren el SO entero Virtualizan User Space
  • 28. FROM node:6.10 RUN mkdir /app WORKDIR /app COPY package.json package.json COPY . /app RUN npm install RUN PORT=4000 npm run build EXPOSE 4000 CMD npm start
  • 29. FROM ruby:2.3.3 RUN apt-get update -qq && apt-get install -y --no- install-recommends build-essential libpq-dev RUN mkdir /usr/src/app WORKDIR /usr/src/app ADD Gemfile /usr/src/app/Gemfile ADD Gemfile.lock /usr/src/app/Gemfile.lock RUN bundle install --jobs 20 --retry 5 ADD . /usr/src/app CMD rails s -b 0.0.0.0 EXPOSE 3000
  • 30. $ docker build -t emaraschio/noteboard-api . Sending build context to Docker daemon 109.1kB Step 1/15 : FROM ruby:2.3.3 ---> 0e1db669d557 (...) Successfully built 385f71c63a97 Successfully tagged emaraschio/noteboard- api:latest
  • 31. $ docker run emaraschio/noteboard-api => Booting Puma => Rails 5.1.4 application starting in development => Run `rails server -h` for more startup options Puma starting in single mode... * Version 3.10.0 (ruby 2.3.3-p222), codename: Russell's Teapot * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://0.0.0.0:3000 Use Ctrl-C to stop
  • 32. DEMO
  • 34. $ docker tag api emaraschio/api:v1 $ docker push emaraschio/api:v1
  • 35.
  • 36. version: '2' services: api: build: noteboard-api image: emaraschio/noteboard-api volumes: - ./noteboard-api:/usr/src/app ports: - "3000:3000" client: build: noteboard-client image: emaraschio/noteboard-client volumes: - ./noteboard-client:/app ports: - "4000:4000" environment: - REACT_APP_API_URL=http://localhost:3000
  • 37. DEMO
  • 38. > VENTAJAS DE DOCKER ▸ Velocidad ▸ Documentación ▸ Simple de usar ▸ Containers públicos
  • 39. > DESVENTAJAS DE DOCKER ▸ Storage ▸ Seguridad ~ ▸ Monitoreo por default
  • 40. > PATH ▸ Create React App -> Client ▸ Ruby on Rails -> API ▸ Docker & docker-compose ▸ Terraform -> Provider AWS
  • 41.
  • 42. Terraform nos permite manejar infraestructura como código
  • 43.
  • 44.
  • 45.
  • 46. # Configure the AWS Provider provider "aws" { region = "us-east-1" } # Create an EC2 instance resource "aws_instance" "example_fullstack_conf" { # AMI ID for Amazon Linux AMI 2017.09.1 (HVM) ami = "ami-55ef662f" instance_type = "t2.micro" # Free Tier }
  • 47. $ terraform plan Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: + aws_instance.example_fullstack_conf ami: <computed> Plan: 1 to add, 0 to change, 0 to destroy.
  • 48. $ terraform apply aws_instance.example_fullstack_conf: Creating... ami: "" => "ami-55ef662f" aws_instance.example_fullstack_conf: Creation complete after 28s (ID: i-01fca7a21257cec04) Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
  • 49.
  • 50. # Configure the AWS Provider provider "aws" { region = "us-east-1" } # Create an EC2 instance resource "aws_instance" "example_fullstack_conf" { # AMI ID for Amazon Linux AMI 2017.09.1 (HVM) ami = "ami-55ef662f" instance_type = "t2.micro" # Free Tier tags { Name = "terraform-demo-fullstack-conf" } }
  • 51. $ terraform plan Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: ~ aws_instance.example_fullstack_conf tags.%: "0" => "1" tags.Name: "" => "terraform-demo-fullstack-conf" Plan: 0 to add, 1 to change, 0 to destroy.
  • 52. $ terraform apply aws_instance.example_fullstack_conf: Refreshing state... (ID: i-01f7cec04) aws_instance.example_fullstack_conf: Modifying... (ID: i-01f7cec04) tags.%: "0" => "1" tags.Name: "" => "terraform-demo-fullstack-conf" aws_instance.example_fullstack_conf: Modifications complete after 6s (ID: i-01f7cec04) Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
  • 53.
  • 54. $ terraform destroy An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: - destroy Terraform will perform the following actions: - aws_instance.example_fullstack_conf Plan: 0 to add, 0 to change, 1 to destroy. aws_instance.example_fullstack_conf: Destruction complete after 55s Destroy complete! Resources: 1 destroyed.
  • 55.
  • 56. DEMO
  • 57. > VENTAJAS DE TERRAFORM ▸ Muy buenas abstracciones ▸ Soporta todos los Cloud Providers del mercado ▸ Simple y de buenas prácticas
  • 58. > DESVENTAJAS DE TERRAFORM ▸ Cuidado con los state files! ▸ Constante cambio ▸ Refactor
  • 59.
  • 60. Elastic Container service (ECS) es una manera de correr Docker en AWS
  • 61.
  • 62. ECS Overview EC2 Instance ECS Cluster ECS Scheduler ECS Agent ECS Tasks ECS Task Definition { "cluster": "example", "serviceName": ”foo", "taskDefinition": "", "desiredCount": 2 } ECS Service Definition { "name": "example", "image": "foo/example", "cpu": 1024, "memory": 2048, "essential": true, }
  • 63. several servers ECS EC2 Instance ECS Cluster ECS Cluster: Instancias manejadas por el ECS Each server must run the ECS Agent ECS Agent EC2 Instance ECS Cluster ECS Agent: Permite ejecutar tareas
  • 64. ECS Service: long-running ECS Task & ELB settings { "name": "example", "image": "foo/example", "cpu": 1024, "memory": 2048, "essential": true, } { "cluster": "example", "serviceName": ”foo", "taskDefinition": "", "desiredCount": 2 } ECS Agent EC2 Instance ECS Task Definition ECS Service Definition ECS Cluster ECS Task: Containers a montar con los recursos necesarios ECS Service: Controla y mantiene las instancias de una tarea específica
  • 65. ECS Scheduler: Deploys Tasks across the ECS Cluster { "name": "example", "image": "foo/example", "cpu": 1024, "memory": 2048, "essential": true, } { "cluster": "example", "serviceName": ”foo", "taskDefinition": "", "desiredCount": 2 } ECS Agent ECS Tasks EC2 Instance ECS Task Definition ECS Service Definition ECS Scheduler ECS Cluster ECS Scheduler: Se encarga del deploy de las tareas en el cluster
  • 66. resource "aws_ecs_cluster" "example_cluster" { name = "example-cluster" } resource "aws_autoscaling_group" "ecs_cluster_instances" { name = "example-cluster-instances" min_size = 4 max_size = 4 launch_configuration = "${aws_launch_configuration.ecs_instance.name}" } Creando el cluster…
  • 67. Creando la tarea… resource "aws_ecs_task_definition" "noteboard_api"{ family = "noteboard-api" container_definitions = <<EOF [{ "name": "noteboard-api", "image": "emaraschio/noteboard-api", "cpu": 1024, "memory": 768, "portMappings": [{"containerPort": 3000,"hostPort": 3000}] }] EOF }
  • 68. Creando el Load Balancer… resource "aws_elb" "noteboard_api" { name = "noteboard_api" listener { instance_port = "3000" instance_protocol = "http" lb_port = "3000" lb_protocol = "http" } }
  • 69. Creando el servicio… resource "aws_ecs_service" "noteboard_api" { name = "noteboard-api" cluster = "${aws_ecs_cluster.example_cluster.id}" task_definition = "${aws_ecs_task_definition.noteboard_api.arn}" desired_count = 1 load_balancer { elb_name = "${aws_elb.noteboard_api.id}" container_name = "noteboard-api" container_port = 3000 } }
  • 71. > VENTAJAS DE ECS ▸ No tiene costo extra ▸ Integra con los load-balancers ▸ Es de los cluster managers más simples ▸ Tiene auto-scaling ▸ Mucho por crecer con Kubernetes!
  • 72. > DESVENTAJAS DE ECS ▸ El monitoreo es mínimo ▸ No tiene service discovery ▸ Cantidad de permisos de configuración
  • 73. > PATH ▸ Create React App -> Client ▸ Ruby on Rails -> API ▸ Docker & docker-compose ▸ Terraform -> Provider AWS