SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Builders’ Day
Jerusalem
CI/CD pipelines on AWS
Lior Pollack, Solutions Architect, AWS
Oren Reuveni, Solutions Architect, AWS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
https://secure.flickr.com/photos/mgifford/4525333972
Why are we
here today?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What we'll cover
DevOps concept
The Amazon DevOps story
AWS CI/CD Portfolio
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Software moves
faster today
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is DevOps?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is DevOps?
• Cultural philosophies
• Practices
• Tools
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevOps Culture
• Dev & Ops coming together
• No more “silos”
• Shared responsibility
• Ownership
• Visibility and communication
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevOps Practices
• Microservices
• Moving away from “monolithic” application architecture
to many individual services
• Continuous
• Continuous Integration
• Continuous Delivery & Deployment
• Monitoring and logging, feedback cycle
• Infrastructure as Code
• Model your AWS resources using code
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Reliability
Benefits of DevOps
Speed
Scale
Rapid DeliveryImproved Collaboration
Security
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A look back at
development at
Amazon..
https://secure.flickr.com/photos/pixelthing/15806918992/
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2001
Development transformation at Amazon: 2001-2009
2009
monolithic application + teams microservices + 2 pizza teams
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Things went much
better under this
model and teams
were releasing faster
than ever, but we
felt that we could
still improve.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
In 2009, we
ran a study to
find out where
inefficiencies
might still exist
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
We were just waiting.
WaitWrite
Code WaitBuild
Code WaitDeploy
to Test
Deploy
to
Prod
Mins Days Mins Days Mins Days Mins
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
We were just waiting.
WaitWrite
Code WaitBuild
Code WaitDeploy
to Test
Deploy
to
Prod
Weeks
Mins Days Mins Days Mins Days Mins
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
We were just waiting.
WaitWrite
Code WaitBuild
Code WaitDeploy
to Test
Deploy
to
Prod
Weeks
Mins Days Mins Days Mins Days Mins
Hours
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
We built tools to
automate our software
release process
https://secure.flickr.com/photos/lindseygee/5894617854/
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Automated actions and
transitions; from check-
in to production
Development benefits:
• Faster
• Safer
• Simplification &
standardization
• Visualization of the
process
Pipelines
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
This has continued to work out really well:
In 2014:
• Thousands of service teams across Amazon
• Building microservices
• Practicing continuous delivery
• Many environments (staging, beta, production)
50 million deploys
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Where do you
?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Integration
tests with
other systems
• Load testing
• UI tests
• Penetration
testing
Release processes have four major phases
Source Build Test Production
• Check-in
source code
such as .java
files.
• Peer review
new code
• Compile code
• Unit tests
• Style checkers
• Code metrics
• Create
container
images
• Deployment
to production
environments
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Release processes levels
Source Build Test Production
Continuous integration
Continuous delivery
Continuous deployment
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
AWS CodePipelineAWS CodeCommit AWS CodeBuild AWS CodeDeploy
AWS CodeStar
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Software release steps
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Software release steps
AWS CodeCommit
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Software release steps
AWS CodeBuild
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Fully managed build service that compiles source
code, runs tests, and produces software packages
Scales continuously and processes multiple builds
concurrently
You can provide custom build environments suited
to your needs via Docker images
Pay by the minute for the compute resources you use
Integrated with AWS CodePipeline and Jenkins
AWS CodeBuild
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
buildspec.yml Example
version: 0.1
environment_variables:
plaintext:
JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64"
phases:
install:
commands:
- apt-get update -y
- apt-get install -y maven
pre_build:
commands:
- echo Nothing to do in the pre_build phase...
build:
commands:
- echo Build started on `date`
- mvn install
post_build:
commands:
- echo Build completed on `date`
artifacts:
type: zip
files:
- target/messageUtil-1.0.jar
discard-paths: yes
• Variables to be used by phases of
build
• Examples for what you can do in the
phases of a build:
• You can install packages or run
commands to prepare your
environment in ”install”
• Run syntax checking, commands in
“pre_build”
• Execute your build tool/command in
“build”
• Test your app further or ship a
container image to a repository in
post_build
• Create and store an artifact in S3
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Third-party
tooling
Software release steps
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deploying your
applications
https://secure.flickr.com/photos/simononly/15386966677
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Software release steps
AWS CodeDeploy
Cloudformation / SAM
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Automates code deployments to any instance
Handles the complexity of updating your
applications
Avoid downtime during application deployment
Rollback automatically if failure detected
Deploy to Amazon EC2 or on-premises servers, in
any language and on any operating system
Integrates with third-party tools and AWS
AWS CodeDeploy
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
appspec.yml Example
version: 0.0
os: linux
files:
- source: /
destination: /var/www/html
permissions:
- object: /var/www/html
pattern: “*.html”
owner: root
group: root
mode: 755
hooks:
ApplicationStop:
- location: scripts/deregister_from_elb.sh
BeforeInstall:
- location: scripts/install_dependencies.sh
ApplicationStart:
- location: scripts/start_httpd.sh
ValidateService:
- location: scripts/test_site.sh
- location: scripts/register_with_elb.sh
• Remove/add instance to ELB
• Install dependency packages
• Start Apache
• Confirm successful deploy
• More!
• Send application files to one
directory and configuration
files to another
• Set specific permissions on
specific directories & files
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
v2 v2 v2 v2 v2 v2
one at a time
half at a time
all at once
v2 v2 v2 v1 v1 v1
v2 v1 v1 v1 v1 v1 Agent Agent
Dev Deployment group
OR
Prod Deployment group
Agent
AgentAgent
Agent Agent
Agent
Choose Deployment Speed and Group
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Serverless Application Model (SAM)
CloudFormation extension optimized for
serverless
New serverless resource types: functions, APIs,
and tables
Supports anything CloudFormation supports
Open specification (Apache 2.0)
https://github.com/awslabs/serverless-application-model
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SAM template
AWSTemplateFormatVersion: '2010-09-09’
Transform: AWS::Serverless-2016-10-31
Resources:
GetHtmlFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://sam-demo-bucket/todo_list.zip
Handler: index.gethtml
Runtime: nodejs4.3
Policies: AmazonDynamoDBReadOnlyAccess
Events:
GetHtml:
Type: Api
Properties:
Path: /{proxy+}
Method: ANY
ListTable:
Type: AWS::Serverless::SimpleTable
Tells CloudFormation this is a SAM
template it needs to “transform”
Creates a Lambda function with the
referenced managed IAM policy,
runtime, code at the referenced zip
location, and handler as defined.
Also creates an API Gateway and
takes care of all
mapping/permissions necessary
Creates a DynamoDB table with 5
Read & Write units
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
NEW: Can deploy AWS Lambda.
Uses AWS SAM to deploy serverless applications
Supports Lambda Alias Traffic Shifting enabling
canaries and blue|green deployments
Can rollback based on CloudWatch Metrics/Alarms
Pre/Post-Traffic Triggers can integrate with other
services (or even call Lambda functions)
AWS CodeDeploy + Lambda
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Source Build Test Production
Third-party
tooling
AWS CodeCommit AWS CodeBuild AWS CodeDeploy
AWS CodePipeline
AWS Code Services
Software release steps
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Continuous delivery service for fast and
reliable application updates
Model and visualize your software release
process
Builds, tests, and deploys your code every
time there is a code change
Integrates with third-party tools and AWS
AWS CodePipeline
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
Source Build Test Production
Third-party
tooling
Software release steps
AWS CodeCommit AWS CodeBuild AWS CodeDeploy
AWS CodePipeline
AWS CodeStar
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Introducing: AWS CodeStar
Quickly develop, build, and deploy applications on AWS
Start developing on AWS in minutes
Work across your team, securely
Manage software delivery easily
Choose from a variety of project templates
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Summary
We’ve seen a quick run through today of the benefits of continuous delivery
on our software release process:
• Continuous integration (build/test) helps shrink our feedback loop
greatly
• We can get our software out in front of our users much more rapidly
• By moving faster we can actually ensure better quality
• AWS Code services enables continuous delivery, and allows integration
with almost any service or tool you can think of!
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Builders’ Day
Jerusalem
Thank You!
Lior Pollack, Solutions Architect, AWS
Oren Reuveni, Solutions Architect, AWS

