open source, infrastructure as code, cloud native apps 2015

59
1 © Copyright 2015 EMC Corporation. All rights reserved. OPEN SOURCE, INFRASTRUCTURE AS CODE AND CLOUD NATIVE APPS JONAS ROSLAND, DEVELOPER ADVOCATE @EMCCODE 1 © Copyright 2015 EMC Corporation. All rights reserved.

Upload: jonas-rosland

Post on 13-Jan-2017

922 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Open Source, infrastructure as Code, Cloud Native Apps 2015

1© Copyright 2015 EMC Corporation. All rights reserved.

OPEN SOURCE, INFRASTRUCTURE AS CODE AND CLOUD NATIVE APPSJONAS ROSLAND, DEVELOPER ADVOCATE @EMCCODE

1© Copyright 2015 EMC Corporation. All rights reserved.

Page 2: Open Source, infrastructure as Code, Cloud Native Apps 2015

22© Copyright 2015 EMC Corporation. All rights reserved.

Jonas RoslandDeveloper AdvocateEMC {code}

@jonasrosland

Loves travelingand retro gamingTalks a lot

Page 3: Open Source, infrastructure as Code, Cloud Native Apps 2015

3© Copyright 2015 EMC Corporation. All rights reserved.

Page 4: Open Source, infrastructure as Code, Cloud Native Apps 2015

4© Copyright 2015 EMC Corporation. All rights reserved.

Lots of projects!

Page 5: Open Source, infrastructure as Code, Cloud Native Apps 2015

5© Copyright 2015 EMC Corporation. All rights reserved.

github.com/emccode

Page 6: Open Source, infrastructure as Code, Cloud Native Apps 2015

6© Copyright 2015 EMC Corporation. All rights reserved.

dashboard.emccode.com

Page 7: Open Source, infrastructure as Code, Cloud Native Apps 2015

7© Copyright 2015 EMC Corporation. All rights reserved.

community.emccode.com

Page 8: Open Source, infrastructure as Code, Cloud Native Apps 2015

8

Why are we doing this?

Page 9: Open Source, infrastructure as Code, Cloud Native Apps 2015

9© Copyright 2015 EMC Corporation. All rights reserved.

Page 10: Open Source, infrastructure as Code, Cloud Native Apps 2015

10© Copyright 2015 EMC Corporation. All rights reserved.

Developers – The New Kingmakers

Page 11: Open Source, infrastructure as Code, Cloud Native Apps 2015

11

Let's start with

infrastructure as code

Page 12: Open Source, infrastructure as Code, Cloud Native Apps 2015

12

What do we define as infrastructure?

Page 13: Open Source, infrastructure as Code, Cloud Native Apps 2015

13

Page 14: Open Source, infrastructure as Code, Cloud Native Apps 2015

14

Page 15: Open Source, infrastructure as Code, Cloud Native Apps 2015

15

Page 16: Open Source, infrastructure as Code, Cloud Native Apps 2015

16

• Deploy, monitor and connect together all the pieces needed to run services for the organization• Processes and tools for faster end-to-end delivery of

quality services• Automation comes built-in

Why define infrastructure as code?

Page 17: Open Source, infrastructure as Code, Cloud Native Apps 2015

17

Manually configured environments are like a house of cards in a china

shop

- Neal Ford

Page 18: Open Source, infrastructure as Code, Cloud Native Apps 2015

18

Up to 60% of failures are caused by human error,

not hardware failure

Page 19: Open Source, infrastructure as Code, Cloud Native Apps 2015

19

Example - Knight Capital Group

https://infocus.emc.com/wp-content/uploads/2012/08/KCG.jpg

Page 20: Open Source, infrastructure as Code, Cloud Native Apps 2015

20

• Manual deployment of new trading software• 7 of 8 servers correctly updated• Old function still alive on the 8th server led to…

Knight Capital Group - What happened?

Page 21: Open Source, infrastructure as Code, Cloud Native Apps 2015

21

$440 million lossin 45 minutes

Page 22: Open Source, infrastructure as Code, Cloud Native Apps 2015

22

Not good

Page 23: Open Source, infrastructure as Code, Cloud Native Apps 2015

23

So

Page 24: Open Source, infrastructure as Code, Cloud Native Apps 2015

24

Treat your infrastructure as code

Page 25: Open Source, infrastructure as Code, Cloud Native Apps 2015

25

But how?

Page 26: Open Source, infrastructure as Code, Cloud Native Apps 2015

26

Just start, right now!• Vagrant• Packer• Terraform• Otto• Nomad

• Puppet• Chef• Ansible• SaltStack(^ amazing config mgmt)

Page 27: Open Source, infrastructure as Code, Cloud Native Apps 2015

27

node 'www2' {

class { 'apache': } # use apache module

apache::vhost { 'awesomewebsite.com': # define vhost

port => '80',

docroot => '/var/www/html'

}

}

Simple example

