_pmiconfig
Shared configuration and operational tooling for PMIVerse Odoo environments. This repository supports the lifecycle of an instance: getting repositories and dependencies, configuring services, backing up and restoring databases, migrating Odoo versions, and testing addons.
It contains executable scripts, configuration, repository catalogs, service
templates, and reusable development assets. Running instances, PostgreSQL data,
filestores, backup archives, and logs live outside this checkout, normally under
versioned /srv/pmiverse/_pmisuite<version>/ directories.
Use the README index below to explore each component. The documentation portal links the detailed command references, runbooks, architecture notes, and terminology.
Developers should start with the developer guide for component boundaries, code flow, side effects, and focused validation.
What this repository does
Configure environments and maintain source repositories
Shared configuration defines database aliases, backup instances and hosts, suite locations, and repository catalogs:
config/pmiverse.conf: generic template for database and instance registries, backup synchronization settings, shared paths, and restore defaults. Active inventory lives in/srv/pmiverse/_pmiregistry/config/pmiverse.conf; setPMIVERSE_CONFto use another location.config/pmisetup.conf: version-specific repository groups, branches, locations, and synchronization logs.data/repos/: versioned CSV repository catalogs and requirement inputs.
Repository updaters clone and update the configured
checkouts. The requirement collector reads runtime
requirements from local OCB, OCA, and PMIVerse repositories and produces grouped
requirement files; it does not install packages. Both Odoo 18 updaters also deploy
committed pmis-i18n-extra artifacts after successful OCB and translation checkout
updates; database activation remains separate.
Configure and manage Odoo services
Templates provide Odoo configuration and systemd units. The Odoo 18 service documentation distinguishes normal Odoo startup from explicit full-database or selected-module maintenance. Updating repositories, installing service units, and upgrading database modules are separate operations.
Back up, synchronize, and restore databases
The Odoo 18 backup producer selects its databases and paths from the central registries. It creates validated ZIPs containing a PostgreSQL custom-format dump and the available filestore, applies per-database archive retention (ten by default), and refreshes latest-backup links.
Remote producers retain /srv/pmiverse/_pmisuite18/data/backups/.
Full-history rsync jobs place each remote server's copies in separate folders
on the local restore server:
The following host names are synthetic. Installation-specific services and timers
live in _pmiregistry.
| Remote source | Local restore mirror |
|---|---|
backup-a:…/data/backups/ |
…/data/backups/backup-a/ |
backup-b:…/data/backups/ |
…/data/backups/backup-b/ |
The laptop workflow separately synchronizes
only the latest archives from configured hosts into a flat backups-latest/
directory and provides progress following and restore commands.
Restore tooling resolves local mirror paths through
the database registry. The generic command supports archive validation, staged
database and filestore publication, coordinated rollback, optional neutralization,
and configuration-only dry runs. Database-specific scripts live in _pmiregistry/scripts/restore/ with their own
restore implementations; see the legacy reference.
Create, duplicate, remove, and migrate databases
Database creation initializes Odoo 18 without demo data, sets an administrator account, and installs selected modules so users can finish configuration in the UI. Existing databases and filestores are refused.
Administrator password recovery resets Odoo user ID 2 in an existing database, with private generated credentials and optional activation.
Database duplication copies a database and, by default, its filestore. It supports PostgreSQL template copying and an explicit dump/restore alternative, refuses existing destinations, and assigns a new database UUID. Copies are not automatically neutralized.
Database deletion provides deletedb, which
removes a selected database and its matching filestore, with target preview
and confirmation options.
The migration runner upgrades databases sequentially from Odoo 14 through 15, 16, 17, and 18, with intermediate databases, backups, and logs. OpenUpgrade overlays supply version-specific migration additions.
Test addons, enforce code quality, and generate translations
Reusable testing assets provide pytest configuration, fixtures, addon scaffolds, Ruff formatting/import rules, pylint-odoo settings, and pre-commit and CI templates. The pytest infrastructure integrates the addon collection with Odoo's namespace and runner-prepared databases.
Commands in scripts/test/ run addon tests and linting, create testing
scaffolds, synchronize Ruff policy, clean disposable test databases, and
publish test badges. See the runner references.
The batch test runner forwards --keep-db to each addon runner, preserving test
databases for inspection after successful or failed runs.
Translation tools generate POT templates for one addon or selected repositories using temporary Odoo databases. Their checked-in source and CLI help document the available selections and configured paths.
The separate repository test suite verifies _pmiconfig
itself, including configuration, repository tooling, backup/restore contracts,
and integration behavior.
Expose commands and check Python compatibility
Host integration installs the restore-db
shortcut and shared Bash completion. Completion covers restore, database
duplication/deletion, testing, and maintenance commands.
The Python compatibility bridge reports supported Python
versions and checks an interpreter against the selected Odoo checkout.
The reserved pmiverse_policy_check.py command is currently a non-functional
placeholder, not an implemented host validation tool.
README index
This index links every component README in the repository. Each component page owns its usage details, prerequisites, and limitations.
Configuration and host tools
| README | Contents |
|---|---|
| Shared configuration | Configuration files, database/instance registries, and consumers. |
| Standalone tools | Python compatibility checks against the selected Odoo checkout. |
| Host integration | CLI shortcut installation, completion, and host-helper status. |
Repositories, services, and migration
| README | Contents |
|---|---|
| Repository updates | Catalog-driven checkout synchronization and version-specific updaters. |
| Runtime requirements | Requirement discovery, filtering, grouping, and output generation. |
| Configuration and service templates | Odoo configuration, backup services, timers, and rsync units. |
| Odoo 18 runtime/update services | Service installation and separate runtime and module-maintenance workflows. |
| Odoo 14–18 migration | Sequential OpenUpgrade workflow and migration runbook. |
| OpenUpgrade overlays | Version-specific migration scripts and their integration. |
Database operations and backup synchronization
| README | Contents |
|---|---|
| Restore | Registry-based source selection, neutralization, locks, archive handling, and rollback. |
| Duplicate | Template and dump/restore copying, filestore options, and completion. |
| Create | New Odoo databases, administrator credentials, selected modules, and UI handoff. |
| Administrator recovery | Password reset for user ID 2 and optional account activation. |
| Delete | Database/filestore deletion, target validation, dry runs, and confirmation. |
| Laptop backups | Latest-archive synchronization, service deployment, progress following, and restore. |
Testing and development assets
| README | Contents |
|---|---|
| Testkit | Shared testing, formatting, linting, scaffold, pre-commit, and workflow assets. |
| Pytest infrastructure | Odoo addon collection, runner contracts, fixtures, and templates. |
| Repository tests | Focused tests for this repository and their isolated fixtures. |
| Translation export | Export lifecycle, temporary databases, POT comparison, and failure behavior. |
Command and runbook index
Some commands have dedicated pages under docs/ instead of a component README.
| Task | Reference |
|---|---|
| Produce Odoo 18 database and filestore backups | Backup runbook |
| Restore or neutralize a database | Generic restore |
| Maintain restore internals | Restore architecture |
| Use retained per-target restore commands | Legacy restore reference |
| Run tests for one addon | Single-addon runner |
| Run tests for selected addons or repositories | Repository runner |
| Run addon lint and formatting checks | Lint runner |
| Synchronize shared Ruff settings | Ruff policy synchronization |
| Generate addon test scaffolds | Scaffold generator |
| Initialize repository testing configuration | Testing initialization |
| Publish test badges | Badge publisher |
| Select an Odoo-supported Python environment | Python compatibility |
| Install shell shortcuts and completion | CLI integration |
| Generate addon translation templates | Translation scripts |
Repository layout
config/ Shared operational configuration
data/repos/ Versioned repository catalogs and requirement inputs
docs/ Command references, runbooks, and architecture notes
openupgrade_overlays/ Version-specific migration additions
scripts/ Operational commands grouped by function
templates/ Odoo configuration and systemd source templates
testkit/ Reusable infrastructure for Odoo addon repositories
tests/ Tests of _pmiconfig itself
tools/ Python compatibility bridge
In particular, scripts/test/ contains executable runners, testkit/
contains the assets they use or deploy, and tests/ checks this repository.
Using the tools
There is no single installation step for the whole repository. Select the component README or runbook for the operation you need. Shell tools commonly require Bash and GNU utilities; database tools require PostgreSQL clients and access to the intended database and filestore. Odoo-aware tools use the corresponding suite's configuration, checkout, and supported Python environment.
The primary backup, service, testing, and translation workflows target
Odoo 18. Repository catalogs and configuration also cover Odoo 14–18, and the
migration runner spans that sequence. Odoo 12 backup scripts and units are
maintained in _pmiregistry for a legacy server. Check each component's actual
version support.
The generic config/pmiverse.conf is a setup template; other files under
config/ are consumed directly by tools. Files under templates/
must be reviewed and installed separately; editing or pulling a template does
not change an installed systemd unit. Implementation-specific inventory belongs in _pmiregistry without secrets;
databases, filestores, archives, generated reports, and runtime logs belong in
their documented instance or output locations.
Read the linked runbook and the script's current help before use. Get the required approval
for production, privileged, destructive, synchronization, commit, push, or
external-write operations. Use a documented preview or dry-run mode when
available. Keep production-derived database copies offline until neutralized.
Addon test runners use disposable test_ databases; repository tests use the
focused validation procedures described in tests/README.md.
License
Unless otherwise noted, this repository's documentation and scripts are provided for internal PMIVerse use.
Copyright (c) 2025 LUXIM d.o.o. — Part of PMISuite.