2. Who Am I?
I work for AWS
I worked for the DNC 2009-2012
I was embedded in the
DevOps Team @ OFA
AWS does not endorse
political candidates
3. Who Am I?
JP, DevOps for Mozilla Foundation
Previous gig DevOps at OFA 2012
Before that, Ops at Threadless
@jdotp
Mozilla Foundation does
endorse animated cats
5. What is Continuous Integration?
Changes to code automatically deployed to mainline branch
• After passing unit and mock tests
Makes changes to code and deployments iterative, not
monolithic
Bugs are detected quickly
Allows rapid development
Helps automate deployments
40. Configuration Management: Puppet
In mid-2011, we looked at options for configuration
management and chose Puppet
We needed to make it scale, and to get it to work with stateless, horizontally scalable infrastructure
How did we do this?
41. Bootstrapping Puppet with CloudInit
CloudInit is built
into Ubuntu and
Amazon Linux
• Allows you to
pass bootstrap
parameters in
Amazon EC2
user-data field, in
YAML format
42. Bootstrapping Puppet with CloudInit
Don’t store creds in puppet manifests, store them in private
Amazon S3 buckets
Either pass Amazon S3 creds through CloudInit:
Even better – avoid this by using AWS Identity and Access
Management (IAM) roles and AWS Unified CLI’s S3 client
43. Bootstrapping Puppet with CloudInit
Built-in puppet support
Use certname with %i for instance id to name the node
Puppetmaster must have auto sign turned on
• Use security groups and/or NACLs for network-level security
In nodes.pp, use regex to match node names
45. Puppet Tips
Use runstages
Don’t store credentials in puppet, store them in private Amazon S3
buckets
• Use AWS IAM to secure the credentials bucket/folders within that bucket
46. Puppet Tips
Use puppet only for configuration files and what makes your
apps unique
For undifferentiated parts of apps, use Amazon S3 backed
RPM/Debian repositories
• Can be either public or private repos, depending on your needs
• Amazon S3 Private RPM Repos: http://git.io/YAcsbg
• Amazon S3 Private Debian Repos: http://git.io/ecCjWQ
47. Puppet Tips
By using packages for applications deploys, you can set ensure
=> latest, and just bump the package in the repo to update
Log everything with rsyslog/graylog/loggly/NewRelic/splunk
48. Scaling the Puppet Masters
Use an Auto Scaling group for puppet masters
• Min size => 2, use multiple Availability Zones
Either have them build themselves off of existing puppet
masters in the group or off packages stored in Amazon S3 and
bootstrapped through user-data
Auto-sign must be on
50. They had this built for the previous 3 months, a
on the East Coast.
51. They had this built for the previous 3 months, a
on the East Coast.
We built this part in
9 hours to be safe.
AWS +
Puppet +
Netflix Asgard +
WAN Optimization Software +
DevOps =
Cross-Continent FaultTolerance On-Demand
52. ARC205 Thursday @ 3:00PM Lando 4303
Deploying the ‘League of Legends’ Data
Pipeline with Chef
54. Webmaker.org circa 2012
• Included Apps, non-SOA: Thimble, Popcorn, Goggles
• ~20 pushes of new software in 2012
• Operations and Development interacted mostly through bugzilla
tickets for deploys
• Hosting in physical datacenter at Mozilla
Webmaker.org circa early 2013
• Deciding to go 12-factor, SOA in app layer
• Weekly pushes of Popcorn on train model
• Operations and Development interacted mostly through bugzilla
tickets for deploys
55. April 2013
Webmaker begins rebuilding entire platform
SOA, 12-factor in node.js exclusively
Moving apps into AWS and DevOps / CI
56. Since April 2013….
Openbadges, Webmaker combine for:
Pushes Per Day (Staging and Prod)
Pushes Per Day to Staging / Prod
1339 Pushes
57. Who?
•
•
•
•
•
~30 Paid Developers
Hundreds of Students
Thousands of Contributors
One DevOps / Internet Jedi
Multiple Teams
How?
• Puppet, Jenkins, Fabric
• Tight feedback loops:
Newrelic, Opsview
• Culture Shift
• Staging Envs
• Brave devs iterate,
keeping work in-context
• Visible Ops
• Cross-train developers in
operations
59. 1) Know How You Were Doing Before
2) Know What Changed When
3) Know How You Are Now Doing
=
The confidence to try more things
and try them faster, with minimum
viable planning.
72. ARC203 Wednesday @ 4:15 Lando 4303
How Adobe Deploys
Refreshing the Entire Stack Every Time
74. Mars Rover Landing by the #’s
NASA TV = HD stream, 1080p, ~1 mb/s per viewer
Expecting peak of ~1m viewers
All playback devices (iOS, Android, Flash, HTML5, blah)
Once in a lifetime moment in history (no crashy crashy)
FUN FUN FUN
75. NASA TV = HD stream, 1080p, ~1 mb/s per viewer
Expecting peak of ~1m viewers
All playback devices (iOS, Android, Flash, HTML5, blah)
Once in a lifetime moment in history (no crashy crashy)
NASA says we can’t use their live stream setup
It’s 6 days before the landing
It’s the same week as the Olympics
Available technical resources from JPL: Brett and Khawaja
NOT FUN NOT FUN NOT FUN
Mars Rover Landing by the #’s
77. The plan
Design a solution around our limits
•
•
•
•
Max connections to origin = 6
Max streams per cache node = 20
Local Latency = critical
US-WEST-1 capacity reserved for S3 static images
Test the snot out of it
Hang on!
117. AWS re:Invent Pub Crawl
Join the AWS Startup Team this evening at the AWS Pub Crawl
When: Wednesday November 13, 5:30pm - 7:30pm
Where: Canaletto at The Venetian, 2nd Floor
Who Will Be There: Startups, The AWS Startup Team,
Startup Launch Companies and
AWS re:Invent Hackathon winners
118. Startup Spotlight Sessions with Dr. Werner Vogels
Thurs. Nov 14, Marcello Room 4406
SPOT 203 - Fireside Chats – Startup Founders, 1:30-2:30pm
– Eliot Horowitz, CTO of MongoDB
– Jeff Lawson, CEO of Twilio
– Valentino Volonghi, Chief Architect of AdRoll
SPOT 204 - Fireside Chats – Startup Influencers, 3:00-4:00pm
– Albert Wegner, Managing Partner at Union Square Ventures
– David Cohen, Founder and CEO of TechStars
SPOT 101 - Startup Launches, 4:15-5:15pm
– 5 companies powered by AWS launching at AWS re:Invent 2013
119. Please give us your feedback on this
presentation
ARC 307
As a thank you, we will select prize
winners daily for completed surveys!