Continuous Delivery: Playing with Immutable servers @commitporto 2016

52
commitporto.com/2016 CONTINUOUS DELIVERY PLAYING WITH IMMUTABLE SERVERS João Cravo

Transcript of Continuous Delivery: Playing with Immutable servers @commitporto 2016

commitporto.com/2016

CONTINUOUS DELIVERY

PLAYING WITH IMMUTABLE SERVERS

João Cravo

@commitporto2016 @joaogbcravo @minderaswcraft

WHO AM I

- João Cravo

- Software Engineer

- Improving pipelines in the last 4 years

- Chef contributor

@commitporto2016 @joaogbcravo @minderaswcraft

WHERE I CAME FROM?

@commitporto2016 @joaogbcravo @minderaswcraft

WHERE I CAME FROM?

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS DELIVERY

PLAYING WITH IMMUTABLE SERVERS

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS DELIVERY

IMMUTABLE SERVERS

@commitporto2016 @joaogbcravo @minderaswcraft

WHAT IS …

CONTINUOUS DELIVERY?

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS DELIVERY (CD)

https://xebia.github.io/cd-with-docker/#/

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS DELIVERY (CD)

http://software-carpentry.org/blog/2014/04/continuous-publication-requires-continuous-attention.html

@commitporto2016 @joaogbcravo @minderaswcraft

WHAT IS …

CONTINUOUS INTEGRATION?

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS INTEGRATION (CI)

@commitporto2016 @joaogbcravo @minderaswcraft

CD VS CONTINUOUS DEPLOYMENT

http://blog.crisp.se/wp-content/uploads/2013/02/continuous-delivery-deployment-sm.jpg

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS

@commitporto2016 @joaogbcravo @minderaswcraft

WHAT IS DEVOPS?

A) A Tool Suite

B) A Job Position

C) A Team

@commitporto2016 @joaogbcravo @minderaswcraft

WHAT DEVOPS…

IS NOT

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS NOT… A JOB TITLE

http://www.indeed.com/jobtrends/q-Devops-Engineer.html?relative=1

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS NOT… A JOB TITLE

https://huddlebuy.workable.com/jobs/255850

… OR GOD

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS NOT… A TEAM

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS NOT… A TEAM

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS NOT… USING TOOLS

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS… A CULTURE

“I LIKE TO DESCRIBE DEVOPS AS THE CULMINATION OF THREE AMAZING AND SIGNIFICANT MOVEMENTS; THE AGILE INFRASTRUCTURE THREAD, THE VELOCITY THREAD, AND THE LEAN STARTUP THREAD.”

JOHN WILLIS, THE CONVERGENCE OF DEVOPS

“THE NOTION OF DEVOPS IS THE REALISATION THAT THE DEVELOPMENT PROCESS DOESN’T END IN DEVELOPMENT. WE CAN’T DISCONNECT THE OPERATIONS PIECE OF SOFTWARE (DEVELOPMENT) FROM THOSE OTHER PHASES OF DEVELOPMENT.”

RYAN BERG (THE CASE FOR DEVOPS)

“A CULTURE THAT AIMS TO BREAK SILOS BETWEEN DIFFERENT TEAMS IN AN IT ORGANISATION, IMPROVING IN THIS WAY, THE DELIVERY, QUALITY AND SUPPORT OF THE SOFTWARE.”

JOÃO CRAVO, COMMITPORTO

@commitporto2016 @joaogbcravo @minderaswcraft

@commitporto2016 @joaogbcravo @minderaswcraft

WHAT IS …

AN IMMUTABLE SERVER?

@commitporto2016 @joaogbcravo @minderaswcraft

MUTABLE SERVER

Subject to:

- manual changes

- automatic changes

- OS updates

- product updates

@commitporto2016 @joaogbcravo @minderaswcraft

CONFIGURATION MANAGEMENT TOOLS

@commitporto2016 @joaogbcravo @minderaswcraft

IMMUTABLE SERVER

- no changes

- no human access

- reproducible

- destroyable

@commitporto2016 @joaogbcravo @minderaswcraft

IMMUTABLE SERVER

@commitporto2016 @joaogbcravo @minderaswcraft

IMMUTABLE SERVER

@commitporto2016 @joaogbcravo @minderaswcraft

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS DELIVERY

PLAYING WITH IMMUTABLE SERVERS

@commitporto2016 @joaogbcravo @minderaswcraft

CD: PLAYING WITH IMMUTABLE SERVERS

- Build (aka CI)

- Create product image

- QA: Build a new immutable cluster

- Production: Build a new immutable cluster

@commitporto2016 @joaogbcravo @minderaswcraft

BUILD (AKA CI)

- Compile

- Tests (unit, integration, code style, etc)

- …

- Package

- Upload

@commitporto2016 @joaogbcravo @minderaswcraft

BUILD (AKA CI)

@commitporto2016 @joaogbcravo @minderaswcraft

CREATE PRODUCT IMAGE

@commitporto2016 @joaogbcravo @minderaswcraft

QA: BUILD A NEW IMMUTABLE CLUSTER

@commitporto2016 @joaogbcravo @minderaswcraft

PRODUCTION: BUILD A NEW IMMUTABLE CLUSTER

@commitporto2016 @joaogbcravo @minderaswcraft

CD: PLAYING WITH IMMUTABLE SERVERS

@commitporto2016 @joaogbcravo @minderaswcraft

ROLLBACK

205

200

@commitporto2016 @joaogbcravo @minderaswcraft

FLICK DNS

@commitporto2016 @joaogbcravo @minderaswcraft

PROS VS CONS

@commitporto2016 @joaogbcravo @minderaswcraft

PROBLEM 1 - IMAGE CREATING TIME

@commitporto2016 @joaogbcravo @minderaswcraft

PROBLEM 2 - ENVIRONMENT CONFIGURATION

- Database and other service connections

- Passwords

- Certificates

- Application settings

- …

@commitporto2016 @joaogbcravo @minderaswcraft

PROBLEM 3 - NO SSH TO MACHINES

- Debug ?

- Production hot fix ?

- Clean up space! Logs are using all the space!

- …

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 1 - NO SSH TO MACHINES

Wasn’t this a problem?

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 1 - NO SSH TO MACHINES

- Security

- No“hammer time”

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 2 - CENTRALISED MONITORING

- Metrics - Logs

http://statful.com/

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 3 - PIPELINES PARALLELISATION

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 3 - PIPELINES PARALLELISATION

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 4 - AUTO SCALING

- Protection against load - Costs

@commitporto2016 @joaogbcravo @minderaswcraft

MORE ADVANTAGES ….

- Easy and fast rollback - Provision once (image creation) - Automatic recover

@commitporto2016 @joaogbcravo @minderaswcraft

SUMMARY

- Immutable Servers are just around to the corner

- Using immutable servers brings amazing advantages

- Embrace the agile, embrace the CI/CD processes

- Meet operations! There is a magic world outside your IDE

@commitporto2016 @joaogbcravo @minderaswcraft

THANKS!

joaogbcravo @ gmail.com

joaogbcravo