0
Jenkins and Django
Lucio Grenzi
l.grenzi@gmail.com
Lucio Grenzi
l.grenzi@gmail.com – Freelance
2
Who am I?
• Delphi developer for 11 years
• Now freelance and Web developer
...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
3
Agenda
• Jenkins: an intro
• Why use it
• Installation on a Ubuntu machine
•...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
4
Jenkins: a complete solution
• Jenkins is an automated continuous integratio...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
5
Jenkins: facts
• Written in java
• 600+ to customize Jenkins in every aspect...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
6
Non java languages supported
• Python
• Ruby
• PHP
• Node.js
• …..
Lucio Grenzi
l.grenzi@gmail.com – Freelance
7
Why Jenkins?
• Testing, building, maintaining, doing releases
by hand is err...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
8
Jenkins
• Easy to install, upgrade and configure
• Monitor external tools
• ...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
9
Continuous integration
• is the practice of merging all developer working
co...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
10
Continuous delivery
• is a software development discipline where you
build ...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
11
You’re doing continuous delivery when:
• Your software is deployable throug...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
12
Install on an Ubuntu server
• wget -q -O - http://pkg.jenkins-
ci.org/debia...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
13
Link between Django and jenkins
• Apt-get install python-pip
• Pip install ...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
14
Configuring django project
• Add 'django_jenkins' to your INSTALLED_APPS
li...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
15
Testing web apps
• Sometimes is a complex task,
• a Web application is made...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
16
The Django’s way
• Unittest: module built in to the Python standard
library...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
17
django-discover-runner
• add a test_settings.py file to your app package
• ...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
18
Quality managment
Continuos performance test
– Selenium
– Graphite
– Cobert...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
19
Best practices
• Plan disk usage
• Do distribute builds
• Discard old build...
Lucio Grenzi
l.grenzi@gmail.com – Freelance
20
Demo
Lucio Grenzi
l.grenzi@gmail.com – Freelance
21
Questions?
Lucio Grenzi
l.grenzi@gmail.com – Freelance
22
Thank you
Creative Commons via tcmaker.org
Upcoming SlideShare
Loading in...5
×

Jenkins djangovillage

136

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
136
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Jenkins djangovillage"

  1. 1. Jenkins and Django Lucio Grenzi l.grenzi@gmail.com
  2. 2. Lucio Grenzi l.grenzi@gmail.com – Freelance 2 Who am I? • Delphi developer for 11 years • Now freelance and Web developer • Javascript addicted Nonantolando.blogspot.com https://plus.google.com/108943068354277861330 http://it.linkedin.com/pub/lucio-grenzi/27/2bb/2a
  3. 3. Lucio Grenzi l.grenzi@gmail.com – Freelance 3 Agenda • Jenkins: an intro • Why use it • Installation on a Ubuntu machine • Testing
  4. 4. Lucio Grenzi l.grenzi@gmail.com – Freelance 4 Jenkins: a complete solution • Jenkins is an automated continuous integration server • Automated testing, building, mantaining your code • Enforce quality control • Manage release process → continuos delivery
  5. 5. Lucio Grenzi l.grenzi@gmail.com – Freelance 5 Jenkins: facts • Written in java • 600+ to customize Jenkins in every aspects • 1000+ public repositories in Github • 500+ contributors • Free and open source • Widely used tools for maintaing continuos integration cycle
  6. 6. Lucio Grenzi l.grenzi@gmail.com – Freelance 6 Non java languages supported • Python • Ruby • PHP • Node.js • …..
  7. 7. Lucio Grenzi l.grenzi@gmail.com – Freelance 7 Why Jenkins? • Testing, building, maintaining, doing releases by hand is error prone • promote test driven development reduce surprises • frequent deployment • Find bugs quickly
  8. 8. Lucio Grenzi l.grenzi@gmail.com – Freelance 8 Jenkins • Easy to install, upgrade and configure • Monitor external tools • No limit of number of jobs • Lots of external tool to explore
  9. 9. Lucio Grenzi l.grenzi@gmail.com – Freelance 9 Continuous integration • is the practice of merging all developer working copies with a shared mainline several times a day. Its main aim is to prevent integration problems - wikipedia -
  10. 10. Lucio Grenzi l.grenzi@gmail.com – Freelance 10 Continuous delivery • is a software development discipline where you build software in such a way that the software can be released to production at any time.
  11. 11. Lucio Grenzi l.grenzi@gmail.com – Freelance 11 You’re doing continuous delivery when: • Your software is deployable throughout its lifecycle • Your team prioritizes keeping the software deployable over working on new features • Anybody can get fast, automated feedback on the production readiness of their systems any time somebody makes a change to them • You can perform push-button deployments of any version of the software to any environment on demand - http://martinfowler.com/bliki/ContinuousDelivery.html -
  12. 12. Lucio Grenzi l.grenzi@gmail.com – Freelance 12 Install on an Ubuntu server • wget -q -O - http://pkg.jenkins- ci.org/debian/jenkins-ci.org.key | sudo apt-key add - • sudo sh -c 'echo deb http://pkg.jenkins- ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' • sudo apt-get update • sudo apt-get install jenkins
  13. 13. Lucio Grenzi l.grenzi@gmail.com – Freelance 13 Link between Django and jenkins • Apt-get install python-pip • Pip install django-jenkins • Pip install virtualenvwrapper • Pip install django
  14. 14. Lucio Grenzi l.grenzi@gmail.com – Freelance 14 Configuring django project • Add 'django_jenkins' to your INSTALLED_APPS list • $ ./manage.py jenkins • JENKINS_TASKS = ( 'django_jenkins.tasks.run_pylint', 'django_jenkins.tasks.with_coverage',)
  15. 15. Lucio Grenzi l.grenzi@gmail.com – Freelance 15 Testing web apps • Sometimes is a complex task, • a Web application is made of several layers of logic – HTTP-level request handling, – form validation and processing, – template rendering.
  16. 16. Lucio Grenzi l.grenzi@gmail.com – Freelance 16 The Django’s way • Unittest: module built in to the Python standard library • Nose framework: uses custom test loader causes troubles with Django code • django-discover-runner requires Django 1.4 built-in in Django 1.6
  17. 17. Lucio Grenzi l.grenzi@gmail.com – Freelance 17 django-discover-runner • add a test_settings.py file to your app package • django-admin.py test --settings=myapp.test_settings myapp
  18. 18. Lucio Grenzi l.grenzi@gmail.com – Freelance 18 Quality managment Continuos performance test – Selenium – Graphite – Cobertura
  19. 19. Lucio Grenzi l.grenzi@gmail.com – Freelance 19 Best practices • Plan disk usage • Do distribute builds • Discard old build records to keep Jenkins status healthy
  20. 20. Lucio Grenzi l.grenzi@gmail.com – Freelance 20 Demo
  21. 21. Lucio Grenzi l.grenzi@gmail.com – Freelance 21 Questions?
  22. 22. Lucio Grenzi l.grenzi@gmail.com – Freelance 22 Thank you Creative Commons via tcmaker.org
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×