Dev ops

Embed Size (px)

Citation preview

DevOps Introduction

Ops' job is NOT to keep the site stable and fast Ops' job is to enable the business(this is dev's job too)

Who am i ?

Systems Administrator @

DevOps

Infrastructure as a code Puppet

Cloud Computing

@EslamElHusseiny

Dev or Ops ?

6 days after a successful deployment, server experiences troubles high load, resources leak

Dev or Ops ?

There is an issue with build server.Code isn't building.

Dev or Ops ?

Software is deployed to the test environment.You can't login to application.

Dev vs. Ops

Dev says ...

Ops replies ...

It's not my server, it's your code

Role of Devs and Ops

Role of Devs and Ops

DevCreate changes

Add / modify features

OpsMaintain stability

Create / enhance services

Role of Devs and Ops

DevCreate changes

Add / modify features

OpsMaintain stability

Create / enhance services

So ?

The problem Disconnect between groups

Devs don't deploy consistent software

Ops motivated to resist changes

Devolpment process is Agile

Operations process is Static

Our Goal

We are all here to ENABLE business

change

Is required for business

Doesn't mean outage

Should be exploited and not feared

Shouldn't mean fire fighting

Rescue

DevOps To The Rescue !

What is DevOps then ?

DevOps is an approach to bridge the gap between agile software development and operations - agileweboperations.com

Collaborative mindset of Devs and Ops

C.A.M.S

Culture

Culture

RelationshipsEngage early, engage often

Be open

Eradicate last-mile syndrome

Culture

CommunicationTalk is cheap (get out of your chair)

Involve each other in core proccesses and decisions

Ask Questions

Don't say No

Automation

Automation

What ca be automated ?Builds

Deployments

Testing

Monitoring

Self-healing

System configuration

Metrics

Metrics

Capture, learn, improve.

Assist in:Capacity planning

Trend analysis

Fault finding

Metrics

Sharing

Sharing

Share ideas

Share metrics

Ops : Give devs shell access

Devs : see what technology ca be leveraged

DevOps life cycle

Before

Talk about functional requirements

Talk about non-functional requirementsSecurity

Backups

Availability

Upgradeability

Configuration management

Monitoring / Metrics

Logging

During

Communication

Source control

Automate builds

Automate tests

Automate deployments (Dev, Test, and Prod)

Collate App and System metrics

After

Release Continue to run tests

Monitor application and system

Issues (might happen)Post meetings

What are we doing ?

Puppet

Puppet

Configuration management tool

Open Source

Infrastructure as a code

Puppet

Puppet

node default {include sshinclude sudoinclude ntp}

node product.dev inherits default {include nginxinclude tomcat5}

node product.test inherits default{include nginxinclude tomcat6}

class sudo {package {'sudo':ensure => latest,}

file {'/etc/sudoers':owner => root,group => root,mode => '0440',source => 'puppet:///files/sudo/sudoers',require => Package['sudo'],}}

Puppet

Let's get hands on

It's deploymnt time

Monitoring

Monitoring

Problem ?

No one noticed

No one got alerted

No automatic recovery

Probelm ?

what is your application doing right now?

do you know when it fails?

failure means customers lose trust

failure means customers go elsewhere

failure means you lose money

application = providing value

Solution

Monitoring

Metrics

Logging

Monitoring means

Is the application available?

Examples

Monitoring

is this service currently providing value?is this service consuming too many resources?

Examples

Monit

check process unicorn with pidfile /var/run/unicorn/unicorn.pid start program = "/etc/init.d/unicorn start" stop program = "/etc/init.d/unicorn stop" if mem is greater than 300.0 MB for 1 cycles then restart if cpu is greater than 50% for 2 cycles then alert if cpu is greater than 80% for 3 cycles then restart group unicorn

Metrics

measurements

historical data

graphs

Metrics

how many customers are on my site?how many customers were on my site yesterday?

Metrics

how slow is paypal's api?how slow was paypal's api yesterday?

Metrics

how much memory is available on my servers?how much has memory usage grown over four weeks?

Metrics

number of open database connectionsnumber of redis commandsnumber of 500 errorsrate of HTTP requestsnumber of HTTP connections

Metrics

median response timenumber of failed resque jobsnumber of twitter followers99th percentile github api response time95th percentile mysql query time

Examples

Munin

Graphite

Metrics as a service

Logging

Logstash

log inputsprocessoutputs

Graylog2

Graylog2

Summary

own your monitoringown your metricsown your loggingnone of them is optional

Muokkaa otsikon tekstimuotoa napsauttamalla

Muokkaa jsennyksen tekstimuotoa napsauttamallaToinen jsennystasoKolmas jsennystasoNeljs jsennystasoViides jsennystasoKuudes jsennystasoSeitsems jsennystasoKahdeksas jsennystasoYhdekss jsennystaso