nzoschke




                   /
Heroku Secrets - Waza 2013
Twelve-Factor
Adam Wiggins' The Twelve-Factor App (http://12factor.net/)

Modern software design for software-as-a-service

Heroku enables and enforces these patterns
Continuous Deployment
One codebase - many deploys

2 million releases in Feb alone

600 "kernel" releases in Feb alone
Dependencies
2x more Rails than Sinatra

3x more Webrick than Thin

5x more Thin than Unicorn

10x more Unicorn than Puma
Bundler API
6 web dynos, 1 data worker, 4 databases

1 production DB

2 read-only follower DBs

1 test DB
Config
Encrypted

Stored in Dynamo
Data
$hrk adn:d hrk-otrsldv-vrin92
  eou dosad eoupsgeq:e -eso=.
Atce a HRK_OTRSLCPE_R
 tahd s EOUPSGEQ_OPRUL

$hrk p:slCPE
  eou gpq OPR
=  shm.q
 > i ceasl
CET TBE
 RAE AL

= cet etninp_ttsaeet;
 > rae xeso gsa_ttmns
CET ETNIN
 RAE XESO
Data Tools
Datascope (https://datascope.herokuapp.com)

Dataclips
(https://dataclips.heroku.com/xqzzcwmlubhblavdipydzzqmlmbm

Dataclips
(https://dataclips.heroku.com/xqzzcwmlubhblavdipydzzqmlmbm

Dataclips
(https://docs.google.com/a/heroku.com/spreadsheet/ccc?
key=0AuBDxqx7T2vodDhfZk1YR0xIXzl2ckJRaFA5RUZjU0E&rm
Build
        https://github.com/nzoschke/apache-http-git
       (https://github.com/nzoschke/apache-http-git)
        https://github.com/kr/heroku-buildpack-inline
       (https://github.com/kr/heroku-buildpack-inline)
$ctbncmie
  a i/opl
#/i/ah
 !bnbs
st-
 e x
BIDDR$pd
 UL_I=(w)

mdr- $UL_I/r
 ki p BIDDRsc
cr - ht:/pcemrospi.o/tp/tp-..4trg |trx - $UL_I/r
 ul s tp/aah.irr.arcmhtdhtd222.a.z  a z C BIDDRsc
cr - ht:/i-oegolcd.o/ie/i-....a.z |trx - $UL_I/r
 ul s tp/gtcr.ogeoecmflsgt1814trg   a z C BIDDRsc

c $UL_I/r/i-...
 d BIDDRscgt1814
.cniue-pei=apvno/i -wtottlk
 /ofgr -rfx/p/edrgt -ihu-ct
mk - -
 ae i k
DSDR$UL_I mk - isal
 ETI=BIDDR ae i ntl

c $UL_I/r/tp-..4
 d BIDDRschtd222
.cniue-pei=apvno/tp
 /ofgr -rfx/p/edrhtd
mk
 ae
DSDR$UL_I mk isal
 ETI=BIDDR ae ntl

r -f$UL_I/r
 m r BIDDRsc
Build Services
$ctbnhtd
  a i/tp

#/i/ah
 !bnbs
PR={OT-00
 OT$PR:50}
RO=(d$drae$).;pd
 OT$c (inm 0/. w)

epr GTDR/m/o.i
 xot I_I=tpfogt
gtii -br $I_I
 i nt -ae GTDR
gtcni ht.eevpc tu
 i ofg tprcieak re

ct>tphtd$.of<EF
 a /m/tp.$cn <O
CsoLg"tpacs_o"cmiei
 utmo /m/ceslg obndo
Erro "tperrlg
 roLg /m/ro_o"
Lgee dbg
 oLvl eu

Stn GTPOETRO /m
 eEv I_RJC_OT tp
Stn GTHT_XOTAL
 eEv I_TPEPR_L
SrpAis/$OTvno/i/iee/i-oegtht-akn/
 citla   RO/edrgtlbxcgtcr/i-tpbced

Lse $OT
 itn PR
EF
 O

tuh
 oc     /m/ceslg
         tpacs_o
tuh
 oc     /m/ro_o
         tperrlg
ti -
 al F   /m/ceslg&
         tpacs_o
ti -
 al F   /m/ro_o &
         tperrlg

ee /p/edrhtdbnhtd- FRGON - /m/tp.$cn &
 xc apvno/tp/i/tp D OERUD f tphtd$.of
Build Services
             https://github.com/ddollar/anvil
            (https://github.com/ddollar/anvil)
$hrk bid.
  eou ul
Cekn frapflst sn..dn,2flsnee
 hcig o  p ie o yc. oe  ie edd
Ulaig 100 (T:0)
 podn: 0.% EA s
Lucigbidpoes. dn
 anhn ul   rcs.. oe
Fthn bidak. dn
 ecig ulpc.. oe
Cmiigap.
 opln p..
Sces su i hts/aiavlok.r/lg/d4c658-ab9e-ca9658tz
 ucs, lg s tp:/p.niwrsogsusc478-2a44-003e2b4e.g
Release API
     https://devcenter.heroku.com/articles/labs-pipelines
    (https://devcenter.heroku.com/articles/labs-pipelines)
$cr -XPS hts/csuu.eoup.o/1ap/eouscesrlae
   ul v OT tp:/iarshrkapcmv/pshrk-ert/ees       
  - "otn-ye tx/sn
   H CnetTp: etjo"                              
  - "$EOUAIKY 
   u :HRK_P_E"
  - '"p""eousces,"ecito""o" "lgul:hts/aiavlok.r/lg/d
   d {ap:hrk-ert" dsrpin:fo, su_r""tp:/p.niwrsogsusc4
4c658-ab9e-ca9658tz}
 78-2a44-003e2b4e.g"'

<HT/. 22Acpe
  TP11 0 cetd
Run
$hrk rnbs
  eou u ah
~$d -h
    u s
52 .
 .M

~$hsnm
   otae
e313-3e43-b07936c5
 b47c73-d893-fd5f54

~$eh $OT
    co PR
278
 22

~$/bnicni |sd- '/*ntad:(09]+)s*/'|ha -
   si/fofg  e n s.ie dr[-../1p  ed 1
1.91117
 02.4.9

~$cr icni.ehs
   ul fofgm/ot
e25-3-85.opt-.mznw.o
 c-4245-9cmue1aaoascm
~$bnl ee ib
   ude xc r
Profile Scripts
$hrk rnbs
  eou u ah
Rnig`ah atce t tria..u,rn87
 unn bs` tahd o emnl. p u.69

SmtmsIwne i Imi m rgtmn. Te i pse ofadIm
 oeie    odr f ' n y ih id hn t ass f n '
a itlieta ee.
 s nelgn   s vr
   - Sme Bcet "ngm"
    - aul ekt, Edae

~$
$ct$OE.rfl./otn.h
  a HM/poiedfrues
#/i/ah
 !bnbs

rb <'O'
 uy <EF
  cnet =Dr"apvno/s/hr/ae/otns*]mp{||Fl.pnf.ed}
   otns  i[/p/edrursaegmsfrue/".a  f ieoe()ra
  frue =cnet.a {||fslt"n" }
   otns  otnsmp  f .pi(%n)
  pt frue.lte.hfl[]
   us otnsfatnsufe0
EF
 O
Disposability
56.5 million unique runs in February alone

75000+ instances and counting in Heroku's production cloud
life
Logs
  https://devcenter.heroku.com/articles/labs-https-drains
 (https://devcenter.heroku.com/articles/labs-https-drains)

HTTP Drains

L2met Server / Service
(https://github.com/ryandotsmith/l2met) -> Librato, etc.

Noah Zoschke at Waza 2013: Heroku Secrets

  • 1.
    nzoschke / Heroku Secrets - Waza 2013
  • 2.
    Twelve-Factor Adam Wiggins' TheTwelve-Factor App (http://12factor.net/) Modern software design for software-as-a-service Heroku enables and enforces these patterns
  • 3.
    Continuous Deployment One codebase- many deploys 2 million releases in Feb alone 600 "kernel" releases in Feb alone
  • 4.
    Dependencies 2x more Railsthan Sinatra 3x more Webrick than Thin 5x more Thin than Unicorn 10x more Unicorn than Puma
  • 5.
    Bundler API 6 webdynos, 1 data worker, 4 databases 1 production DB 2 read-only follower DBs 1 test DB
  • 6.
  • 7.
    Data $hrk adn:d hrk-otrsldv-vrin92 eou dosad eoupsgeq:e -eso=. Atce a HRK_OTRSLCPE_R tahd s EOUPSGEQ_OPRUL $hrk p:slCPE eou gpq OPR = shm.q > i ceasl CET TBE RAE AL = cet etninp_ttsaeet; > rae xeso gsa_ttmns CET ETNIN RAE XESO
  • 8.
  • 9.
    Build https://github.com/nzoschke/apache-http-git (https://github.com/nzoschke/apache-http-git) https://github.com/kr/heroku-buildpack-inline (https://github.com/kr/heroku-buildpack-inline) $ctbncmie a i/opl #/i/ah !bnbs st- e x BIDDR$pd UL_I=(w) mdr- $UL_I/r ki p BIDDRsc cr - ht:/pcemrospi.o/tp/tp-..4trg |trx - $UL_I/r ul s tp/aah.irr.arcmhtdhtd222.a.z a z C BIDDRsc cr - ht:/i-oegolcd.o/ie/i-....a.z |trx - $UL_I/r ul s tp/gtcr.ogeoecmflsgt1814trg a z C BIDDRsc c $UL_I/r/i-... d BIDDRscgt1814 .cniue-pei=apvno/i -wtottlk /ofgr -rfx/p/edrgt -ihu-ct mk - - ae i k DSDR$UL_I mk - isal ETI=BIDDR ae i ntl c $UL_I/r/tp-..4 d BIDDRschtd222 .cniue-pei=apvno/tp /ofgr -rfx/p/edrhtd mk ae DSDR$UL_I mk isal ETI=BIDDR ae ntl r -f$UL_I/r m r BIDDRsc
  • 10.
    Build Services $ctbnhtd a i/tp #/i/ah !bnbs PR={OT-00 OT$PR:50} RO=(d$drae$).;pd OT$c (inm 0/. w) epr GTDR/m/o.i xot I_I=tpfogt gtii -br $I_I i nt -ae GTDR gtcni ht.eevpc tu i ofg tprcieak re ct>tphtd$.of<EF a /m/tp.$cn <O CsoLg"tpacs_o"cmiei utmo /m/ceslg obndo Erro "tperrlg roLg /m/ro_o" Lgee dbg oLvl eu Stn GTPOETRO /m eEv I_RJC_OT tp Stn GTHT_XOTAL eEv I_TPEPR_L SrpAis/$OTvno/i/iee/i-oegtht-akn/ citla RO/edrgtlbxcgtcr/i-tpbced Lse $OT itn PR EF O tuh oc /m/ceslg tpacs_o tuh oc /m/ro_o tperrlg ti - al F /m/ceslg& tpacs_o ti - al F /m/ro_o & tperrlg ee /p/edrhtdbnhtd- FRGON - /m/tp.$cn & xc apvno/tp/i/tp D OERUD f tphtd$.of
  • 11.
    Build Services https://github.com/ddollar/anvil (https://github.com/ddollar/anvil) $hrk bid. eou ul Cekn frapflst sn..dn,2flsnee hcig o p ie o yc. oe ie edd Ulaig 100 (T:0) podn: 0.% EA s Lucigbidpoes. dn anhn ul rcs.. oe Fthn bidak. dn ecig ulpc.. oe Cmiigap. opln p.. Sces su i hts/aiavlok.r/lg/d4c658-ab9e-ca9658tz ucs, lg s tp:/p.niwrsogsusc478-2a44-003e2b4e.g
  • 12.
    Release API https://devcenter.heroku.com/articles/labs-pipelines (https://devcenter.heroku.com/articles/labs-pipelines) $cr -XPS hts/csuu.eoup.o/1ap/eouscesrlae ul v OT tp:/iarshrkapcmv/pshrk-ert/ees - "otn-ye tx/sn H CnetTp: etjo" - "$EOUAIKY u :HRK_P_E" - '"p""eousces,"ecito""o" "lgul:hts/aiavlok.r/lg/d d {ap:hrk-ert" dsrpin:fo, su_r""tp:/p.niwrsogsusc4 4c658-ab9e-ca9658tz} 78-2a44-003e2b4e.g"' <HT/. 22Acpe TP11 0 cetd
  • 13.
    Run $hrk rnbs eou u ah ~$d -h u s 52 . .M ~$hsnm otae e313-3e43-b07936c5 b47c73-d893-fd5f54 ~$eh $OT co PR 278 22 ~$/bnicni |sd- '/*ntad:(09]+)s*/'|ha - si/fofg e n s.ie dr[-../1p ed 1 1.91117 02.4.9 ~$cr icni.ehs ul fofgm/ot e25-3-85.opt-.mznw.o c-4245-9cmue1aaoascm ~$bnl ee ib ude xc r
  • 14.
    Profile Scripts $hrk rnbs eou u ah Rnig`ah atce t tria..u,rn87 unn bs` tahd o emnl. p u.69 SmtmsIwne i Imi m rgtmn. Te i pse ofadIm oeie odr f ' n y ih id hn t ass f n ' a itlieta ee. s nelgn s vr - Sme Bcet "ngm" - aul ekt, Edae ~$ $ct$OE.rfl./otn.h a HM/poiedfrues #/i/ah !bnbs rb <'O' uy <EF cnet =Dr"apvno/s/hr/ae/otns*]mp{||Fl.pnf.ed} otns i[/p/edrursaegmsfrue/".a f ieoe()ra frue =cnet.a {||fslt"n" } otns otnsmp f .pi(%n) pt frue.lte.hfl[] us otnsfatnsufe0 EF O
  • 15.
    Disposability 56.5 million uniqueruns in February alone 75000+ instances and counting in Heroku's production cloud life
  • 16.
    Logs https://devcenter.heroku.com/articles/labs-https-drains (https://devcenter.heroku.com/articles/labs-https-drains) HTTP Drains L2met Server / Service (https://github.com/ryandotsmith/l2met) -> Librato, etc.