Question on updating prod
ni-ka opened this issue · 1 comments
Hi @remi-filament,
Thanks again for this project, the longer I use it the more I love it
I have a question on how you update prod? I test on my staging environement and then use
docker tag xxxxxx filament/odoo:14.0
to update the tag to the latest image and then docker-compose up -d
recreates the odoo image on prod. Is this how you do that as well?
I also saw that you've started work on odoo 16 - that's awesome! Now we'll see how quickly OCA will catch up :)
Cheers!
Hi @ni-ka
For operations on Docker (once configuration is installed and not changing), we use a specific playbook you can find here : https://github.com/lefilament/ansible/blob/master/docker_odoo_operations_playbook.yml
This playbook does not use any role, only tasks with tags.
You can use one of the following tags :
- rebuild_pull_nonprod or rebuild_pull_prod : download latest generic Docker image from Le Filament, update repos list, builds specific Docker image and restarts instance on new image
- rebuild_nonprod or rebuild_prod : update repos list, builds specific Docker image and restarts instance on new image (without downloading daily generic image)
- restart_nonprod_on_prod_db : copyes prod database on test instance and restarts it (needs backup functionalities)
- restart_nonprod or restart_prod : restart service on locally available image
- restart_whitelists : restart whitelists service
- prod_image_to_test : copies production Docker image to test (CAUTION, here we are talking about software, not database) - it won't reload on new image, use restart_test for that
- test_image_to_prod : copies test image to prod - it won't reload on new image, use restart_prod or restart_prod_on_test_image (which does copy + restart) for that
- restart_prod_on_test_image : copies test Dcoker image to prod and restarts prod instance on it (= test_image_to_prod + restart_prod)
- update_nonprod ou update_prod : update/install modules given as arguments in variable(s) odoo_modules_to_update and/or odoo_modules_to_install
You can define test image to use with --extra-vars "odoo_nonprod_instance='<instance>'"
(where is odoo_test by default).
So long answer to tell you that we are doing exactly what you wrote above with tag restart_prod_on_test_image !
Yes I have started infrastructure for Odoo 16.0, though not released yet. It allowed me to test reducing Docker image size.