Weitere ähnliche Inhalte

Was ist angesagt?

AWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best Practices
Amazon Web Services
 
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
Amazon Web Services
 

Was ist angesagt? (20)

Amazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for KubernetesAmazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for Kubernetes
 
Amazon ECS
Amazon ECSAmazon ECS
Amazon ECS
 
Intro to Amazon ECS
Intro to Amazon ECSIntro to Amazon ECS
Intro to Amazon ECS
 
DevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesDevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and Processes
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
 
DevOps and AWS
DevOps and AWSDevOps and AWS
DevOps and AWS
 
DevOps on AWS - Building Systems to Deliver Faster
DevOps on AWS - Building Systems to Deliver FasterDevOps on AWS - Building Systems to Deliver Faster
DevOps on AWS - Building Systems to Deliver Faster
 
Getting Started on Amazon EKS
Getting Started on Amazon EKSGetting Started on Amazon EKS
Getting Started on Amazon EKS
 
Introduction to AWS Organizations
Introduction to AWS OrganizationsIntroduction to AWS Organizations
Introduction to AWS Organizations
 
AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipeline
 
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
 
AWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best Practices
 
infrastructure as code
infrastructure as codeinfrastructure as code
infrastructure as code
 
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
 
Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS SummitInfrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
 
