Continuous Deployment
Tiago Henriques
Solutions Architect, Amazon Web Services
CONTINUOUS
INTEGRATION
DEVELOPER
SOURCE CODE
REPOSITORY
SOURCE CODE
REPOSITORY

PROJECT MANAGEMENT
SERVER
SOURCE CODE
REPOSITORY

CONTINUOUS
INTEGRATION SERVER

PROJECT MANAGEMENT
SERVER
SOURCE CODE
REPOSITORY

CONTINUOUS
INTEGRATION SERVER

PROJECT MANAGEMENT
SERVER
PICK
TASKS
SOURCE CODE
REPOSITORY

SUBMIT
CODE

CONTINUOUS
INTEGRATION SERVER

PROJECT MANAGEMENT
SERVER
SOURCE CODE
REPOSITORY

CONTINUOUS
INTEGRATION SERVER

SCHEDULE
BUILD
PROJECT MANAGEMENT
SERVER
SOURCE CODE
REPOSITORY

CONTINUOUS
INTEGRATION SERVER
RECURRENT
BUILDS

PROJECT MANAGEMENT
SERVER
SOURCE CODE
REPOSITORY

CONTINUOUS
INTEGRATION SERVER
CODE
FETCH

PROJECT MANAGEMENT
SERVER
SOURCE CODE
REPOSITORY

CONTINUOUS
INTEGRATION SERVER
CODE QUALITY
TESTS

PROJECT MANAGEMENT
SERVER
TEST
RESULTS
SOURCE CODE
REPOSITORY

CONTINUOUS
INTEGRATION SERVER

BUILD OUTPUT
PROJECT MANAGEMENT
SERVER
SOURCE CODE
REPOSITORY

DOCS

CONTINUOUS
INTEGRATION SERVER
BINARIES
& PACKAGES

PROJECT MANAGEMENT
SERVER
SOURCE CODE
REPOSITORY

BUILDS

CONTINUOUS
INTEGRATION SERVER

DNS

PROJECT
MANAGEMENT SERVER
PAIN POINTS
•
•
•
•
•

UNIT TESTS INCOMPLETE
MOCK TESTS MAINTENANCE
EXPENSIVE TEST ENVIRONMENT
TEST ENVIRONMENT ≠ PRODUCTI...
ON-DEMAND

ELASTIC

PAY AS YOU GO
=

