In today's "always connected" world, brands must find unique ways to engage customers anywhere, anytime and across an ever-changing variety of formats. Large enterprises are often challenged by aging, monolithic applications that limit their ability to adapt quickly to changes. In this session, the BMW Group discusses how it is using microservices on the AWS Cloud to transform its customer engagement platform. Learn how the company built its Unified Configurator Platform (UCP) to serve 30+ branded customer-facing applications with over 300 RESTful API endpoints using services such as Amazon API Gateway, AWS Lambda, Amazon Elastic Beanstalk, and AWS Elastic Container Service. Additionally, the BMW Group discusses how Game Days and Chaos Monkey methodologies led to the success of the overall program.
11. Page 11Lanners & Roedig, BMW Group | AWS re:Invent 2018
THE PLATFORM CONSOLIDATES THE VEHICLE PRODUCTS AS SERVICES.
~7
Engines
~12
Colors
~14
Wheels
~11
Upholstery
~7
Trims
~90
Optional
Equipment
Many possibilitiesto configureyour dream car
=
OUR PLATFORM CONSOLIDATES THE VEHICLE PRODUCTS AS SERVICES
12. Page 12Lanners & Roedig, BMW Group | AWS re:Invent 2018
EXAMPLES OF FRONT ENDS THAT USE OUR CONFIGURATOR PLATFORM
Dealer iPad Configurator bmw.de mini.at bmw-motorrad.de 26+ Systems
13. Page 13Lanners & Roedig, BMW Group | AWS re:Invent 2018
UNIFIED CONFIGURATOR PLATFORM: CENTRAL
ENGAGEMENT PLATFORM AS BUSINESS ENABLER
Unified Configurator Platform
Accessories
Product Data
Official
Technical Data
Net-Gross-Price
Calculation
Virtual Garage
Constructability
Check
Data Import Data Generation
Product Data Technical Data …
Consumes API
...
Technical
Calculations
Key facts:
- RESTful API
- Used by ~30 products
- Hundreds of Mio API
calls per month
- Supports all BMW
Group brands and
markets
15. Page 15Lanners & Roedig, BMW Group | AWS re:Invent 2018
A MONOLITHIC SYSTEM ISN’T BYDEFINITION A BAD THING
Monolith
Team
Clients
Benefits
- Fast development of a first production-ready MVP
- No need to handle the challenges of a distributed system
Challenges and driving factors for going the next step
- Increased number of requirements led to an increase of
the overall complexity
16. Page 16Lanners & Roedig, BMW Group | AWS re:Invent 2018
MICROSERVICES WITH API-FIRST STRATEGY: ENABLES FASTER DEVELOPMENT AND
INCREASEDTRANSPARENCY
Benefits
- Increased transparency for API consumer due to API-
first approach
- Multiple teams can work independently
Challenges and driving factors for going the next
step
- Latency performance to provide our service on a
worldwide basis
- Broader solution scope needed to satisfy business
needs
Teams
Clients
MS
MS
MS
MS
API-First
17. Page 17Lanners & Roedig, BMW Group | AWS re:Invent 2018
GAME CHANGER: BRINGINGTHE MICROSERVICES IN A “LIFT-THINK-SHIFT”
APPROACHTO AWS
AWS Elastic Beanstalk
Amazon API Gateway
Amazon ECS + AWS Batch
Amazon RDS
AWS-Cloud
Glassfish 4
Microservice
Software Business Logic
API Specification Transformation into API-GW
Transformation from
ORACLEto Postgres
API-Sec. Auth. Information
Dockerizethe business logic
Specifications
WEB-EAM Master Solution
On-Premises Off-Premises
API Interface (generated)
Authentication Information
Docker + GF4
Microservice DB
Software Business Logic
Rewrite import procedures
from PL/SQLto Java
Microservice DB
Import Job
Docker
Software Import Job
18. Page 18Lanners & Roedig, BMW Group | AWS re:Invent 2018
WE DEFINED A SINGLE ENTRY POINT TO OUR SERVICES
AWS
API Gateway
AWS
CloudFront
Amazon
Route 53
AWS
Lambda
AWS
DynamoDB
Elastic Beanstalk Environment
Network Load
Balancer
ELB Subnet A/B App Subnet A/B
Amazon
Route 53
VPC Link
EB Environment
Microservice A
Amazon
EC2
Proxy
19. Page 19Lanners & Roedig, BMW Group | AWS re:Invent 2018
OUR BASE TECH STACK FOR MICROSERVICES ON BEANSTALK
Elastic Beanstalk Environment
Application
Load
Balancer
ELB Subnet A/B App Subnet A/B
Amazon
EC2
Auto Scaling Group
Amazon RDS
(Multi AZ)
DB Subnet A/B
Security Group
Security Group
Microservice A
nstalk Environment
d
B App Subnet A/B
Amazon
Route 53
Amazon
EC2
Proxy
21. Architecture deep dives3
Service discovery
AWS Lambda CI/CD
Offline data processing
Advanced Lambda use case
Environments on demand
22. Architecture deep dives3
Service discovery
AWS Lambda CI/CD
Offline data processing
Advanced Lambda use case
Environments on demand
23. Page 23Lanners & Roedig, BMW Group | AWS re:Invent 2018
AWS
API Gateway
AWS
CloudFront
AWS
Route 53
AWS
Lambda
AWS
DynamoDB
ENHANCED FLEXIBILITYTHROUGH DNS-BASED SERVICE DISCOVERY
Elastic Beanstalk Environment
Network Load
Balancer
ELB Subnet A/B App Subnet A/B
Amazon
Route 53
VPC Link
EB Environment
Microservice A
Amazon
EC2
Proxy
24. Page 24Lanners & Roedig, BMW Group | AWS re:Invent 2018
AWS
API Gateway
AWS
CloudFront
AWS
Route 53
AWS
Lambda
AWS
DynamoDB
ENHANCED FLEXIBILITYTHROUGH DNS BASED SERVICE DISCOVERY.
Elastic Beanstalk Environment
Network Load
Balancer
ELB Subnet A/B App Subnet A/B
Amazon
Route 53
VPC Link
EB Environment
Microservice A
Amazon
EC2
Proxy
EB Environment
Microservice B
EB Environment
Microservice C
25. Page 25Lanners & Roedig, BMW Group | AWS re:Invent 2018
AWS
API Gateway
AWS
CloudFront
AWS
Route 53
AWS
Lambda
AWS
DynamoDB
ENHANCED FLEXIBILITYTHROUGH DNS BASED SERVICE DISCOVERY.
Elastic Beanstalk Environment
Network Load
Balancer
ELB Subnet A/B App Subnet A/B
Amazon
Route 53
VPC Link
Amazon
EC2
EB Environment
Microservice A
Proxy
26. Page 26Lanners & Roedig, BMW Group | AWS re:Invent 2018
AWS
API Gateway
AWS
CloudFront
AWS
Route 53
AWS
Lambda
AWS
DynamoDB
ENHANCED FLEXIBILITYTHROUGH DNS BASED SERVICE DISCOVERY.
Elastic Beanstalk Environment
Network Load
Balancer
ELB Subnet A/B App Subnet A/B
Amazon
Route 53
VPC Link
Amazon
EC2
EB Environment
Microservice A
Proxy
EB Environment
Microservice A
Weighted
Routing
99%
1%
27. Page 27Lanners & Roedig, BMW Group | AWS re:Invent 2018
AWS
API Gateway
AWS
CloudFront
AWS
Route 53
AWS
Lambda
AWS
DynamoDB
ENHANCED FLEXIBILITYTHROUGH DNS BASED SERVICE DISCOVERY.
Elastic Beanstalk Environment
Network Load
Balancer
ELB Subnet A/B App Subnet A/B
Amazon
Route 53
VPC Link
Amazon
EC2
Proxy
EB Environment
Microservice A
Weighted
Routing
100%
EB Environment
Microservice A
28. Page 28Lanners & Roedig, BMW Group | AWS re:Invent 2018
AWS
API Gateway
AWS
CloudFront
AWS
Route 53
AWS
Lambda
AWS
DynamoDB
ENHANCED FLEXIBILITYTHROUGH DNS BASED SERVICE DISCOVERY.
Elastic Beanstalk Environment
Network Load
Balancer
ELB Subnet A/B App Subnet A/B
Amazon
Route 53
VPC Link
Amazon
EC2
Proxy
Weighted
Routing
EB Environment
Microservice A
99%
Other tech stack
Microservice A
1%
29. Page 29Lanners & Roedig, BMW Group | AWS re:Invent 2018
AWS
API Gateway
AWS
CloudFront
AWS
Route 53
AWS
Lambda
AWS
DynamoDB
ENHANCED FLEXIBILITYTHROUGH DNS BASED SERVICE DISCOVERY.
Elastic Beanstalk Environment
Network Load
Balancer
ELB Subnet A/B App Subnet A/B
Amazon
Route 53
VPC Link
Amazon
EC2
Proxy
Weighted
Routing
Other tech stack
Microservice A
100%
30. Architecture deep dives3
Service discovery
AWS Lambda CI/CD
Offline data processing
Advanced Lambda use case
Environments on demand
31. Page 31Lanners & Roedig, BMW Group | AWS re:Invent 2018
THE AUTOMATED CI/CD-PIPELINE ALLOWS US TO
SAFELYDEPLOYNEW LAMBDA FUNCTIONS Git
- Lambda code
- AWS CloudFormation
- Jenkinsfile
git
AWS
CodeDeploy
AWS
CloudFormation
Amazon
S3
Jenkins
Build and
upload
Stack
create/update
AWS CloudFormation
- Creates new Lambda version
- Creates a new alias
AWS CodeDeploy:
- Canary deployment (e.g. 10/90)
- Rollback with Amazon
CloudWatch Metric
Amazon
CloudWatch
10%
Code V2
Lambda
90%
Code V1
32. Architecture deep dives3
Service discovery
AWS Lambda CI/CD
Offline data processing
Advanced Lambda use case
Environments on demand
33. Page 33Lanners & Roedig, BMW Group | AWS re:Invent 2018
DATA IMPORTS NEED TO BE
COORDINATED WORLDWIDE
Microservice A
On-Premises
Data sources
On-Premises
Data sources
Microservice B
Microservice D
import
import
import
Microservice C
aggregate
aggregate
10:20 pm
10:30 pm
10:40 pm
10:50 pm
11:00 pm
11:10 pm
05:20 am
05:30 am
05:40 am
05:50 am
06:00 am
06:10 am
06:20 am
UTC+0
A
B
D
C
A
B
D
C
A
B
D
C
A
B
D
C
A
B
D
C
A
B
D
C
A
B
D
C
A
B
D
C
A
B
D
C
A
B
D
C
A
B
D
C
A
B
D
C
Eventual
consistency
Germany Austria France Spain
USA Canada Mexico
...
...
UTC+1
UTC-6
Data processing per day
34. Page 34Lanners & Roedig, BMW Group | AWS re:Invent 2018
HOW WE CONTINUOUSLYIMPORT DATA FROM ON-PREMISES DATA SOURCES
Amazon
ECS
ment
bnet A/B
zon
C2
ing Group
Amazon RDS
(Multi AZ)
DB Subnet A/B
Security Group
y Group
Microservice A CloudWatch Event
AWS
Lambda
Trigger
Lambda
AWS Batch
Queue
Tasks
On-Premises
Data
Sources
Execute Task and
Import Data
Create
Job with
Dependencies
A
B
C
35. Page 35Lanners & Roedig, BMW Group | AWS re:Invent 2018
HOW WE CONTINUOUSLYIMPORT DATA FROM ON-PREMISES DATA SOURCES
Amazon
ECS
ment
bnet A/B
zon
C2
ing Group
Amazon RDS
(Multi AZ)
DB Subnet A/B
Security Group
y Group
Microservice A CloudWatch Event
AWS
Lambda
Trigger
Lambda
AWS Batch
Queue
Tasks
Create
Job with
Dependencies
A
B
C
Amazon ECR
36. Architecture deep dives3
Service discovery
AWS Lambda CI/CD
Offline data processing
Advanced Lambda use case
Environments on demand
37. Page 37Lanners & Roedig, BMW Group | AWS re:Invent 2018
LEVERAGE AWS LAMBDA TO PERFORM THOUSANDS
OF VEHICLES CONSTRUCTABILITYCHECKS Use case
• Purpose-driven calculation
• Fast response
AWS Lambda
Orchestration
Amazon S3
Vehicle product data
and constructability
rules
Request
Response
AWS Lambda
Constructability
Check
AWS Lambda
Constructability
Check
AWS Lambda
Constructability
Check
.
.
.
Solution
• Spawn parallel Lambdas
Limits
• Restricted parallel
executions
• Reusage of hot lambdas
• Caching prevents
recalculation
• Consider the costs
38. Architecture deep dives3
Service discovery
AWS Lambda CI/CD
Offline data processing
Advanced Lambda use case
Environments on demand
39. Page 39Lanners & Roedig, BMW Group | AWS re:Invent 2018
ON-DEMAND DEVELOPMENT ENVIRONMENTS ARE AN
ESSENTIAL PART OF OUR AUTOMATED TEST PROCESS
Jenkinsgit
AWS
CloudFormation
Stack(s)
On-demand stack for feature branch
Key Facts:
• Gitflow workflow
• Full stack “on demand”
Benefits
• Teams are not blocked
• Isolated testing
• Verification of AWS
CloudFormation code
• Happy Dev teams
Trigger
create
stacks
deploy
feature branch
Microservice with
feature branchAmazon API
Gateway
Amazon
Route 53
Network Load
Balancer
Amazon
Route 53
41. Page 41Lanners & Roedig, BMW Group | AWS re:Invent 2018
WE INTRODUCED GAMEDAYS TO TRAIN OUR OPERATION TEAM TO BE WELL
PREPARED FOR POTENTIAL PRODUCTION PROBLEMS
§ Solve real production scenarios
§ Gamification is used through scoring and
leaderboards
§ Chaos Monkey Team brings fun into the situation
§ Each team gains points for
§ Availability of the system
§ Proposed improvements for DevOps-Cycle
42. Page 42Lanners & Roedig, BMW Group | AWS re:Invent 2018
FEEDBACK AFTER THE FIRST GAMEDAY
The gameday showed that it’s a great opportunity
to deepen the transferred knowledge in a fun way
and to gain hands on experience through
simulated incidents for the operation work.
“
Operationsteam, March 2018
„
43. Page 43Lanners & Roedig, BMW Group | AWS re:Invent 2018
LESSONS LEARNED FROM THE TRANSITION TO AWS
• Don’t build a distributed monolithic application
• Don’t try to make it too perfect
• Stop talking, start building
• Continuous learning and adaptation
• Be aware of AWS soft & hard limits, and build your architecture accordingly
• Doing the transformation in-house was a game changer
• Consider AWS Professional Services as a coach at the beginning of your transition