puppet at scale – case study of paypal's learnings - puppetconf 2013

18
PUPPET AT SCALE: CASE STUDY OF LEARNINGS AT PAYPAL Stan Hsu, Harendra Narayan, Chris Huang August 23, 2013

Upload: puppet-labs

Post on 23-Jan-2015

20.965 views

Category:

Technology


1 download

DESCRIPTION

"Puppet at Scale – Case Study of PayPal's Learnings" by Stan Hsu, Senior Dev Manager, PayPal. Presentation Overview: Large scale and app level management pose challenges to any implementation of puppet. Come and learn some of the challenges PayPal Deployment Systems team faced and the how these were overcome. Speaker Bio: Stan Hsu is the Senior Dev Manager for PayPal's deployment systems team. His team is currently responsible to build out a new deployment system based on puppet. In his tenure at eBay/PayPal, he's had the unique experience of having had access to all data centers in both eBay and PayPal to help build out of new deployment systems for production and QA environments. His interests include application at scale, scalability, performance tuning, and usability. In his previous roles he has managed teams at Tibco, Crossworlds, and HP.

TRANSCRIPT

Page 1: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

PUPPET AT SCALE:CASE STUDY OF LEARNINGS AT PAYPAL

Stan Hsu, Harendra Narayan, Chris Huang

August 23, 2013

Page 2: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

2 Confidential and Proprietary

PAYPAL SCALE

• PayPal is part of eBay Inc

• 132 million active registered accounts

• 25 currencies in 193 markets

• Net Total Payment Volume: $43 Billion in Q2

• 7.6 million payments per day

• $5,277 in Total Payment Volume every second

Page 3: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

3 Confidential and Proprietary

THE CHALLENGE

• 100GB+ and counting… • 4000+ packages• 20-50 new packages introduced every release• complex dependency graph across domains and services

• Build a new system for deploying application and system software

• Massive scale in production across multiple data centers

• Thousands of stages in QA• 3000+ dev & QE in 10+ offices across

time zones and geographic regions

Page 4: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

4 Confidential and Proprietary

ARCHITECTURE

VELOCITY

Deploy Hiera (Mongo)

Deployment REST API

Puppet Master

Yum Repo

Endpoint

1. Enter label, application, size

2. P

rovis

ion vm

s

3. Register w/ Hiera

4. Register VM

5. Register with puppet6. Deploy

Openstack Deployment System

Page 5: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

SCALABILITY CHALLENGE

Challenges:• Traditional 1 app 1 module does not scale• High velocity environment with ever increasing speed of

change• New pkgs, sunset pkgs, dependency changes, dev staff

operating 24x5

• Lack of puppet expertise to complement 3000+ technology staff across geographic regions

Solution:• Ninja engine generate resources dynamically• Dependency discovery• Puppet code change not required

Confidential and Proprietary

Page 6: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

6

ROLES & LABELS

Role• One role per pool• Define a set of packages to install

Label• A set of versioned packages• Backed by a yum repository

Confidential and Proprietary

Page 7: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

7

ROLES & LABELS

Confidential and Proprietary

aWeb.100.0bWeb.100.0aSvc.99.0bSvc.100.0aServ.100.0…

Role abWeb:aWebbWeb

Role abSvc:aSvcbSvc

aWeb.100.0bWeb.100.0

aSvc.99.0bSvc.100.0

Pool

Host

Label

abWeb abSvc

deploy

deploy

Page 8: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

SYSTEM HIERARCHY

Page 9: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

9

SYSTEM HIERARCHY

Confidential and Proprietary

Page 10: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

10 Confidential and Proprietary

ENC / HIERA

• Mongo DB for hierarchical datastore

• Reduced multiple Hiera calls to one for classes, role, parameters look up• Efficiency & easier debug

• Created a web based tool to visualize Hiera data

• REST API for CRUD operations on Hiera data

Page 11: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

SCALING ACTIVEMQ

Page 12: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

12 Confidential and Proprietary

ACTIVEMQCLIENTS

LOADBALANCER

ACTIVEMQCLUSTER

Page 13: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

13

MCOLLECTIVE AT SCALE

• Query systems through facts, agents, or regular expressions[peadmin@puppet ~]$ mco find -F processorcount=24

• Verify package versions in all systems for simple auditing purposes[peadmin@puppet ~]$ mco package status python-qpid

---- package agent summary ----

           Nodes: 3366 / 3366

        Versions: 3356 * 0.14-6.el5, 10 * absent

    Elapsed Time: 34.68 s

• Kick off puppet runs

• ssh script replacement

• REST API enables Mcollective to web and other tools

Confidential and Proprietary

Page 14: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

14 Confidential and Proprietary

Large number ofApplications and Services

Real Time Status Updates of Puppet Runs

Page 15: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

WHY’S IT TAKING SO LONG? ETA?

Confidential and Proprietary

Page 16: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

PROGRESS PUPPET MODULE

Sample Update Message (JSON):

{ "host": "stage2vmppsm02.sc4.paypal.com", "time": "2012-04-25T10:00:37Z", "type": "puppet_run", "catalog_version": 1335348026, "puppet_run_status": "running", "package": { "status": "successful", "name": "axis" }}

Confidential and Proprietary

Page 17: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

PROGRESS PUPPET MODULE

• Open source code available at • https://github.com/hunner/progress_mq

• Modified since then• To enable/disable messages for different puppet runs• To format JSON messages when writing to a file

Confidential and Proprietary

Page 18: Puppet at Scale – Case Study of PayPal's Learnings - PuppetConf 2013

Thank you!