39
@kief Infrastructure as MICROSERVICES #OReillySACon

Infrastructure as Microservices - OReillySACon London 2016

Embed Size (px)

Citation preview

@kief

Infrastructureas

MICROSERVICES#OReillySACon

[email protected] Practice Lead (UK)

DevOps, Continuous Delivery, Agile Ops

Twitter: @kiefBook: http://oreil.ly/1JKIBVeSite: http://infrastructure-as-code.com

October 2016

The

MONOLITHICinfrastructure

THE INFRASTRUCTURE

Microservices

Infrastructure

Fragile: Easy to break something

Effort: Changes require too much time and effort

Snowflakes: Can’t reliably rebuild it

Testing: Difficult to write automated tests

PROBLEMS

MICROSERVICES!

Ease of Change

Resilience

Replaceability

Scaling

Composability

THINGS TO THINK ABOUT

■ Teams ■ Capabilities ■ Design

TEAMS

HOW ARE YOUR DEV & OPS TEAMS ORGANIZED?

SEPARATE DEV & OPS GROUPS?

FULLY CROSS-FUNCTIONAL TEAMS?

DEV, OPS, AND DEVOPS?

Challenges with Cross-Functional Teams

DISPERSAL OF DEEP EXPERTISE

DUPLICATED EFFORT

LACK OF OWNERSHIP

CONFLICTING PRIORITIES

MONOLITHIC INFRASTRUCTURE TEAM ...

Multiple Microservice

Teams

Single [Infrastructure] Team

“Organizations which design systems are constrained to produce designs which are copies of the communication structures of these organizations.”

CONWAY’S LAW

Design your team structures and technical architectures together

INVERSE CONWAY MANEUVER

ThoughtWorks Radar: http://thght.works/2dpXEJv

OPS SERVICE TEAMS

Organized around capabilities

Enable other teams

“You build it, you run it”

CAPABILITIES

What services does your infrastructure need to provide?

● Servers

● Networking

● Storage

● Monitoring

● Deployment

● Security

● Databases

CHARACTERISTIC OF MICROSERVICE DESIGN

Independently deployable elementsOrganized around business capabilitiesDelivered as products not projectsWith decentralized governanceDesigned for failureWith an evolving design

http://martinfowler.com/articles/microservices.html

PROVIDING CAPABILITIES

GuidanceExamples

ToolsServices

Define and manage your platform by:● Identifying your users● Identifying their goals● Defining tasks● Organizing tasks to achieve outcomeshttp://jpattonassociates.com/user-story-mapping/

STORY MAPPING / CAPABILITY MAPPING

DESIGN

How are your infrastructure files currently organized?

● One big file?● Modules?● Other?

DESIGN CHALLENGE

How can we design loosely coupled infrastructure so that we can make changes routinely, easily, and safely?

EXAM

PLE

INFR

ASTR

UCT

URE

Catalog DB User DB

Viewer Service Editor Service

Catalog Service User Service Vendor Service

ELB

Monitoring Service

ELBSecurity Group

Catalog DB User DB

Viewer Service Editor Service

Catalog Service User Service Vendor Service

ELB

Monitoring Service

MO

NO

LITH

ICST

ACK

ELBSecurity Group

MO

DU

LAR

INFR

ASTR

UCT

URE

ELB Definition Module

Modularity is helpful for sharing and reusing code

MO

DU

LAR

INFR

ASTR

UCT

URE

Shared ELB Definition Module

Modularity can actually make change more risky

Multiple stacks import the module

HO

RIZO

NTA

L ST

ACKS

MIC

RO-S

ERVI

CE

STAC

KSInfrastructure Stack for the Viewer Service● Load Balancer VIP● Firewall Rule● Web Server Vhost● App Server Cluster

Infrastructure Stack for the User Service● Load Balancer VIP● Firewall Rules● App Server Cluster● Database Instance

SHA

RED

STAC

KS

Shared Networking Infrastructure Stack● Subnets● Firewall Rules

User Service Infrastructure Stack● Load Balancer VIP● App Server Cluster● Database Instance

SHA

RED

STAC

KSConfiguration Registry

app_server_subnet_id=sn-1234abcdhttps_port_allow_rule=sg-dcba4321

Shared Networking

User Service

A FEW THOUGHTS

Align infrastructure stacks according to the scope of change

Use delivery pipelines to test changes to infrastructure elements

Book: http://oreil.ly/1JKIBVeSite: http://infrastructure-as-code.comTwitter: @kief

[email protected] Practice Lead (UK)

DevOps, Continuous Delivery, Agile Ops