SlideShare uma empresa Scribd logo
1 de 125
Baixar para ler offline
Adam Larter
Principal Solutions Architect, Developer Specialist
Real-world development
Peeling the onion - migrating a
monolithic application to microservices
• Approaches to taking an enterprise Java monolith and
breaking it into microservices on AWS.
• Using the AWS developer tools - AWS CodeStar, AWS CodeCommit,
AWS CodePipeline and AWS CodeBuild - to orchestrate and
automate our deployment.
• Using AWS Lambda and Amazon API Gateway to host
polyglot serverless microservices.
• Using AWS X-Ray to capture custom application events, trace requests
through the AWS SDKs and analyse underlying service performance.
LEARNING OBJECTIVES
D E V L O U N G E
A compelling event
Some technical debt
Big business opportunity
D E V L O U N G E
ARCHITECTURE
Single vertically-scaled
server hosted off-cloud
Single vertically-scaled
server hosted off-cloud
D E V L O U N G E
ARCHITECTURE
Single vertically-scaled
server hosted off-cloud
Single vertically-scaled
server hosted off-cloud
D E V L O U N G E
XML / JSON data dumps
from 3rd party providers
WWW / HTML
end users
ARCHITECTURE
Single vertically-scaled
server hosted off-cloud
Single vertically-scaled
server hosted off-cloud
D E V L O U N G E
XML / JSON data dumps
from 3rd party providers
XML / JSON REST endpoint
for 3rd party integrators
WWW / HTML
end users
D E V L O U N G E
OUR MONOLITH
BUSINESS REQUIREMENTS
• Go faster – deliver new features at increased cadence.
Speed wins in business
• Be more stable – no more business interruptions due to technical problems
• Increase quality – all changes and updates to production should work first
time, every time
• Be cheaper – reduce TCO
• Business long-term and short-term solution
“Let’s move this workload to the cloud”
D E V L O U N G E
How can we quickly set up an
end-to-end DevOps toolchain for
our monolith?
D E V L O U N G E
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
AWS CODESTAR
D E V L O U N G E
Let’s create a CodeStar project
for our monolith
D E V L O U N G E
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
D E V L O U N G E
Collaborate securely with your team: Manage team access,
add team members to projects by role i.e. owners,
contributors
Integrated issue tracking and project management: Integrates
Atlassian JIRA Software to easily manage issues directly from
CodeStar dashboard and monitor application progress and
activity
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
D E V L O U N G E
Develop on AWS in minutes: Easily set up your entire
development environment and programming tools for
coding, building, testing, and deploying on AWS
Supported for popular programming languages: Develop
variety of applications using language of choice including
Java, NodeJS, JavaScript, PHP, Ruby, Python
and now .Net Core
Preconfigured AWS CloudFormation templates for quick
development project creation
• Automatic provisioning of underlying AWS services
so the team can get coding quickly
Over twenty different AWS CodeStar project templates
Support for websites, web services, microservices,
Alexa Skills dev projects (and more)
3 Hosting environments
§ Self-Managed: Amazon EC2 with AWS CodeDeploy
§ Managed: Elastic Beanstalk
§ Serverless: AWS Lambda
Amazon
EC2
AWS
CodeDeploy
AWS Elastic
Beanstalk
AWS
Lambda
AWS CODESTAR PROJECT TEMPLATES
D E V L O U N G E
• Single pane of glass to manage your project & build pipeline
• Coordinate your day-to-day development activities
• Dashboard provides tools to view real time application activity,
monitor builds, and flow of code through deployment pipeline
• Customize project dashboard by adding, removing, moving
tiles
• Add customizable team wiki tile for team resources sharing or
other purposes (eg. show code snippets)
• Use CodeStar project extensions to add tiles and functionality
dashboard
AWS CODESTAR PROJECT DASHBOARD
D E V L O U N G E
ARCHITECTURE
Single vertically-scaled
server hosted off-cloud
Single vertically-scaled
server hosted off-cloud
D E V L O U N G E
ARCHITECTURE
MONOLITH MONOLITH
D E V L O U N G E
HIDDEN COMPLEXITY
One Monolith – many
components
Cold/Hot
Read/Write master
D E V L O U N G E
Single vertically-scaled
server hosted off-cloud
D E V L O U N G E
Underlying
Framework
Data Access
Service
Single vertically-scaled
server hosted off-cloud
Flight / Hotel / Trip
Services
User Experience &
Session Manager
HIDDEN COMPLEXITY
• Monolithic codebase
• Stateful application logic
• Tight coupling
• Technical debt
• Performance issues
• Maintenance difficulties
• Implementation detail leakage in the API
• Data tier complexities technology and lock-in
• Lots of undifferentiated heavy lifting
TECHNICAL CHALLENGES
D E V L O U N G E
• Deploy to AWS Elastic Beanstalk PaaS immediately
(lift-and-shift to meet our compelling event deadline)
• Migrate over time to a microservices architecture as we
re-think and re-imagine our business and technical solution
• Use AWS Lambda to host our microservices as serverless
• Restructure organisation around business capability
• Delegate ownership of each microservice to a dedicated team
TECHNICAL SOLUTION
D E V L O U N G E
Monolith
Microservices
Monolithic
off-cloud
Elastic Beanstalk
?
Identify candidate
microservice,
design APIs
CodePipeline
CodeBuild
CodeCommit
CodeStar
Lambda
“Lift&Shift”
Time D E V L O U N G E
TECHNICAL SOLUTION
API Gateway
Compelling event
Monolith
Microservices
Monolithic
off-cloud
Elastic Beanstalk
?
Identify candidate
microservice,
design APIs
CodePipeline
CodeBuild
CodeCommit
CodeStar
Lambda
“Lift&Shift”
Time D E V L O U N G E
TECHNICAL SOLUTION
API Gateway
Compelling event
How does AWS CodeStar help?
D E V L O U N G E
AWS CodePipeline AWS CodeCommit AWS CodeBuildAWS CodeDeployAWS CodeStar
AWS CODE SERVICES
D E V L O U N G E
• Integration
tests with
other systems
• Load testing
• UI tests
• Penetration
testing
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
dev, staging, uat
or production
environments
RELEASE PROCESSES HAVE FOUR MAIN PHASES
Continuous integration
Continuous delivery
Continuous deployment
RELEASE PROCESS LEVELS
Source Build Test Production
Source Build Test Production
AWS CodeCommit
Software Release Steps:
AWS CODE SERVICES
D E V L O U N G E
Source Build Test Production
AWS CodeBuild
Software Release Steps:
AWS CODE SERVICES
D E V L O U N G E
Source Build Test Production
Third Party
Tooling
Software Release Steps:
AWS CODE SERVICES
D E V L O U N G E
Source Build Test Production
AWS CodeDeploy
Software Release Steps:
AWS CODE SERVICES
D E V L O U N G E
Source Build Test Production
Third Party
Tooling
AWS CodeCommit AWS CodeBuild AWS CodeDeploy
AWS CodePipeline
Software Release Steps:
AWS CODE SERVICES
D E V L O U N G E
Source Build Test Production
Third Party
Tooling
AWS CodeCommit AWS CodeBuild AWS CodeDeploy
AWS CodePipeline
AWS CodeStar
Software Release Steps:
AWS CODE SERVICES
ü Project Templates
ü Team Access Management with
AWS IAM
ü Managed Build Service with
AWS Code Build
ü Unified Project Dashboard using
Amazon CloudWatch monitoring
service
ü Issue tracking and project
management tool in dashboard
via integrated Atlassian JIRA
Software
ü AWS CodeCommit for Secure
Hosted Git Repository
ü Automated App Deployments
with AWS CodeDeploy and
AWS CloudFormation
ü Integration of AWS
CodePipeline for Automated
Continuous Delivery Pipeline
AWS CODESTAR FEATURES
D E V L O U N G E
THE 6 R’s OF MIGRATION
RetainR1 R4
R2 R5
R3 R6
• Keep host/application in source environment
• Minimal analysis/validation of scope
& application affinity
Retire • Decommission
• No migration of application
Rehost • Like-for-life app migration to AWS
• Lift-and-shift approach
• Minimal effort to make the app
work ‘on’ the cloud or take advantage of cloud
native services
Replatform • Up-version the OS/DB
• Make use of Amazon RDS
• Some app changes
• App re-installation and clean-up
Refactor • OS/DB porting
• Middleware and app changes
to use AWS services natively
• Data conversion, DB transition
(eg: MySQL & Aurora)
Rearchitect • Application architecture changes
• Using SaaS-based offerings
• Porting of application architecture
• Data modernisation, application
consolidation, make use of AWS-native
managed services
THE 6 R’s OF MIGRATION
RetainR1 R4
R2 R5
R3 R6
• Keep host/application in source environment
• Minimal analysis/validation of scope
& application affinity
Retire • Decommission
• No migration of application
Rehost • Like-for-life app migration to AWS
• Lift-and-shift approach
• Minimal effort to make the app
work ‘on’ the cloud or take advantage of cloud
native services
Replatform • Up-version the OS/DB
• Make use of Amazon RDS
• Some app changes
• App re-installation and clean-up
Refactor • OS/DB porting
• Middleware and app changes
to use AWS services natively
• Data conversion, DB transition
(eg: MySQL & Aurora)
Rearchitect • Application architecture changes
• Using SaaS-based offerings
• Porting of application architecture
• Data modernisation, application
consolidation, make use of AWS-native
managed services
ON the cloud
THE 6 R’s OF MIGRATION
RetainR1 R4
R2 R5
R3 R6
• Keep host/application in source environment
• Minimal analysis/validation of scope
& application affinity
Retire • Decommission
• No migration of application
Rehost • Like-for-life app migration to AWS
• Lift-and-shift approach
• Minimal effort to make the app
work ‘on’ the cloud or take advantage of cloud
native services
Replatform • Up-version the OS/DB
• Make use of Amazon RDS
• Some app changes
• App re-installation and clean-up
Refactor • OS/DB porting
• Middleware and app changes
to use AWS services natively
• Data conversion, DB transition
(eg: MySQL & Aurora)
Rearchitect • Application architecture changes
• Using SaaS-based offerings
• Porting of application architecture
• Data modernisation, application
consolidation, make use of AWS-native
managed services
IN the cloud
THE 6 R’s OF MIGRATION
RetainR1 R4
R2 R5
R3 R6
• Keep host/application in source environment
• Minimal analysis/validation of scope
& application affinity
Retire • Decommission
• No migration of application
Rehost • Like-for-life app migration to AWS
• Lift-and-shift approach
• Minimal effort to make the app
work ‘on’ the cloud or take advantage of cloud
native services
Replatform • Up-version the OS/DB
• Make use of Amazon RDS
• Some app changes
• App re-installation and clean-up
Refactor • OS/DB porting
• Middleware and app changes
to use AWS services natively
• Data conversion, DB transition
(eg: MySQL & Aurora)
Rearchitect • Application architecture changes
• Using SaaS-based offerings
• Porting of application architecture
• Data modernisation, application
consolidation, make use of AWS-native
managed services
FOR the cloud
• Cloud infrastructure introduces new concepts
• Off-cloud design doesn’t always translate to cloud principles
• Lift-and-shift often limits the value proposition
but addresses our time constraints for the compelling event
• Applications that don’t embrace cloud-native design
don’t fully realize scale, availability, and cost benefits
• Cloud design principles are still emerging, but based on well-known
highly scalable application patterns
D E V L O U N G E
THE 6 R’s OF MIGRATION
Monolith
Microservices
Monolithic
off-cloud
Elastic Beanstalk
?
Identify candidate
microservice,
design APIs
CodePipeline
CodeBuild
CodeCommit
CodeStar
Lambda
“Lift&Shift”
D E V L O U N G E
TECHNICAL SOLUTION
API Gateway
Rehost
• Like-for-life app migration to AWS
• Lift-and-shift approach
• Minimal effort to make the app
work ‘on’ the cloud or take advantage of cloud
native services
• Quickly deploy and manage applications
in the AWS cloud without worrying about
the application infrastructure
• True PaaS – automatically handles all
the details of patching, resource
provisioning, load balancing & auto-scaling
• Launch your Java, PHP, .NET, Node.js,
Python, and Ruby applications
in a matter of minutes
Automate N-tier web apps on PaaS
AWS ELASTIC BEANSTALK
D E V L O U N G E
Automate N-tier web apps on PaaS
AWS ELASTIC BEANSTALK
192.168.96.0/20
AZ-BAZ-A
Public Subnet
192.168.100.0/24
Public Subnet
192.168.102.0/24
192.168.100.210
NAT1 NAT2
WWW WWW
Private Subnet 192.168.104.0/24 Private Subnet 192.168.105.0/24
Private Subnet 192.168.106.0/24 Private Subnet 192.168.107.0/24
192.168.101.10
AD DC
1
AD DC
2ADFS
Public ELB
AWS Region
D E V L O U N G E
Test
customers
WWW WWWPublic ELB
Elastic Load Balancer
Web servers
Security Groups
Auto-scaling &
self-healing
D E V L O U N G E
Re-architecting our application
as serverless microservices
D E V L O U N G E
D E V L O U N G E
https://martinfowler.com/articles/microservices.html
D E V L O U N G E
https://martinfowler.com/articles/microservices.html
Microservices approach advocates creating
a system from a collection of small,
isolated services, each of which owns their data,
and is independently isolated,
scalable and resilient to failure
D E V L O U N G E
• Organized around business capability
• Decentralised ownership of services
• Automated deployment
• Intelligent endpoints
MICROSERVICES CHARACTERISTICS
D E V L O U N G E
Monolithic Microservices
• Simple deployments
• Binary failure modes
• Inter-module refactoring
• Technology monoculture
• Vertical scaling
• Shared datastore
• Owned by everyone
• Partial deployments
• Graceful degradation
• Strong module boundaries
• Technology diversity
• Horizontal scaling
• Discrete datastores
• Owned by single dev or team
D E V L O U N G E
• Increased speed and agility and ability to innovate
Changes can be made to the decoupled architecture quickly with low risk
• Reduced cost
Designing, implementing and scaling microservices is cost effective because they
are decoupled and have no dependencies
• Improved resilience
If one microservice fails, the entire system will continue to function
MICROSERVICES CHARACTERISTICS
• Be small enough to be re-written in two weeks
• Follow DDD bounded contexts
• Be run by the team that built them
• Own their own state and do not share
• Be developed by a team that can be fed by 2 pizzas
• Have freedom to use the right technology stack for the job
MICROSERVICES CHARACTERISTICS
• Isn’t it just Service-Oriented Architecture (SOA)?
• How micro is ‘micro’? How many is enough/too many?
• Just like object oriented code -
low coupling, highly cohesive, data hidden,
encapsulation, defined interface
• Not just a technology change!
MICROSERVICES ARCHITECTURES
D E V L O U N G E
MONOLITHIC ORGANISATION
D E V L O U N G E
Organised on technology capabilities (Conway’s Law)
Web Tier
App Tier
DB
OrganisationalStructure
ApplicationArchitecture
UI Team
App Logic Team
DBA Team
MICROSERVICES ORGANISATION
D E V L O U N G E
Organised on business initiativesOrganisationalStructure
ApplicationArchitecture
Flight
Service
Team
Trips
Service
Team
Hotel
Service
Team
Web Tier
App Tier
DB
Requirements
Quality Deployment
DevelopmentTechnology
Stack
Operations
OWNERSHIP – TEAMS CONTROL THEIR DESTINY
D E V L O U N G E
Peeling the onion:
How do we identify candidate microservices?
D E V L O U N G E
Monolith
Microservices
Monolithic
off-cloud
Elastic Beanstalk
?
Identify candidate
microservice,
design APIs
CodePipeline
CodeBuild
CodeCommit
CodeStar
Lambda
“Lift&Shift”
D E V L O U N G E
TECHNICAL SOLUTION
API Gateway
D E V L O U N G E
• Domain-driven design aligns well with the characteristics of
microservices – encapsulated, defined-interfaces, isolated
• Microservices should have a well-defined bounded context
and should “just do one thing”
• A bounded context encapsulates a single domain
(eg, application service or data model)
• Defines the integration points with other domains
• Beware of creating monolithic microservices!
DDD & BOUNDED CONTEXT
D E V L O U N G E
• Look for ‘seams’ between service classes
• Many of these will own their own DAO and will be well isolated
• Services with CRUD-style interfaces with some
related business logic are good candidates
• Look for classes with no or few dependencies
• Try some refactoring to clean up the code before you start
PEELING THE ONION
Serverless microservices
with AWS Lambda
D E V L O U N G E
• VMs – machine as the unit of scale
• “I want to configure machines, storage,
networking, and my OS”
• Containers – application as the unit of scale
• “I want to run servers, configure applications,
and control scaling”
• Serverless – functions as the unit of scale
• “Run my code when it’s needed”
ECS
EC2
AWS Lambda
CHOOSING COMPUTE INFRASTRUCTURE
D E V L O U N G E
Continuous scalingNo servers to
manage
Never pay for idle –
no cold servers
D E V L O U N G E
AWS LAMBDA FOR MICROSERVICES
Monolith
Microservices
Monolithic
off-cloud
Elastic Beanstalk
?
Identify candidate
microservice,
design APIs
CodePipeline
CodeBuild
CodeCommit
CodeStar
Lambda
“Lift&Shift”
D E V L O U N G E
TECHNICAL SOLUTION
API Gateway
Let’s create a CodeStar project
for our first microservice on AWS Lambda
D E V L O U N G E
D E V L O U N G E
Team
Members
AWS CodeStar
Administrator
Developers
commit
changes
Build
Changes
are built
Deployment
Code is
deployed
Monitoring
Application and
infrastructure
Ideas
Requests
Bug fixes
Developers
Best practices
Team decisions
Changes
Updates
Fixes
Creates
project and
adds users Customer
input
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
D E V L O U N G E
Team
Members
AWS CodeStar
Administrator
Developers
commit
changes
Build
Changes
are built
Deployment
Code is
deployed
Monitoring
Application and
infrastructure
Ideas
Requests
Bug fixes
Developers
Best practices
Team decisions
Changes
Updates
Fixes
Creates
project and
adds users Customer
input
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
D E V L O U N G E
Team
Members
AWS CodeStar
Administrator
Developers
commit
changes
Build
Changes
are built
Deployment
Code is
deployed
Monitoring
Application and
infrastructure
Ideas
Requests
Bug fixes
Developers
Best practices
Team decisions
Changes
Updates
Fixes
Creates
project and
adds users Customer
input
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
Secure, scalable, and managed git source control
Use standard git tools
Scalability, availability, and durability of Amazon S3
Encryption at rest with customer-specific keys
No repo size limit
Post-commit hooks to call out to SNS/Lambda
AWS CODECOMMIT
D E V L O U N G E
git pull/push CodeCommit
git objects in
Amazon S3
git index in
Amazon
DynamoDB
Encryption key
in AWS KMS
SSH or HTTPS
D E V L O U N G E
AWS CODECOMMIT
D E V L O U N G E
Team
Members
AWS CodeStar
Administrator
Developers
commit
changes
Build
Changes
are built
Deployment
Code is
deployed
Monitoring
Application and
infrastructure
Ideas
Requests
Bug fixes
Developers
Best practices
Team decisions
Changes
Updates
Fixes
Creates
project and
adds users Customer
input
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
D E V L O U N G E
Team
Members
AWS CodeStar
Administrator
Developers
commit
changes
Build
Changes
are built
Deployment
Code is
deployed
Monitoring
Application and
infrastructure
Ideas
Requests
Bug fixes
Developers
Best practices
Team decisions
Changes
Updates
Fixes
Creates
project and
adds users Customer
input
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
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
Only pay by the minute for the compute resources you use
CodePipeline and Jenkins integration
D E V L O U N G E
AWS CODEBUILD
“Building” code typically refers to languages that
require compiled binaries:
• .NET languages: C#, F#, VB.net, etc.
• Java and JVM languages: Java, Scala, JRuby
• Go
We also refer to the process of creating Docker
container images as “building” the image.
EC2
BUILDING YOUR CODE
Many languages don’t require building.
These are considered interpreted languages:
• PHP
• Ruby
• Python
• Node.js
CodeBuild can package dependencies
ready for deployment
EC2
D E V L O U N G E
PACKAGING YOUR CODE
1. Downloads source code
2. Executes commands configured in the buildspec in temporary
compute containers (created fresh on every build)
3. Streams the build output logs to the
service console and CloudWatch logs
4. Uploads the generated artifact to an S3 bucket
D E V L O U N G E
AWS CODEBUILD
Build process
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
D E V L O U N G E
EXAMPLE buildspec.yml
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
EXAMPLE buildspec.yml
Strangling the monolith
D E V L O U N G E
Browser
Account
Service
User
Service
Cart
Service
Common monolithic
database
Store Front
User Interface
STRANGLING THE MONOLITH
Reducing risk by using a Strangler pattern
rather than a direct cut-over
Browser
Account
Service
User
Service
Cart
Service
Common monolithic
database
Store Front
User Interface
New
Microservice
NO MORE NEW FEATURES ON THE MONOLITH
Reducing risk by using a Strangler pattern
rather than a direct cut-over
Browser
Account
Service
User
Service
Cart
Service
Common monolithic
database
New
Microservice
Store Front
User Interface
ACL
ANTI-CORRUPTION LAYER FOR INTEGRATION
Indirection Pattern
An ACL is used as a layer of abstraction and
indirection between bounded contexts. It
translates from one context to the other.
Browser
Account
Service
User
Service
Client
Cart
Service
Common monolithic
database
New
Microservice
Store Front
User Interface
User
Microservice
START WITH A SIMPLE EXISTING SERVICE
Indirection Pattern
An ACL is used as a layer of abstraction and
indirection between bounded contexts. It
translates from one context to the other.
Browser
Account
Service
User
Service
Client
Cart
Service
Common monolithic
database
New
Microservice
Store Front
User Interface
ACL
User
Microservice
Cart
Microservice
MOVE ON TO MORE COMPLICATED SERVICES
Browser
User
Microservice
Account
Microservice
Account
Service
User
Service
Client
ACL
Cart
Service
ACL
Common monolithic
database
New
Microservice
User
Microservice
Cart
Microservice
Account
Microservice
Store Front
User Interface
MOVE ON TO MORE COMPLICATED SERVICES
Browser
User
Microservice
Account
Microservice
New
Microservice
User
Microservice
Cart
Microservice
Account
Microservice
Store Front
User Interface
END STATE
D E V L O U N G E
Next step – UX modernisation
to an SPA using Angular/React
and hosted on S3
Polyglot microservices
D E V L O U N G E
TravelBuddy
UI
Flights
Database
Flight
Service
Hotel
Service
Hotels
Database
Trips Search
Service
Trips
Database
Web clients Load Balancer API Gateway
OWNERSHIP – TEAMS CONTROL THEIR DESTINY
Development
Technology
Stack
D E V L O U N G E
Polyglot persistence
D E V L O U N G E
Amazon
ElastiCache
Cache
Amazon
DynamoDB
NoSQL
Amazon
RDS
SQL
Amazon
Redshift
Amazon
S3
Object
Amazon
Glacier
POLYGLOT PERSISTENCE
D E V L O U N G E
ACID
Transactions
Fast reads
NoSQL
BLOBs High-throughput
volatile cache
HotelSpecials-SvcTripSearch-SvcFlightSpecials-Svc
Amazon
ElastiCache
Amazon
RDS
Amazon
DynamoDB
Amazon
RDS
DECENTRALISED DATA STORES
D E V L O U N G E
Scale each
independently
to optimise its
scale for
performance
and cost
Let’s do polyglot!
D E V L O U N G E
Orchestrating build and deploy
with pipelines
D E V L O U N G E
D E V L O U N G E
Team
Members
AWS CodeStar
Administrator
Developers
commit
changes
Build
Changes
are built
Deployment
Code is
deployed
Monitoring
Application and
infrastructure
Ideas
Requests
Bug fixes
Developers
Best practices
Team decisions
Changes
Updates
Fixes
Creates
project and
adds users Customer
input
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
D E V L O U N G E
Team
Members
AWS CodeStar
Administrator
Developers
commit
changes
Build
Changes
are built
Deployment
Code is
deployed
Monitoring
Application and
infrastructure
Ideas
Requests
Bug fixes
Developers
Best practices
Team decisions
Changes
Updates
Fixes
Creates
project and
adds users Customer
input
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
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
D E V L O U N G E
Source
Source
GitHub
Build
CodeBuild
AWS CodeBuild
Deploy
JavaApp
Elastic Beanstalk
Pipeline
Stage
Action
Transition
CodePipeline
MyApplication
D E V L O U N G E
Build
CodeBuild
AWS CodeBuild
NotifyDevelopers
Lambda
Parallel actions
Source
Source
GitHub
CodePipeline
MyApplication
Deploy
JavaApp
Elastic Beanstalk
D E V L O U N G E
Build
CodeBuild
AWS CodeBuild
NotifyDevelopers
Lambda
TestAPI
Runscope
Sequential actions
Deploy
JavaApp
Elastic Beanstalk
Source
Source
GitHub
CodePipeline
MyApplication
D E V L O U N G E
Build
CodeBuild
AWS CodeBuild
Staging-Deploy
JavaApp
Elastic Beanstalk
Prod-Deploy
JavaApp
Elastic Beanstalk
QATeamReview
Manual Approval
Manual Approvals
Review
CodePipeline
MyApplication
D E V L O U N G E
Debugging and traceability
D E V L O U N G E
MONOLITHIC ARCHITECTURE
D E V L O U N G E
Underlying
Framework
Data Access
Service
Flights, Trips & Hotels in
monolithic database
Flight / Hotel / Trips
Service
User Experience &
Session Manager
Complexity is hidden
inside the monolithic
codebase
TravelBuddy
UI
Flights
Database
Flight
Service
Hotel
Service
Hotels
Database
Trips Search
Service
Trips
Database
Web clients Load Balancer API Gateway
MICROSERVICES ARCHITECTURE
Complexity in
Code Base
Complexity in
Interactions &
Deployment
CHALLENGES OF MICROSERVICES
D E V L O U N G E
Team
Members
AWS CodeStar
Administrator
Developers
commit
changes
Build
Changes
are built
Deployment
Code is
deployed
Monitoring
Application and
infrastructure
Ideas
Requests
Bug fixes
Developers
Best practices
Team decisions
Changes
Updates
Fixes
Creates
project and
adds users Customer
input
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
D E V L O U N G E
Team
Members
AWS CodeStar
Administrator
Developers
commit
changes
Build
Changes
are built
Deployment
Code is
deployed
Monitoring
Application and
infrastructure
Ideas
Requests
Bug fixes
Developers
Best practices
Team decisions
Changes
Updates
Fixes
Creates
project and
adds users Customer
input
Quickly develop, build, and deploy applications on AWS
AWS CODESTAR
• Complex distributed apps are the new normal
• Debugging distributed apps is hard
• Performance management of microservice-oriented
applications is more work compared to monolithic applications
• Tracing across distributed applications is a challenge because:
• Interactions occur across many services
• Variations in logging formats – lacking standardisation
• Collection, aggregation, and collation of logs from many services
involved in a single interaction is complex
DEBUGGING AND TRACABILITY
D E V L O U N G E
Analyze and debug production, distributed
applications
Simple setup: instrument your application with X-Ray
SDK and install X-Ray Daemon
(already installed for AWS Lambda and Amazon Elastic Beanstalk environments)
End-to-End Tracing, cross-service view of requests
made to your application.
AWS X-RAY
D E V L O U N G E
Service Map provides a view of connections between
services in your application and aggregated data for
each service, including average latency and failure rates
The service provides facilities for custom injection,
data annotation, adding metadata and filtering
AWS X-RAY
D E V L O U N G E
Amazon
ECS
Amazon
EC2
AWS Elastic
Beanstalk
Amazon
SQS
Amazon
SNS
Amazon RDS:
Postgres,
MySQL,
Aurora
Amazon
DynamoDB
AWS
Lambda
AWS X-RAY SERVICE INTEGRATIONS
D E V L O U N G E
user
Amazon API
Gateway
AWS Lambda
Amazon
DynamoDB
Amazon
SQS queue
AWS X-RAY COMPONENTS
D E V L O U N G E
AWS X-RAY – INSTRUMENTING YOUR APPLICATION
1. Add the SDK as a dependency in your build configuration.
AWS X-RAY RECORDER FOR JAVA
pom.xml
2. Add a servlet filter to your deployment descriptor to trace incoming HTTP requests.
AWS X-RAY RECORDER FOR JAVA
web.xml
D E V L O U N G E
3. Configure JDBC interceptor in DataSource bean
AWS X-RAY RECORDER FOR JAVA
servlet-context.xml
D E V L O U N G E
AWS X-RAY – INSTRUMENTING YOUR APPLICATION
D E V L O U N G E
AWS X-RAY – INSTRUMENTING YOUR APPLICATION
D E V L O U N G E
AWS X-RAY – INSTRUMENTING YOUR APPLICATION
D E V L O U N G E
Easily Gain Benefits of DevOps
AWS CODESTAR
Reliability
Speed
Scale
Rapid Delivery
Security
Improved Collaboration
D E V L O U N G E
Programming Languages
Java
JavaScript
Python
Ruby
PHP
.Net Core
IDE/Code Editors
Visual Studio
Eclipse
AWS CLI
AWS CLI
CodeStar project templates support popular languages and IDEs
AWS CODESTAR
D E V L O U N G E
• Integrates with Atlassian JIRA Software
issue tracking and project management tool
• Easy JIRA and AWS CodeStar setup
ü Log into JIRA and Copy URL from any project
ü Enter JIRA URL field in the CodeStar Extensions
• Monitor application activity and manage all JIRA issues in CodeStar dashboard
• Create new JIRA tickets for work items directly dashboard
D E V L O U N G E
AWS CODESTAR
Easily Gain Benefits of DevOps
THINK BIG
START SMALL
ACT NOW
>
HOW DO I START?
Learn more about CodeStar:
https://aws.amazon.com/codestar
Check out Blog Post: Introducing AWS CodeStar:
https://aws.amazon.com/blogs/aws/new-aws-codestar/
Get started with AWS CodeStar:
https://console.aws.amazon.com/codestar
REFERENCES
D E V L O U N G E
Learn more about AWS X-Ray:
https://aws.amazon.com/x-ray
Check out Blog Post: Introducing AWS CodeStar:
https://aws.amazon.com/blogs/aws/category/aws-x-ray/
Get started with AWS CodeStar:
https://console.aws.amazon.com/xray/home
REFERENCES
D E V L O U N G E
Adam Larter
Principal Solutions Architect, Developer Specialist
Thank you!

