How to setup your own runbot
19. Add your first repo : Odoo
20. Add your own repo : petstore
26. Add a field, Override update_git
28. Add a field, restore the db, do -u all
30. Launch a process in a dir
31. Run coverage
32. Produce report
33. Link in the webpage
3. What, Why, When, Who? Introduction
8. In four steps Deploy a runbot
14. And how it works Configure runbot
24. Customize to fit your needs Create own module for runbot
37. Thank You Let's integrate
1. HOW TO SETUP YOUR OWN RUNBOT SEINLET Nicolas, TECHNICAL CONSULTANT
23. Link to GitHub o Set GitHub token to use GitHub API o Bi directional link
21. Use branch name matching o 1. Same branch name o 2. Common ancestors (git merge-base) o 3. Name splitting on '-' character
22. Use sticky branches o Always on top o No build skipped o Last build not killed
16. o Parameters are shared by all instances o Timeout vs Max CPU time o Runbot domain vs FQDN Global parameters
9. Deploy PostgreSQL Step 1 Step 2 Step 3 Step 4 As runbot is an Odoo module, we need PostgreSQL As we'll have many instances of odoo running on the server, we must adapt the PostgreSQL configuration, # of connections, total allocated memory, user authentification, fsync=False,...
7. o Since the very beginning of the process o Before every merge o For every functional test o For a new feature test When ?
17. Add authentication As runbot is generaly behind a public IP, it's better to create groups and users o Use groups per team, project, ... o Add users in groups o Manage default user profile It's possible to use other authentication methods (nginx, ...)
25. A first simple custo o Official Odoo repo needed as fallback o Official Odoo repo is already build by Odoo s.a. o Official Odoo repo can be used to test new features o → Only build sticky branches
13. Runbot server PostgreSQL Test DB xxx Test DB xxx Scale up Runbot db Runbot server PostgreSQL Test DB xxx Test DB xxx
2. SUMMARY Introduction 1 Deploy a runbot 2 Configure runbot 3 Create own module 4 Conclusion 5
4. o Runbot is a continuous integration server o Runbot is an Odoo module o Runbot is a communication tool between functional and technical guys o Live preview with 2 databases (base, all) o Provide build status to GitHub What ?
11. Add ssh keys for authentification Step 1 Step 3 Step 2 Step 4 Your runbot will need read access to all your repositories, as well as read access to the odoo repository o Generate an ssh key for the linux user running runbot o Add this key to the github, bitbucket, ... user o Give read access for this user to your repositories
12. External tools Step 1 Step 4 Step 2 Step 3 o DNS : redirect *.runbot.mycompany.com o NGINX : runbot is running on port 8080 o Fake SMTP server (MailCatcher, ...) o Any external software you link to (ftp, edi, ...)
27. A second one: add a job Test base Test all Restore customer DB o Add a field for the db to restore o Restore the database over the existing xxx-all o Upgrade all modules on this database
29. A harder one: code coverage o http://pypi.python.org/pypi/coverage o Code coverage measurement for Python by Ned Batchelder o When using coverage.py, need to be in instance folder for the .coverage creation o Produce HTML report o Link to the report in the runbot page o Choose which repository needs coverage
10. Deploy Odoo Step 1 Step 2 Step 3 Step 4 o Install python libraries o Install Odoo 8 from the github repo o Install runbot from the odoo-extra github repo o Install any runbot custom module o Don't forget the dbfilter parameter
6. Who ? Any member, functional or technical, member of a company which : o Deploy Odoo o Deploy custom module o Deploy custom theme And also : o Developper who wants to test a new module o Reviewer to check the commit o Functional to check a use case o Anybody to test a new app
18. Add your first repo : Odoo o The easiest one o Necessary for other repositories o Find missing libraries o Check Nginx o Check smtp o Check dns o Check ssh access to GitHub o Check PostgreSQL config o Check system load
5. o Automate test phase o Let test instances leaving o Ease communication between technical and functional guys o Easy to use, even for non-technical guys o Do not replace a Q&A on customer side o Other CI softwares exists and may be already used by technical team o Designed for Odoo by Odoo o Integrated with Git and GitHub Why ?
36. Your own runbot o Deployable on your own infrastructure o Linked to your GitHub account o Access to your repos o Part of the dev process o Easy to use for everyone o A communication tool o A dev tool o A quick test tool o Customizable to fit your needs o Source code : https://bitbucket.org/nseinlet/xperience2015
15. How it's made Server Repositories Branches Builds Jobs Scheduler Update repositories Create missing branches Self assign builds Advance jobs (base, all, run) Update NGINX config
- 1858 Total Views
- 863 Website Views
- 995 Embeded Views
- Social Shares
- 3 Likes
- 0 Dislikes
- 0 Comments
- 0 Facebook
- 0 Twitter
- 0 Google+
- 2 www.odoo.com
- 1 accounts.odoo.com
- 1 l.facebook.com
Keynote: Odoo 9 New Features40725 Views .
Odoo 9 New Design- The rationales behind it11294 Views .
Odoo Mobile Development Framework & App build with it10112 Views .
Open Source Licenses8842 Views .
Shipper integration - UPS, DHL, FedEx7389 Views .
How A/B testing can help you optimize your website6740 Views .
UX best practices to create your module5962 Views .
Keynote: Odoo Strategy 20155798 Views .
How to use Odoo in a Restaurant5459 Views .
Odoo 9: New Business Model5323 Views .
Import and export data - Tips & Tricks4649 Views .
Odoo cms Performance Comparison and Optimisation4542 Views .
Contributing to the Odoo Community Association (OCA)4121 Views .
First steps in Odoo dev3759 Views .
Odoo 9 New Design- Usability Methodology3744 Views .
Advanced Features of the API3543 Views .
New Odoo Apps store: How to use it3527 Views .
Advanced barcodes management3516 Views .
How to use Odoo in a service company3435 Views .