Deploy and Govern at Scale with AWS Control Tower
Deploy and Govern at Scale with AWS Control TowerDeploy and Govern at Scale with AWS Control Tower
Deploy and Govern at Scale with AWS Control Tower
 
CI/CD for Modern Applications
CI/CD for Modern ApplicationsCI/CD for Modern Applications
CI/CD for Modern Applications
 
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
CI/CD with AWS Code Services
CI/CD with AWS Code ServicesCI/CD with AWS Code Services
CI/CD with AWS Code Services
 

Ähnlich wie CI/CD pipelines on AWS - Builders Day Israel

Ähnlich wie CI/CD pipelines on AWS - Builders Day Israel (20)

DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
Improve Productivity with Continuous Integration & Delivery
Improve Productivity with Continuous Integration & DeliveryImprove Productivity with Continuous Integration & Delivery
Improve Productivity with Continuous Integration & Delivery
 
Improve Productivity with Continuous Integration & Delivery
Improve Productivity with Continuous Integration & DeliveryImprove Productivity with Continuous Integration & Delivery
Improve Productivity with Continuous Integration & Delivery
 
DevOps: The Amazon Story
DevOps: The Amazon StoryDevOps: The Amazon Story
DevOps: The Amazon Story
 
DevOps Culture at Amazon
DevOps Culture at AmazonDevOps Culture at Amazon
DevOps Culture at Amazon
 
Set Up a CI/CD Pipeline for Deploying Containers Using the AWS Developer Tool...
Set Up a CI/CD Pipeline for Deploying Containers Using the AWS Developer Tool...Set Up a CI/CD Pipeline for Deploying Containers Using the AWS Developer Tool...
Set Up a CI/CD Pipeline for Deploying Containers Using the AWS Developer Tool...
 
Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...
Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...
Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...
 
CI CD using AWS Developer Tools @ AWS Community Day Bengaluru 2018
CI CD using AWS Developer Tools @ AWS Community Day Bengaluru 2018CI CD using AWS Developer Tools @ AWS Community Day Bengaluru 2018
CI CD using AWS Developer Tools @ AWS Community Day Bengaluru 2018
 
CI/CD@Scale
CI/CD@ScaleCI/CD@Scale
CI/CD@Scale
 
Community day _aws_ci_cd_v0.2
Community day _aws_ci_cd_v0.2Community day _aws_ci_cd_v0.2
Community day _aws_ci_cd_v0.2
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
 
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
 
Improve Productivity with Continuous Integration & Delivery
Improve Productivity with Continuous Integration & DeliveryImprove Productivity with Continuous Integration & Delivery
Improve Productivity with Continuous Integration & Delivery
 
How to Build a CICD Pipeline with AWS CodeStar
How to Build a CICD Pipeline with AWS CodeStarHow to Build a CICD Pipeline with AWS CodeStar
How to Build a CICD Pipeline with AWS CodeStar
 
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
 
CI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateCI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and Fargate
 
Scaling and Automating DevOps with CloudBees and Spot Instances (GPSTEC310) -...
Scaling and Automating DevOps with CloudBees and Spot Instances (GPSTEC310) -...Scaling and Automating DevOps with CloudBees and Spot Instances (GPSTEC310) -...
Scaling and Automating DevOps with CloudBees and Spot Instances (GPSTEC310) -...
 
From Code to a Running Container | AWS Floor28
From Code to a Running Container | AWS Floor28From Code to a Running Container | AWS Floor28
From Code to a Running Container | AWS Floor28
 
