continuous delivery of microservices ken mugrage - @kmugrage
TRANSCRIPT
CONTINUOUS DELIVERY OF MICROSERVICES
Ken Mugrage - @kmugrage
AGENDA
Introduction
Definitions
Anti-Patterns
Cultural Considerations
Technical Considerations
Testing
Deployment Patterns2
AMBITIOUS MISSIONSNEED DISRUPTIVE THINKING
3
DEFINITIONS
4
MICROSERVICE
Small Autonomous servicesthat work together modeled around a business domain
5
Independently Releasable
Newman, Sam (2015) Building Microservices O’Reilly
CONTINUOUS INTEGRATION
Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.
6
http://martinfowler.com/articles/continuousIntegration.html Originally published 10 September 2000
DEVOPS
DevOps (a clipped compound of "development" and "operations") is a culture, movement or practice that emphasizes the collaboration and communication of both software developers and other information-technology (IT) professionals while automating the process of software delivery and infrastructure changes.[1][2] It aims at establishing a culture and environment where building, testing, and releasing software, can happen rapidly, frequently, and more reliably.
7
https://en.wikipedia.org/wiki/DevOps
http://www.jedi.be/blog/2010/02/12/what-is-this-devops-thing-anyway/
CONTINUOUS DELIVERY
Continuous Delivery is a software development discipline where you build software in such a way that the software can be released to production at any time.
8
Humble, Jez – Farley, David (2010) Continuous Delivery Addison Wesley
CONTINUOUS DELIVERY
9
Delivery Team
CommitBuild and Unit Tests
Automated Acceptance
User Acceptance
Deploy
http://continuousdelivery.com/2010/02/continuous-delivery/
WHAT CD LOOKS LIKE
10
CONTINUOUS DELIVERY
You’re doing Continuous Delivery when:
Your software is deployable throughout its lifecycle
Your team prioritizes keeping the software deployable over working on new features
Anybody can get fast, automated feedback on the production readiness of their systems and time somebody makes a change to them
You can perform push-button deployments of any version of the software to any environment on demand
11
CONTINUOUS DELIVERY ANTI-PATTERNS
12
THE REALLY COMPLICATED MONOLITH
13
Newman, Sam (2015) Building Microservices O’Reilly
DEPLOYING EVERYTHING AT ONCE
14
REQUIRING SPECIFIC VERSIONS
15
Service 1
Service 2
Service 3
REQUIRING SPECIFIC VERSIONS
16
Service 1
Service 2
Service 3
CULTURAL CONSIDERATIONS(Spoiler: This is the hardest part)
17
CONWAY’S LAW
Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.
18
http://www.melconway.com/Home/Conways_Law.html
DEVOPS
19
TECHNICAL CONSIDERATIONS
20
ARCHITECTURE
Loose coupling
A change to one service should not require a change to another
High cohesion
Related behavior sits together, unrelated behavior sits elsewhere
21
INTEGRATION
Avoid breaking changes
Keep your APIs technology agnostic
Make your service simple for consumers
Hide internal implementation detail
22
IF YOU REALLY NEED A BREAKING CHANGE
We really want to avoid forcing consumers to upgrade in lock step
23
Newman, Sam (2015) Building Microservices O’Reilly
Getting integration right is the single most important aspect of the technology associated with microservices in my opinion.
Newman, Sam (2015-02-02). Building Microservices.
24
CONTINUOUS INTEGRATION
25
Newman, Sam (2015) Building Microservices O’Reilly
CONTINUOUS INTEGRATION
26
Newman, Sam (2015) Building Microservices O’Reilly
BUILD CONSIDERATIONS
A thing gets built exactly once
One host / one service
Consider OS specific deployment packages
Consider building the entire host
27
CONTINUOUS DELIVERY
Use fan in / fan out to build confidence
28
CONTINUOUS DELIVERY – THE GOAL
29
TESTING
30
TESTING
If you’re doing a lot of manual testing, stop here and address that first
Unit tests
Service tests
A smarter stub service - http://www.mbtest.org/
31
NONFUNCTIONAL TESTING
32
CROSS FUNCTIONAL TESTING
Performance
Security
Individual services have individual expectations
33
DEPLOYMENT PATTERNS
34
BLUE / GREEN DEPLOYMENT
35
http://martinfowler.com/bliki/BlueGreenDeployment.html
CANARY RELEASE
36
FURTHER READING
SUMMARY
The ability to deploy independently is vital
The culture is the hardest part
One service / one host helps find issues
Purpose built tools help the journey
38
THANK YOUhttp://www.thoughtworks.com/go
http://www.go.cd/@goforcd
@kmugrage
http://www.thoughtworks.com/gohttp://www.go.cd/
@goforcd@kmugrage