102
01

Enterprise flight into DevOps space for RigaDevDay 2015

Embed Size (px)

Citation preview

Page 1: Enterprise flight into DevOps space for RigaDevDay 2015

01

Page 2: Enterprise flight into DevOps space for RigaDevDay 2015

About me02

Page 3: Enterprise flight into DevOps space for RigaDevDay 2015

Andrey AdamovichBio: Developer, coach, speaker, author

Company: Aestas/IT (http://aestasit.com)

E­mail: [email protected]

Linkedin: http://www.linkedin.com/in/andreyadamovich

Lanyrd: http://lanyrd.com/profile/andrey­adamovich

GitHub: https://github.com/aadamovich

SO: http://stackoverflow.com/users/162792/andrey­adamovich

Twitter: @codingandrey, @aestasit

••••••••

03

Page 4: Enterprise flight into DevOps space for RigaDevDay 2015

The story04

Page 5: Enterprise flight into DevOps space for RigaDevDay 2015

Once upon a time...

05

Page 6: Enterprise flight into DevOps space for RigaDevDay 2015

An email arrives...

06

Page 7: Enterprise flight into DevOps space for RigaDevDay 2015

...let's get to work

07

Page 8: Enterprise flight into DevOps space for RigaDevDay 2015

...two days later...

08

Page 9: Enterprise flight into DevOps space for RigaDevDay 2015

...five days later...

09

Page 10: Enterprise flight into DevOps space for RigaDevDay 2015

Another emailHi Jack, I got a call from Sandy, the secret project's PM, she says that

the DEV servers are not ready yet, I really want you to understand how

critical is this project for the organization, please, don't let me down...

Francis, VP

10

Page 11: Enterprise flight into DevOps space for RigaDevDay 2015

Jack's bossHi Jack, I understand you have been working on the secret project

servers setup recently, don't forget that we need to keep the

documentation up­to­date yeah?

11

Page 12: Enterprise flight into DevOps space for RigaDevDay 2015

No problem! We know how to write docs.

12

Page 13: Enterprise flight into DevOps space for RigaDevDay 2015

... in the meanwhile ...

13

Page 14: Enterprise flight into DevOps space for RigaDevDay 2015

The dreaded CRHey Jack, we can't deploy anymore to our DEV servers. What the hell

is going on?

14

Page 15: Enterprise flight into DevOps space for RigaDevDay 2015

Fixing

15

Page 16: Enterprise flight into DevOps space for RigaDevDay 2015

...things get worse...

16

Page 17: Enterprise flight into DevOps space for RigaDevDay 2015

Worst thandown...

17

Page 18: Enterprise flight into DevOps space for RigaDevDay 2015

UNKNOWN STATE

18

Page 19: Enterprise flight into DevOps space for RigaDevDay 2015

Chaos (r)19

Page 20: Enterprise flight into DevOps space for RigaDevDay 2015

The "secret" project moves into QA

20

Page 21: Enterprise flight into DevOps space for RigaDevDay 2015

The GO LIVE!

21

Page 22: Enterprise flight into DevOps space for RigaDevDay 2015

Let's throw more people at it

22

Page 23: Enterprise flight into DevOps space for RigaDevDay 2015

...it's going to work, right?

23

Page 24: Enterprise flight into DevOps space for RigaDevDay 2015

What aboutmonitoring?

24

Page 25: Enterprise flight into DevOps space for RigaDevDay 2015

Do we haveit?

25

Page 26: Enterprise flight into DevOps space for RigaDevDay 2015

YES!26

Page 27: Enterprise flight into DevOps space for RigaDevDay 2015

But...

27

Page 28: Enterprise flight into DevOps space for RigaDevDay 2015

Well...28

Page 29: Enterprise flight into DevOps space for RigaDevDay 2015

Sorry!29

Page 30: Enterprise flight into DevOps space for RigaDevDay 2015

No happyending?

30

Page 31: Enterprise flight into DevOps space for RigaDevDay 2015

Where is theproblem?

31

Page 32: Enterprise flight into DevOps space for RigaDevDay 2015

Communication problems I

32

Page 33: Enterprise flight into DevOps space for RigaDevDay 2015

Communication problems II

33

Page 34: Enterprise flight into DevOps space for RigaDevDay 2015

Stability vs.agility

34

Page 35: Enterprise flight into DevOps space for RigaDevDay 2015

Fear of deployBecause systems are fragile, each deployment is like a trip to the

nearest casino

Devs and SysOps make development cycles longer to be as far as

possible from the deploy date

Slower time to market, systems are down more often

Nobody is happy!

••

35

Page 36: Enterprise flight into DevOps space for RigaDevDay 2015

Unplanned vs. failed

36

Page 37: Enterprise flight into DevOps space for RigaDevDay 2015

Unplanned vs. unique

37

Page 38: Enterprise flight into DevOps space for RigaDevDay 2015

DevOps!38

Page 39: Enterprise flight into DevOps space for RigaDevDay 2015

Fix communication

39

Page 40: Enterprise flight into DevOps space for RigaDevDay 2015

The feedback loopThrough configuration management and deploy automation, we can

deploy more often and reduce risk

The feedback loop gets shorter

Functionalities are rolled out with higher frequency

Systems are always in a known state

Changes to the system can be simulated and impacts calculated

••••

40

Page 41: Enterprise flight into DevOps space for RigaDevDay 2015

Sharing responsibility I

41

Page 42: Enterprise flight into DevOps space for RigaDevDay 2015

Sharing responsibility IIThe focus of DevOps is on automating the tasks performed during the

build, QA and deployment stage

The risk of deployment errors is reduced drastically by having a strong

automated testing suite, automated deployment workflow, well

defined/automated rollback process

42

Page 43: Enterprise flight into DevOps space for RigaDevDay 2015

Reduce failed changes

43

Page 44: Enterprise flight into DevOps space for RigaDevDay 2015

Reduce number of unique configs

44

Page 45: Enterprise flight into DevOps space for RigaDevDay 2015

Great!45

Page 46: Enterprise flight into DevOps space for RigaDevDay 2015

Now we'veheard aboutDevOps!46

Page 47: Enterprise flight into DevOps space for RigaDevDay 2015

Let's do it!47

Page 48: Enterprise flight into DevOps space for RigaDevDay 2015

It will save us!48

Page 49: Enterprise flight into DevOps space for RigaDevDay 2015

Failedexpectations

49

Page 50: Enterprise flight into DevOps space for RigaDevDay 2015

Most startwith the tools

50

Page 51: Enterprise flight into DevOps space for RigaDevDay 2015

Tools are asimportant

as...51

Page 52: Enterprise flight into DevOps space for RigaDevDay 2015

Internalculture!

52

Page 53: Enterprise flight into DevOps space for RigaDevDay 2015

C.A.M.SCulture : People over processes and tools. Software is made by and

for people.

Automation : Automation is essential for DevOps to gain quick

feedback.

Measurement : DevOps finds a specific path to measurement. Quality

and shared (or at least aligned) incentives are critical.

Sharing : Creates a culture where people share ideas, processes, and

tools.

53

Page 54: Enterprise flight into DevOps space for RigaDevDay 2015

How Devsand Ops canhelp eachother?54

Page 55: Enterprise flight into DevOps space for RigaDevDay 2015

TALK!55

Page 56: Enterprise flight into DevOps space for RigaDevDay 2015

TALK MORE!56

Page 57: Enterprise flight into DevOps space for RigaDevDay 2015

SHARE!57

Page 58: Enterprise flight into DevOps space for RigaDevDay 2015

SHAREEVERYTHING!

58

Page 59: Enterprise flight into DevOps space for RigaDevDay 2015

Hints fordevelopers59

Page 60: Enterprise flight into DevOps space for RigaDevDay 2015

Don't ignoreoperations!60

Page 61: Enterprise flight into DevOps space for RigaDevDay 2015

AvoidShadowOps

DevOoops••

61

Page 62: Enterprise flight into DevOps space for RigaDevDay 2015

LoggingWhenever you add new logging statement to your code, remember

that the guy on the other side can actually read it!

Logging level, message and frequency of logging can help or disturb

62

Page 63: Enterprise flight into DevOps space for RigaDevDay 2015

Bad logging messages

63

Page 64: Enterprise flight into DevOps space for RigaDevDay 2015

ConfigurationStructure application configuration

Backward­compatibile, good defaults, good naming

Do not mix technical and business configuration

•••

64

Page 65: Enterprise flight into DevOps space for RigaDevDay 2015

Bad parameter naming

65

Page 66: Enterprise flight into DevOps space for RigaDevDay 2015

MonitoringEmbed monitoring capabilities into your code

Know monitoring channels that your operations use: JMX, SNMP,

HTTP

••

66

Page 67: Enterprise flight into DevOps space for RigaDevDay 2015

Monitoring vitalsTechnical metrics:

CPU, Memory, Disk

Resource pools

Network I/O

Transactions/requests/operations per second/minute/hour

Database performance

Business metrics

••••••

67

Page 68: Enterprise flight into DevOps space for RigaDevDay 2015

Create dashboards!

68

Page 69: Enterprise flight into DevOps space for RigaDevDay 2015

Align early!69

Page 70: Enterprise flight into DevOps space for RigaDevDay 2015

Late alignment issues

70

Page 71: Enterprise flight into DevOps space for RigaDevDay 2015

Learn how to use provisioning softwarePuppet

Chef

Ansible

Salt

••••

71

Page 72: Enterprise flight into DevOps space for RigaDevDay 2015

Build a cloneSame OS version,

same components,

same configuration

as in production environemnt,

but running in virtual machine on your laptop or at some cloud provider

•••••

72

Page 73: Enterprise flight into DevOps space for RigaDevDay 2015

vagrant up

73

Page 74: Enterprise flight into DevOps space for RigaDevDay 2015

Similarity levelsDEV << QA <<< PROD

DEV < QA < PROD

DEV ~ QA ~ PROD

DEV = QA = PROD

1.

2.

3.

4.

74

Page 75: Enterprise flight into DevOps space for RigaDevDay 2015

Package managersSystem administrators know how to install standard OS packages

Just make one for them!

RPM, DEB, MSI... ­ it's not that hard to master!

•••

75

Page 76: Enterprise flight into DevOps space for RigaDevDay 2015

Artifact repositories

76

Page 77: Enterprise flight into DevOps space for RigaDevDay 2015

Automation over documentation

77

Page 78: Enterprise flight into DevOps space for RigaDevDay 2015

Automate everything repeatablebuild

release

deploy

test

backup

migration

restarts

•••••••

78

Page 79: Enterprise flight into DevOps space for RigaDevDay 2015

Hints foroperations79

Page 80: Enterprise flight into DevOps space for RigaDevDay 2015

Problem solvingGet developers to solve production problems

Look at how they did it

Post­mortem analysis

•••

80

Page 81: Enterprise flight into DevOps space for RigaDevDay 2015

MonitoringCreate dashboards! Many, but meaningful dashboards!

Analyze your data!

Create alerts!

•••

81

Page 82: Enterprise flight into DevOps space for RigaDevDay 2015

LoggingAggregate logs

Analyze logs

Rotate logs

Clean logs

••••

82

Page 83: Enterprise flight into DevOps space for RigaDevDay 2015

Learn how to use provisioning softwarePuppet

Chef

Ansible

Salt

••••

83

Page 84: Enterprise flight into DevOps space for RigaDevDay 2015

Infrastructureas code

84

Page 85: Enterprise flight into DevOps space for RigaDevDay 2015

Keep it in version control

85

Page 86: Enterprise flight into DevOps space for RigaDevDay 2015

Port changesback to DEV!

86

Page 87: Enterprise flight into DevOps space for RigaDevDay 2015

Prepare for disaster!Backups!

Test your backups. Seriously!

Capacity planning.

•••

87

Page 88: Enterprise flight into DevOps space for RigaDevDay 2015

Technologiesto follow

88

Page 89: Enterprise flight into DevOps space for RigaDevDay 2015

VirtualizationLocal: VirtualBox/VMWare/Parallels (+ Vagrant)

OS: Docker

Remote: Various cloud oferrings

•••

89

Page 90: Enterprise flight into DevOps space for RigaDevDay 2015

CloudsAWS

VMWare

Azure

Google Cloud

OpenStack

•••••

90

Page 91: Enterprise flight into DevOps space for RigaDevDay 2015

Infrastructure provisioningPuppet

Chef

Ansible

Salt

••••

91

Page 92: Enterprise flight into DevOps space for RigaDevDay 2015

Infrastructure monitoringLogstash

Graphite

Kibana

Grafana

Dashing

•••••

92

Page 93: Enterprise flight into DevOps space for RigaDevDay 2015

DevOps companiesSpotify

Netflix

Etsy

Twitter

Amazon

Google

GitHub

•••••••

93

Page 94: Enterprise flight into DevOps space for RigaDevDay 2015

Readingmaterial

94

Page 95: Enterprise flight into DevOps space for RigaDevDay 2015

The Phoenix Project

95

Page 96: Enterprise flight into DevOps space for RigaDevDay 2015

Continuous Delivery

96

Page 97: Enterprise flight into DevOps space for RigaDevDay 2015

Release It

97

Page 98: Enterprise flight into DevOps space for RigaDevDay 2015

Inviting Disaster

98

Page 99: Enterprise flight into DevOps space for RigaDevDay 2015

DevOps blogshttp://enterprisedevops.com/

http://itrevolution.com/devops­blog/••

99

Page 100: Enterprise flight into DevOps space for RigaDevDay 2015

Questions?100

Page 101: Enterprise flight into DevOps space for RigaDevDay 2015

Thank you!101

Page 102: Enterprise flight into DevOps space for RigaDevDay 2015

Have a niceflight!

102