Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Towards Continuous Deployment         with Django           Roger Barnes           @mindsocket     roger@mindsocket.com.au...
Beer          Adventure        Photography             Frisbee   Web development      Python/DjangoCo-founder @ Arribaa   ...
Concepts from other talks●   The why    –   Lean startups and customer discovery    –   Do more with less●   The how    – ...
What is continuous delivery*"Rapid, incremental, low-risk delivery of high quality, valuablenew functionality to users thr...
More Than Technology●   Technology - For automation●   People - Cross-functional team, organised around    product●   Proc...
Why●   Fail fast, win fast - Build, Measure, Learn●   Competitive advantage●   Avoid YAGNI - do less●   Less manual proces...
Continuous Delivery in Practice●   Single path to production●   Optimise for resilience●   Get comfortable with being unco...
Develop Commit Build Stage Deploy Measure                        Environments●   Make dev/test/prod as similar as possible...
Develop Commit Build Stage Deploy Measure                Environments        Dev/test virtualised using VagrantCreate and ...
Develop Commit Build Stage Deploy Measure                       EnvironmentsVagrantfile configures base image, provisionin...
Develop Commit Build Stage Deploy Measure                                Environments●   Repeatable, versioned configurati...
Develop Commit Build Stage Deploy Measure Development top level puppet configinclude uwsgiinclude statsdinclude solrinclud...
Develop Commit Build Stage Deploy Measure           Using Fabric with Vagrantdef vagrant():    # get vagrant ssh setup    ...
Develop Commit Build Stage Deploy Measure                         Dependencies●   virtualenv – separate env for each app● ...
Develop Commit Build Stage Deploy Measure                       Dependencies●   Using virtualenv and pip with fabricenv.si...
Develop Commit Build Stage Deploy Measure                       Database migration●   South    –   Schema changes    –   D...
Develop Commit Build Stage Deploy Measure              Database migration●   Using South with fabricdef syncdb():    ve_ru...
Develop Commit Build Stage Deploy Measure               Tying it all together●   Update pip requirements on vagrant VM    ...
Develop Commit Build Stage Deploy Measure                    Source control●   Pick one, learn it●   Use tags to keep trac...
arribaa                Application code├── apps               Django apps│    └── ...├── static             Django static ...
vagrant├── Vagrantfile      Dev VM              config└── puppet    ├── modules      Puppet              modules    │   ├─...
Develop Commit Build Stage Deploy Measure                      Automated Testing●   Django’s test framework●   Continuous ...
Develop Commit Build Stage Deploy Measure                      Test separation●   Split up tests by type●   Can parallelis...
Develop Commit Build Stage Deploy Measure                         Test separation●   Unit●   Functional/UI    –   Selenium...
Develop Commit Build Stage Deploy Measure                         Test separation   ●   How to do this with Django?       ...
Develop Commit Build Stage Deploy Measure                             Test separation# Used to ignore testsignore = lambda...
Develop Commit Build Stage Deploy Measure                        Build Pipeline●   One pipeline●   All developers feed sta...
Develop Commit Build Stage Deploy Measure        Build Pipeline   Currently simple linear flow
Develop Commit Build Stage Deploy Measure                         Build Pipeline●   Jenkins job – unit test stage:    bash...
Develop Commit Build Stage Deploy Measure                               Staging/QA Job●   fab staging-deploy – very simila...
Develop Commit Build Stage Deploy Measure                   Deployment Strategies●   Optimistic    –   Deploy, reload serv...
Develop Commit Build Stage Deploy Measure     Deployment with Jenkins & FabricUsing Git tags     –   Set in Jenkins after ...
Develop Commit Build Stage Deploy Measure                    Tags set by build pipeline
Develop Commit Build Stage Deploy Measure   Deployment with Jenkins & FabricJenkins script:  virtualenv -q /opt/virtualenv...
Develop Commit Build Stage Deploy Measure     Deployment with Jenkins & Fabricdef deploy(): dbbackup() # django-dbbackup –...
Develop Commit Build Stage Deploy Measure    Decoupling deployment and release●   Feature flags vs feature branches    –  ...
Develop Commit Build Stage Deploy Measure                     Measurement●   Eyes wide open    –   Track system and user b...
Develop Commit Build Stage Deploy Measure        Measurement
Develop Commit Build Stage Deploy Measure  Measurement - Munin
Develop Commit Build Stage Deploy Measure
Develop Commit Build Stage Deploy Measure                         Measurement●   django-statsd, statsd and graphite    –  ...
Rollback options●   Level of automation    –   Depends on risk aversion and complexity of environment    –   12+ years of ...
Rollback options  "My deployment rollback strategy is     like a car with no reverse gear.      You can still go backwards...
Where to from here                     Have an existing app with some gaps?               Think about whats slowing you do...
Looking Forward●   Better version pinning●   Fully automated provisioning●   Better test separation and parallelisation●  ...
Resources●   Slides – http://slideshare.net/mindsocket/●   Continuous delivery/deployment    –   Continuous Delivery Prime...
Thank You!http://slideshare.net/mindsocket                   Questions?
Resources● Slides – http://slideshare.net/mindsocket/● Continuous
Nächste SlideShare
Wird geladen in …5
×

Resources● Slides – http://slideshare.net/mindsocket/● Continuous Towards Continuous Deployment with Django

24.712 Aufrufe

Veröffentlicht am

Resources● Slides – http://slideshare.net/mindsocket/● Continuous delivery/deployment – Continuous Delivery Primer - http://www.informit.com/articles/article.aspx?p=1641923 – Anatomy of the Deployment Pipeline - http://www.informit.com/articles/printerfriendly.aspx?p=1621865 – Code as Craft – Etsy http://codeascraft.etsy.com/ – Safe deploying on the cutting edge – Urban Airship http://lanyrd.com/2011/djangocon-us/shbqz/● Vagrant – http://vagrantup.com● Vagrant with Fabric - https://gist.github.com/1099132● Jenkins Build Pipeline Plugin - http://www.morethanseven.net/2011/03/20/A-continuous-deployment-example-setup.html● Git/fabric based rollback options – http://dan.bravender.us/2012/5/11/git-based_fabric_deploys_are_awesome.html – http://www.askthepony.com/blog/2011/07/setup-a-complete-django-server-deploy-rollback-%E2%80%93-all-in-one- powerful-script/ – http://lethain.com/deploying-django-with-fabric/

Veröffentlicht in: Technologie
  • Loggen Sie sich ein, um Kommentare anzuzeigen.

×