Update resolution 013
continuous-integration/drone/push Build is passing Details

This commit is contained in:
3wc 2024-01-09 23:13:03 -03:00
parent f5cfe1f92b
commit 2f21edf2b9
2 changed files with 15 additions and 25 deletions

View File

@ -1,25 +1,25 @@
---
title: "Resolution 013: Budget 007: Operator sync - 2023-10-14"
title: "Resolution 013: Budget 007: Operator sync - 2024-01-??"
---
- Deadline: 2023-10-28
!!! note
This resolution has been amended! The main change was to remove automatic
git synchronisation; please see [the file
history](https://git.coopcloud.tech/coop-cloud/docs.coopcloud.tech/commits/branch/main/docs/federation/resolutions/in-progress/013.md) for a full run-down.
- Deadline: 2024-01-XX
- Size: Large
### Summary
As highlighted in several tickets (e.g. [`#434`](https://git.coopcloud.tech/coop-cloud/organising/issues/434), [`#467`](https://git.coopcloud.tech/coop-cloud/organising/issues/467)), several operators working together on the same server routinely run into deployment instability. This is due to the fact that we do not store or sync the deployment version of the apps.
As highlighted in several tickets (e.g. [`#434`](https://git.coopcloud.tech/coop-cloud/organising/issues/434), [`#467`](https://git.coopcloud.tech/coop-cloud/organising/issues/467)), several operators working together on the same server routinely run into deployment instability. This is due to the fact that we do not store the deployment version of the apps.
With this proposal, we would like to address the synchronisation of app deployment versions. This is being called "Operator sync". What follows is the design proposal which has already received feedback from operators on [this pad](https://pad.riseup.net/p/IebZQkpe3OOpYyVT8f1j-keep).
### Details (Budget 007)
We support a config file (`$ABRA_DIR/config.yml`) which has these defaults:
```yaml
---
operator:
sync: false
```
We add support a config file (`$ABRA_DIR/config.yml`) which has these defaults:
We also add a `abra config` command which has the following shape:
@ -44,22 +44,12 @@ There is also a new command `abra app sync <domain>` which triggers a synchronis
When `abra app deploy/upgrade/rollback/sync` is run, here's what we do:
* `git pull` on the sync repository
* if there are changes, pull them in & log them
* if there is a merge conflict, bail out and ask operator to resolve them
`abra` will search for Git repositories under `$ABRA_DIR/servers/...`. A single Git repository at the root (`$ABRA_DIR/servers/.git`) and on the individual server level (`$ABRA_DIR/servers/example.com/.git`) are supported. Both solution work alongside each other and symlinks are resolved.
The way to avoid merge conflicts will be to never move the `OPERATOR_SYNC_VERSION` env var (see below) from the line it is on in the app env config. `abra` will always insert it just under the `TYPE` env var.
The initial implementation asks operators to initialise their own Git repositories.
* Read the `OPERATOR_SYNC_VERSION` env var as the version to deploy / upgrade from / rollback from
* upgrade: if deployed version does not match `OPERATOR_SYNC_VERSION`, warn before overview
* rollback: same as above!
* Run the deployment
* if successful, record a new `OPERATOR_SYNC_VERSION`, commit & push the changes
* if successful, record a new `OPERATOR_SYNC_VERSION`
* if unsuccessful, do not record a `OPERATOR_SYNC_VERSION` and ask operator to resolve
If `--chaos` is passed, we use the short commit hash instead of the version label.
@ -74,10 +64,10 @@ OPERATOR_SYNC_VERSION=4.0.0+v1.93.0 # managed by Abra
Operator documentation will also be provided.
**Budget amount**: 400 EUR (20 hrs * 20 EUR/hr)
**Budget amount**: 200 EUR (10 hrs * 20 EUR/hr)
**Who will implement this**: ??? (was `@decentral1se` but no more)
**Who will implement this**: (someone?)
**When will the money be spent**: Before mid November 2023.
**When will the money be spent**: Before mid-February 2024
**What is the money for**: Implementing the first steps of operator sync.

View File

@ -104,9 +104,9 @@ nav:
- federation/resolutions/passed/014.md
- "In progress":
- federation/resolutions/in-progress/index.md
- federation/resolutions/in-progress/013.md
- "Draft":
- federation/resolutions/drafts/index.md
- federation/resolutions/drafts/013.md
- "Finance": federation/finance.md
- "Membership": federation/membership.md
- "Minutes":