Slide 1

Slide 1 text

Continuous Integration + Deployment for Spree with Wercker (and Heroku!)

Slide 2

Slide 2 text

2 Hi, I'm Daniel ● Application developer at Coroutine in Memphis, Tennessee ● Working with Spree since last April ● Approaching go-live on our second Spree store

Slide 3

Slide 3 text

3 Keeping the Spree team busy (sorry!)

Slide 4

Slide 4 text

4 Case Study: Tube Depot ● Devs in different time zones ● Spree customizations needed to be tested and refined quickly ● No full-time sysadmin

Slide 5

Slide 5 text

5 CI + CD + Heroku ● CI: New code is automatically tested. Failures are immediately communicated to the dev team. ● CD: Passing CI builds are automatically deployed... somewhere ● Heroku (or Ninefold maybe?): Platform as a service application hosting. Database, logging, caching, analytics, mailing, error tracking, background jobs. Snapshotted deploys for quick rollbacks!

Slide 6

Slide 6 text

6 But why? ● Immediate feedback makes it harder to break the build or introduce conflicting designs ● Increases developer confidence, especially when they're not colocated ● Stakeholders always have a working, clickable copy of the latest edition of the store ● Dramatically less effort and risk involved in deployment means more deployments, more feedback, and a better storefront

Slide 7

Slide 7 text

7 Spree's CI: ci.spree.fm

Slide 8

Slide 8 text

8 Spree's .travis.yml

Slide 9

Slide 9 text

9 Spree stores with Wercker

Slide 10

Slide 10 text

10 wercker.yml

Slide 11

Slide 11 text

11 Multiple deploy targets

Slide 12

Slide 12 text

12 Deployment variables

Slide 13

Slide 13 text

13 Results: Successful go-live!

Slide 14

Slide 14 text

14 Sample Wercker + Heroku code https://github.com/dpritchett/techcamp-ab-testing

Slide 15

Slide 15 text

15 Thanks Spreeple! Keep in touch: @dpritchett on Twitter and Github [email protected] Ask me about one-click shipping label generation + printing from your Spree order admin