deploying ruby/sinatra at rent the runway - next dev stackup,may 6, 2014

29
How We Write the DRESS CODE at Rent the Runway

Upload: timothy-ricablanca

Post on 30-Jun-2015

386 views

Category:

Software


1 download

DESCRIPTION

Eric and Tim from Rent the Runway went to The Flatiron School to talk about Ruby, daily deployments, supporting service-oriented-architecture with a front-end Sinatra app, the mistakes and lessons learned from shifting platforms, and trying to fix everything with a big red button. You can get more context by reading the blog post here: http://blog.tech.renttherunway.com/?p=774 Big thanks to StackUp Talks (http://stackuptalks.com/) and The Flatiron School (http://flatironschool.com/) for having us!

TRANSCRIPT

Page 1: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

How We Write the DRESS CODE

at Rent the Runway

Page 2: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

Introductions!

Eric Weinstein@ericqweinstein

Tim Ricablanca@timx

@RTR_tech

Page 3: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

● Founded in November 2009● Cinderella-Experience-as-a-ServiceTM*

● 40+ engineers / 10 Ruby committers● Operations:

○ Warehouse & Fulfillment in NJ○ Henri Bendel’s and HQ in NYC○ The Cosmopolitan, Las Vegas

About Rent the Runway

* We made this up

Page 4: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

Ruby at Rent the Runway

Page 5: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014
Page 6: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

We use Sinatra for our front-end

. . . served by Unicorn, behind Nginx

. . . tested by RSpec and Jasmine

. . . talking to our APIs over Typhoeus

. . . deployed by Rake and Capistrano

Page 7: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

Commit to a feature branch Pull Request

RSpec & Jasmine

Code review & mergeCode Climate

Deploy via CapistranoSelenium tests

Rubocop & JSHint

Page 8: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

We deploy renttherunway.com every day.

Our deploys are boring and uneventful.

It took four devs, a systems engineer, and a team of QA engineers three months to get there.

Page 9: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

Humble Beginnings:The Journey to Boring Deploys:

A Tuskforce Adventure

Page 10: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

The Early Days

● Drupal on LAMP● No separation of concerns ● No database abstraction● Test coverage was questionable● <standard painful problem with legacy

software>

Page 11: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

“You run your e-commerce site on Drupal?”

Page 12: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

SOA and Salami Slicing

Page 13: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

Our Runway

Page 14: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

And then came the swimlanes

Page 15: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

User

Checkout

Static Asset CDN Origin

Drupal

Our Runway

Home

Grid

Product Detail

static assets

sinatra views / erbs

< Sinatra::Base

RtR API clients

Heroku

Rackspace

Engine Yard

Page 16: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

...but wait, there’s more:EACH ONE OF THE SWIMLANES HAD ITS OWN CDN AND MEMCACHED INSTANCE

Page 17: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

“Deploying the website was like executing a lunar mission”

- Eric Q. Weinstein

Page 18: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

“some m#%@&*s are always trying to ice skate uphill”

Page 19: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

The swimlanes solved a scalability problem that we didn’t have.

We regressed at the cost of productivity, feature velocity, and developer happiness.

Page 20: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

Organizational Buy-in

Page 21: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

“Everyone deserves a Cinderella Experience”- Rent the Runway Core Value #1

(even developers!)

*queue the Tuskforce*

Page 22: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

Storefront App

< Sinatra::Base

API Clients

*

Page 23: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014
Page 24: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

(It’s this one)

Page 25: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

It used to take two devs 6 hours to shepherd the deploy.

It now takes about 6 minutes.

Page 26: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

FashionatorTM

Page 27: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

FlaggregatorTM

Page 28: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

Lessons Learned

● New tech stack: growing pains● YAGNI: don’t build what you don’t need● You can’t boil the ocean, but you can cause

global warming● Everyone deserves a Cinderella

experience—even developers!

Page 29: Deploying Ruby/Sinatra at Rent the Runway - Next Dev StackUp,May 6, 2014

Questions?