Skip to content

Commit

Permalink
Merge pull request #59 from coopdevs/document-new-release-strategies
Browse files Browse the repository at this point in the history
Document new download strategies
  • Loading branch information
raneq authored Jul 12, 2019
2 parents 04adc66 + 769834b commit 9ded8d7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 25 deletions.
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,32 @@ Available variables are listed below, along with default values:

* Edition

This role allows to install Odoo in two editions: [Odoo Nightly](http://nightly.odoo.com/) and [OCA/OCB](https://github.com/OCA/OCB.git) edition.
This role supports installing Odoo following two different strategies: `git` (from a git repository) and `tar` (a package or compressed release file).

```
# Vars for the Odoo Nightly edition
# odoo_role_odoo_edition: "odoo"
odoo_role_odoo_version: 11.0
odoo_role_odoo_release: 20170914
```yml
# Odoo releases download strategy: tar or git
odoo_role_download_strategy: tar

# Vars for tar download strategy
# supported any other formats supported by ansible unarchive, i.e. by unzip or gtar)
# Releases from Odoo.com odoo nightly
odoo_role_odoo_version: 11.0 # not used outside this file
odoo_role_odoo_release: 20190505 # not used outside this file
odoo_role_odoo_url: "https://nightly.odoo.com/{{ odoo_role_odoo_version }}/nightly/src/odoo_{{ odoo_role_odoo_version }}.{{ odoo_role_odoo_release }}.tar.gz"
odoo_role_odoo_download_path: /tmp/odoo_{{ odoo_role_odoo_version }}.{{ odoo_role_odoo_release }}.tar.gz
# Releases from an Odoo comunity backports updated fork
# odoo_role_odoo_release: "11.0_2019-05-05"
# odoo_role_odoo_url: "https://gitlab.com/coopdevs/OCB/-/archive/{{ odoo_role_odoo_release }}/OCB-{{ odoo_role_odoo_release }}.tar.gz"
odoo_role_odoo_download_path: "{{ odoo_role_odoo_path }}/../odoo_releases/odoo_{{ odoo_role_odoo_version }}.{{ odoo_role_odoo_release }}.tar.gz"

# Vars for the OCA/OCB edition
# odoo_role_odoo_edition: "oca"
# Vars for git download strategy
odoo_role_odoo_git_url: "https://github.com/OCA/OCB.git"
# Use the commit SHA of the required version
odoo_role_odoo_head: "8ef3986d58a097a04502d9ca1ee0a860d7230723"
# OCA's OCB, branch 11.0. LTS probably until 14.0 release. 13.0 is scheduled for October 2019.
odoo_role_odoo_git_ref: "11.0"
```
* Users and group
```
```yml
odoo_role_odoo_user: odoo
odoo_role_odoo_group: odoo

Expand All @@ -49,7 +55,7 @@ odoo_role_odoo_venv_path: /opt/.odoo_venv
* Directories structure
```
```yml
odoo_role_odoo_path: /opt/odoo
odoo_role_odoo_bin_path: "{{ odoo_role_odoo_path }}/build/scripts-2.7/odoo"
odoo_role_odoo_python_path: "{{ odoo_venv_path }}/bin/python"
Expand All @@ -60,7 +66,7 @@ odoo_role_odoo_modules_path: /opt/odoo/modules
* Database
```
```yml
odoo_role_odoo_db_name: odoo
# This not a DB user password, but a password for Odoo to deal with DB.
odoo_role_odoo_db_admin_password: 1234
Expand All @@ -79,14 +85,14 @@ odoo_role_odoo_proxy_mode: false
* Core modules list to install/update
```
```yml
# Comma-separated list of modules to install before running the server
odoo_role_odoo_core_modules: "base"
```
* Community modules list to install/update
```
```yml
# Comma-separated list of modules to install before running the server
odoo_role_odoo_community_modules: ""
```
Expand Down Expand Up @@ -114,7 +120,7 @@ Once the modules are in the server, you need to install them in the database.

Define a `odoo_role_odoo_community_modules` var with the list of the modules names you want to install.

```
```yml
# invenotry/group_vars/all.yml
odoo_role_odoo_community_modules: 'contract,contract_sale_invoicing'
```
Expand All @@ -134,6 +140,7 @@ Example Playbook
vars:
odoo_role_odoo_db_name: odoo-db
odoo_role_odoo_db_admin_password: "{{ odoo_admin_password }}"
odoo_role_download_strategy: tar
odoo_role_odoo_version: 11.0
odoo_role_odoo_release: 20180424
```
Expand Down
20 changes: 12 additions & 8 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@ odoo_role_odoo_group: odoo
# VirtualEnv vars
odoo_role_odoo_venv_path: /opt/.odoo_venv

# Edition vars

# Vars for tar download strategy (or other formats supported by ansible unarchive, i.e. by unzip or gtar)
# Odoo releases download strategy: tar or git
odoo_role_download_strategy: tar
odoo_role_odoo_version: 11.0
odoo_role_odoo_release: 20190501

# Vars for tar download strategy
# supported any other formats supported by ansible unarchive, i.e. by unzip or gtar)
# Releases from Odoo.com odoo nightly
odoo_role_odoo_version: 11.0 # not used outside this file
odoo_role_odoo_release: 20190505 # not used outside this file
odoo_role_odoo_url: "https://nightly.odoo.com/{{ odoo_role_odoo_version }}/nightly/src/odoo_{{ odoo_role_odoo_version }}.{{ odoo_role_odoo_release }}.tar.gz"
# Releases from an Odoo comunity backports updated fork
# odoo_role_odoo_release: "11.0_2019-05-05"
# odoo_role_odoo_url: "https://gitlab.com/coopdevs/OCB/-/archive/{{ odoo_role_odoo_release }}/OCB-{{ odoo_role_odoo_release }}.tar.gz"
odoo_role_odoo_download_path: "{{ odoo_role_odoo_path }}/../odoo_releases/odoo_{{ odoo_role_odoo_version }}.{{ odoo_role_odoo_release }}.tar.gz"

# Vars for the OCA/OCB edition
# odoo_role_download_strategy: git
# Vars for git download strategy
odoo_role_odoo_git_url: "https://github.com/OCA/OCB.git"
# OCA/OCB, branch 11.0. LTS probably until 14.0 release. 13.0 is scheduled for October 2019.
# OCA's OCB, branch 11.0. LTS probably until 14.0 release. 13.0 is scheduled for October 2019.
odoo_role_odoo_git_ref: "11.0"

odoo_role_odoo_path: /opt/odoo
Expand Down

0 comments on commit 9ded8d7

Please sign in to comment.