Running operations in 2 hours at DevTernity 2015

41
RUNNING OPERATIONS IN 2 HOURS Erno Aapa ernoaapa

Transcript of Running operations in 2 hours at DevTernity 2015

Page 1: Running operations in 2 hours at DevTernity 2015

RUNNING OPERATIONS IN 2 HOURS!

Erno Aapa " ernoaapa

Page 2: Running operations in 2 hours at DevTernity 2015

Erno Aapa " ernoaapa # [email protected]

Operations engineer @ Shark Punch Founder of DevOpsFinland

Page 3: Running operations in 2 hours at DevTernity 2015

201520102005

Continuous Delivery

Kanban DevOps DevOps Finland

Dockercontainers

Lean Startup Lean

Cloud

There must be a better way! Continuous

IntegrationConfiguration Management

Scrum

Infrastructure Automation

" ernoaapa

CleanCode

DevTernity.

Startup

MesosKubernetes

Terraform

Page 4: Running operations in 2 hours at DevTernity 2015

Open DevOps Engineer position

Continuous Integration, Continuous delivery,

deployment automation, Agile, Scrum, Kanban, test

automation, Cloud, DevOps, Infrastructure automation,

Configuration Management, RDBMS, No-SQL, CDN,

network automation, Docker, containers, Hardware, ...

Responsibilities:

- Fullstack engineer

- Operations, network

- Infrastructure, sysadmin

- Team Manager,

- Be CIO, CTO, ...

132 new mail

KNOW EVERYTHING,

DO EVERYTHING!

" ernoaapa

Page 5: Running operations in 2 hours at DevTernity 2015

I'm DevOps? NO!" ernoaapa

Devops!=

one man

two jobswithwith

Page 6: Running operations in 2 hours at DevTernity 2015

ulture

utomation

Easure

haring

This DevOps means for me!

C

A

M

S

" ernoaapa

Page 7: Running operations in 2 hours at DevTernity 2015

" ernoaapa

This is your product...

... and the crew is your team!

Page 8: Running operations in 2 hours at DevTernity 2015

Make yourself replaceable!

" ernoaapa

Page 9: Running operations in 2 hours at DevTernity 2015

Refer to putting one person or thing in place of another

replaceable /rɪˈpleɪs/

" ernoaapa

Page 10: Running operations in 2 hours at DevTernity 2015

No time for learning

and innovation

Repeat same task over and

over again

No progress in your career

High risk to become

unemployed

You might undermine

whole company

Irreplaceable

" ernoaapa

Page 11: Running operations in 2 hours at DevTernity 2015

Being IRREplaceable is not good to you

• No time for learning because you use all your time doing same task over and over again

• You don't develop because you don't have time for learning and innovation

• You don't progress in your career because you company cannot move you off from the task

• You become useless when product/service get changed and your tasks disappear

• You end up being unemployed with outdated knowledge of some legacy system what no one needs

" ernoaapa

Page 12: Running operations in 2 hours at DevTernity 2015

IRREplaceable is not good for company

• Your business is very vulnerable - what if that guy dies? • That guy can use that to require high salary • Company knowledge doesn't grow and you end up having

outdated tools, practices and technologies • Company doesn't innovate and get stuck on single legacy

solution what new companies can outdo

" ernoaapa

Page 13: Running operations in 2 hours at DevTernity 2015

Share your knowledge Share responsibility

Time for innovation

You become more productive

$Improve the process Teach others to solve the problems

" ernoaapa

Page 14: Running operations in 2 hours at DevTernity 2015

" ernoaapa

StartupEnterprise %

Page 15: Running operations in 2 hours at DevTernity 2015

" ernoaapa

MY PERFECT PLAN

Page 16: Running operations in 2 hours at DevTernity 2015

" ernoaapa

MY PLAN OUR NEED

Page 17: Running operations in 2 hours at DevTernity 2015

How I did cut off-80%

operation work?20%

" ernoaapa

Page 18: Running operations in 2 hours at DevTernity 2015

- 20% Remove all unnecessary

-20%Remove legacy servers

Switch to cloud services

Remove all "I might need some day" -code

Clean up duplicate code

" ernoaapa

Page 19: Running operations in 2 hours at DevTernity 2015

-30% Simplify, SIMPLIFY But don't over-Simplify!

-30%Remove rarely used features

Refactor codebase

Simplify technology stack

Remove legacy technologies

Split service to smaller pieces (micro services)

But DON'T force to single stack!

" ernoaapa

Page 20: Running operations in 2 hours at DevTernity 2015

- 30% Make your self replaceable

-30%

Automate your work

Push responsibility to the team

Teach everything you know to everyone

Make sure team can work without you

" ernoaapa

Page 21: Running operations in 2 hours at DevTernity 2015

Story of two companies

Intrepid

Tit

anic

From Ansible newsletter 9/15 / Matt Jaynes" ernoaapa

Page 22: Running operations in 2 hours at DevTernity 2015

&&&&&&&&&&&&&&&&&&&& 20 servers

$60.000/Month

From Ansible newsletter 9/15 / Matt Jaynes

Revenue

Sysadmins

Servers

Operation costs

' $5M/Year

