48
http://bigpanda.io @chuparko#automateALLTHETHINGS Dan Chuparkowith a one-man Ops team 1 WIFI: ansi14

Ansible ALLTHETHINGS

Embed Size (px)

DESCRIPTION

Learn how in less than 6 months and with a 1-person team, they went from no infrastructure automation, to having all of their infrastructure automated with Ansible. Learn how BigPanda (http://bigpanda.io ) handles zero-downtime infrastructure updates and connects Ansible with their chat infrastructure, and some strategies on managing automation projects with very small teams.

Citation preview

Page 1: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

#automateALLTHETHINGS

Dan Chuparkoff

with a one-man Ops team

1

WIFI:

ansi14

Page 2: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

Dan ChuparkoffDirector of Growth

& Engagement

2

Page 3: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

Feb 1, 2009

3

Page 4: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 4

Page 5: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 5

Page 6: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 6

Page 7: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

What percentage of 140 million people will go to a website

for free tickets?

7

Page 8: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

?8

Page 9: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

100,000 free trips in 42 seconds

9

Page 10: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

..,:::,,,:::,.. ...,::,,,,::,... .,, ,8MMMMMMMMMN, ,,. .:. IMMMMMMMMMMI :.

.,, +MMMMMMMMMMMMMMMMM$ :.. .: MMMMMMMMMMMMMMMMMM :. .: IMMMMMMMMMMMMMMMMMMMMM+ ., ., MMMMMMMMMMMMMMMMMMMMMM ...

., .MMMMMMMMMMMMMMMMMMMMMMMMM . ZMMMMMMMMMMMMMMMMMMMMMMMMM :. .: DMMMMMMMMMMMMMMMMMMMMMMMMMMM. NMMMMMMMMMMMMMMMMMMMMMMMMMMM. ,

.: 7MMMMMMMMM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MMMMM/ M~ ?M? \MMMMMMMMMMMMMMMMMMMMM, :.

,. ?MMMMMMMMMMMMMMMMMMMM/, ?MMM 8M \MMMMMMMMMMMMMMMMMMM~ :. .. ?MMMMMMMMMMMMMMMMMM /MMMMM. \ .\MMMMMMMMMMMMMMMMMM :. .: MMMMMMMMMMMMMMMM/ /MMMMMMMM \MMMMMMMMMMMMMMMMIY .,.

.: $MMMMMMMMMMMMMM .MMMMMMMMMM\ MMMMMMMMMMMMMMM? ,. .., NMMMMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMMMMM. .,.

... MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM. .:. .,. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM~ :.

.,. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM. :.. .,. NMMMMMMMMMMMMMMMMMMMMMMMMMMM .:..

.:. MMMMMMMMMMMMMMMMMMMMMMMM .:. .,. DMMMMMMMMMMMMMMMMMMM .:.

.,, 8MMMMMMMMMMMMMMM. .:. .,. MMMMMMMMMMMM7 :.

.,. MMMMMMMMN :. .: ZMMMMM .,.

., ,MM7 :. .: :. .,. .:.

..

10

Page 11: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 11

Page 12: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 12

Page 13: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 13

a one-man Ops team

Page 14: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 14

No matter what the complexity of the tasks, it all boils down to running an Ansible

module, which makes playbooks easy to write and easy to review later.

Page 15: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

• All you need is Python + a playground server with SSHD • Ansible is agentless, so setup can be done in minutes • Playbooks are intuitive • Ansible is rich with built-in modules for trivial to complex tasks

Simplicity1

15

Page 16: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

• Idempotence enables Ansible to be declarative & also reliable • We can run multiple times without changing the result beyond the

initial execution

IDEMPOTENCE2

16

Page 17: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

• Every script we write is used two times • once, when deploying a new version • and again when provisioning a new server

• Using tags we run or skip tasks or plays as needed.

REUSABLE3

17

./playbook.yml -i hosts -- --tags infra

Page 18: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

• Ansible can be easily extended with JSON • Correlating monitoring alerts with application deployments

significantly reduces MTTR

EXTENSIBLE4

18

Page 19: Ansible ALLTHETHINGS

http://bigpanda.io

We meanALL THE

THINGS!!

Page 20: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 20

server provisioning server orchestration

application deployment

for

Page 21: Ansible ALLTHETHINGS

steps to automating

everything using Ansible6

21

Page 22: Ansible ALLTHETHINGS

122

Ansible Workshop

Page 23: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

Chapter 1 - Basic Setup

Chapter 2 - My First Playbook

Chapter 3 - Nginx

Chapter 4 - Handlers

Chapter 5 - Application Deployments

Ansible Workshop1

23

Chapter 6 - Roles

Chapter 7 - Role Dependencies

Chapter 8 - Advanced Inventory

Chapter 9 - Variable Precedence

Page 24: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

1

24

github.com/bigpandaio/ansible-workshop

Ansible Workshop

Page 25: Ansible ALLTHETHINGS

2Playbook Playbooks

25

Page 26: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

2

26

Playbook Playbooks

Page 27: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

2

27

Playbook Playbooks

Page 28: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

2

28

github.com/bigpandaio/ansible-exec

Playbook Playbooks

Page 29: Ansible ALLTHETHINGS

3 Make the scariest part of the build, the easiest.

29

Page 30: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 30

deploy bigpanda

Page 31: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 31

Ansible is so intuitive & easy we no longer bother connecting to servers

& running commands manually.

Page 32: Ansible ALLTHETHINGS

4Meet Beanbot

32

Page 33: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 33

Page 34: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 34

Page 35: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 35

Page 36: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

Meet Beanbot4

36

github.com/github/hubot

https://github.com/hipchat/hubot-hipchat

Page 37: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

4

37

BigPanda HipChat Beanbot Ansible

Meet Beanbot

Page 38: Ansible ALLTHETHINGS

5 Infrastructure Confidence

38

Page 39: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

Infrastructure Confidence5

39

• We were able to redeploy ALLTHETHINGS. • We ensured that everything was configured exactly as intended

and we ensured that we had 100% Ansible infrastructure coverage.

• With zero downtime.

Page 40: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff 40

Page 41: Ansible ALLTHETHINGS

6 Connect Alerts & Changes

41

Page 42: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

9)    Easily  correla.ng  Ansible  changes  with  alerts

42

Page 43: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

9)    Easily  correla.ng  Ansible  changes  with  alerts

43

Page 44: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

We hear a lot of talk about

Lifecycle Management

44

Page 45: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

Lifecycle ManagementWe hear a lot of talk about

45

Page 46: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

The scale & speed of Modern Ops requires

46

Lifecycle Automation

Page 47: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

The scale & speed of Modern Ops requires

47

Lifecycle Automation

Page 48: Ansible ALLTHETHINGS

http://bigpanda.io @chuparkoff

Thanks!#automateALLTHETHINGS

Dan Chuparkoff

48