Mais conteúdo relacionado

Mais procurados

Automate Migration to AWS with Datapipe
Automate Migration to AWS with DatapipeAutomate Migration to AWS with Datapipe
Automate Migration to AWS with Datapipe
Amazon Web Services
 

Mais procurados (20)

Deep Dive on Microservices and Docker
Deep Dive on Microservices and DockerDeep Dive on Microservices and Docker
Deep Dive on Microservices and Docker
 
Serverless Big Data Architectures: Serverless Data Analytics
Serverless Big Data Architectures: Serverless Data AnalyticsServerless Big Data Architectures: Serverless Data Analytics
Serverless Big Data Architectures: Serverless Data Analytics
 
AWS re:Invent 2016: Building SaaS Offerings for Desktop Apps with Amazon AppS...
AWS re:Invent 2016: Building SaaS Offerings for Desktop Apps with Amazon AppS...AWS re:Invent 2016: Building SaaS Offerings for Desktop Apps with Amazon AppS...
AWS re:Invent 2016: Building SaaS Offerings for Desktop Apps with Amazon AppS...
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Migrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless PlatformMigrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless Platform
 
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
 
Content Delivery: accelerare in modo sicuro e flessibile siti web e applicazioni
Content Delivery: accelerare in modo sicuro e flessibile siti web e applicazioniContent Delivery: accelerare in modo sicuro e flessibile siti web e applicazioni
Content Delivery: accelerare in modo sicuro e flessibile siti web e applicazioni
 
