Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use Avanon Pyenv community role to install Pyenv #78

Merged
merged 5 commits into from
Jun 4, 2020
Merged

Conversation

danypr92
Copy link
Member

@danypr92 danypr92 commented Jun 4, 2020

Add default Pyenv vars to set the global Python interpreter to 3.8.2 and
the Odoo python interpreter to 3.7.7.

@enricostano
Copy link
Contributor

@danypr92 @cesarlr how should we manage upgrades of existing Odoo instances related to this?

@cesarlr
Copy link
Contributor

cesarlr commented Jun 4, 2020

@danypr92 @cesarlr how should we manage upgrades of existing Odoo instances related to this?

It's a manual process, so we can only document it

@danypr92
Copy link
Member Author

danypr92 commented Jun 4, 2020

@danypr92 @cesarlr how should we manage upgrades of existing Odoo instances related to this?

I think that we can run the provision over these outdated servers and the new Python interpreter and virtualenv will be successfully installed. The old virtualenv remains in the server, but if we don't use them we can delete them in the future...

@enricostano are you asking by how we can use this new strategy in the old servers or how can we purge the old virtualenv strategy?

@enricostano
Copy link
Contributor

I just want to understand what needs to be done to make an existent inventory compatible to this change. It seems that nothing, it's not a problem if the old venv will still be there IMHO.

Maybe we can just try the process later in local with some existing inventory.

@enricostano
Copy link
Contributor

@cesarlr @danypr92 what about the systemd unit? Should we point to the pyenv venv binary now?

@danypr92
Copy link
Member Author

danypr92 commented Jun 4, 2020

@cesarlr @danypr92 what about the systemd unit? Should we point to the pyenv venv binary now?

We are updating the odoo_role_odoo_venv_path var to point to the new virtualenv. This var is used in the systemd unit to execute the correct Python interpreter:

odoo_role_odoo_python_path: "{{ odoo_role_odoo_venv_path }}/bin/python"

ExecStart={{ odoo_role_odoo_python_path }} {{ odoo_role_odoo_bin_path }} -c {{ odoo_role_odoo_config_path }}/odoo.conf --load-language='{{ odoo_role_loaded_languages }}'

@cesarlr cesarlr merged commit 0982224 into master Jun 4, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants