Top Banner
The Layer Cake is a LIE A functional programming approach to operations and architecture
20
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Functional Ops - the cake is a lie

The Layer Cake is a LIEA functional programming approach to operations and architecture

Page 2: Functional Ops - the cake is a lie

Rigid Abstraction Anti-Pattern!Call to action:

Consider functional interactions up front in design.

“Abstractions are useful until they are not”

Page 3: Functional Ops - the cake is a lie

Rob HirschfeldCloud Operations since 1999OpenStack Board Member since 2011Founder of OpenCrowbar Project (& RackN)Cloud Culture & Process BloggerEducation: Robotics & Industrial Engineering

Page 4: Functional Ops - the cake is a lie

What is a Layer Cake?Product Architectural SegmentationAka “Taxonomy” Assumes:● clean boundaries between services● upward stacking of dependencies● Under-layers can create resources● Services APIs are equally available● Does not show time component

Page 5: Functional Ops - the cake is a lie

Leave No Service Behind...Just keep stacking layers (and colors) until you’ve included the kitchen sink.

Is everything required?How do you deploy that?

Page 6: Functional Ops - the cake is a lie

Ops is messy, not layered● There are dependencies between

layers● Things are constantly changing● We have to connect actions together● Where matters as much as what

It's not just Ops! Application design is messy too.

Page 7: Functional Ops - the cake is a lie

Ops is about inter-connect● No server/service stands alone● Not everything is equally

reachable● Order of operations matters● Connectivity and proximity

matters● Hidden Interconnects are

FAILURESDurability and Simplicity are very important characteristics in Ops

Page 8: Functional Ops - the cake is a lie

NetworkAbstractions

StandardOpsTool

Chains

HardwareAbstractions

UserInterface,

Scale,& High

Availability

Top of Rack Switch Fabric

BMC management networkC

usto

mA

PIs

Pup

pet

Sal

t, ...

SS

HP

XE

TFTP

OpenCrowbarOrchestration

Che

f

App

Firmware

O/S

NCC-1701-r

A

F

O

A

F

O

A

F

O

A

F

O

A

F

O

A

F

O

App

F/W

O/S

A

F

O

A

F

O

A

F

O

A

F

O

A

F

O

A

F

O

App

F/W

O/S

A

F

O

A

F

O

A

F

O

A

F

O

A

F

O

A

F

O

App

F/W

O/S

Page 9: Functional Ops - the cake is a lie

How do we manage inter-connect?● Accept The Cake is a Lie● Decompose Big Work

into Small Work● Do not hide interconnections● Apply Functional

Programming

Page 10: Functional Ops - the cake is a lie

Functional Programming?… that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data …

● Defined Inputs & Outputs● No Side Effects● Repeatable Actions● Black Box

http://en.wikipedia.org/wiki/Functional_programming

Page 11: Functional Ops - the cake is a lie

Interchangeable PartsFunctional Design has very early roots allowing scale operations.

Famously, Eli Whitney demonstrated how a decomposed design could be used to speed assembly of rifles.

Robust designs can be taken apart and put back together.

Page 12: Functional Ops - the cake is a lie

Functional Ops is DifferentThe system construction paradigm focuses on connections and services instead of nodes and abstraction layers.

It is easier to automate in a generic wayAnd platforms can scale it dynamically

Page 13: Functional Ops - the cake is a lie

Can't we ignore this? I <3 Cake!That was the idea for PaaS, but…

● Containers make it worse!● Smaller Units (“micro-services”)● Shorter Life Cycles● More Portable● Highly Interconnect

Irony Alert: Docker's #1 feature is layering images (not the same thing, but...)

Page 14: Functional Ops - the cake is a lie

How does this help?● Clear contracts between operations● Replaceable work units (functions)● No Hidden interconnections● Deterministic execution (not

eventual)● Easier to Test

We still have complexity, but it's visibleHidden connections are fatal

RackN

IPM

I / B

MC

BIO

S

RA

ID

O/S

CM

age

nt(s

)

Clie

nts

Net

wor

k

Customers’ Applications

Page 15: Functional Ops - the cake is a lie

East-West vs North-SouthE-W is dependency focused vs N-S is control focused

East-West is critical when...● sequence of operations matters● the control layer is incomplete● you have multiple control surfaces● you have circular dependencies● you have distributed authors

Page 16: Functional Ops - the cake is a lie

Functional Ops Example 1Database Configuration Functionally● Setup the Server Service – target network, credentials● Setup the Client – target network, register client● Create the Database – credentials, db name, ACL

Base functions work ● even for a cluster● different BD types● work independently of each other (DB as a service)● Cross-reference issues are resolved externally● Deterministic

Page 17: Functional Ops - the cake is a lie

Functional Ops Example 2Milestone 6 Milestone 8Milestone 7: “setup NIC”

Node 2

Vendor B

Node 1

Vendor AA1

B2

C1

D1

A2 A3

A1 A2 A3

B1

D2

C2

A0

B0

A0

C0

A4

Page 18: Functional Ops - the cake is a lie

Container Orchestration, Oh my.This area is very turbulent. My thoughts:1. It’s not clear how to best orchestrate µServices2. There are a lot of companies/projects in play3. This approach is different than cloud IaaS4. I believe it will disrupt virtualization APIs

Page 19: Functional Ops - the cake is a lie

Functional Ops Take Aways● Avoid side-effects in Ops scripting● Establish clear requirements

(inputs/outputs)● Establish contracts for interconnects● Do not over define “black box” actions● Embrace orchestration● When possible, fail fast and small

Page 20: Functional Ops - the cake is a lie

Thank You