Peeling the Onion - Monoliths to Serverless Microservices on Amazon Web Services
Peeling the Onion - Monoliths to Serverless Microservices on Amazon Web ServicesPeeling the Onion - Monoliths to Serverless Microservices on Amazon Web Services
Peeling the Onion - Monoliths to Serverless Microservices on Amazon Web Services
 
AWS Lambda: Event-driven Code for Devices and the Cloud
AWS Lambda: Event-driven Code for Devices and the CloudAWS Lambda: Event-driven Code for Devices and the Cloud
AWS Lambda: Event-driven Code for Devices and the Cloud
 
Architetture Serverless: concentrarsi sull'idea, non sull'infrastruttura
Architetture Serverless: concentrarsi sull'idea, non sull'infrastrutturaArchitetture Serverless: concentrarsi sull'idea, non sull'infrastruttura
Architetture Serverless: concentrarsi sull'idea, non sull'infrastruttura
 
Automate Migration to AWS with Datapipe
Automate Migration to AWS with DatapipeAutomate Migration to AWS with Datapipe
Automate Migration to AWS with Datapipe
 
Workshop : Wild Rydes Takes Off - The Dawn of a New Unicorn
Workshop : Wild Rydes Takes Off - The Dawn of a New UnicornWorkshop : Wild Rydes Takes Off - The Dawn of a New Unicorn
Workshop : Wild Rydes Takes Off - The Dawn of a New Unicorn
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
 
ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017
 
AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...
AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...
AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...
 
Wild Rydes - Serverless DevOps to the Rescue
Wild Rydes - Serverless DevOps to the RescueWild Rydes - Serverless DevOps to the Rescue
Wild Rydes - Serverless DevOps to the Rescue
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
 

Semelhante a Real World Development: Peeling The Onion – Migrating A Monolithic Application to Microservices

Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
Amazon Web Services
 

Semelhante a Real World Development: Peeling The Onion – Migrating A Monolithic Application to Microservices (20)

DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software DeliveryDevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software Delivery
 
Dev Ops on AWS - Accelerating Software Delivery - AWS-Summit SG 2017
Dev Ops on AWS - Accelerating Software Delivery - AWS-Summit SG 2017Dev Ops on AWS - Accelerating Software Delivery - AWS-Summit SG 2017
Dev Ops on AWS - Accelerating Software Delivery - AWS-Summit SG 2017
 
How to Deploy .NET Code to AWS from Within Visual Studio - AWS Online Tech Talks
How to Deploy .NET Code to AWS from Within Visual Studio - AWS Online Tech TalksHow to Deploy .NET Code to AWS from Within Visual Studio - AWS Online Tech Talks
How to Deploy .NET Code to AWS from Within Visual Studio - AWS Online Tech Talks
 
