forked from acsone/click-odoo
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Arnold
committed
Nov 20, 2019
1 parent
2437df6
commit e722658
Showing
7 changed files
with
338 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# `dodoo backup` Component | ||
|
||
## Abstract | ||
|
||
`dodoo backup` subcommand snpashots a database and it's filestore into a local | ||
filemount and ships a **strongly** encrypted _deduplicating_ backup | ||
bandwith-efficiently (`zlib`) to a remote host over ssh using `borg`. | ||
|
||
No GnuGP nighmare as in `duplicity`. True BLAKE2b. Period. | ||
|
||
It can retrieve backups form the remote and restore them into an existing or | ||
fresh database. | ||
|
||
You need to deploy `borg` on the backup server. Backups give you peace of mind, | ||
so _know_ what you do. That's not asking too much. [RTFM](https://borgbackup.readthedocs.io/en/stable/deployment.html) | ||
|
||
|
||
## Spec | ||
|
||
<sub>Encryption/Auth key provided by the `dodoo` server instance</sub> | ||
|
||
``` | ||
dodoo backup [options] <subcommand> | ||
Subcommands: | ||
init [options] <remote> | ||
--storage-quota 5G Set storage quota of the new repository. | ||
prune | ||
--keep-daily 7 | ||
--keep-weekly 4 | ||
--keep-monthly 6 | ||
create <databasename> <tag> | ||
restore <tag> <databasename> | ||
--help This help | ||
All options can be supplied with environment variables: | ||
Uppercase / strip inital '--' / replace '-' by '_' / prefix `DODOO_`. | ||
``` | ||
|
||
|
||
<div align="center"> | ||
<div> | ||
<a href="https://xoe.solutions"> | ||
<img width="100" src="https://erp.xoe.solutions/logo.png" alt="XOE Corp. SAS"> | ||
</a> | ||
</div> | ||
<p> | ||
<sub>Currently, folks <a href="https://github.com/xoe-labs/">@xoe-labs</a> try to keep up with their task to maintain this.</sub> | ||
</p> | ||
<p> | ||
<sub>If you're the kind of person, willing to sponsor open source projects, consider sending some spare XLM banana to <code>blaggacao*keybase.io</code></sub> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# `dodoo copy` Component | ||
|
||
## Abstract | ||
|
||
`dodoo copy` subcommand copies a database on the given db conection and - | ||
optionally - installs a module list and/or executes raw SQL. | ||
|
||
Installing modules allows you to overload certain modules which prepare a | ||
database for staging or testing environments. | ||
|
||
Executing raw sql goes further and let's you do aribtrary stuff on your | ||
copied database (eg. anonymize contact data or change the company name) | ||
|
||
## Spec | ||
|
||
``` | ||
dodoo copy [options] <source> <destination> <rawsql> | ||
--force-disconnect Attempt to disconnect users from the source database. | ||
--install-modules Comma separated list of addons to install. | ||
--help This help | ||
All options can be supplied with environment variables: | ||
Uppercase / strip inital '--' / replace '-' by '_' / prefix `DODOO_`. | ||
``` | ||
|
||
|
||
<div align="center"> | ||
<div> | ||
<a href="https://xoe.solutions"> | ||
<img width="100" src="https://erp.xoe.solutions/logo.png" alt="XOE Corp. SAS"> | ||
</a> | ||
</div> | ||
<p> | ||
<sub>Currently, folks <a href="https://github.com/xoe-labs/">@xoe-labs</a> try to keep up with their task to maintain this.</sub> | ||
</p> | ||
<p> | ||
<sub>If you're the kind of person, willing to sponsor open source projects, consider sending some spare XLM banana to <code>blaggacao*keybase.io</code></sub> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# `dodoo init` Component | ||
|
||
## Abstract | ||
|
||
`dodoo init` subcommand initializes a database on the given db conection and - | ||
optionally - installs a module list and/or executes raw SQL. | ||
|
||
It keeps a specially prefixed db / filstore cache so that subsequent inits are | ||
accelerated. A hash is built over the listed module dirs to keep cache | ||
consistent with your code and clear as needed. | ||
|
||
Executing raw SQL permits you to do advanced, eventually templated, database | ||
seeding setting for example main company data or certain config settings. | ||
|
||
|
||
## Spec | ||
|
||
``` | ||
dodoo init [options] <newdatabase> <rawsql> | ||
--install-modules Comma separated list of addons to install. | ||
--with-demo Load Odoo demo data. | ||
--no-cache Don't use cache. | ||
--cache-prefix Cache prefix. Caution: identifies clearble artefacts. | ||
--cache-max-age Clear cache after so many days of non-usage. | ||
Default: 30. Use -1 to disable. | ||
--cache-max-size Keep N most recently used cache templates. | ||
Default: 5. Use -1 to disable. Use 0 to empty. | ||
--help This help | ||
All options can be supplied with environment variables: | ||
Uppercase / strip inital '--' / replace '-' by '_' / prefix `DODOO_`. | ||
``` | ||
|
||
|
||
<div align="center"> | ||
<div> | ||
<a href="https://xoe.solutions"> | ||
<img width="100" src="https://erp.xoe.solutions/logo.png" alt="XOE Corp. SAS"> | ||
</a> | ||
</div> | ||
<p> | ||
<sub>Currently, folks <a href="https://github.com/xoe-labs/">@xoe-labs</a> try to keep up with their task to maintain this.</sub> | ||
</p> | ||
<p> | ||
<sub>If you're the kind of person, willing to sponsor open source projects, consider sending some spare XLM banana to <code>blaggacao*keybase.io</code></sub> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# `dodoo load` Component | ||
|
||
## Abstract | ||
|
||
`dodoo load` subcommand provides state and boilerplate for the loading part of | ||
ETL projects. | ||
|
||
It can take a file or stream and load data into the given database, it persists | ||
loading state with appropriate (augmented) metadata into the `dodoo` schema and | ||
resumes accordingly. | ||
|
||
It toposorts input to according to model dependencies and always loads in the | ||
right order. It also cares to loading order for hierarchies through locks. | ||
|
||
After a loading is done, the loading state can be cleaned or reported on. | ||
|
||
|
||
## Spec | ||
``` | ||
dodoo load [options] <database> <stream or file> | ||
--with-history Activate chatter history generation. (Default: off) | ||
--batch-size Batch size; recent Odoo batch create efficiently. | ||
--emulate-onchange Emulate onchange actions if loaded fields trigger. | ||
Subcommands: | ||
report <database> Report on loaded data. | ||
prune <database> Clean state about the entire ETL project. | ||
--model Just prune specific models. | ||
--help This help | ||
All options can be supplied with environment variables: | ||
Uppercase / strip inital '--' / replace '-' by '_' / prefix `DODOO_`. | ||
``` | ||
|
||
|
||
<div align="center"> | ||
<div> | ||
<a href="https://xoe.solutions"> | ||
<img width="100" src="https://erp.xoe.solutions/logo.png" alt="XOE Corp. SAS"> | ||
</a> | ||
</div> | ||
<p> | ||
<sub>Currently, folks <a href="https://github.com/xoe-labs/">@xoe-labs</a> try to keep up with their task to maintain this.</sub> | ||
</p> | ||
<p> | ||
<sub>If you're the kind of person, willing to sponsor open source projects, consider sending some spare XLM banana to <code>blaggacao*keybase.io</code></sub> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# `dodoo migrate` Component | ||
|
||
## Abstract | ||
|
||
`dodoo migrate` subcommand manages the complete database upgrade including | ||
integration with remote uprade services such as Odoo EE. | ||
|
||
It uses a descriptive migration path aligned with semantic project versioning | ||
derived from a yaml file expected to be checked into source code. | ||
|
||
A descriptive migration path preserves history and provides for rollbacks. | ||
|
||
It also produces a backup snapshot just before migrating. | ||
|
||
To make migrations atomic transactions in the face of the user, a light | ||
splashscreen server with configurable templates informs the user about the | ||
maintenance. | ||
|
||
It coincidentially ships with openupgradelib and odoo's own leaked migration | ||
library for delivering on advanced migration scripts. | ||
|
||
In order to keep migration management apart from main code (ie. to replicate | ||
Odoo's service model for own modules), this command is able to overlay a | ||
migration folder tree before loading the server. | ||
|
||
State is kept in a special purpose database schema. TODO: move the schema to | ||
up to the `dodoo` command - we never know what it might be good for. | ||
|
||
|
||
## Spec | ||
|
||
``` | ||
dodoo migrate [options] <database> | ||
--spec The yaml file containing the migration steps. | ||
Default: `./migration.yaml` | ||
--overlay A migration directory overlay. (optional) | ||
--until Version to migrate to (included). (optional) | ||
--help This help | ||
All options can be supplied with environment variables: | ||
Uppercase / strip inital '--' / replace '-' by '_' / prefix `DODOO_`. | ||
``` | ||
|
||
|
||
<div align="center"> | ||
<div> | ||
<a href="https://xoe.solutions"> | ||
<img width="100" src="https://erp.xoe.solutions/logo.png" alt="XOE Corp. SAS"> | ||
</a> | ||
</div> | ||
<p> | ||
<sub>Currently, folks <a href="https://github.com/xoe-labs/">@xoe-labs</a> try to keep up with their task to maintain this.</sub> | ||
</p> | ||
<p> | ||
<sub>If you're the kind of person, willing to sponsor open source projects, consider sending some spare XLM banana to <code>blaggacao*keybase.io</code></sub> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# `dodoo test` Component | ||
|
||
## Abstract | ||
|
||
`dodoo test` subcommand initializes a database on the given db conection and - | ||
optionally - executes the tests in the given test mode. | ||
|
||
It does not recreate databases, therefore non-idempotent tests have to be dealt | ||
with. Those, however are rare in recent odoo versions. If you hit one, you might | ||
use patches `odooup patch` to remedy. | ||
|
||
It can be executed in two flavors: default and pytest. | ||
|
||
Default mode comes with auto-detection modes and let's you filter on Odoo's test | ||
tags. For weekly test, you can forc include certain modules, you also can | ||
exclude notoriously unrelated failing test from autodetected module sets. | ||
|
||
While pytest already ships with a built in humran friendly report format, | ||
default mode emulates a custom, but human & CI-friendly test report. | ||
|
||
|
||
## Spec | ||
``` | ||
dodoo test <subcommand> | ||
Subcommands: | ||
default [options] <database> | ||
--detect-mode [git] Strategy to autodetect eligible tests. | ||
Default: git | ||
--git-dir Git bare repository (".git") dir to compare with. | ||
--exclude-modules Exclude (auto-detected) modules from tests. | ||
--include-modules Force to include modules for tests. | ||
--filter-tags Filter on test tags. | ||
pytest <database> <pytestargs> | ||
--help This help | ||
All options can be supplied with environment variables: | ||
Uppercase / strip inital '--' / replace '-' by '_' / prefix `DODOO_`. | ||
``` | ||
|
||
|
||
<div align="center"> | ||
<div> | ||
<a href="https://xoe.solutions"> | ||
<img width="100" src="https://erp.xoe.solutions/logo.png" alt="XOE Corp. SAS"> | ||
</a> | ||
</div> | ||
<p> | ||
<sub>Currently, folks <a href="https://github.com/xoe-labs/">@xoe-labs</a> try to keep up with their task to maintain this.</sub> | ||
</p> | ||
<p> | ||
<sub>If you're the kind of person, willing to sponsor open source projects, consider sending some spare XLM banana to <code>blaggacao*keybase.io</code></sub> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# `dodoo translate` Component | ||
|
||
## Abstract | ||
|
||
`dodoo translate` subcommand exports translatation files and submits them to | ||
a remote api, such as weblate, or local directory tree. | ||
|
||
TBD | ||
|
||
|
||
## Spec | ||
``` | ||
dodoo translate database | ||
TBD | ||
``` | ||
|
||
|
||
<div align="center"> | ||
<div> | ||
<a href="https://xoe.solutions"> | ||
<img width="100" src="https://erp.xoe.solutions/logo.png" alt="XOE Corp. SAS"> | ||
</a> | ||
</div> | ||
<p> | ||
<sub>Currently, folks <a href="https://github.com/xoe-labs/">@xoe-labs</a> try to keep up with their task to maintain this.</sub> | ||
</p> | ||
<p> | ||
<sub>If you're the kind of person, willing to sponsor open source projects, consider sending some spare XLM banana to <code>blaggacao*keybase.io</code></sub> | ||
</p> | ||
</div> |