ansible allthethings

Post on 22-Apr-2015

1.311 Views

Category:

Software

7 Downloads

Preview:

Click to see full reader

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.

TRANSCRIPT

http://bigpanda.io @chuparkoff

#automateALLTHETHINGS

Dan Chuparkoff

with a one-man Ops team

1

WIFI:

ansi14

http://bigpanda.io @chuparkoff

Dan ChuparkoffDirector of Growth

& Engagement

2

http://bigpanda.io @chuparkoff

Feb 1, 2009

3

http://bigpanda.io @chuparkoff 4

http://bigpanda.io @chuparkoff 5

http://bigpanda.io @chuparkoff 6

http://bigpanda.io @chuparkoff

What percentage of 140 million people will go to a website

for free tickets?

7

http://bigpanda.io @chuparkoff

?8

http://bigpanda.io @chuparkoff

100,000 free trips in 42 seconds

9

http://bigpanda.io @chuparkoff

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

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

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

.: 7MMMMMMMMMMMMMMMMMMMMMMMMMMMMM 8MMMMMMMMMMMMMMMMMMMMMMMMMMMMM ., . =MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM$MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM :.

.: MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM? .. ., MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM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MMMMMMM\ MMMMMMMMMMMMMMM? ,. .., NMMMMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMMMMM. .,.

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

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

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

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

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

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

..

10

http://bigpanda.io @chuparkoff 11

http://bigpanda.io @chuparkoff 12

http://bigpanda.io @chuparkoff 13

a one-man Ops team

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.

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

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

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

http://bigpanda.io @chuparkoff

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

significantly reduces MTTR

EXTENSIBLE4

18

http://bigpanda.io

We meanALL THE

THINGS!!

http://bigpanda.io @chuparkoff 20

server provisioning server orchestration

application deployment

for

steps to automating

everything using Ansible6

21

122

Ansible Workshop

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

http://bigpanda.io @chuparkoff

1

24

github.com/bigpandaio/ansible-workshop

Ansible Workshop

2Playbook Playbooks

25

http://bigpanda.io @chuparkoff

2

26

Playbook Playbooks

http://bigpanda.io @chuparkoff

2

27

Playbook Playbooks

http://bigpanda.io @chuparkoff

2

28

github.com/bigpandaio/ansible-exec

Playbook Playbooks

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

29

http://bigpanda.io @chuparkoff 30

deploy bigpanda

http://bigpanda.io @chuparkoff 31

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

& running commands manually.

4Meet Beanbot

32

http://bigpanda.io @chuparkoff 33

http://bigpanda.io @chuparkoff 34

http://bigpanda.io @chuparkoff 35

http://bigpanda.io @chuparkoff

Meet Beanbot4

36

github.com/github/hubot

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

http://bigpanda.io @chuparkoff

4

37

BigPanda HipChat Beanbot Ansible

Meet Beanbot

5 Infrastructure Confidence

38

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.

http://bigpanda.io @chuparkoff 40

6 Connect Alerts & Changes

41

http://bigpanda.io @chuparkoff

9)    Easily  correla.ng  Ansible  changes  with  alerts

42

http://bigpanda.io @chuparkoff

9)    Easily  correla.ng  Ansible  changes  with  alerts

43

http://bigpanda.io @chuparkoff

We hear a lot of talk about

Lifecycle Management

44

http://bigpanda.io @chuparkoff

Lifecycle ManagementWe hear a lot of talk about

45

http://bigpanda.io @chuparkoff

The scale & speed of Modern Ops requires

46

Lifecycle Automation

http://bigpanda.io @chuparkoff

The scale & speed of Modern Ops requires

47

Lifecycle Automation

http://bigpanda.io @chuparkoff

Thanks!#automateALLTHETHINGS

Dan Chuparkoff

48

top related