Immut able Infrastructure Rise of the Machine Images About Axel - - PowerPoint PPT Presentation

immut able infrastructure
SMART_READER_LITE
LIVE PREVIEW

Immut able Infrastructure Rise of the Machine Images About Axel - - PowerPoint PPT Presentation

@axelfontaine Immut able Infrastructure Rise of the Machine Images About Axel Fontaine Founder and CEO of Boxfuse Over 15 years industry experience Continuous Delivery expert Regular speaker at tech conferences JavaOne


slide-1
SLIDE 1

Rise of the Machine Images

Immut able Infrastructure

@axelfontaine

slide-2
SLIDE 2

About Axel Fontaine

  • Founder and CEO of Boxfuse
  • Over 15 years industry experience
  • Continuous Delivery expert
  • Regular speaker at tech conferences
  • JavaOne RockStar

@axelfontaine

slide-3
SLIDE 3

flywaydb.org

slide-4
SLIDE 4

boxfuse.com

slide-5
SLIDE 5

about

questions

slide-6
SLIDE 6

sometime in the 20th century …

slide-7
SLIDE 7
slide-8
SLIDE 8

http://en.wikipedia.org/wiki/File:Tdkc60cassette.jpg

slide-9
SLIDE 9
slide-10
SLIDE 10

+ =

ON PREM

+

Challenges

 Power  Network  Cooling  Phys. Security  Phys. Space  OS Install  OS Patching  App Install  App Updates  Procurement  Vendor Mgmt  Capacity Plan.  Financing

slide-11
SLIDE 11

+ =

ON PREM

+

Challenges

 Power  Network  Cooling  Phys. Security  Phys. Space  OS Install  OS Patching  App Install  App Updates  Procurement  Vendor Mgmt  Capacity Plan.  Financing

slide-12
SLIDE 12
slide-13
SLIDE 13

+ =

ON PREM

+

Challenges

 Power  Network  Cooling  Phys. Security  Phys. Space  OS Install  OS Patching  App Install  App Updates  Procurement  Vendor Mgmt  Capacity Plan.  Financing Months Hours Days or Weeks

slide-14
SLIDE 14

+ = +

Challenges

 Power  Network  Cooling  Phys. Security  Phys. Space  OS Install  OS Patching  App Install  App Updates  Procurement  Vendor Mgmt  Capacity Plan.  Financing Months Hours Days or Weeks

COLO

slide-15
SLIDE 15

+ = +

Challenges

 OS Install  OS Patching  App Install  App Updates  Procurement  Vendor Mgmt  Capacity Plan.  Financing Hours Days or Weeks

ROOT SERVER

slide-16
SLIDE 16

 OS Install  OS Patching  App Install  App Updates

Let’s talk about software

slide-17
SLIDE 17

POLL: which level of automation are you at?

 Build  Unit Tests  Continuous Integration  Acceptance Tests  Continuous Deployment (Code)  Continuous Deployment (Code + DB + Configuration)  Infrastructure

slide-18
SLIDE 18

Build Test

slide-19
SLIDE 19

Build Test

slide-20
SLIDE 20
  • One immutable unit
  • Regenerated after every change
  • Promoted from Environment to Environment

Classic Mis istake: Build per Environment

slide-21
SLIDE 21

OS Kernel Libraries Language App Server App

slide-22
SLIDE 22

OS Kernel Libraries Language App Server App

slide-23
SLIDE 23

why aren’t we doing the same for the layers this is running on ???

slide-24
SLIDE 24
slide-25
SLIDE 25

OS Kernel Libraries Language App Server App

Build Test

slide-26
SLIDE 26

OS Kernel Libraries Language App Server App

Build Test

App

slide-27
SLIDE 27

OS Kernel Libraries Language App Server App OS Kernel Libraries Language App Server App OS Kernel Libraries Language App Server App

Any difference is a potential source of errors

slide-28
SLIDE 28

OS Kernel Libraries Language App Server App OS Kernel Libraries Language App Server App OS Kernel Libraries Language App Server App

Updates Updates Updates

Sysadmin

slide-29
SLIDE 29