PROGRAMMABLE
PLATFORM
IF YOU CAN PROGRAM IT
YOU CAN AUTOMATE IT
AWS
CLOUDFORMATION
STACK-BASED DEPLOYMENT
SERVICE
CLOUDFORMATION
TEMPLATE
{
"Description" : "Create RDS with username and password",
"Resources" : {
"MyDB" : {
"Type" : "AWS::RDS::DBInstance",
"Pr...
"AWS::CloudFormation::Init" : {

"config" : {

"packages" : {
"yum" : {
"mysql"
: [],
"mysql-server" : [],
"httpd"
: [],
"...
{
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2
KeyPair to enable SSH
access to the instance",
"...
PROCEDURAL
DEFINITION

KNOWN
CONFIGURATION

Create it programmatically

Store stack configuration in
source control

CLOUD...
APPLICATION
VERSIONS

+
INFRASTRUCTURE
VERSIONS
CLOUDFORMATION
TEMPLATE
HTTP://SORCERY.SMUGMUG.COM/
TEST ENVIRONMENTS
30,000 REQUESTS / SECOND
1 TB TRAFFIC / DAY
“…AWS seemed to be the best solution available to allow a
small, independent company to rapidly develop and test a
complet...
LOAD TESTING
USING AMAZON EC2 TO SIMULATE

2.4 MILLION PLAYERS
CONTINUOUS
DEPLOYMENT
SMALL, FREQUENT CHANGES
CONSTANTLY INTEGRATING INTO
PRODUCTION
KEY = ITERATION
ITERATION
=
MODIFY THE SYSTEM TO BETTER
MEET THE EXPECTATIONS OF
YOUR USERS
DEPLOYMENTS AT
AMAZON.COM
11.6s

1,079

10,000

30,000

Mean time
between
deployments
(weekday)

Max number of
deployments...
SOFTWARE DEPLOY

≠
PRODUCT LAUNCH
1.5 BILLION PAGE VIEWS
$83 MILLION IN TRANSACTIONS
4.2 MILLION ITEMS SOLD
OCTOBER 2012
30 DEPLOYS PER DAY
1 DEPLOY EVERY 20 MINUTES
"Production is truly the only place you
can validate your code."
AWS OPSWORKS
INTEGRATED APPLICATION
MANAGEMENT
14 BILLION REQUESTS/MONTH
50 000 DATABASE UPDATES / SEC
NO CACHE
A / B TESTING
DATA-DRIVEN
ARCHITECTURES
METRICS @ETSY
COST-ORIENTED
ARCHITECTURES
PHP+APACHE+VARNISH

NGINX+NODEJS
CONTINUOUS
DEPLOYMENT
CONTINUOUS
INTEGRATION
Continuous Deployment
Tiago Henriques
Solutions Architect, Amazon Web Services
CONTINUOUS
DEPLOYMENT
=
CONTINUOUS
EXPERIMENTATION
CONTINUOUS
DEPLOYMENT
=
CONTINUOUS
IMPROVEMENT
INNOVATE
« Want to increase innovation?
Lower the cost of failure »
Joi Ito
SPEED AND AGILITY
“ON-PREMISE”
Experiment
Infrequently

Experiment
Often

Failure is
expensive

Fail quickly at
a low cost...
TEST ENVIRONMENTS ON DEMAND
ODIGEO GROUP
ODIGEO Group, creado en Julio 2011, está formado
por eDreams, GO Voyages, Opodo y Travellink.
ODIGEO Group ac...
CI
•
•
•
•
•
•

CI Server
Plugin jenkins – Amazon EC2
VCS: SVN y Bitbucket.
1 job por rama de desarrollo.
Cada commit lanz...
Entornos de test

Problema

• Incremento del equipo de IT
• No disponibilidad de entornos de test.

Requerimientos

•
•
•
...
QAM

Solución

•
•
•
•
•

Amazon EC2
Tenemos una ami con la configuración del entorno.
Configuración por puppet del entorn...
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
AWS Summit Barcelona - Continuous Deployment
Upcoming SlideShare
Loading in …5
×

AWS Summit Barcelona - Continuous Deployment

700 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
700
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
61
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

AWS Summit Barcelona - Continuous Deployment

  1. 1. Continuous Deployment Tiago Henriques Solutions Architect, Amazon Web Services
  2. 2. CONTINUOUS INTEGRATION
  3. 3. DEVELOPER
  4. 4. SOURCE CODE REPOSITORY
  5. 5. SOURCE CODE REPOSITORY PROJECT MANAGEMENT SERVER
  6. 6. SOURCE CODE REPOSITORY CONTINUOUS INTEGRATION SERVER PROJECT MANAGEMENT SERVER
  7. 7. SOURCE CODE REPOSITORY CONTINUOUS INTEGRATION SERVER PROJECT MANAGEMENT SERVER PICK TASKS
  8. 8. SOURCE CODE REPOSITORY SUBMIT CODE CONTINUOUS INTEGRATION SERVER PROJECT MANAGEMENT SERVER
  9. 9. SOURCE CODE REPOSITORY CONTINUOUS INTEGRATION SERVER SCHEDULE BUILD PROJECT MANAGEMENT SERVER
  10. 10. SOURCE CODE REPOSITORY CONTINUOUS INTEGRATION SERVER RECURRENT BUILDS PROJECT MANAGEMENT SERVER
  11. 11. SOURCE CODE REPOSITORY CONTINUOUS INTEGRATION SERVER CODE FETCH PROJECT MANAGEMENT SERVER
  12. 12. SOURCE CODE REPOSITORY CONTINUOUS INTEGRATION SERVER CODE QUALITY TESTS PROJECT MANAGEMENT SERVER TEST RESULTS
  13. 13. SOURCE CODE REPOSITORY CONTINUOUS INTEGRATION SERVER BUILD OUTPUT PROJECT MANAGEMENT SERVER
  14. 14. SOURCE CODE REPOSITORY DOCS CONTINUOUS INTEGRATION SERVER BINARIES & PACKAGES PROJECT MANAGEMENT SERVER
  15. 15. SOURCE CODE REPOSITORY BUILDS CONTINUOUS INTEGRATION SERVER DNS PROJECT MANAGEMENT SERVER
  16. 16. PAIN POINTS • • • • • UNIT TESTS INCOMPLETE MOCK TESTS MAINTENANCE EXPENSIVE TEST ENVIRONMENT TEST ENVIRONMENT ≠ PRODUCTION DEPLOYMENT CYCLES
  17. 17. ON-DEMAND ELASTIC PAY AS YOU GO
  18. 18. = PROGRAMMABLE PLATFORM
  19. 19. IF YOU CAN PROGRAM IT YOU CAN AUTOMATE IT
  20. 20. AWS CLOUDFORMATION STACK-BASED DEPLOYMENT SERVICE
  21. 21. CLOUDFORMATION TEMPLATE
  22. 22. { "Description" : "Create RDS with username and password", "Resources" : { "MyDB" : { "Type" : "AWS::RDS::DBInstance", "Properties" : { "AllocatedStorage" : "500", "DBInstanceClass" : "db.m1.small", "Engine" : "MySQL", "EngineVersion" : "5.5", "MasterUsername" : "MyName", "MasterUserPassword" : "MyPassword" } } } }
  23. 23. "AWS::CloudFormation::Init" : { "config" : { "packages" : { "yum" : { "mysql" : [], "mysql-server" : [], "httpd" : [], "php" : [], "php-mysql" : [] } }, "sources" : { "/var/www/html" : "https://s3.amazonaws.com/my-builds/build-v4.zip" } }
  24. 24. { "Parameters" : { "KeyName" : { "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance", "Type" : "String" } }, }
  25. 25. PROCEDURAL DEFINITION KNOWN CONFIGURATION Create it programmatically Store stack configuration in source control CLOUDFORMATION TEMPLATE PARAMETER DRIVEN Dynamic and user-driven templates COLLABORATION Share templates with ease as just files
  26. 26. APPLICATION VERSIONS + INFRASTRUCTURE VERSIONS
  27. 27. CLOUDFORMATION TEMPLATE
  28. 28. HTTP://SORCERY.SMUGMUG.COM/
  29. 29. TEST ENVIRONMENTS
  30. 30. 30,000 REQUESTS / SECOND 1 TB TRAFFIC / DAY
  31. 31. “…AWS seemed to be the best solution available to allow a small, independent company to rapidly develop and test a completely new infrastructure, and host it. We also loved the flexibility that AWS allowed us, when spinning up smaller test environments, for beta trials, QA, localization, and during development. The low initial cost was also crucial.” Alex Evans, CTO
  32. 32. LOAD TESTING
  33. 33. USING AMAZON EC2 TO SIMULATE 2.4 MILLION PLAYERS
  34. 34. CONTINUOUS DEPLOYMENT SMALL, FREQUENT CHANGES CONSTANTLY INTEGRATING INTO PRODUCTION
  35. 35. KEY = ITERATION
  36. 36. ITERATION = MODIFY THE SYSTEM TO BETTER MEET THE EXPECTATIONS OF YOUR USERS
  37. 37. DEPLOYMENTS AT AMAZON.COM 11.6s 1,079 10,000 30,000 Mean time between deployments (weekday) Max number of deployments in a single hour Mean number of hosts simultaneously receiving a deployment Max number of hosts simultaneously receiving a deployment
  38. 38. SOFTWARE DEPLOY ≠ PRODUCT LAUNCH
  39. 39. 1.5 BILLION PAGE VIEWS $83 MILLION IN TRANSACTIONS 4.2 MILLION ITEMS SOLD OCTOBER 2012
  40. 40. 30 DEPLOYS PER DAY 1 DEPLOY EVERY 20 MINUTES
  41. 41. "Production is truly the only place you can validate your code."
  42. 42. AWS OPSWORKS INTEGRATED APPLICATION MANAGEMENT
  43. 43. 14 BILLION REQUESTS/MONTH 50 000 DATABASE UPDATES / SEC NO CACHE
  44. 44. A / B TESTING
  45. 45. DATA-DRIVEN ARCHITECTURES
  46. 46. METRICS @ETSY
  47. 47. COST-ORIENTED ARCHITECTURES
  48. 48. PHP+APACHE+VARNISH NGINX+NODEJS
  49. 49. CONTINUOUS DEPLOYMENT CONTINUOUS INTEGRATION
  50. 50. Continuous Deployment Tiago Henriques Solutions Architect, Amazon Web Services
  51. 51. CONTINUOUS DEPLOYMENT = CONTINUOUS EXPERIMENTATION
  52. 52. CONTINUOUS DEPLOYMENT = CONTINUOUS IMPROVEMENT
  53. 53. INNOVATE
  54. 54. « Want to increase innovation? Lower the cost of failure » Joi Ito
  55. 55. SPEED AND AGILITY “ON-PREMISE” Experiment Infrequently Experiment Often Failure is expensive Fail quickly at a low cost Less Innovation More Innovation
  56. 56. TEST ENVIRONMENTS ON DEMAND
  57. 57. ODIGEO GROUP ODIGEO Group, creado en Julio 2011, está formado por eDreams, GO Voyages, Opodo y Travellink. ODIGEO Group actualmente opera y ofrece sus servicios en un total de 38 paises. En 2011, servimos conjuntamente 14 milliones de clientes y 3.9 Billion en Reservas. Somos más de 1400 empleados. Y más de 300 empleados en el equipo de IT. Más de 80 nuevos miebrss en el equipo de IT en el último año.
  58. 58. CI • • • • • • CI Server Plugin jenkins – Amazon EC2 VCS: SVN y Bitbucket. 1 job por rama de desarrollo. Cada commit lanza una ejecución de los jobs. La CI está compuesta por: • Métricas de calidad. • Test unitarios. • Test automáticos. • Publicación de artefactos.
  59. 59. Entornos de test Problema • Incremento del equipo de IT • No disponibilidad de entornos de test. Requerimientos • • • • • Creación de los entornos bajo demanda. Gestión de los entornos por los usuarios. Los entornos sin actividad se deben autodestruir. Sin límite de entornos de test concurrentes. Start/Stop automáticos.
  60. 60. QAM Solución • • • • • Amazon EC2 Tenemos una ami con la configuración del entorno. Configuración por puppet del entorno. La versión de software se descarga de Nexus. Aplicación de gestión desarrollada en colaboración con Celingest • Gestión de usuarios. • Auditaría del uso y consumo. • Control de instancias, número y tiempo.

×