Intro to AWS Developer Tools, featuring AWS CodeStar
Intro to AWS Developer Tools, featuring AWS CodeStarIntro to AWS Developer Tools, featuring AWS CodeStar
Intro to AWS Developer Tools, featuring AWS CodeStar
 
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
 
Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...
Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...
Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...
 
Running Business-Critical Applications on the AWS Cloud
Running Business-Critical Applications on the AWS CloudRunning Business-Critical Applications on the AWS Cloud
Running Business-Critical Applications on the AWS Cloud
 
Development tools
Development toolsDevelopment tools
Development tools
 
DevOps automation for AWS
DevOps automation for AWSDevOps automation for AWS
DevOps automation for AWS
 
Collision 2018: CodeStar for CICD Pipelines
Collision 2018: CodeStar for CICD PipelinesCollision 2018: CodeStar for CICD Pipelines
Collision 2018: CodeStar for CICD Pipelines
 
Introducing AWS CodeStar and the AWS CI:CD workflow - AWS Summit Tel Aviv 2017
Introducing AWS CodeStar and the  AWS CI:CD workflow - AWS Summit Tel Aviv 2017Introducing AWS CodeStar and the  AWS CI:CD workflow - AWS Summit Tel Aviv 2017
Introducing AWS CodeStar and the AWS CI:CD workflow - AWS Summit Tel Aviv 2017
 
Developing applications on AWS with .NET core - AWS Cape Town Summit 2018
Developing applications on AWS with .NET core - AWS Cape Town Summit 2018Developing applications on AWS with .NET core - AWS Cape Town Summit 2018
Developing applications on AWS with .NET core - AWS Cape Town Summit 2018
 
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
 
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...
 
Automate Software Deployments on EC2 with AWS CodeDeploy
Automate Software Deployments on EC2 with AWS CodeDeployAutomate Software Deployments on EC2 with AWS CodeDeploy
Automate Software Deployments on EC2 with AWS CodeDeploy
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
 
Introducing amplify and full stack demo app built with vue.js, graph ql, auth...
Introducing amplify and full stack demo app built with vue.js, graph ql, auth...Introducing amplify and full stack demo app built with vue.js, graph ql, auth...
Introducing amplify and full stack demo app built with vue.js, graph ql, auth...
 
Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at Scale
 
ACDKOCHI19 - CI / CD using AWS Developer Tools
ACDKOCHI19 - CI / CD using AWS Developer ToolsACDKOCHI19 - CI / CD using AWS Developer Tools
ACDKOCHI19 - CI / CD using AWS Developer Tools
 

Mais de 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
 

Mais de 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
 