If I had asked my customers what they wanted they would have said a faster horse.

Henry Ford

slide-30
SLIDE 30

OS Kernel Libraries Language App Server App OS Kernel Libraries Language App Server App OS Kernel Libraries Language App Server App

Updates Updates Updates

Sysadmin

slide-31
SLIDE 31

OS Kernel Libraries Language App Server App OS Kernel Libraries Language App Server App OS Kernel Libraries Language App Server App

Updates Updates Updates

Automated Sysadmin

slide-32
SLIDE 32

fast forward to 2016 …

slide-33
SLIDE 33

Every day, AWS adds enough server capacity to power the whole $7B enterprise Amazon.com was in 2004. Weekends included.

slide-34
SLIDE 34

Shift to a world of abundance (no more resource scarcity)

slide-35
SLIDE 35

"Advanced Test Reactor" by Argonne National Laboratory -

  • riginally posted to Flickr as Advanced Test Reactor core,

Idaho National LaboratoryUploaded using F2ComButton. Licensed under CC BY-SA 2.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Advanced_Test_Reac tor.jpg#mediaviewer/File:Advanced_Test_Reactor.jpg "RIAN archive 341194 Kursk Nuclear Power Plant" by RIA Novosti archive, image #341194 / Sergey Pyatakov / CC-BY-SA 3.0. Licensed under CC BY-SA 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:RIAN_archive_341194_ Kursk_Nuclear_Power_Plant.jpg#mediaviewer/File:RIAN_archi ve_341194_Kursk_Nuclear_Power_Plant.jpg

Control Plane Data Plane

slide-36
SLIDE 36

Control Plane Data Plane

slide-37
SLIDE 37

Automated Provisioning Cost-driven Architectures

slide-38
SLIDE 38

it is time to rethink the faster horse

slide-39
SLIDE 39

App OS Kernel Libraries Language App Server

Build Test

slide-40
SLIDE 40

App OS Kernel Libraries Language App Server

Build Test

Undifferentiated Heavy lifting

slide-41
SLIDE 41

App OS Kernel Libraries Language App Server

Build Test

slide-42
SLIDE 42

App

Machine Image

OS Kernel Libraries Language App Server

Build Test

Machine Image

slide-43
SLIDE 43

OS Kernel Libraries Language App Server App OS Kernel Libraries Language App Server App OS Kernel Libraries Language App Server App

Machine Image Machine Image Machine Image

slide-44
SLIDE 44

Machine Image Machine Image Machine Image

Updates

slide-45
SLIDE 45

but there is one big problem left …

slide-46
SLIDE 46

Machine Image

Network Cable

slide-47
SLIDE 47

Machine Image

Network Cable

Multiple GB

slide-48
SLIDE 48

Running servers in production should be like going backpacking. You take the bare minimum with you. Anything else is going to hurt.

A Wise Man

slide-49
SLIDE 49

what is really adding business value ???

slide-50
SLIDE 50

Machine Image

Network Cable

slide-51
SLIDE 51

Editors Daemons OS Kernel Libraries Utilities Drivers App App Server Package Mgr Compilers SSH Firewall Compatibility Man Pages Language Log Files Users Shells

Machine Image

Network Cable

slide-52
SLIDE 52

OS Kernel Libraries App App Server Language Bootable App

slide-53
SLIDE 53

15 MB

slide-54
SLIDE 54

Multiple GB

15 MB

slide-55
SLIDE 55

Network Cable

Bootable App

slide-56
SLIDE 56

who is this for ???

slide-57
SLIDE 57

OS Kernel Libraries Language App Server App

12-factor app

slide-58
SLIDE 58

demo

slide-59
SLIDE 59

What are the implications ???

slide-60
SLIDE 60

Focus shift Individual instances become disposable Instance Service

slide-61
SLIDE 61

Treat servers like cattle instead of pets

slide-62
SLIDE 62

for servers is dead!

slide-63
SLIDE 63

high uptime is a liability

The longer an instance is up, the harder it becomes to recreate exactly (and it will fail eventually!)

slide-64
SLIDE 64

How to solve service discovery ?

