Doc: Move documentation to doc/
- Explain how to use script and fork - Add discover guide - Improve all documentation
This commit is contained in:
parent
8a11ab88c7
commit
5a6656665d
16 changed files with 329 additions and 93 deletions
|
|
@ -1,7 +0,0 @@
|
||||||
# ERPLibre
|
|
||||||
|
|
||||||
## Move database prod to dev
|
|
||||||
|
|
||||||
When moving database prod to your dev environment, you want to remove email servers, and install user test to test the database.
|
|
||||||
Run :
|
|
||||||
> -c config.conf --stop-after-init -i user_test,disable_mail_server --dev all -d DATABASE
|
|
||||||
4
HOWTO.md
4
HOWTO.md
|
|
@ -1,4 +0,0 @@
|
||||||
# How to clone me
|
|
||||||
|
|
||||||
First,
|
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
# ERPLibre
|
|
||||||
|
|
||||||
## Move database prod to dev
|
|
||||||
|
|
||||||
When moving database prod to your dev environment, you want to remove email servers, and install user test to test the database.
|
|
||||||
Run :
|
|
||||||
> -c config.conf --stop-after-init -i user_test,disable_mail_server --dev all -d DATABASE
|
|
||||||
80
README.md
80
README.md
|
|
@ -1,75 +1,17 @@
|
||||||
# ERPLibre
|
# ERPLibre documentation
|
||||||
https://railsware.com/blog/taming-the-git-daemon-to-quickly-share-git-repository/
|
Select a guide to install your environment!
|
||||||
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose
|
|
||||||
|
|
||||||
repo init -u git://127.0.0.1:9418/ -b $(git branch --show-current)
|
## Discover guide
|
||||||
|
[Guide to run ERPLibre in discover to learn it](./doc/DISCOVER.md).
|
||||||
|
|
||||||
Table à vérifier dans pgsql :
|
## Production guide
|
||||||
ir_ui_view
|
[Guide to run ERPLibre in production server](./doc/PRODUCTION.md).
|
||||||
|
|
||||||
Restore une BD :
|
## Development guide
|
||||||
- un module est installé mais n'est pas physiquement là
|
[Guide to run ERPLibre in development environment](./doc/DEVELOPMENT.md).
|
||||||
|
|
||||||
Une DB est installé mais on n'arrive pas à l'exécuté
|
|
||||||
|
|
||||||
HEALTHCHECK CMD curl --fail http://localhost:8069/web || exit 1
|
|
||||||
|
|
||||||
TODO : having the DB variable configurable
|
|
||||||
|
|
||||||
|
|
||||||
## Installation procedure production
|
|
||||||
|
|
||||||
##### 1. Clone the project:
|
|
||||||
```
|
|
||||||
git clone https://github.com/ERPLibre/ERPLibre.git
|
|
||||||
```
|
|
||||||
##### 2. Modify the parameters
|
|
||||||
Modify the file env_var.sh for production installation.
|
|
||||||
|
|
||||||
##### 3. Execute the script:
|
|
||||||
```
|
|
||||||
sudo ./script/odoo_install_production.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## Installation procedure locally
|
|
||||||
|
|
||||||
##### 1. Clone the project:
|
|
||||||
```
|
|
||||||
git clone https://github.com/ERPLibre/ERPLibre.git
|
|
||||||
```
|
|
||||||
|
|
||||||
##### 2. Execute the script:
|
|
||||||
```
|
|
||||||
sudo ./script/odoo_install_locally.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
# Execution
|
# Execution
|
||||||
## First run
|
[Guide to run ERPLibre with different case](./doc/RUN.md).
|
||||||
```
|
|
||||||
source ./venv/bin/activate
|
|
||||||
python odoo/odoo-bin -c config.conf --log-level debug
|
|
||||||
```
|
|
||||||
|
|
||||||
## Update all
|
# git-repo
|
||||||
Great idea to run it when update Odoo, update database of each modules.
|
To change repository like addons, see [GIT_REPO.md](doc/GIT_REPO.md)
|
||||||
```
|
|
||||||
python odoo/odoo-bin -c config.conf -d [DATABASE] -u all --log-level debug
|
|
||||||
```
|
|
||||||
|
|
||||||
## Update module
|
|
||||||
```
|
|
||||||
python odoo/odoo-bin -c config.conf -d [DATABASE] -u [module] --log-level debug
|
|
||||||
```
|
|
||||||
|
|
||||||
## Test
|
|
||||||
```
|
|
||||||
python odoo/odoo-bin -c config.conf -d [DATABASE] -i [module to test] --test-enable --stop-after-init --log-level=test --test-tags [module_name][tags]
|
|
||||||
```
|
|
||||||
|
|
||||||
# Production
|
|
||||||
```
|
|
||||||
python odoo/odoo-bin -c config.conf -d [DATABASE] --no-database-list
|
|
||||||
```
|
|
||||||
|
|
||||||
# Thanks
|
|
||||||
Thanks Yenthe Van Ginneken for your guides.
|
|
||||||
|
|
|
||||||
16
doc/CONTRIBUTION.md
Normal file
16
doc/CONTRIBUTION.md
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Thanks
|
||||||
|
## AGILE OPS
|
||||||
|
Thanks for contributing to GIT_REPO.
|
||||||
|
- [Agile OPS](https://www.linkedin.com/in/michaelfaille/)
|
||||||
|
|
||||||
|
## MathBenTech
|
||||||
|
Thanks for creating this project.
|
||||||
|
- [MathBen.Tech](https://mathben.tech)
|
||||||
|
|
||||||
|
## TechnoLibre
|
||||||
|
Thanks for making enterprise edition of ERPLibre.
|
||||||
|
- [TechnoLibre](https://technolibre.ca)
|
||||||
|
|
||||||
|
## Yenthe Van Ginneken
|
||||||
|
Thanks Yenthe Van Ginneken for your scripting guides and tutorial.
|
||||||
|
- [Yenthe666 InstallScript](https://github.com/Yenthe666/InstallScript)
|
||||||
87
doc/DEVELOPMENT.md
Normal file
87
doc/DEVELOPMENT.md
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
# Development guide
|
||||||
|
Setup your environment to develop modules and debug the platform.
|
||||||
|
|
||||||
|
## Installation procedure locally
|
||||||
|
### 1. Clone the project:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/ERPLibre/ERPLibre.git
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Execute the script:
|
||||||
|
```bash
|
||||||
|
cd ERPLibre
|
||||||
|
./script/install_dev.sh
|
||||||
|
./script/install_locally_dev.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Run ERPLibre
|
||||||
|
```bash
|
||||||
|
./run.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Fork project to create a new project independent of ERPLibre (deprecated)
|
||||||
|
ERPLibre was created by this script. It's now deprecated.
|
||||||
|
Use this script when you need to fork directly from the original source.
|
||||||
|
Don't use this script if you want to update from ERPLibre and follow mainstream development.
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/fork_project.py --github_token GITHUB_KEY --organization NAME
|
||||||
|
```
|
||||||
|
|
||||||
|
# Fork all repo for you own organization
|
||||||
|
Go to your github account and generate a token to access fork option with your user. Create an organization (or you can choose your user name).
|
||||||
|
|
||||||
|
This command will fork all repos and ERPLibre to your own organization. It keeps track to ERPLibre.
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/fork_project_ERPLibre.py --github_token GITHUB_KEY --organization NAME
|
||||||
|
```
|
||||||
|
|
||||||
|
## Generate manifest from csv repo
|
||||||
|
Add repo in file [./source_repo_addons.csv](./source_repo_addons.csv)
|
||||||
|
|
||||||
|
Execute to generate manifest of Repo
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/fork_project_ERPLibre.py --skip_fork
|
||||||
|
```
|
||||||
|
|
||||||
|
## Move database prod to dev
|
||||||
|
When moving database prod to your dev environment, you want to remove email servers, and install user test in order to test the database.
|
||||||
|
Run:
|
||||||
|
```bash
|
||||||
|
./run.sh --stop-after-init -i user_test,disable_mail_server --dev all -d DATABASE
|
||||||
|
```
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/git_change_remote.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## Change git url https to git
|
||||||
|
This will update all urls in git format:
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/git_change_remote_https_to_git.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## Diff repo with another project
|
||||||
|
Tools to display the differences between the repo and another project.
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/list_repo_diff.py --sync_to /path/to/project/erplibre --dyr_sync
|
||||||
|
```
|
||||||
|
|
||||||
|
## Sync repo with another project
|
||||||
|
Tools to synchronise the repo with another project. This will show differences and try to checkout on the same commit in all repo.
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/git_change_remote.py --sync_to /path/to/project/erplibre
|
||||||
|
```
|
||||||
|
|
||||||
|
## Add repo
|
||||||
|
Access to a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv)
|
||||||
|
|
||||||
|
Fork the repo to be able to push new code:
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/fork_project_ERPLibre.py
|
||||||
|
```
|
||||||
|
|
||||||
|
To regenerate only manifest.xml.
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/fork_project_ERPLibre.py --skip_fork
|
||||||
|
```
|
||||||
31
doc/DISCOVER.md
Normal file
31
doc/DISCOVER.md
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Discover
|
||||||
|
Explore the ERPLibre solution.
|
||||||
|
|
||||||
|
## Fast installation
|
||||||
|
### 1. Clone the project:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/ERPLibre/ERPLibre.git
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Run installation locally:
|
||||||
|
```bash
|
||||||
|
cd ERPLibre
|
||||||
|
./script/install_dev.sh
|
||||||
|
./script/install_locally_dev.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Run ERPLibre
|
||||||
|
```bash
|
||||||
|
./run.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Add repo
|
||||||
|
Access to a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv)
|
||||||
|
|
||||||
|
Execute script:
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/git_repo_manifest.py
|
||||||
|
./script/install_locally_dev.sh
|
||||||
|
git commit -am "Add new repo"
|
||||||
|
```
|
||||||
|
[Update your repo.](./GIT_REPO.md)
|
||||||
21
doc/FAQ.md
Normal file
21
doc/FAQ.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# FAQ
|
||||||
|
## git-repo
|
||||||
|
### error.GitError fatal bad revision
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
error.GitError: manifests rev-list (u'^2736dfd46e8a30cf59a9cd6e93d9e56e87021f2a', 'HEAD', '--'): fatal: bad revision 'HEAD'
|
||||||
|
```
|
||||||
|
|
||||||
|
Did you modify files in .repo?
|
||||||
|
|
||||||
|
Anyways, to reset files from your branch into .repo:
|
||||||
|
```bash
|
||||||
|
cd .repo/manifests
|
||||||
|
git branch -av
|
||||||
|
> remotes/m/rel/8953/zd552kl/7.1.1-11.40.208 -> origin/rel/8953/zd552kl/7.1.1-11.40.208
|
||||||
|
> remotes/origin/dev/ze550kl/asus/5.0.0-20150208 11a37fe set dev/ze550kl/asus/5.0.0-20150208
|
||||||
|
> remotes/origin/rel/8953/zd552kl/7.1.1-11.40.208 2736dfd Remove opencv3 from the manifest
|
||||||
|
# To reset the "remotes/origin" use the same as "remotes/m"
|
||||||
|
git reset --hard REF_OF_REMOTES/m
|
||||||
|
> git reset --hard remotes/origin/rel/8953/zd552kl/7.1.1-11.40.208
|
||||||
|
```
|
||||||
54
doc/GIT_REPO.md
Normal file
54
doc/GIT_REPO.md
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
# git-repo
|
||||||
|
This is a guide to understand git-repo. Scripts in ERPLibre use git-repo automatically.
|
||||||
|
|
||||||
|
[git-repo of Google](https://code.google.com/archive/p/git-repo) is used to manage all git repository under licence [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.html).
|
||||||
|
|
||||||
|
## Setup repo
|
||||||
|
```bash
|
||||||
|
curl https://storage.googleapis.com/git-repo-downloads/repo > ./venv/repo
|
||||||
|
```
|
||||||
|
|
||||||
|
## prod
|
||||||
|
```bash
|
||||||
|
./venv/repo init -u http://git.erplibre.ca/ERPLibre -b 12.0_repo
|
||||||
|
./venv/repo sync
|
||||||
|
```
|
||||||
|
|
||||||
|
## dev
|
||||||
|
```bash
|
||||||
|
./venv/repo init -u http://git.erplibre.ca/ERPLibre -b 12.0_repo -m ./manifest/default.dev.xml
|
||||||
|
./venv/repo sync
|
||||||
|
```
|
||||||
|
|
||||||
|
## dev locally
|
||||||
|
[Guide to setup locally git](https://railsware.com/blog/taming-the-git-daemon-to-quickly-share-git-repository/).
|
||||||
|
```bash
|
||||||
|
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
|
||||||
|
|
||||||
|
./venv/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --abbrev-ref HEAD) -m ./manifest/default.dev.xml
|
||||||
|
./venv/repo sync -m ./manifest/default.dev.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
# Create Manifest
|
||||||
|
A [Manifest](https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md), is a XML file managed by git-repo to generate repo.
|
||||||
|
|
||||||
|
## Make a new version of prod
|
||||||
|
Freezes all repo, from dev to prod.
|
||||||
|
|
||||||
|
This will add revision git hash in the Manifest.
|
||||||
|
```bash
|
||||||
|
./venv/repo manifest -r -o ./manifest/default.xml
|
||||||
|
```
|
||||||
|
Do your commit.
|
||||||
|
```bash
|
||||||
|
git commit -am "[#ticket] subject: short sentence"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Create a dev version
|
||||||
|
```bash
|
||||||
|
./venv/repo manifest -o ./manifest/default.dev.xml
|
||||||
|
```
|
||||||
|
Do your commit.
|
||||||
|
```bash
|
||||||
|
git commit -am "[#ticket] subject: short sentence"
|
||||||
|
```
|
||||||
3
doc/HOWTO.md
Normal file
3
doc/HOWTO.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# HOW TO
|
||||||
|
## Update changelog
|
||||||
|
Please, read documentation (keepachangelog.com)[https://keepachangelog.com]
|
||||||
|
|
@ -6,7 +6,7 @@ TODO
|
||||||
|
|
||||||
## Migration procedure dev
|
## Migration procedure dev
|
||||||
|
|
||||||
Example :
|
Example:
|
||||||
|
|
||||||
update module helpdesk_mgmt and helpdesk_join_team
|
update module helpdesk_mgmt and helpdesk_join_team
|
||||||
|
|
||||||
32
doc/PRODUCTION.md
Normal file
32
doc/PRODUCTION.md
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
# ERPLibre production guide
|
||||||
|
|
||||||
|
## Installation procedure production
|
||||||
|
|
||||||
|
### 1. Clone the project:
|
||||||
|
```bash
|
||||||
|
git clone https://git.erplibre.ca/ERPLibre.git
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Modify the parameters
|
||||||
|
Modify the file env_var.sh for production installation.
|
||||||
|
|
||||||
|
### 3. Execute the script:
|
||||||
|
```bash
|
||||||
|
cd ERPLibre
|
||||||
|
./script/install_dev.sh
|
||||||
|
./script/install_production.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Production execution
|
||||||
|
```bash
|
||||||
|
cd /[EL_USER]/erplibre
|
||||||
|
./run.sh -d [DATABASE] --no-database-list
|
||||||
|
```
|
||||||
|
|
||||||
|
## Move database prod to dev
|
||||||
|
|
||||||
|
When moving database prod to your dev environment, you want to remove email servers, and install user test to test the database.
|
||||||
|
Run:
|
||||||
|
```bash
|
||||||
|
./run.sh --stop-after-init -i user_test,disable_mail_server --dev all -d DATABASE
|
||||||
|
```
|
||||||
21
doc/RELEASE.md
Normal file
21
doc/RELEASE.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Release
|
||||||
|
A guide on how to do a release.
|
||||||
|
|
||||||
|
## Generate new prod
|
||||||
|
```bash
|
||||||
|
./venv/repo manifest -r -o ./manifest/default.xml
|
||||||
|
```
|
||||||
|
Do your commit.
|
||||||
|
```bash
|
||||||
|
git commit -am "[#ticket] subject: short sentence"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Merge release
|
||||||
|
Merge your feature to master. Generate a new tag. Fill CHANGELOG.md
|
||||||
|
|
||||||
|
# TIPS
|
||||||
|
## Compare diff repo with another ERPLibre project
|
||||||
|
To generate a list of differences between repo git commit, do
|
||||||
|
```bash
|
||||||
|
./venv/bin/python ./script/git_change_remote.py --sync_to /path/to/directory
|
||||||
|
```
|
||||||
41
doc/RUN.md
Normal file
41
doc/RUN.md
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
# Execute ERPLibre
|
||||||
|
|
||||||
|
## Start database
|
||||||
|
```bash
|
||||||
|
sudo systemctl start postgresql.service
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run ERPLibre
|
||||||
|
### Method 1
|
||||||
|
Simply
|
||||||
|
```bash
|
||||||
|
./run.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
With arguments
|
||||||
|
```bash
|
||||||
|
./run.sh -h
|
||||||
|
```
|
||||||
|
|
||||||
|
### Method 2
|
||||||
|
Execute your own python script:
|
||||||
|
```bash
|
||||||
|
source ./venv/bin/activate
|
||||||
|
python odoo/odoo-bin -c config.conf --log-level debug
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update all
|
||||||
|
Great idea to run it when updating Odoo, it updates database of each modules.
|
||||||
|
```bash
|
||||||
|
python odoo/odoo-bin -c config.conf -d [DATABASE] -u all --log-level debug
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update module
|
||||||
|
```bash
|
||||||
|
python odoo/odoo-bin -c config.conf -d [DATABASE] -u [module] --log-level debug
|
||||||
|
```
|
||||||
|
|
||||||
|
### Test
|
||||||
|
```bash
|
||||||
|
python odoo/odoo-bin -c config.conf -d [DATABASE] -i [module to test] --test-enable --stop-after-init --log-level=test --test-tags [module_name][tags]
|
||||||
|
```
|
||||||
11
doc/TODO.md
Normal file
11
doc/TODO.md
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Note healtcheck
|
||||||
|
Table à vérifier dans pgsql: ir_ui_view
|
||||||
|
|
||||||
|
Restore une BD:
|
||||||
|
- un module est installé mais n'est pas physiquement là
|
||||||
|
|
||||||
|
Une DB est installé mais on n'arrive pas à l'exécuté
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl --fail http://localhost:8069/web || exit 1
|
||||||
|
|
||||||
|
TODO: having the DB variable configurable
|
||||||
5
run.md
5
run.md
|
|
@ -1,5 +0,0 @@
|
||||||
== Start database ==
|
|
||||||
sudo systemctl start postgresql.service
|
|
||||||
|
|
||||||
== Run Odoo ==
|
|
||||||
./venv/bin/python ./odoo/odoo-bin -c config.conf
|
|
||||||
Loading…
Reference in a new issue