[FIX] text correction in documentation

Signed-off-by: Marie-Michèle Poulin <marie-michele.poulin@technolibre.ca>
This commit is contained in:
Marie-Michele Poulin 2020-09-30 20:49:35 -04:00 committed by Mathieu Benoit
parent 6cbd2884bb
commit d8ef5912e4
15 changed files with 78 additions and 85 deletions

View file

@ -12,7 +12,7 @@ Support Ubuntu 18.04 and OSX
./script/install_dev.sh
./script/install_locally_prod.sh
```
Update your configuration if you need to run somehere than 127.0.0.1, file config.conf
Update your configuration if you need to run somehere than 127.0.0.1, file `config.conf`
```
#xmlrpc_interface = 127.0.0.1
#netrpc_interface = 127.0.0.1

View file

@ -1,6 +1,6 @@
# Thanks
## AGILE OPS
Thanks for contributing to GIT_REPO.
Thanks for contributing to GIT_REPO and docker.
- [Agile OPS](https://www.linkedin.com/in/michaelfaille/)
## MathBenTech
@ -8,9 +8,9 @@ Thanks for creating this project.
- [MathBen.Tech](https://mathben.tech)
## TechnoLibre
Thanks for making enterprise edition of ERPLibre.
Thanks for making this enterprise edition of ERPLibre.
- [TechnoLibre](https://technolibre.ca)
## Yenthe Van Ginneken
Thanks Yenthe Van Ginneken for your scripting guides and tutorial.
Thanks Yenthe Van Ginneken for your scripting guides and tutorials.
- [Yenthe666 InstallScript](https://github.com/Yenthe666/InstallScript)

View file

@ -1,7 +1,7 @@
# Development guide
Setup your environment to develop modules and debug the platform.
## Installation procedure locally
## Local installation procedure
### 1. Clone the project:
```bash
git clone https://github.com/ERPLibre/ERPLibre.git
@ -20,17 +20,10 @@ cd ERPLibre
```
## Develop in Odoo repository
You need to remove
> clone-depth="1"
You need to remove `clone-depth="10"` from `./manifest/default.dev.xml` in order to be able to commit and push.
Make a temporary commit and regenerate with `./script/install_locally_dev.sh`
from
> ./manifest/default.dev.xml
file to be able to commit and push.
Commit temporary and regenerate with
> ./script/install_locally_dev.sh
## Fork project to create a new project independent of ERPLibre (deprecated)
## Fork project to create a new project independent from 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.
@ -38,8 +31,8 @@ Don't use this script if you want to update from ERPLibre and follow mainstream
./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).
# Fork all repos for you own organization
Go to your github account and generate a token to access fork option with your user. Create an organization or use your personal account can choose your user name.
This command will fork all repos and ERPLibre to your own organization. It keeps track to ERPLibre.
```bash
@ -49,13 +42,13 @@ This command will fork all repos and ERPLibre to your own organization. It keeps
## Generate manifest from csv repo
Add repo in file [./source_repo_addons.csv](./source_repo_addons.csv)
Execute to generate manifest of Repo
Execute to generate Repo manifest
```bash
./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.
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
@ -72,32 +65,32 @@ This will update all urls in git format:
./script/git_change_remote_https_to_git.py
```
## Diff repo with another project
## Showing repo differences between projects
Tools to display the differences between the repo and another project.
```bash
./script/git_change_remote.py --sync_to /path/to/project/erplibre --dry_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.
Tools to synchronise the repo with another project. This will show differences and try to checkout on the same commit in all repos.
```bash
./script/git_change_remote.py --sync_to /path/to/project/erplibre
```
## Diff code between manifest
To show diff between commits in different manifest
## Compare two files manifests
To show differences between commits in different manifests
```bash
./script/git_diff_repo_manifest.py --input1 ./manifest/MANIFEST1.xml --input2 ./manifest/MANIFEST2.xml
```
## Diff between actual branch with manifest
To show diff between actual code and expected in manifest
## Differences between code and manifest
To show differences between actual code and manifest
```bash
./script/git_show_divergence_repo_manifest.py --manifest ./manifest/MANIFEST1.xml
./script/git_show_code_diff_repo_manifest.py --manifest ./manifest/MANIFEST1.xml
```
## Add repo
Access to a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv)
To access 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
@ -109,20 +102,20 @@ To regenerate only manifest.xml.
./script/fork_project_ERPLibre.py --skip_fork
```
Check if contains "auto_install" in manifest, change to False.
Check if manifest contains "auto_install" and change the value to False.
```bash
./script/repo_remove_auto_install.py
```
# Coding
## Create module scaffold (run in the venv)
## Create module scaffold
```bash
source ./.venv/bin/activate
python odoo/odoo-bin scaffold MODULE_NAME addons/REPO_NAME/
```
# Pull request
## Show all pull request from organization
## Show all pull requests from organization
```bash
/script/pull_request_ERPLibre.py --github_token ### --organization ERPLibre
```

View file

@ -20,7 +20,7 @@ cd ERPLibre
```
## Add repo
Access to a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv)
To access a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv)
Execute script:
```bash

View file

@ -8,7 +8,7 @@ error.GitError: manifests rev-list (u'^2736dfd46e8a30cf59a9cd6e93d9e56e87021f2a'
Did you modify files in .repo?
Anyways, to reset files from your branch into .repo:
To reset files from your branch into .repo:
```bash
cd .repo/manifests
git branch -av