Use a stable entry point with an internal registry

?

Elastic Load Balancer

Instance Instance Instance

slide-65
SLIDE 65

What about security ?

When was the last time your toaster got hacked?

slide-66
SLIDE 66

What about security ?

Complexity is the Enemy of Security

slide-67
SLIDE 67

What about security ?

  • Smallest possible attack surface
  • Vastly reduced implications due to low

uptime and transient nature of instances

  • Very difficult to exploit other systems

because essential tooling is missing

Bootable App

slide-68
SLIDE 68
  • Bake as much configuration as

possible for all environments directly in the Bootable App

  • Use environment detection

and auto-configuration

what about configuration ???

slide-69
SLIDE 69

Bootable App

Key Value JDBC_URL jdbc:… ENV prod

what about configuration ???

  • Bake as much configuration as

possible for all environments directly in the Bootable App

  • Use environment detection

and auto-configuration

  • Pass remaining configuration

at startup and expose it as environment variables

slide-70
SLIDE 70

Instance

what about the database ???

  • Keep all persistent state out of the instance,

including the database

  • Use one of the many good hosted solutions

available like Amazon RDS or Google Cloud SQL

  • Use a database migration tool to update the

schema on application startup

slide-71
SLIDE 71

what about the logs ???

LOG file LOG file LOG file

ssh me@myserver1 tail -f server.log ssh me@myserver2 tail -f server.log ssh me@myserver3 tail -f server.log

slide-72
SLIDE 72

LOG file LOG file LOG file

log server

where logs can be

  • aggregated
  • stored and backuped
  • indexed
  • searched
slide-73
SLIDE 73

what about sessions ???

Keep session in an encrypted and signed cookie

  • avoids session timeouts
  • avoids server clustering & session replication
  • avoids sticky sessions & server affinity

Instance

slide-74
SLIDE 74

what about rolling out new versions ???

slide-75
SLIDE 75

Availability Zone 2

Load Balancer

Logs

Availability Zone 1 App V1 App V1

slide-76
SLIDE 76

Load Balancer

Logs

Availability Zone 1 App V1 App V1 Availability Zone 2

slide-77
SLIDE 77

Load Balancer

Logs

Availability Zone 1 App V1 App V1 App V2 App V2 Availability Zone 2

slide-78
SLIDE 78

Load Balancer

Logs

Availability Zone 1 Availability Zone 2 App V1 App V1 App V2 App V2

slide-79
SLIDE 79

what about containers ???

(as in OS-level virtualization)

slide-80
SLIDE 80

understanding modern CPUs

Both Intel and AMD have hardware support for virtualization

  • isolation
  • performance penalty
slide-81
SLIDE 81

Image Hardware Hypervisor Image Hardware OS+Container Runtime

Container VM

  • n prem

your responsibility

slide-82
SLIDE 82

Image Hardware Hypervisor Image Hardware OS+Container Runtime

Container VM

cloud

Hypervisor

slide-83
SLIDE 83

cloud your responsibility clo loud responsibility

instance scheduling machine images instances instance volumes instance networking container scheduling container images containers container volumes container networking

slide-84
SLIDE 84

1.5 months of t2.nano

slide-85
SLIDE 85

1 hour of t2.nano

slide-86
SLIDE 86

cloud your responsibility clo loud responsibility

instance scheduling machine images instances instance volumes instance networking container scheduling container images containers container volumes container networking

Only makes sense if you cannot afford 0.5 .5p/hour granularity

slide-87
SLIDE 87

summary

slide-88
SLIDE 88
  • One immutable unit
  • Regenerated after every change
  • Promoted from Environment to Environment

Classic Mis istake: Build per Environment

slide-89
SLIDE 89

Bootable App

  • One immutable unit
  • Regenerated after every change
  • Promoted from Environment to Environment
  • Use Minimal Images
  • Focus on Cost in your architecture

Classic Mis istake: Build per Environment

slide-90
SLIDE 90

boxfuse.com

slide-91
SLIDE 91

Thanks

slide-92
SLIDE 92

AXEL FONTAINE @axelfontaine

boxfuse.com

I'LL BE BACK