DevSecOps 的規模化實踐 (Level: 300-400)
DevSecOps 的規模化實踐 (Level: 300-400)DevSecOps 的規模化實踐 (Level: 300-400)
DevSecOps 的規模化實踐 (Level: 300-400)
 
CI/CD for AWS Lambda Projects - IsraelCloud Meetup
CI/CD for AWS Lambda Projects - IsraelCloud MeetupCI/CD for AWS Lambda Projects - IsraelCloud Meetup
CI/CD for AWS Lambda Projects - IsraelCloud Meetup
 

Mehr von Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Mehr von Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

CI/CD pipelines on AWS - Builders Day Israel

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Builders’ Day Jerusalem CI/CD pipelines on AWS Lior Pollack, Solutions Architect, AWS Oren Reuveni, Solutions Architect, AWS
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. https://secure.flickr.com/photos/mgifford/4525333972 Why are we here today?
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What we'll cover DevOps concept The Amazon DevOps story AWS CI/CD Portfolio
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Software moves faster today
  • 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is DevOps?
  • 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is DevOps? • Cultural philosophies • Practices • Tools
  • 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DevOps Culture • Dev & Ops coming together • No more “silos” • Shared responsibility • Ownership • Visibility and communication
  • 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DevOps Practices • Microservices • Moving away from “monolithic” application architecture to many individual services • Continuous • Continuous Integration • Continuous Delivery & Deployment • Monitoring and logging, feedback cycle • Infrastructure as Code • Model your AWS resources using code
  • 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Reliability Benefits of DevOps Speed Scale Rapid DeliveryImproved Collaboration Security
  • 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A look back at development at Amazon.. https://secure.flickr.com/photos/pixelthing/15806918992/
  • 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2001 Development transformation at Amazon: 2001-2009 2009 monolithic application + teams microservices + 2 pizza teams
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Things went much better under this model and teams were releasing faster than ever, but we felt that we could still improve.
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. In 2009, we ran a study to find out where inefficiencies might still exist
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. We were just waiting. WaitWrite Code WaitBuild Code WaitDeploy to Test Deploy to Prod Mins Days Mins Days Mins Days Mins
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. We were just waiting. WaitWrite Code WaitBuild Code WaitDeploy to Test Deploy to Prod Weeks Mins Days Mins Days Mins Days Mins
  • 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. We were just waiting. WaitWrite Code WaitBuild Code WaitDeploy to Test Deploy to Prod Weeks Mins Days Mins Days Mins Days Mins Hours
  • 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. We built tools to automate our software release process https://secure.flickr.com/photos/lindseygee/5894617854/
  • 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Automated actions and transitions; from check- in to production Development benefits: • Faster • Safer • Simplification & standardization • Visualization of the process Pipelines
  • 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. This has continued to work out really well: In 2014: • Thousands of service teams across Amazon • Building microservices • Practicing continuous delivery • Many environments (staging, beta, production) 50 million deploys
  • 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Where do you ?
  • 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Integration tests with other systems • Load testing • UI tests • Penetration testing Release processes have four major phases Source Build Test Production • Check-in source code such as .java files. • Peer review new code • Compile code • Unit tests • Style checkers • Code metrics • Create container images • Deployment to production environments
  • 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Release processes levels Source Build Test Production Continuous integration Continuous delivery Continuous deployment
  • 23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Code Services AWS CodePipelineAWS CodeCommit AWS CodeBuild AWS CodeDeploy AWS CodeStar
  • 24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Code Services Source Build Test Production Software release steps
  • 25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Code Services Source Build Test Production Software release steps AWS CodeCommit
  • 26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Code Services Source Build Test Production Software release steps AWS CodeBuild
  • 27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Fully managed build service that compiles source code, runs tests, and produces software packages Scales continuously and processes multiple builds concurrently You can provide custom build environments suited to your needs via Docker images Pay by the minute for the compute resources you use Integrated with AWS CodePipeline and Jenkins AWS CodeBuild
  • 28. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. buildspec.yml Example version: 0.1 environment_variables: plaintext: JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64" phases: install: commands: - apt-get update -y - apt-get install -y maven pre_build: commands: - echo Nothing to do in the pre_build phase... build: commands: - echo Build started on `date` - mvn install post_build: commands: - echo Build completed on `date` artifacts: type: zip files: - target/messageUtil-1.0.jar discard-paths: yes • Variables to be used by phases of build • Examples for what you can do in the phases of a build: • You can install packages or run commands to prepare your environment in ”install” • Run syntax checking, commands in “pre_build” • Execute your build tool/command in “build” • Test your app further or ship a container image to a repository in post_build • Create and store an artifact in S3
  • 29. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Code Services Source Build Test Production Third-party tooling Software release steps
  • 30. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deploying your applications https://secure.flickr.com/photos/simononly/15386966677
  • 31. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Code Services Source Build Test Production Software release steps AWS CodeDeploy Cloudformation / SAM
  • 32. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Automates code deployments to any instance Handles the complexity of updating your applications Avoid downtime during application deployment Rollback automatically if failure detected Deploy to Amazon EC2 or on-premises servers, in any language and on any operating system Integrates with third-party tools and AWS AWS CodeDeploy
  • 33. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. appspec.yml Example version: 0.0 os: linux files: - source: / destination: /var/www/html permissions: - object: /var/www/html pattern: “*.html” owner: root group: root mode: 755 hooks: ApplicationStop: - location: scripts/deregister_from_elb.sh BeforeInstall: - location: scripts/install_dependencies.sh ApplicationStart: - location: scripts/start_httpd.sh ValidateService: - location: scripts/test_site.sh - location: scripts/register_with_elb.sh • Remove/add instance to ELB • Install dependency packages • Start Apache • Confirm successful deploy • More! • Send application files to one directory and configuration files to another • Set specific permissions on specific directories & files
  • 34. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. v2 v2 v2 v2 v2 v2 one at a time half at a time all at once v2 v2 v2 v1 v1 v1 v2 v1 v1 v1 v1 v1 Agent Agent Dev Deployment group OR Prod Deployment group Agent AgentAgent Agent Agent Agent Choose Deployment Speed and Group
  • 35. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Serverless Application Model (SAM) CloudFormation extension optimized for serverless New serverless resource types: functions, APIs, and tables Supports anything CloudFormation supports Open specification (Apache 2.0) https://github.com/awslabs/serverless-application-model
  • 36. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SAM template AWSTemplateFormatVersion: '2010-09-09’ Transform: AWS::Serverless-2016-10-31 Resources: GetHtmlFunction: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/todo_list.zip Handler: index.gethtml Runtime: nodejs4.3 Policies: AmazonDynamoDBReadOnlyAccess Events: GetHtml: Type: Api Properties: Path: /{proxy+} Method: ANY ListTable: Type: AWS::Serverless::SimpleTable Tells CloudFormation this is a SAM template it needs to “transform” Creates a Lambda function with the referenced managed IAM policy, runtime, code at the referenced zip location, and handler as defined. Also creates an API Gateway and takes care of all mapping/permissions necessary Creates a DynamoDB table with 5 Read & Write units
  • 37. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. NEW: Can deploy AWS Lambda. Uses AWS SAM to deploy serverless applications Supports Lambda Alias Traffic Shifting enabling canaries and blue|green deployments Can rollback based on CloudWatch Metrics/Alarms Pre/Post-Traffic Triggers can integrate with other services (or even call Lambda functions) AWS CodeDeploy + Lambda
  • 38. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Source Build Test Production Third-party tooling AWS CodeCommit AWS CodeBuild AWS CodeDeploy AWS CodePipeline AWS Code Services Software release steps
  • 39. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Continuous delivery service for fast and reliable application updates Model and visualize your software release process Builds, tests, and deploys your code every time there is a code change Integrates with third-party tools and AWS AWS CodePipeline
  • 40. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 41. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Code Services Source Build Test Production Third-party tooling Software release steps AWS CodeCommit AWS CodeBuild AWS CodeDeploy AWS CodePipeline AWS CodeStar
  • 42. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Introducing: AWS CodeStar Quickly develop, build, and deploy applications on AWS Start developing on AWS in minutes Work across your team, securely Manage software delivery easily Choose from a variety of project templates
  • 43. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo
  • 44. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Summary We’ve seen a quick run through today of the benefits of continuous delivery on our software release process: • Continuous integration (build/test) helps shrink our feedback loop greatly • We can get our software out in front of our users much more rapidly • By moving faster we can actually ensure better quality • AWS Code services enables continuous delivery, and allows integration with almost any service or tool you can think of!
  • 45. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Builders’ Day Jerusalem Thank You! Lior Pollack, Solutions Architect, AWS Oren Reuveni, Solutions Architect, AWS