Real World Development: Peeling The Onion – Migrating A Monolithic Application to Microservices

  • 1. Adam Larter Principal Solutions Architect, Developer Specialist Real-world development Peeling the onion - migrating a monolithic application to microservices
  • 2. • Approaches to taking an enterprise Java monolith and breaking it into microservices on AWS. • Using the AWS developer tools - AWS CodeStar, AWS CodeCommit, AWS CodePipeline and AWS CodeBuild - to orchestrate and automate our deployment. • Using AWS Lambda and Amazon API Gateway to host polyglot serverless microservices. • Using AWS X-Ray to capture custom application events, trace requests through the AWS SDKs and analyse underlying service performance. LEARNING OBJECTIVES D E V L O U N G E
  • 3. A compelling event Some technical debt Big business opportunity D E V L O U N G E
  • 4. ARCHITECTURE Single vertically-scaled server hosted off-cloud Single vertically-scaled server hosted off-cloud D E V L O U N G E
  • 5. ARCHITECTURE Single vertically-scaled server hosted off-cloud Single vertically-scaled server hosted off-cloud D E V L O U N G E XML / JSON data dumps from 3rd party providers WWW / HTML end users
  • 6. ARCHITECTURE Single vertically-scaled server hosted off-cloud Single vertically-scaled server hosted off-cloud D E V L O U N G E XML / JSON data dumps from 3rd party providers XML / JSON REST endpoint for 3rd party integrators WWW / HTML end users
  • 7. D E V L O U N G E OUR MONOLITH
  • 8. BUSINESS REQUIREMENTS • Go faster – deliver new features at increased cadence. Speed wins in business • Be more stable – no more business interruptions due to technical problems • Increase quality – all changes and updates to production should work first time, every time • Be cheaper – reduce TCO • Business long-term and short-term solution “Let’s move this workload to the cloud” D E V L O U N G E
  • 9. How can we quickly set up an end-to-end DevOps toolchain for our monolith? D E V L O U N G E
  • 10. 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 AWS CODESTAR D E V L O U N G E
  • 11. Let’s create a CodeStar project for our monolith D E V L O U N G E
  • 12. Quickly develop, build, and deploy applications on AWS AWS CODESTAR D E V L O U N G E Collaborate securely with your team: Manage team access, add team members to projects by role i.e. owners, contributors Integrated issue tracking and project management: Integrates Atlassian JIRA Software to easily manage issues directly from CodeStar dashboard and monitor application progress and activity
  • 13. Quickly develop, build, and deploy applications on AWS AWS CODESTAR D E V L O U N G E Develop on AWS in minutes: Easily set up your entire development environment and programming tools for coding, building, testing, and deploying on AWS Supported for popular programming languages: Develop variety of applications using language of choice including Java, NodeJS, JavaScript, PHP, Ruby, Python and now .Net Core
  • 14. Preconfigured AWS CloudFormation templates for quick development project creation • Automatic provisioning of underlying AWS services so the team can get coding quickly Over twenty different AWS CodeStar project templates Support for websites, web services, microservices, Alexa Skills dev projects (and more) 3 Hosting environments § Self-Managed: Amazon EC2 with AWS CodeDeploy § Managed: Elastic Beanstalk § Serverless: AWS Lambda Amazon EC2 AWS CodeDeploy AWS Elastic Beanstalk AWS Lambda AWS CODESTAR PROJECT TEMPLATES D E V L O U N G E
  • 15. • Single pane of glass to manage your project & build pipeline • Coordinate your day-to-day development activities • Dashboard provides tools to view real time application activity, monitor builds, and flow of code through deployment pipeline • Customize project dashboard by adding, removing, moving tiles • Add customizable team wiki tile for team resources sharing or other purposes (eg. show code snippets) • Use CodeStar project extensions to add tiles and functionality dashboard AWS CODESTAR PROJECT DASHBOARD D E V L O U N G E
  • 16. ARCHITECTURE Single vertically-scaled server hosted off-cloud Single vertically-scaled server hosted off-cloud D E V L O U N G E
  • 18. HIDDEN COMPLEXITY One Monolith – many components Cold/Hot Read/Write master D E V L O U N G E Single vertically-scaled server hosted off-cloud
  • 19. D E V L O U N G E Underlying Framework Data Access Service Single vertically-scaled server hosted off-cloud Flight / Hotel / Trip Services User Experience & Session Manager HIDDEN COMPLEXITY
  • 20. • Monolithic codebase • Stateful application logic • Tight coupling • Technical debt • Performance issues • Maintenance difficulties • Implementation detail leakage in the API • Data tier complexities technology and lock-in • Lots of undifferentiated heavy lifting TECHNICAL CHALLENGES D E V L O U N G E
  • 21. • Deploy to AWS Elastic Beanstalk PaaS immediately (lift-and-shift to meet our compelling event deadline) • Migrate over time to a microservices architecture as we re-think and re-imagine our business and technical solution • Use AWS Lambda to host our microservices as serverless • Restructure organisation around business capability • Delegate ownership of each microservice to a dedicated team TECHNICAL SOLUTION D E V L O U N G E
  • 22. Monolith Microservices Monolithic off-cloud Elastic Beanstalk ? Identify candidate microservice, design APIs CodePipeline CodeBuild CodeCommit CodeStar Lambda “Lift&Shift” Time D E V L O U N G E TECHNICAL SOLUTION API Gateway Compelling event
  • 23. Monolith Microservices Monolithic off-cloud Elastic Beanstalk ? Identify candidate microservice, design APIs CodePipeline CodeBuild CodeCommit CodeStar Lambda “Lift&Shift” Time D E V L O U N G E TECHNICAL SOLUTION API Gateway Compelling event
  • 24. How does AWS CodeStar help? D E V L O U N G E
  • 25. AWS CodePipeline AWS CodeCommit AWS CodeBuildAWS CodeDeployAWS CodeStar AWS CODE SERVICES D E V L O U N G E
  • 26. • Integration tests with other systems • Load testing • UI tests • Penetration testing 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 dev, staging, uat or production environments RELEASE PROCESSES HAVE FOUR MAIN PHASES
  • 27. Continuous integration Continuous delivery Continuous deployment RELEASE PROCESS LEVELS Source Build Test Production
  • 28. Source Build Test Production AWS CodeCommit Software Release Steps: AWS CODE SERVICES D E V L O U N G E
  • 29. Source Build Test Production AWS CodeBuild Software Release Steps: AWS CODE SERVICES D E V L O U N G E
  • 30. Source Build Test Production Third Party Tooling Software Release Steps: AWS CODE SERVICES D E V L O U N G E
  • 31. Source Build Test Production AWS CodeDeploy Software Release Steps: AWS CODE SERVICES D E V L O U N G E
  • 32. Source Build Test Production Third Party Tooling AWS CodeCommit AWS CodeBuild AWS CodeDeploy AWS CodePipeline Software Release Steps: AWS CODE SERVICES D E V L O U N G E
  • 33. Source Build Test Production Third Party Tooling AWS CodeCommit AWS CodeBuild AWS CodeDeploy AWS CodePipeline AWS CodeStar Software Release Steps: AWS CODE SERVICES
  • 34. ü Project Templates ü Team Access Management with AWS IAM ü Managed Build Service with AWS Code Build ü Unified Project Dashboard using Amazon CloudWatch monitoring service ü Issue tracking and project management tool in dashboard via integrated Atlassian JIRA Software ü AWS CodeCommit for Secure Hosted Git Repository ü Automated App Deployments with AWS CodeDeploy and AWS CloudFormation ü Integration of AWS CodePipeline for Automated Continuous Delivery Pipeline AWS CODESTAR FEATURES D E V L O U N G E
  • 35. THE 6 R’s OF MIGRATION RetainR1 R4 R2 R5 R3 R6 • Keep host/application in source environment • Minimal analysis/validation of scope & application affinity Retire • Decommission • No migration of application Rehost • Like-for-life app migration to AWS • Lift-and-shift approach • Minimal effort to make the app work ‘on’ the cloud or take advantage of cloud native services Replatform • Up-version the OS/DB • Make use of Amazon RDS • Some app changes • App re-installation and clean-up Refactor • OS/DB porting • Middleware and app changes to use AWS services natively • Data conversion, DB transition (eg: MySQL & Aurora) Rearchitect • Application architecture changes • Using SaaS-based offerings • Porting of application architecture • Data modernisation, application consolidation, make use of AWS-native managed services
  • 36. THE 6 R’s OF MIGRATION RetainR1 R4 R2 R5 R3 R6 • Keep host/application in source environment • Minimal analysis/validation of scope & application affinity Retire • Decommission • No migration of application Rehost • Like-for-life app migration to AWS • Lift-and-shift approach • Minimal effort to make the app work ‘on’ the cloud or take advantage of cloud native services Replatform • Up-version the OS/DB • Make use of Amazon RDS • Some app changes • App re-installation and clean-up Refactor • OS/DB porting • Middleware and app changes to use AWS services natively • Data conversion, DB transition (eg: MySQL & Aurora) Rearchitect • Application architecture changes • Using SaaS-based offerings • Porting of application architecture • Data modernisation, application consolidation, make use of AWS-native managed services ON the cloud
  • 37. THE 6 R’s OF MIGRATION RetainR1 R4 R2 R5 R3 R6 • Keep host/application in source environment • Minimal analysis/validation of scope & application affinity Retire • Decommission • No migration of application Rehost • Like-for-life app migration to AWS • Lift-and-shift approach • Minimal effort to make the app work ‘on’ the cloud or take advantage of cloud native services Replatform • Up-version the OS/DB • Make use of Amazon RDS • Some app changes • App re-installation and clean-up Refactor • OS/DB porting • Middleware and app changes to use AWS services natively • Data conversion, DB transition (eg: MySQL & Aurora) Rearchitect • Application architecture changes • Using SaaS-based offerings • Porting of application architecture • Data modernisation, application consolidation, make use of AWS-native managed services IN the cloud
  • 38. THE 6 R’s OF MIGRATION RetainR1 R4 R2 R5 R3 R6 • Keep host/application in source environment • Minimal analysis/validation of scope & application affinity Retire • Decommission • No migration of application Rehost • Like-for-life app migration to AWS • Lift-and-shift approach • Minimal effort to make the app work ‘on’ the cloud or take advantage of cloud native services Replatform • Up-version the OS/DB • Make use of Amazon RDS • Some app changes • App re-installation and clean-up Refactor • OS/DB porting • Middleware and app changes to use AWS services natively • Data conversion, DB transition (eg: MySQL & Aurora) Rearchitect • Application architecture changes • Using SaaS-based offerings • Porting of application architecture • Data modernisation, application consolidation, make use of AWS-native managed services FOR the cloud
  • 39. • Cloud infrastructure introduces new concepts • Off-cloud design doesn’t always translate to cloud principles • Lift-and-shift often limits the value proposition but addresses our time constraints for the compelling event • Applications that don’t embrace cloud-native design don’t fully realize scale, availability, and cost benefits • Cloud design principles are still emerging, but based on well-known highly scalable application patterns D E V L O U N G E THE 6 R’s OF MIGRATION
  • 40. Monolith Microservices Monolithic off-cloud Elastic Beanstalk ? Identify candidate microservice, design APIs CodePipeline CodeBuild CodeCommit CodeStar Lambda “Lift&Shift” D E V L O U N G E TECHNICAL SOLUTION API Gateway Rehost • Like-for-life app migration to AWS • Lift-and-shift approach • Minimal effort to make the app work ‘on’ the cloud or take advantage of cloud native services
  • 41. • Quickly deploy and manage applications in the AWS cloud without worrying about the application infrastructure • True PaaS – automatically handles all the details of patching, resource provisioning, load balancing & auto-scaling • Launch your Java, PHP, .NET, Node.js, Python, and Ruby applications in a matter of minutes Automate N-tier web apps on PaaS AWS ELASTIC BEANSTALK D E V L O U N G E
  • 42. Automate N-tier web apps on PaaS AWS ELASTIC BEANSTALK
  • 43. 192.168.96.0/20 AZ-BAZ-A Public Subnet 192.168.100.0/24 Public Subnet 192.168.102.0/24 192.168.100.210 NAT1 NAT2 WWW WWW Private Subnet 192.168.104.0/24 Private Subnet 192.168.105.0/24 Private Subnet 192.168.106.0/24 Private Subnet 192.168.107.0/24 192.168.101.10 AD DC 1 AD DC 2ADFS Public ELB AWS Region D E V L O U N G E
  • 44. Test customers WWW WWWPublic ELB Elastic Load Balancer Web servers Security Groups Auto-scaling & self-healing D E V L O U N G E
  • 45. Re-architecting our application as serverless microservices D E V L O U N G E
  • 46. D E V L O U N G E https://martinfowler.com/articles/microservices.html
  • 47. D E V L O U N G E https://martinfowler.com/articles/microservices.html
  • 48. Microservices approach advocates creating a system from a collection of small, isolated services, each of which owns their data, and is independently isolated, scalable and resilient to failure D E V L O U N G E
  • 49. • Organized around business capability • Decentralised ownership of services • Automated deployment • Intelligent endpoints MICROSERVICES CHARACTERISTICS D E V L O U N G E
  • 50. Monolithic Microservices • Simple deployments • Binary failure modes • Inter-module refactoring • Technology monoculture • Vertical scaling • Shared datastore • Owned by everyone • Partial deployments • Graceful degradation • Strong module boundaries • Technology diversity • Horizontal scaling • Discrete datastores • Owned by single dev or team D E V L O U N G E
  • 51. • Increased speed and agility and ability to innovate Changes can be made to the decoupled architecture quickly with low risk • Reduced cost Designing, implementing and scaling microservices is cost effective because they are decoupled and have no dependencies • Improved resilience If one microservice fails, the entire system will continue to function MICROSERVICES CHARACTERISTICS
  • 52. • Be small enough to be re-written in two weeks • Follow DDD bounded contexts • Be run by the team that built them • Own their own state and do not share • Be developed by a team that can be fed by 2 pizzas • Have freedom to use the right technology stack for the job MICROSERVICES CHARACTERISTICS
  • 53. • Isn’t it just Service-Oriented Architecture (SOA)? • How micro is ‘micro’? How many is enough/too many? • Just like object oriented code - low coupling, highly cohesive, data hidden, encapsulation, defined interface • Not just a technology change! MICROSERVICES ARCHITECTURES D E V L O U N G E
  • 54. MONOLITHIC ORGANISATION D E V L O U N G E Organised on technology capabilities (Conway’s Law) Web Tier App Tier DB OrganisationalStructure ApplicationArchitecture UI Team App Logic Team DBA Team
  • 55. MICROSERVICES ORGANISATION D E V L O U N G E Organised on business initiativesOrganisationalStructure ApplicationArchitecture Flight Service Team Trips Service Team Hotel Service Team Web Tier App Tier DB
  • 57. Peeling the onion: How do we identify candidate microservices? D E V L O U N G E
  • 58. Monolith Microservices Monolithic off-cloud Elastic Beanstalk ? Identify candidate microservice, design APIs CodePipeline CodeBuild CodeCommit CodeStar Lambda “Lift&Shift” D E V L O U N G E TECHNICAL SOLUTION API Gateway
  • 59. D E V L O U N G E • Domain-driven design aligns well with the characteristics of microservices – encapsulated, defined-interfaces, isolated • Microservices should have a well-defined bounded context and should “just do one thing” • A bounded context encapsulates a single domain (eg, application service or data model) • Defines the integration points with other domains • Beware of creating monolithic microservices! DDD & BOUNDED CONTEXT
  • 60. D E V L O U N G E • Look for ‘seams’ between service classes • Many of these will own their own DAO and will be well isolated • Services with CRUD-style interfaces with some related business logic are good candidates • Look for classes with no or few dependencies • Try some refactoring to clean up the code before you start PEELING THE ONION
  • 61. Serverless microservices with AWS Lambda D E V L O U N G E
  • 62. • VMs – machine as the unit of scale • “I want to configure machines, storage, networking, and my OS” • Containers – application as the unit of scale • “I want to run servers, configure applications, and control scaling” • Serverless – functions as the unit of scale • “Run my code when it’s needed” ECS EC2 AWS Lambda CHOOSING COMPUTE INFRASTRUCTURE D E V L O U N G E
  • 63. Continuous scalingNo servers to manage Never pay for idle – no cold servers D E V L O U N G E AWS LAMBDA FOR MICROSERVICES
  • 64. Monolith Microservices Monolithic off-cloud Elastic Beanstalk ? Identify candidate microservice, design APIs CodePipeline CodeBuild CodeCommit CodeStar Lambda “Lift&Shift” D E V L O U N G E TECHNICAL SOLUTION API Gateway
  • 65. Let’s create a CodeStar project for our first microservice on AWS Lambda D E V L O U N G E
  • 66. D E V L O U N G E Team Members AWS CodeStar Administrator Developers commit changes Build Changes are built Deployment Code is deployed Monitoring Application and infrastructure Ideas Requests Bug fixes Developers Best practices Team decisions Changes Updates Fixes Creates project and adds users Customer input Quickly develop, build, and deploy applications on AWS AWS CODESTAR
  • 67. D E V L O U N G E Team Members AWS CodeStar Administrator Developers commit changes Build Changes are built Deployment Code is deployed Monitoring Application and infrastructure Ideas Requests Bug fixes Developers Best practices Team decisions Changes Updates Fixes Creates project and adds users Customer input Quickly develop, build, and deploy applications on AWS AWS CODESTAR
  • 68. D E V L O U N G E Team Members AWS CodeStar Administrator Developers commit changes Build Changes are built Deployment Code is deployed Monitoring Application and infrastructure Ideas Requests Bug fixes Developers Best practices Team decisions Changes Updates Fixes Creates project and adds users Customer input Quickly develop, build, and deploy applications on AWS AWS CODESTAR
  • 69. Secure, scalable, and managed git source control Use standard git tools Scalability, availability, and durability of Amazon S3 Encryption at rest with customer-specific keys No repo size limit Post-commit hooks to call out to SNS/Lambda AWS CODECOMMIT D E V L O U N G E
  • 70. git pull/push CodeCommit git objects in Amazon S3 git index in Amazon DynamoDB Encryption key in AWS KMS SSH or HTTPS D E V L O U N G E AWS CODECOMMIT
  • 71. D E V L O U N G E Team Members AWS CodeStar Administrator Developers commit changes Build Changes are built Deployment Code is deployed Monitoring Application and infrastructure Ideas Requests Bug fixes Developers Best practices Team decisions Changes Updates Fixes Creates project and adds users Customer input Quickly develop, build, and deploy applications on AWS AWS CODESTAR
  • 72. D E V L O U N G E Team Members AWS CodeStar Administrator Developers commit changes Build Changes are built Deployment Code is deployed Monitoring Application and infrastructure Ideas Requests Bug fixes Developers Best practices Team decisions Changes Updates Fixes Creates project and adds users Customer input Quickly develop, build, and deploy applications on AWS AWS CODESTAR
  • 73. 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 Only pay by the minute for the compute resources you use CodePipeline and Jenkins integration D E V L O U N G E AWS CODEBUILD
  • 74. “Building” code typically refers to languages that require compiled binaries: • .NET languages: C#, F#, VB.net, etc. • Java and JVM languages: Java, Scala, JRuby • Go We also refer to the process of creating Docker container images as “building” the image. EC2 BUILDING YOUR CODE
  • 75. Many languages don’t require building. These are considered interpreted languages: • PHP • Ruby • Python • Node.js CodeBuild can package dependencies ready for deployment EC2 D E V L O U N G E PACKAGING YOUR CODE
  • 76. 1. Downloads source code 2. Executes commands configured in the buildspec in temporary compute containers (created fresh on every build) 3. Streams the build output logs to the service console and CloudWatch logs 4. Uploads the generated artifact to an S3 bucket D E V L O U N G E AWS CODEBUILD Build process
  • 77. 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 D E V L O U N G E EXAMPLE buildspec.yml
  • 78. 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 EXAMPLE buildspec.yml
  • 79. Strangling the monolith D E V L O U N G E
  • 80. Browser Account Service User Service Cart Service Common monolithic database Store Front User Interface STRANGLING THE MONOLITH Reducing risk by using a Strangler pattern rather than a direct cut-over
  • 81. Browser Account Service User Service Cart Service Common monolithic database Store Front User Interface New Microservice NO MORE NEW FEATURES ON THE MONOLITH Reducing risk by using a Strangler pattern rather than a direct cut-over
  • 82. Browser Account Service User Service Cart Service Common monolithic database New Microservice Store Front User Interface ACL ANTI-CORRUPTION LAYER FOR INTEGRATION Indirection Pattern An ACL is used as a layer of abstraction and indirection between bounded contexts. It translates from one context to the other.
  • 83. Browser Account Service User Service Client Cart Service Common monolithic database New Microservice Store Front User Interface User Microservice START WITH A SIMPLE EXISTING SERVICE Indirection Pattern An ACL is used as a layer of abstraction and indirection between bounded contexts. It translates from one context to the other.
  • 84. Browser Account Service User Service Client Cart Service Common monolithic database New Microservice Store Front User Interface ACL User Microservice Cart Microservice MOVE ON TO MORE COMPLICATED SERVICES
  • 86. Browser User Microservice Account Microservice New Microservice User Microservice Cart Microservice Account Microservice Store Front User Interface END STATE D E V L O U N G E Next step – UX modernisation to an SPA using Angular/React and hosted on S3
  • 87. Polyglot microservices D E V L O U N G E
  • 88. TravelBuddy UI Flights Database Flight Service Hotel Service Hotels Database Trips Search Service Trips Database Web clients Load Balancer API Gateway OWNERSHIP – TEAMS CONTROL THEIR DESTINY Development Technology Stack D E V L O U N G E
  • 89. Polyglot persistence D E V L O U N G E
  • 90. Amazon ElastiCache Cache Amazon DynamoDB NoSQL Amazon RDS SQL Amazon Redshift Amazon S3 Object Amazon Glacier POLYGLOT PERSISTENCE D E V L O U N G E ACID Transactions Fast reads NoSQL BLOBs High-throughput volatile cache
  • 91. HotelSpecials-SvcTripSearch-SvcFlightSpecials-Svc Amazon ElastiCache Amazon RDS Amazon DynamoDB Amazon RDS DECENTRALISED DATA STORES D E V L O U N G E Scale each independently to optimise its scale for performance and cost
  • 92. Let’s do polyglot! D E V L O U N G E
  • 93. Orchestrating build and deploy with pipelines D E V L O U N G E
  • 94. D E V L O U N G E Team Members AWS CodeStar Administrator Developers commit changes Build Changes are built Deployment Code is deployed Monitoring Application and infrastructure Ideas Requests Bug fixes Developers Best practices Team decisions Changes Updates Fixes Creates project and adds users Customer input Quickly develop, build, and deploy applications on AWS AWS CODESTAR
  • 95. D E V L O U N G E Team Members AWS CodeStar Administrator Developers commit changes Build Changes are built Deployment Code is deployed Monitoring Application and infrastructure Ideas Requests Bug fixes Developers Best practices Team decisions Changes Updates Fixes Creates project and adds users Customer input Quickly develop, build, and deploy applications on AWS AWS CODESTAR
  • 96. 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 D E V L O U N G E
  • 99. Build CodeBuild AWS CodeBuild NotifyDevelopers Lambda TestAPI Runscope Sequential actions Deploy JavaApp Elastic Beanstalk Source Source GitHub CodePipeline MyApplication D E V L O U N G E
  • 100. Build CodeBuild AWS CodeBuild Staging-Deploy JavaApp Elastic Beanstalk Prod-Deploy JavaApp Elastic Beanstalk QATeamReview Manual Approval Manual Approvals Review CodePipeline MyApplication D E V L O U N G E
  • 101. Debugging and traceability D E V L O U N G E
  • 102. MONOLITHIC ARCHITECTURE D E V L O U N G E Underlying Framework Data Access Service Flights, Trips & Hotels in monolithic database Flight / Hotel / Trips Service User Experience & Session Manager Complexity is hidden inside the monolithic codebase
  • 104. Complexity in Code Base Complexity in Interactions & Deployment CHALLENGES OF MICROSERVICES
  • 105. D E V L O U N G E Team Members AWS CodeStar Administrator Developers commit changes Build Changes are built Deployment Code is deployed Monitoring Application and infrastructure Ideas Requests Bug fixes Developers Best practices Team decisions Changes Updates Fixes Creates project and adds users Customer input Quickly develop, build, and deploy applications on AWS AWS CODESTAR
  • 106. D E V L O U N G E Team Members AWS CodeStar Administrator Developers commit changes Build Changes are built Deployment Code is deployed Monitoring Application and infrastructure Ideas Requests Bug fixes Developers Best practices Team decisions Changes Updates Fixes Creates project and adds users Customer input Quickly develop, build, and deploy applications on AWS AWS CODESTAR
  • 107. • Complex distributed apps are the new normal • Debugging distributed apps is hard • Performance management of microservice-oriented applications is more work compared to monolithic applications • Tracing across distributed applications is a challenge because: • Interactions occur across many services • Variations in logging formats – lacking standardisation • Collection, aggregation, and collation of logs from many services involved in a single interaction is complex DEBUGGING AND TRACABILITY D E V L O U N G E
  • 108. Analyze and debug production, distributed applications Simple setup: instrument your application with X-Ray SDK and install X-Ray Daemon (already installed for AWS Lambda and Amazon Elastic Beanstalk environments) End-to-End Tracing, cross-service view of requests made to your application. AWS X-RAY D E V L O U N G E
  • 109. Service Map provides a view of connections between services in your application and aggregated data for each service, including average latency and failure rates The service provides facilities for custom injection, data annotation, adding metadata and filtering AWS X-RAY D E V L O U N G E
  • 111. user Amazon API Gateway AWS Lambda Amazon DynamoDB Amazon SQS queue AWS X-RAY COMPONENTS D E V L O U N G E
  • 112. AWS X-RAY – INSTRUMENTING YOUR APPLICATION
  • 113. 1. Add the SDK as a dependency in your build configuration. AWS X-RAY RECORDER FOR JAVA pom.xml
  • 114. 2. Add a servlet filter to your deployment descriptor to trace incoming HTTP requests. AWS X-RAY RECORDER FOR JAVA web.xml D E V L O U N G E
  • 115. 3. Configure JDBC interceptor in DataSource bean AWS X-RAY RECORDER FOR JAVA servlet-context.xml D E V L O U N G E
  • 116. AWS X-RAY – INSTRUMENTING YOUR APPLICATION D E V L O U N G E
  • 117. AWS X-RAY – INSTRUMENTING YOUR APPLICATION D E V L O U N G E
  • 118. AWS X-RAY – INSTRUMENTING YOUR APPLICATION D E V L O U N G E
  • 119. Easily Gain Benefits of DevOps AWS CODESTAR Reliability Speed Scale Rapid Delivery Security Improved Collaboration D E V L O U N G E
  • 120. Programming Languages Java JavaScript Python Ruby PHP .Net Core IDE/Code Editors Visual Studio Eclipse AWS CLI AWS CLI CodeStar project templates support popular languages and IDEs AWS CODESTAR D E V L O U N G E
  • 121. • Integrates with Atlassian JIRA Software issue tracking and project management tool • Easy JIRA and AWS CodeStar setup ü Log into JIRA and Copy URL from any project ü Enter JIRA URL field in the CodeStar Extensions • Monitor application activity and manage all JIRA issues in CodeStar dashboard • Create new JIRA tickets for work items directly dashboard D E V L O U N G E AWS CODESTAR Easily Gain Benefits of DevOps
  • 122. THINK BIG START SMALL ACT NOW > HOW DO I START?
  • 123. Learn more about CodeStar: https://aws.amazon.com/codestar Check out Blog Post: Introducing AWS CodeStar: https://aws.amazon.com/blogs/aws/new-aws-codestar/ Get started with AWS CodeStar: https://console.aws.amazon.com/codestar REFERENCES D E V L O U N G E
  • 124. Learn more about AWS X-Ray: https://aws.amazon.com/x-ray Check out Blog Post: Introducing AWS CodeStar: https://aws.amazon.com/blogs/aws/category/aws-x-ray/ Get started with AWS CodeStar: https://console.aws.amazon.com/xray/home REFERENCES D E V L O U N G E
  • 125. Adam Larter Principal Solutions Architect, Developer Specialist Thank you!