View file

@ -1,7 +1,7 @@
# 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).
[git-repo of Google](https://code.google.com/archive/p/git-repo) is used to manage all git repositories under licence [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.html).
## Setup repo
```bash
@ -20,7 +20,7 @@ curl https://storage.googleapis.com/git-repo-downloads/repo > ./.venv/repo
./.venv/repo sync
```
## dev locally
## local dev
[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 &
@ -33,18 +33,18 @@ git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose
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.
It freezes all repo, from dev to prod.
This will add revision git hash in the Manifest.
```bash
./.venv/repo manifest -r -o ./default.xml
```
Do your commit.
Commit.
```bash
git commit -am "[#ticket] subject: short sentence"
```
### Mix prod and dev to do a stage
When dev contain specific revision with default revision, you want to replace default revision by prod revision and keep specific version, do:
### Mix prod and dev to create a stage version
When dev contains specific revision with default revision, you need to replace default revision with prod revision and keep specific version:
```bash
./script/git_merge_repo_manifest.py --input1 ./manifest/default.dev.xml --input2 ./default.xml --output ./manifest/default.staged.xml
git commit -am "Updated manifest/default.staged.xml"
@ -60,23 +60,23 @@ git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose
```bash
./.venv/repo manifest -o ./manifest/default.dev.xml
```
Do your commit.
Commit.
```bash
git commit -am "[#ticket] subject: short sentence"
```
## Useful command
### Search all repo with specific branch name
## Useful commands
### Search all repo with a specific branch name
```bash
./.venv/repo forall -pc "git branch -a|grep BRANCH"
```
### Search missing branch in all repo
### Search missing branch in all repos
```bash
./.venv/repo forall -pc 'git branch -a|(grep /BRANCH$||echo "no match")|grep "no match"'
```
### Search change file in all repo
### Search changed file in all repos
```bash
./.venv/repo forall -pc "git status -s"
```

View file

@ -1,3 +1,3 @@
# HOW TO
## Update changelog
Please, read documentation [keepachangelog.com](https://keepachangelog.com)
Please read the following documentation [keepachangelog.com](https://keepachangelog.com)

View file

@ -1,10 +1,10 @@
# ERPLibre
## Migration procedure production
## Migration procedure in production
TODO
## Migration procedure dev
## Migration procedure in dev
Example:

View file

@ -1,13 +1,13 @@
# Poetry
## Add automatically dependancies
Add your dependancies in files [requirements.txt](../requirements.txt) and run script
## Add automatically dependencies
Add your dependencies in file [requirements.txt](../requirements.txt) and run script
```bash
./script/poetry_update.py
```
This will search all requirements.txt files and update pyproject.toml, to run poetry update.
This will search all `requirements.txt` files and update `pyproject.toml` and it will update poetry
## Add manually dependancies
The automatic script will erase this dependency, but you can add it for your locally test.
## Add manually dependencies
The automatic script will erase this dependency, but you can add it for your local test.
```bash
poetry add PYTHON_MODULE
```

View file

@ -1,6 +1,6 @@
# ERPLibre production guide
## Installation procedure production
## Production installation procedure
### 1. Clone the project:
```bash
@ -17,7 +17,7 @@ Modify the file env_var.sh for production installation.
./script/install_dev.sh
./script/install_production.sh
```
A service is running by systemd, you can access with the DNS name, found it in env_var.sh
A service is running by systemd. You can access it with the DNS name found in env_var.sh
#### Ubuntu 20.04 server
Apply fix libpng12-0: https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html
@ -26,7 +26,7 @@ Apply fix libpng12-0: https://www.linuxuprising.com/2018/05/fix-libpng12-0-missi
./script/install_dev.sh
./script/install_production.sh
```
A service is running by systemd, you can access with the DNS name, found it in env_var.sh
A service is running by systemd, you can access with the DNS name found in env_var.sh
### 4. SSL:
Generate a ssl certificate
@ -40,13 +40,13 @@ sudo systemctl -feu [EL_USER]
```
## Run by address ip
Comment following line in /[EL_USER]/erplibre/config.conf
Comment the following line in `/[EL_USER]/erplibre/config.conf`
```
#xmlrpc_interface = 127.0.0.1
#netrpc_interface = 127.0.0.1
#proxy_mode = True
```
Add your address ip in nginx config at server_name in /etc/nginx/sites-available/[EL_WEBSITE_NAME]
Add your address ip server_name in nginx config `/etc/nginx/sites-available/[EL_WEBSITE_NAME]`
Restart daemon:
```bash
@ -60,15 +60,15 @@ 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.
## Move prod database to dev
When moving prod database 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
```
## Update production
Simply update all feature.
Update all features.
```bash
./run.sh --limit-time-real 99999 --stop-after-init -u all -d DATABASE
```
@ -77,11 +77,11 @@ Simply update all feature.
To show config file:
> psql -U postgres -c 'SHOW config_file'
Edit this file to accept interface from all network:
Edit this file to accept interface from all networks:
> /var/lib/postgres/data/postgresql.conf
# Delete an instance in production
Caution, this delete home of users, it's irrevocable.
Caution, this delete user's home, it's irrevocable.
```bash
./script/delete_production.sh
```

View file

@ -1,24 +1,24 @@
# Release
A guide on how to do a release.
A guide on how to generate a release.
## Generate new prod
```bash
./.venv/repo manifest -r -o ./default.xml
```
Do your commit.
Commit.
```bash
git commit -am "[#ticket] subject: short sentence"
```
Update variable ERPLIBRE_VERSION in [env_var.sh](../env_var.sh)
Update ERPLIBRE_VERSION variable in [env_var.sh](../env_var.sh)
## Merge release
When ready to make a release, create a branch release/#.#.# and create a pull request to master.
When you are ready to generate a release, create a branch release/#.#.# and create a pull request to master.
Update file [CHANGELOG.md](../CHANGELOG.md) and create a section with new version.
Merge it when maintainer accept it.
Merge it when the maintainer accepts it.
Add a tag on the commit on branch master with your release. When adding tag, be sure to update default.xml
Add a tag on the commit in branch master with your release. When adding tag, be sure to update default.xml
```bash
git tag v#.#.#
# Push your tags
@ -31,8 +31,8 @@ git push --tags
```
# TIPS
## Compare diff repo with another ERPLibre project
To generate a list of differences between repo git commit, do
## Compare repo differences with another ERPLibre project
To generate a list of differences between repo git commit
```bash
./script/git_change_remote.py --sync_to /path/to/directory
```

View file

@ -24,7 +24,7 @@ Execute your own python script:
```
### Update all
Great idea to run it when updating Odoo, it updates database of each modules.
Great idea to run it when updating Odoo, it updates each module database.
```bash
./run.sh -d [DATABASE] -u all --log-level debug
```
@ -39,11 +39,11 @@ First execution, install you requirements, choose a new database.
```bash
./run.sh -d [DATABASE] -i [module to test] --test-enable --stop-after-init --log-level=test
```
Execute your test on specific module.
Execute your test on a specific module.
```bash
./run.sh -d [DATABASE] -u [module to test] --test-enable --stop-after-init --log-level=test
```
Execute your test on specific module with tags.
Execute your test on a specific module with tags.
```bash
./run.sh -d [DATABASE] -u [module to test] --test-enable --stop-after-init --log-level=test --test-tags [module_name][tags]
```

View file

@ -1,9 +1,9 @@
# Update ERPLibre
## Update all repo from origin source
The update is done on branch 12.0, you need to validate this branch exist.
## Update all repos from the origin source
The update is possible on branch 12.0, you need to verify this branch existence.
1. Make sure all repo git is conform, remove all argument depth from manifest and regenerate.
You can clean all and regenerate
1. Make sure all git repos are conform, remove all argument depth from manifest and regenerate.
You can clean all and regenerate.
```bash
./script/clean_repo_manifest.sh
./script/install_locally_dev.sh
@ -19,6 +19,6 @@ You can clean all and regenerate
./script/git_update_repo.py
```
4. Push force all needed repo, manage rebase conflict
4. Do a forced push on all needed repo and manage rebase conflicts.
5. Test a clone with dev, check file [DEVELOPMENT.md](./DEVELOPMENT.md)

View file

@ -1,10 +1,10 @@
# ERPLibre - Docker
Those image are prepare to permit better portability and reproducibility of ERPLibre release.
Those images are prepared to permit better portability and reproducibility of ERPLibre release.
Due the the growing code of ERPLibre, it could also simplify development.
NOTE: Those Dockerfile themselve are in heavy development for now. Incompatibilities between release are normal until the interfaces will be stabilized.
NOTE: Those Dockerfiles themselves are in heavy development for now. Incompatibilities between releases are normal until the interface is stabilized.
## Pre-requirements
@ -14,9 +14,9 @@ NOTE: Those Dockerfile themselve are in heavy development for now. Incompatibili
## Files representations
- Dockerfile.base: This Dockerfile represent the base Docker image layer reused by other child layers
- Dockerfile.base: This Dockerfile represents the base Docker image layer reused by other child layers.
- Dockerfile.dev: This Dockerfile is specialized in development.
- Dockerfile.prod{pkg,src}: Dockerfile.prod.\* is a Docker image specialized for production systems. Dockerfile.prod.pkg reuse official Debian files from Odoo.com. Dockerfile.prod.src fetch the Odoo source code as the ERPLibre runtime.
- Dockerfile.prod{pkg,src}: Dockerfile.prod.\* is a Docker image specialized for production systems. Dockerfile.prod.pkg reuses official Debian files from Odoo.com. Dockerfile.prod.src fetches the Odoo source code as the ERPLibre runtime.
## Getting started
@ -62,7 +62,7 @@ docker exec -ti DOCKER_NAME bash
docker exec -u root -ti DOCKER_NAME bash
```
Interesting command to debug
Commands for debugging
```bash
docker run -p 8069:8069 --entrypoint bash -ti DOCKER_NAME
docker exec -ti DOCKER_NAME bash
@ -97,14 +97,14 @@ Delete volume
docker volume prune
```
# Need more space for docker
You can change the home for docker, edit file `/etc/docker/daemon.json`
# Change docker directory
You can change the docker directory by editing file `/etc/docker/daemon.json`
```json
{
"data-root": "/home/docker"
}
```
And restart docker service. You can delete all older location of docker or move it.
And restart docker service. You can delete or move all older locations of docker.
# Update docker
When building your docker with script