$$$ 3 Administrators

Titanic

" ernoaapa

Page 23: Running operations in 2 hours at DevTernity 2015

''''''''''''''''''''''' $115M/Year

From Ansible newsletter 9/15 / Matt Jaynes

Revenue

Sysadmins

Servers

Operation costs

INTREPID

$ ¼ Developer

&&&& 4 Servers

$2.500/Month

" ernoaapa

Page 24: Running operations in 2 hours at DevTernity 2015

From Ansible newsletter 9/15 / Matt Jaynes

Intrepid

Titanic

Operation costs per $1M revenue

$144 000$260

That's over 500 times more!

" ernoaapa

Page 25: Running operations in 2 hours at DevTernity 2015

Buy as-a-Service all you can!

" ernoaapa

Page 26: Running operations in 2 hours at DevTernity 2015

$100 Developer / day Costs for the company

5 Days To setup server

$500 Total costs To setting up costs

+$200 Costs / Month Server and maintenance

" ernoaapa

Self build and host cost

Page 27: Running operations in 2 hours at DevTernity 2015

$100 Total costs To setting up costs

+$99 Costs / Month Grows by needs and usage

" ernoaapa

"Buy-as-a-service" cost

$100 Developer / day Costs for the company

1 Days To setup server

-400$!

-101$!

Page 28: Running operations in 2 hours at DevTernity 2015

Saas vs self hostedCo

sts

Time

Self hosted

SaaSHuge upfront invest of time and money

to get started

Startup rebuilds the stack

here anyway!

" ernoaapa

Page 29: Running operations in 2 hours at DevTernity 2015

Force team to not depend on you!

" ernoaapa

Page 30: Running operations in 2 hours at DevTernity 2015

$Developer

!Production

$Test

Manager

$Release Manager

$Operations Engineer

Common enterprise deployment pipeline

Tests (manually) that new version

works as expected

Decides when change

can be deployed

Deploy new version to

production

Risk!

Risk!

Risk!

Risk that something goes wrong,

get misunderstood or work queue up!

" ernoaapa

Page 31: Running operations in 2 hours at DevTernity 2015

$Developer

!Production

Provides environment where is easy to deploy,

get visibility and it's easy to maintain

$Fellow

Developer

Review code changes and give feedback

$Test

Manager

Maintain testing automation and help with tests

$Operations Engineer

Automatio

n!

Continuous delivery pipeline

" ernoaapa

Page 32: Running operations in 2 hours at DevTernity 2015

" ernoaapa

My man, Hubro!Hubot: https://hubot.github.com/

My dad!

Page 33: Running operations in 2 hours at DevTernity 2015

I'll deploy "frontweb" project branch "feature-searchbar" to production Contains commits:- Add new search API to backend- Implement searchbar to the front page

Reviewed: ( Approved: (

Chatops

hubro deploy frontweb/feature-searchbar

) Type to chat...

*Developer

Deployment of "frontweb" project branch "feature-searchbar" completed! +

Apply same practice for server

configuration changes too!

" ernoaapa

Hubro

Hubro

Page 34: Running operations in 2 hours at DevTernity 2015

@team Alert: response time change +20%

Chatops

hubot show production cpu usage

) Type to chat...

*Anyone

Production CPU usage last 7h

" ernoaapa

Hubro

Hubro

Page 35: Running operations in 2 hours at DevTernity 2015

How can I make team to own the monitoring?

" ernoaapa

Alert!

Page 36: Running operations in 2 hours at DevTernity 2015

" ernoaapa

+ +MeasureCollect metrics from your code

easily with Statsd

DetectAdd Sensu checks into your project

repository in JSON file

AlertEveryone is in paging team to

wake up for alerts

Page 37: Running operations in 2 hours at DevTernity 2015

" ernoaapa

frontend.git,

- sensu/checks. page_size.json

backend.git,

- sensu/checks. response_time.json

operations.git,

- sensu/checks. cpu_usage.json

- src/javascript - src/java - src/ansible

Team maintains their own checks and alerts in their

codebase like they do with code

No need for strange UI, take the settings to place where

the team is on their own!

Page 38: Running operations in 2 hours at DevTernity 2015

" ernoaapa

1 Do I really need it?

2 Can I buy it?

3 Can machine do it?

4 Can somebody else do it?

5 Ok, I'll do it!

Ask from yourself before doing anything!

Page 39: Running operations in 2 hours at DevTernity 2015

Build simple software what it easy to understand. Write tests so it's easy to

maintain and make sure that it's transparent and easy to operate.

MAKE YOUR SELF REPLACEABLE/

" ernoaapa

Page 40: Running operations in 2 hours at DevTernity 2015

Make the infrastructure as simple as possible and use SaaS services when it's possible.

Automate all changes and actions and push responsibility to solve issues to the team.

MAKE YOUR SELF REPLACEABLE/

" ernoaapa

Page 41: Running operations in 2 hours at DevTernity 2015

Please give feedback sayat.me/ernoaapa

Thank you!

CreditsBackgrounds: Mehmet Demiray, Turkey "two companies"-story: Matt Jaynes, Ansible newsletter 9/15

" ernoaapa