LXC CI/CD Configuration¶
Muppy's CI/CD reacts to your git provider's webhooks: a push creates, updates or destroys LXC servers according to what the Application Definition declares.
Activating it¶
In the Application Definition, check Activate LXC CI/CD. A CICD LXC tab then appears, where the pipeline is configured for every kind of server.
Note
The repository's Project ID and name must be set before the option can be activated — that is what lets Muppy match an incoming webhook to this App Definition.
The CICD LXC tab¶
One field applies to the whole definition:
- Upgrade Task — the Muppy Task that upgrades the database. Muppy ships one that upgrades an Odoo database.
Everything else is grouped in sub-tabs, one per kind of server: Test Servers,
Staging Servers, Production Servers. The parameters are the same in each, so that
a rule can differ between test and production; the field labels carry the kind in
parentheses (… (Test), … (Staging)).
Deployment parameters¶
| Field | Meaning |
|---|---|
| re-Deployment Trigger | Every push — deploy on every push. Comment tag — deploy only when the commit message carries a given tag. |
| Deploy Trigger comment tag | The tag that triggers a deployment in Comment tag mode, e.g. #mpy_deploy_test. |
| Stop Primary Before Deploy | Stop the server before deploying. On by default. |
| Reset Repository | Erase and re-clone the repository at every deployment, instead of updating it (git fetch then git checkout). Off by default. |
| Launch builder | Run the builder at every deployment. On by default. |
| Default Repository Token | The git credential used to fetch the code. |
Provisioning parameters (Test servers)¶
| Field | Meaning |
|---|---|
| Activate Auto deploy | Master switch for automatic deployment on feature branches. |
| Branch exclusion Regex | A push on a branch matching this regex is ignored. |
| Provision Server on commit | Create the server if it does not exist yet. |
| Deprovision on branch Delete | Destroy the server when its branch is deleted. On by default. |
Staging servers have Default Branch instead: the branch whose commits they follow.
Database initialisation parameters¶
| Field | Meaning |
|---|---|
| Database source Strategy | Empty Database — create the server with no database. Seed Database (as pg_dump) — start from a sample dump, given in the field below. Most recent Dump of a Database — start from the latest backup of an existing database. |
| Seed pg_dump | The dump used as seed, in Seed Database mode. |
| Backed-up Database | The database whose latest backup is used, in Most recent Dump mode. |
| Default 'init' command | The shell command that initialises the database. Redirect to $UPGRADE_LOG_FILE to capture large logs (e.g. … > $UPGRADE_LOG_FILE). |
Database upgrade parameters¶
| Field | Meaning |
|---|---|
| Default 'upgrade' command | The shell command that upgrades the database. Pass the arguments as the shell will receive them, on a single line. |
| Backup Before Upgrade | Back the database up before every upgrade. On by default. |
| Duplicate DB Before Upgrade | Duplicate the database instead of dumping it (into {{db_name}}_bu). Use this on databases so large that a backup takes too long. Off by default. |
| Stop Before Backup | Stop the server before the backup or the duplication. On by default. |
| Delete Dupl. DB after upgrade | On a successful upgrade, drop the duplicated database. On by default. |
Others¶
Host Allocator decides where the LXC is placed — it defaults to the allocator set in Muppy Settings — and Qualifier is the qualifier stamped on the servers created here.