Page 28: Open Source, infrastructure as Code, Cloud Native Apps 2015

28

user { root: ensure => present, password => '$ecretP@ssw0rd',}

Change root password

Page 29: Open Source, infrastructure as Code, Cloud Native Apps 2015

29

AWS exampleresource "aws_elb" "frontend" { name = "frontend-load-balancer" listener { instance_port = 8000 instance_protocol = "http" lb_port = 80 lb_protocol = "http" }

instances = ["${aws_instance.app.*.id}"]} resource "aws_instance" "app" { count = 5 ami = "ami-043a5034" instance_type = "m1.small"}

Page 30: Open Source, infrastructure as Code, Cloud Native Apps 2015

30

vSphere exampleresource "vsphere_virtual_machine" "default" { name = ”mysql-04" domain = ”corp.local" datacenter = "datacenter-1" cluster = "cluster-2" vcpu = 2 memory = 4096 disk { datastore = ”FLASH-DATASTORE-14" template = "centos-7.0-x86_64" iops = 5000 }

gateway = "192.168.0.254" network_interface { label = ”internal" ip_address = "192.168.0.74" subnet_mask = "255.255.255.0" }}

Page 31: Open Source, infrastructure as Code, Cloud Native Apps 2015

31

• Self documenting infrastructure• You now have source code for how everything in your

datacenter is setup• Executable documentation

Recap of the benefits

Page 32: Open Source, infrastructure as Code, Cloud Native Apps 2015

32

Alright

Page 33: Open Source, infrastructure as Code, Cloud Native Apps 2015

33

Then what?

Page 34: Open Source, infrastructure as Code, Cloud Native Apps 2015

34

Let’s look at thehistory of our apps

Page 35: Open Source, infrastructure as Code, Cloud Native Apps 2015

35

From 10 years ago

Page 36: Open Source, infrastructure as Code, Cloud Native Apps 2015

36

Or perhaps 2 days ago

Page 37: Open Source, infrastructure as Code, Cloud Native Apps 2015

37

Consider astandard monolithic

application

Page 38: Open Source, infrastructure as Code, Cloud Native Apps 2015

38http://cantina.co/monolithic-architecture-doesnt-scale/

Page 39: Open Source, infrastructure as Code, Cloud Native Apps 2015

39

How do you scale it?

Page 40: Open Source, infrastructure as Code, Cloud Native Apps 2015

40http://cantina.co/monolithic-architecture-doesnt-scale/

Page 41: Open Source, infrastructure as Code, Cloud Native Apps 2015

41http://cantina.co/monolithic-architecture-doesnt-scale/

Page 42: Open Source, infrastructure as Code, Cloud Native Apps 2015

42

So what to do?

Page 43: Open Source, infrastructure as Code, Cloud Native Apps 2015

43

It’s not all about scale

Page 44: Open Source, infrastructure as Code, Cloud Native Apps 2015

44

But also aboutseparation of concern

Page 45: Open Source, infrastructure as Code, Cloud Native Apps 2015

45

Microservices

Page 46: Open Source, infrastructure as Code, Cloud Native Apps 2015

46http://cantina.co/monolithic-architecture-doesnt-scale/

Page 47: Open Source, infrastructure as Code, Cloud Native Apps 2015

47

Everything isloosely coupled

Page 48: Open Source, infrastructure as Code, Cloud Native Apps 2015

48

Enables parts to be fixed, updated and worked on…

Page 49: Open Source, infrastructure as Code, Cloud Native Apps 2015

49

Independently!

Page 50: Open Source, infrastructure as Code, Cloud Native Apps 2015

50

Let’s look at an example

Page 51: Open Source, infrastructure as Code, Cloud Native Apps 2015

51

Page 52: Open Source, infrastructure as Code, Cloud Native Apps 2015

57

Our apps are becomingCloud Native

Page 53: Open Source, infrastructure as Code, Cloud Native Apps 2015

58

Cloud Native Architectures• Broad set of

components working together• Prescriptive software

stacks• Functions in mixed cloud

environments• Built on microservices

https://pivotal.io/platform/migrating-to-cloud-native-application-architectures-ebook

Page 54: Open Source, infrastructure as Code, Cloud Native Apps 2015

59

Cloud Native Computing Foundation

Page 55: Open Source, infrastructure as Code, Cloud Native Apps 2015

60

Cloud Native Platforms – Cloud Foundry

Page 56: Open Source, infrastructure as Code, Cloud Native Apps 2015

61

Take this questionwith you…

Page 57: Open Source, infrastructure as Code, Cloud Native Apps 2015

62

How long would it take your organization to deploy a change

that involves just one single line of code?

- Mary Poppendieck

Page 58: Open Source, infrastructure as Code, Cloud Native Apps 2015

63

Questions?Jonas Rosland

Developer Advocate @ EMC {code}@jonasrosland

Page 59: Open Source, infrastructure as Code, Cloud Native Apps 2015