Skip to content

Commit

Permalink
- introduces fixes to the pip install method.
Browse files Browse the repository at this point in the history
- increases the default values for limit_memory_soft and limit_memory_hard,
as the previous were obsolete, applicable to openerp 7.0
  • Loading branch information
JordiBForgeFlow committed Feb 18, 2018
1 parent c5c50c1 commit 0c8e963
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ odoo_config_geoip_database: /usr/share/GeoIP/GeoLiteCity.dat
odoo_config_http_enable: True # >= 11.0
odoo_config_http_interface: '' # >= 11.0
odoo_config_http_port: 8069 # >= 11.0
odoo_config_limit_memory_hard: 805306368
odoo_config_limit_memory_soft: 671088640
odoo_config_limit_memory_hard: 2684354560
odoo_config_limit_memory_soft: 2147483648
odoo_config_limit_time_cpu: 60
odoo_config_limit_time_real: 120
odoo_config_limit_time_real_cron: -1 # >= 10.0
Expand Down
4 changes: 4 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
tags:
- odoo_log

- name: Create odoo data dir directory
file: path={{ odoo_config_data_dir }} state=directory
owner={{ odoo_user }} group={{ odoo_user }} force=yes

- name: Project repository already cloned?
stat: path={{ odoo_repo_dest }}
register: project_path
Expand Down
3 changes: 2 additions & 1 deletion templates/odoo-pip.init
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ VIRTUALENV={{ odoo_pip_venv_path }}
DAEMON={{ odoo_pip_odoo_bin_path }}
NAME={{ odoo_service }}
DESC={{ odoo_service }}
CONFIG={{ odoo_config_file }}
LOGFILE={{ odoo_logdir }}/{{ odoo_service }}.log
PIDFILE=/var/run/${NAME}.pid
USER={{ odoo_user }}
Expand All @@ -40,7 +41,7 @@ function _start() {
# from the configuration file
# Odoo: https://github.com/odoo/odoo/pull/13685
# OCB: https://github.com/OCA/OCB/pull/553
start-stop-daemon --chdir=${WORKDIR} --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON -- --logfile $LOGFILE{{ odoo_config_server_wide_modules not in [False, 'None', ''] and ' --load=%s' % odoo_config_server_wide_modules or '' }}
start-stop-daemon --chdir=${WORKDIR} --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON -- --config $CONFIG --logfile $LOGFILE{{ odoo_config_server_wide_modules not in [False, 'None', ''] and ' --load=%s' % odoo_config_server_wide_modules or '' }}
}

function _stop() {
Expand Down
2 changes: 1 addition & 1 deletion templates/odoo-pip.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=network.target
Type=simple
User={{ odoo_user }}
WorkingDirectory={{ odoo_workdir }}
ExecStart={{ odoo_pip_odoo_bin_path }}
ExecStart={{ odoo_pip_odoo_bin_path }} --logfile {{ odoo_logdir }}/{{ odoo_service}}.log --config {{ odoo_config_file }}
{% for name, value in odoo_init_env.iteritems() %}
Environment={{ name }}={{ value }}
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions templates/odoo-standard.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Type=simple
User={{ odoo_user }}
WorkingDirectory={{ odoo_workdir }}
{% if odoo_version | version_compare('10.0', '>=') %}
ExecStart={{ odoo_rootdir }}/odoo-bin --logfile {{ odoo_logdir }}/{{ odoo_service }}.log
ExecStart={{ odoo_rootdir }}/odoo-bin --logfile {{ odoo_logdir }}/{{ odoo_service }}.log --config {{ odoo_config_file }}
{% else %}
ExecStart={{ odoo_rootdir }}/odoo.py --logfile {{ odoo_logdir }}/{{ odoo_service }}.log
ExecStart={{ odoo_rootdir }}/odoo.py --logfile {{ odoo_logdir }}/{{ odoo_service}}.log --config {{ odoo_config_file }}
{% endif %}
{% for name, value in odoo_init_env.iteritems() %}
Environment={{ name }}={{ value }}
Expand Down

0 comments on commit 0c8e963

Please sign in to comment.