TryingCon*nuousDelivery      Toru Furukawa!      @torufurukawa!
Keep service running
before and after releasing
Change,Change,Change
Ship it as soon as it is ready
Con*nuousdelivery#"Update"the"site"every"5"minutes"*/5"*"*"*"*"cd"/www/example.com""""""""""&&"git"pull""""""""""&&"servic...
Business value
5Problems
1. Manual operation is 
   expensive and unpredictable
Preferscriptsoveropera*ons$"make"env".............."build"dev"environment"unittest"........."run"unit"tests"acceptancetest...
Automateacceptancetests
HaveJenkinsruntests                                Deploy!          Push!       Notify!                      Pull!Write co...
2. Requirements will never be fixed
Design product to ship incrementally
Schema changeclass"User(Model):"          class"User(Model):"""name"="StringProperty()"   ""name"="StringProperty()"""birt...
Addnewproperty1.  Add property with required=False!2.  Deploy!3.  Add app code to read and write new    property!4.  Updat...
Change property1.  “Add” property with required=False!2.  Deploy!3.  Add app code to access old and new    model!4.  Updat...
class"User(Model):"""name"="StringProperty()"""birthday"="DateProperty()"
class"User(Model):"""name"="StringProperty()"""date_birthday"="""""DateProperty(name=birthday)"""str_birthday"="""""String...
class"User(Model):"""name"="StringProperty()"""date_birthday"="…"""str_birthday"="…""""def"get_birthday(self):"""""return"...
class"User(Model):"""name"="StringProperty()"""date_birthday"="…"""str_birthday"="…""""def"get_birthday(self):"""""if"self...
class"User(Model):"""name"="db.StringProperty()"""date_birthday"="…"""str_birthday"="…""""def"get_birthday(self):"…""""def...
class"User(Model):"""name"="db.StringProperty()"""date_birthday"="…"""str_birthday"="…""""def"get_birthday(self):"…""""def...
3. Building and changing
   environment is expensive
Google App Engine 
lets us focus on app
Make dev and production    environments almost identical                                          Production$ appcfg.py up...
Have multiple versions deployed to        switch code quickly$"appcfg.py"–V"v11"update"src"..."(v11.myapp.appspot.com)"$"a...
4. We still have problems
Hg-flow for hotfix branches         featuredevelop               release                           hotfixmaster              ...
Rollback by changing default version$"appcfg.py"–V"v11"update"src"..."(v11.myapp.appspot.com)"$"appcfg.py"–V"v11"set_defau...
5. It does not happen overnight
Start with what makes sense to you
Allocate time for improvement
TODOs•    Review!•    Faster feedback!•    Automate capacity tests!•    Manage libraries!•    Test client side app
Things got better andare getting even better
Share OUR experiences                    @torufurukawa!      http://about.me/torufurukawa!http://facebook.com/toru.furukawa!
Upcoming SlideShare
Loading in …5
×

Trying Continuous Delivery - pyconjp 2012

1,256 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,256
On SlideShare
0
From Embeds
0
Number of Embeds
262
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Trying Continuous Delivery - pyconjp 2012

  1. 1. TryingCon*nuousDelivery Toru Furukawa! @torufurukawa!
  2. 2. Keep service running
before and after releasing
  3. 3. Change,Change,Change
  4. 4. Ship it as soon as it is ready
  5. 5. Con*nuousdelivery#"Update"the"site"every"5"minutes"*/5"*"*"*"*"cd"/www/example.com""""""""""&&"git"pull""""""""""&&"service"apache"restart"h5ps://speakerdeck.com/u/zeeg/p/prac*cing>con*nuous>deployment>disqus>pycon>2012
  6. 6. Business value
  7. 7. 5Problems
  8. 8. 1. Manual operation is 
 expensive and unpredictable
  9. 9. Preferscriptsoveropera*ons$"make"env".............."build"dev"environment"unittest"........."run"unit"tests"acceptancetest"..."run"acceptance"tests"inspect".........."inspect"codes"deploy"..........."deploy"to"App"Engine"
  10. 10. Automateacceptancetests
  11. 11. HaveJenkinsruntests Deploy! Push! Notify! Pull!Write codes
 Unit testsUnit tests! Acceptance test!
  12. 12. 2. Requirements will never be fixed
  13. 13. Design product to ship incrementally
  14. 14. Schema changeclass"User(Model):" class"User(Model):"""name"="StringProperty()" ""name"="StringProperty()"""birthday"=" ""birthday"="""""DateProperty()" """"StringProperty()" ""email"=" """"StringProperty()"
  15. 15. Addnewproperty1.  Add property with required=False!2.  Deploy!3.  Add app code to read and write new property!4.  Update index!5.  Deploy!
  16. 16. Change property1.  “Add” property with required=False!2.  Deploy!3.  Add app code to access old and new model!4.  Update index!5.  Deploy!6.  Fill new property (if necessary)!7.  Remove old property!
  17. 17. class"User(Model):"""name"="StringProperty()"""birthday"="DateProperty()"
  18. 18. class"User(Model):"""name"="StringProperty()"""date_birthday"="""""DateProperty(name=birthday)"""str_birthday"="""""StringProperty(name=str_birthday’)"
  19. 19. class"User(Model):"""name"="StringProperty()"""date_birthday"="…"""str_birthday"="…""""def"get_birthday(self):"""""return"self.date_birthday""""def"set_birthday(self,"val):"""""self.date_birthday"="val""""birthday"="property(get_birthday,"""""""""""""""""""""""set_birthday)"
  20. 20. class"User(Model):"""name"="StringProperty()"""date_birthday"="…"""str_birthday"="…""""def"get_birthday(self):"""""if"self.date_birthday:"""""""return"self.date_birthday.strftime(…)"""""else:"""""""return"self.str_birthday"
  21. 21. class"User(Model):"""name"="db.StringProperty()"""date_birthday"="…"""str_birthday"="…""""def"get_birthday(self):"…""""def"set_birthday(self,"val):"""""if"isinstance(val,"datetime.date):"""""""val"="val.strftime(…)"""""""self.date_birthday"="None"""""self.str_birthday"="val"
  22. 22. class"User(Model):"""name"="db.StringProperty()"""date_birthday"="…"""str_birthday"="…""""def"get_birthday(self):"…""""def"set_birthday(self,"val):"…""""birthday"="property(get_birthday,"""""""""""""""""""""""set_birthday)"
  23. 23. 3. Building and changing
 environment is expensive
  24. 24. Google App Engine 
lets us focus on app
  25. 25. Make dev and production environments almost identical Production$ appcfg.py update –A myproduction src Server $ appcfg.py update src app.yaml Dev Server $ dev_appserver.py src Local dev server
  26. 26. Have multiple versions deployed to switch code quickly$"appcfg.py"–V"v11"update"src"..."(v11.myapp.appspot.com)"$"appcfg.py"–V"v11"set_default_version"src"..."(myapp.appspot.com)""
  27. 27. 4. We still have problems
  28. 28. Hg-flow for hotfix branches featuredevelop release hotfixmaster Deploy Deploy
  29. 29. Rollback by changing default version$"appcfg.py"–V"v11"update"src"..."(v11.myapp.appspot.com)"$"appcfg.py"–V"v11"set_default_version"src""$"appcfg.py"–V"v10"set_default_version"src"
  30. 30. 5. It does not happen overnight
  31. 31. Start with what makes sense to you
  32. 32. Allocate time for improvement
  33. 33. TODOs•  Review!•  Faster feedback!•  Automate capacity tests!•  Manage libraries!•  Test client side app
  34. 34. Things got better andare getting even better
  35. 35. Share OUR experiences @torufurukawa! http://about.me/torufurukawa!http://facebook.com/toru.furukawa!

×