2. This is our vision
Building the foundation to Build a 3B Company by FY20
Variedad de tecnologías
3. This is our vision
Building the foundation to Build a 3B Company by FY20
Variedad de tecnologías
+
4. This is our vision
Building the foundation to Build a 3B Company by FY20
Variedad de tecnologías
+ +
5. This is our vision
Building 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.”
7. This is our vision
Building the foundation to Build a 3B Company by FY20
Dockerfile
FROM golang:1.6-onbuild
8. This is our vision
Building 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
9. This is our vision
Building the foundation to Build a 3B Company by FY20
Docker Compose
+
11. This is our vision
Building the foundation to Build a 3B Company by FY20
docker-compose.yml
app:
build: .
ports:
- “8080:8080”
volumes:
- .:/go/src/app
postgres:
image: postgres:latest
environment:
- POSTGRES_USER=test
- POSTGRES_PASSWORD=test
12. This is our vision
Building the foundation to Build a 3B Company by FY20
Ejecutar la aplicación y servicios
docker-compose build
docker-compose up -d
13. This is our vision
Building 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
14. This is our vision
Building 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.
15. This is our vision
Building the foundation to Build a 3B Company by FY20
Cloud
+
16. This is our vision
Building the foundation to Build a 3B Company by FY20
VPC 10.0.0.0/16
Componentes en AWS
17. This is our vision
Building the foundation to Build a 3B Company by FY20
us-east-1a
VPC 10.0.0.0/16
Subnet
10.0.0.0/24
Componentes en AWS
18. This is our vision
Building the foundation to Build a 3B Company by FY20
us-east-1a
VPC 10.0.0.0/16
Subnet
10.0.0.0/24
Router
Componentes en AWS
19. This is our vision
Building the foundation to Build a 3B Company by FY20
us-east-1a
VPC 10.0.0.0/16
Subnet
10.0.0.0/24
Router Internet
Gateway
Componentes en AWS
20. This is our vision
Building the foundation to Build a 3B Company by FY20
us-east-1a
VPC 10.0.0.0/16
Subnet
10.0.0.0/24
Router Internet
Gateway
Componentes en AWS
ACL
21. This is our vision
Building the foundation to Build a 3B Company by FY20
us-east-1a us-east-1b us-east-1c us-east-1d
VPC 10.0.0.0/16
Subnet
10.0.0.0/24
Componentes en AWS
Subnet
10.1.0.0/24
Subnet
10.2.0.0/24
Subnet
10.3.0.0/24
22. This is our vision
Building the foundation to Build a 3B Company by FY20
VPC 10.0.0.0/16
Componentes en AWS
Elastic Load Balancer
23. This is our vision
Building 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
24. This is our vision
Building 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
25. This is our vision
Building 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
26. This is our vision
Building 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.”
27. This is our vision
Building the foundation to Build a 3B Company by FY20
template.json
{
“Parameters”: { ... },
”Resources”: { ... },
”Outputs”: { ... }
}
28. This is our vision
Building the foundation to Build a 3B Company by FY20
template.json
{
“Parameters”: {
“CustomCird”: {
“Type”: “String”,
“Description”: “Rango de ips de la VPC”
}
},
”Resources”: { ... },
”Outputs”: { ... }
}
29. This is our vision
Building the foundation to Build a 3B Company by FY20
template.json
{
“Parameters”: { ... },
”Resources”: {
“MyVpc”: {
“Type”: “AWS::EC2::VPC”,
“Parameters”: {
“CidrBlock”: { “Ref”: “CustomCird”}
}
}
},
”Outputs”: { ... }
}
30. This is our vision
Building the foundation to Build a 3B Company by FY20
template.json
{
“Parameters”: { ... },
”Resources”: { ... },
”Outputs”: {
“VpcID”: {
“Value”: { “Ref”: “MyVpc” }
}
}
}
31. This is our vision
Building 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