Using Docker to Improve Your Development Workflow
14. Thank you
1. Docker based workflow
4. Configuration management Not really suited for dev/staging/production environment
5. Docker Solves the configuration management ?
10. Run docker : runserver Just starts docker to run odoo with the right parameters
13. Questions - More info - Show me the source http://www.apertoso.be https://github.com/apertoso/infrastructure https://github.com/apertoso/tools
2. Docker based development ● What is the problem we wanted to solve ? ○ Easy setup of devel environment ○ Configuration management ● Our solution - architecture ●
3. Odoo Environments ● Dev environment on your laptop ( virtualbox / vagrant / ... ) ● Staging/Testing environment ● Production Env Challenge to keep dependencies/module lists/etc consistent
7. Odoo models for odoo instances ● Hierarchical ○ Inherit settings from parent ● Integration with github and gitlab api ○ Fetch modules list from the repo ● Export the settings with a specific URL ○ Fetching configuration data is done with a single http request
12. Demo ● Create a new instance in odoo ● Setup the working directory ● Download backup DB ● Restore DB ● Run odoo ● Debugging session with pycharm
8. projectsetup - Setting up a work directory ● Input = instance url data ● Store instance data into the directory ● Fetches git sources ( in case of development instance ) ○ Uses git work-tree in order to checkout a single repo multiple times ● Check odoo module manifest for missing dependencies ● Generate Dockerfile
11. What’s next ● Local odoo instance can now be easily setup, within 5 minutes ● Setup Testing/staging instance on a cloud server ○ Scripts work with a remote docker machine too for test instances ○ We are experimenting with traefik.io ● Setup production environment ○ For now we still use ansible, so we created a dynamic environment script ( only 200 lines code ) ○ We want to migrate to 100% docker in production
6. What we did 1. Created odoo models containing instance data with easy UI 2. Created 4 scripts that ○ Setup working environment ○ Download production DB backup ○ Restore DB backup ○ Start docker container with odoo 3. Always consistent with the state as configured 4. Profit :)
9. Fetching and restoring Database dbbackup and dbrestore ● Script to download DB Backup ○ With odoo v8 v9 (v10?) api, based on stored instance data ○ No assumtions on deployment ● Script to restore DB for the downloaded backup ○ Restores DB and attachments ○ Resets user passwords to enable easy testing ○ Disable cron jobs you don’t want to run in test environment ( fetchmail ) ○ Reset DB uuid ○ Setup test email config: debugmail.io ○ ...
- 668 Total Views
- 2 Website Views
- 666 Embeded Views
- Social Shares
- 0 Likes
- 0 Dislikes
- 0 Comments
- 0 Facebook
- 0 Twitter
- 0 Google+
- 8 onlinesync.odoo.com
Keynote: Odoo 9 New Features41156 Views .
Odoo Mobile Development Framework & App build with it12163 Views .
Odoo 9 New Design- The rationales behind it11441 Views .
Open Source Licenses9671 Views .
How A/B testing can help you optimize your website9126 Views .
Shipper integration - UPS, DHL, FedEx7619 Views .
Import and export data - Tips & Tricks6828 Views .
UX best practices to create your module6141 Views .
Keynote: Odoo Strategy 20156007 Views .
How to use Odoo in a Restaurant5589 Views .
Odoo 9: New Business Model5454 Views .
Contributing to the Odoo Community Association (OCA)5210 Views .
Odoo cms Performance Comparison and Optimisation4835 Views .
VOIP: One-click Button to Automate Calls4535 Views .
First steps in Odoo dev4051 Views .
Introduction to Odoo Warehouse Management3990 Views .
How to use Odoo in a service company3905 Views .
State of the Odoo JS framework3878 Views .
Odoo 9 New Design- Usability Methodology3829 Views .