Upload
melidevelopers
View
148
Download
0
Embed Size (px)
Citation preview
Nov 2016
First 90Docker + Cloud
This is our visionBuilding the foundation to Build a 3B Company by FY20
Variedad de tecnologías
This is our visionBuilding the foundation to Build a 3B Company by FY20
Variedad de tecnologías
+
This is our visionBuilding the foundation to Build a 3B Company by FY20
Variedad de tecnologías
+ +
This is our visionBuilding the foundation to Build a 3B Company by FY20
Una sola tecnología
“Docker es una forma de ejecutar procesos de
forma aislada, por medio de la generación de
containers.”
Demo
This is our visionBuilding the foundation to Build a 3B Company by FY20
Dockerfile
FROM golang:1.6-onbuild
This is our visionBuilding the foundation to Build a 3B Company by FY20
Preparar y ejecutar la aplicación
docker build -t myapp .
docker run -p 8080:8080 myapp
This is our visionBuilding the foundation to Build a 3B Company by FY20
Docker Compose
+
Demo
This is our visionBuilding the foundation to Build a 3B Company by FY20
docker-compose.ymlapp:
build: .ports:- “8080:8080”volumes:- .:/go/src/app
postgres:image: postgres:latestenvironment:- POSTGRES_USER=test- POSTGRES_PASSWORD=test
This is our visionBuilding the foundation to Build a 3B Company by FY20
Ejecutar la aplicación y servicios
docker-compose build
docker-compose up -d
This is our visionBuilding the foundation to Build a 3B Company by FY20
Publicar la imagen de la aplicación
https://hub.docker.com/
docker login -u USER -p PASSWORD
docker push USER/myapp
This is our visionBuilding the foundation to Build a 3B Company by FY20
Ventajas de Docker en Desarrollo
+ Simplificar el setup del entorno.
+ Generar nuevos ambientes.
+ Documentar dependencias
externas.
+ Simular Producción localmente.
This is our visionBuilding the foundation to Build a 3B Company by FY20
Cloud
+
This is our visionBuilding the foundation to Build a 3B Company by FY20
VPC 10.0.0.0/16
Componentes en AWS
This is our visionBuilding the foundation to Build a 3B Company by FY20
us-east-
1a
VPC 10.0.0.0/16
Subnet10.0.0.0/24
Componentes en AWS
This is our visionBuilding the foundation to Build a 3B Company by FY20
us-east-
1a
VPC 10.0.0.0/16
Subnet10.0.0.0/24
Router
Componentes en AWS
This is our visionBuilding the foundation to Build a 3B Company by FY20
us-east-
1a
VPC 10.0.0.0/16
Subnet10.0.0.0/24
Router Internet
Gateway
Componentes en AWS
This is our visionBuilding the foundation to Build a 3B Company by FY20
us-east-
1a
VPC 10.0.0.0/16
Subnet10.0.0.0/24
Router Internet
Gateway
Componentes en AWS
ACL
This is our visionBuilding the foundation to Build a 3B Company by FY20
us-east-
1aus-east-
1bus-east-
1cus-east-
1d
VPC 10.0.0.0/16
Subnet10.0.0.0/24
Componentes en AWS
Subnet10.1.0.0/24
Subnet10.2.0.0/24
Subnet10.3.0.0/24
This is our visionBuilding the foundation to Build a 3B Company by FY20
VPC 10.0.0.0/16
Componentes en AWS
Elastic Load Balancer
This is our visionBuilding the foundation to Build a 3B Company by FY20
VPC 10.0.0.0/16
Componentes en AWS
Elastic Load Balancer
Instancia
Instancia
Instancia
Instancia
This is our visionBuilding the foundation to Build a 3B Company by FY20
VPC 10.0.0.0/16
Componentes en AWS
Elastic Load Balancer
Auto Scaling Group
Instancia
Instancia
Instancia
Instancia
This is our visionBuilding the foundation to Build a 3B Company by FY20
VPC 10.0.0.0/16
Componentes en AWS
Elastic Load Balancer
Auto Scaling Group
Instancia
Instancia
Instancia
Instancia
Security Group
This is our visionBuilding the foundation to Build a 3B Company by FY20
CloudFormation
“Ofrece un método sencillo de crear una colección de recursos de AWS relacionados
entre sí para ofrecerlos de una manera
ordenada y predecible.”
This is our visionBuilding the foundation to Build a 3B Company by FY20
template.json{
“Parameters”: { ... },
”Resources”: { ... },
”Outputs”: { ... }}
This is our visionBuilding the foundation to Build a 3B Company by FY20
template.json{
“Parameters”: {“CustomCird”: {
“Type”: “String”,“Description”: “Rango de ips de la VPC”
}},
”Resources”: { ... },”Outputs”: { ... }
}
This is our visionBuilding the foundation to Build a 3B Company by FY20
template.json{
“Parameters”: { ... },”Resources”: {
“MyVpc”: {“Type”: “AWS::EC2::VPC”,“Parameters”: {
“CidrBlock”: { “Ref”: “CustomCird”}}
}},
”Outputs”: { ... }}
This is our visionBuilding the foundation to Build a 3B Company by FY20
template.json{
“Parameters”: { ... },”Resources”: { ... },”Outputs”: {
“VpcID”: {“Value”: { “Ref”: “MyVpc” }
}}
}
This is our visionBuilding the foundation to Build a 3B Company by FY20
Crear un Stack
aws cloudformation create-stack--stack-name myApp--template-body
file://path/template.json--parameters CustomCidr=10.0.0.0/24
Demo
This is our visionBuilding the foundation to Build a 3B Company by FY20
Otras opciones
+ Elastic Beanstalk
+ ECS Container Service
Muchasgracias