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

Continuous Delivery: Playing with Immutable servers @commitporto 2016

Feb 11, 2017

Download

Technology

João Cravo
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Continuous Delivery: Playing with Immutable servers @commitporto 2016

commitporto.com/2016

CONTINUOUS DELIVERY

PLAYING WITH IMMUTABLE SERVERS

João Cravo

Page 2: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

WHO AM I

- João Cravo

- Software Engineer

- Improving pipelines in the last 4 years

- Chef contributor

Page 3: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

WHERE I CAME FROM?

Page 4: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

WHERE I CAME FROM?

Page 5: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS DELIVERY

PLAYING WITH IMMUTABLE SERVERS

Page 6: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS DELIVERY

IMMUTABLE SERVERS

Page 7: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

WHAT IS …

CONTINUOUS DELIVERY?

Page 8: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS DELIVERY (CD)

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

Page 9: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS DELIVERY (CD)

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

Page 10: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

WHAT IS …

CONTINUOUS INTEGRATION?

Page 11: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS INTEGRATION (CI)

Page 12: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

CD VS CONTINUOUS DEPLOYMENT

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

Page 13: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS

Page 14: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

WHAT IS DEVOPS?

A) A Tool Suite

B) A Job Position

C) A Team

Page 15: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

WHAT DEVOPS…

IS NOT

Page 16: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS NOT… A JOB TITLE

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

Page 17: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS NOT… A JOB TITLE

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

… OR GOD

Page 18: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS NOT… A TEAM

Page 19: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS NOT… A TEAM

Page 20: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

DEVOPS IS NOT… USING TOOLS

Page 21: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@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

Page 22: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

Page 23: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

WHAT IS …

AN IMMUTABLE SERVER?

Page 24: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

MUTABLE SERVER

Subject to:

- manual changes

- automatic changes

- OS updates

- product updates

Page 25: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

CONFIGURATION MANAGEMENT TOOLS

Page 26: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

IMMUTABLE SERVER

- no changes

- no human access

- reproducible

- destroyable

Page 27: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

IMMUTABLE SERVER

Page 28: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

IMMUTABLE SERVER

Page 29: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

Page 30: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

CONTINUOUS DELIVERY

PLAYING WITH IMMUTABLE SERVERS

Page 31: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@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

Page 32: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

BUILD (AKA CI)

- Compile

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

- …

- Package

- Upload

Page 33: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

BUILD (AKA CI)

Page 34: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

CREATE PRODUCT IMAGE

Page 35: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

QA: BUILD A NEW IMMUTABLE CLUSTER

Page 36: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

PRODUCTION: BUILD A NEW IMMUTABLE CLUSTER

Page 37: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

CD: PLAYING WITH IMMUTABLE SERVERS

Page 38: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

ROLLBACK

205

200

Page 39: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

FLICK DNS

Page 40: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

PROS VS CONS

Page 41: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

PROBLEM 1 - IMAGE CREATING TIME

Page 42: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

PROBLEM 2 - ENVIRONMENT CONFIGURATION

- Database and other service connections

- Passwords

- Certificates

- Application settings

- …

Page 43: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

PROBLEM 3 - NO SSH TO MACHINES

- Debug ?

- Production hot fix ?

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

- …

Page 44: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 1 - NO SSH TO MACHINES

Wasn’t this a problem?

Page 45: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 1 - NO SSH TO MACHINES

- Security

- No“hammer time”

Page 46: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 2 - CENTRALISED MONITORING

- Metrics - Logs

http://statful.com/

Page 47: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 3 - PIPELINES PARALLELISATION

Page 48: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 3 - PIPELINES PARALLELISATION

Page 49: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

ADVANTAGE 4 - AUTO SCALING

- Protection against load - Costs

Page 50: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

MORE ADVANTAGES ….

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

Page 51: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@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

Page 52: Continuous Delivery: Playing with Immutable servers @commitporto 2016

@commitporto2016 @joaogbcravo @minderaswcraft

THANKS!

joaogbcravo @ gmail.com

joaogbcravo