"swarm exec" support
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- docker, docker-compose, go
- Bereich
- devops, infrastructure
Rechercherichtung
Read the linked issue 423 and the supplied swarm-backuper.sh and swarm-backuper-stack.yaml examples first. Then inspect the project's Docker Swarm support and entry points to determine where per-node exec and volume handling would fit. Done means defining and implementing the requested swarm-wide backup flow, including labeled exec steps, volume backups, and service scaling and restoration.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Is your feature request related to a problem? Please describe.
Yes. The problem was described in issue 423. previous issue
Main points of problem
- Swarm cluster. 2 Nodes. MASTER_1, WORKER_1
- Run postgres with docker on WORKER_1
- Need to backup postgres. Before backup need to run script: pg_dump ...
- Up offen-backup on WORKER_1, add labels to deploy section of postgres stack (service)
- Catch the error: no master node. Can exec labels only on master
Describe the solution you'd like
Solution is
- Run offen-backup service ONLY on master node
- For exec labels - run one-time container (docker:25.0.5-cli-alpine) on EACH node when we found tasks (containers) with lables
- For volumes - run one-time container (offen-backup, for example) on EACH node when we found tasks (containers) with labels: volume-list (You can see it in my .sh script)
- If we want to use different timers for different exec-lables or different volume-list-labels - we can also use your idea of exec-label=database, but add support for exec and for volume-list
Additional context
I'm a big fan of docker-swarm. And use swarm cluster in production.
I spent some time and write .sh script for backup WHOLE swarm cluster, depends on labels and use your open-source project
swarm-backuper.sh
- GET all volumes from all nodes. Start docker dind container on each node and get volume list
- GET all services with label volume-list. in this label - we enter volumes, which we want to backup for this service. JOIN this volumes with volumes from step one. Result: MAP<node-name, [volume1, volume2, etc]>
- RUN all labels: exec-pre. Run separate container on each node, where we need to run exec-pre and run docker exec ...
- STOP all services with label: stop. Important: stop === scale to 0, Stop only services in replicated mode
- RUN offen-backup on each node with all volumes from step 2
- RESTORE all services with label: stop. Important: we need to use the JSON from step 4. Scale to original replicas number, before step 4
- RUN all labels: exec-post
How we can run it ?
swarm-backuper-stack.yaml
All of this functions can be write on GoLang and add to ypur project (offen-backup)
- Vorherrschende Sprache
- Go
- Sterne
- 4.1k
- Forks
- 157
- Ø Merge
- 4 Std. 35 Min.
- Gemergte PRs (30 T.)
- 15
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus offen/docker-volume-backup
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
offen/docker-volume-backup#910 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Backup aborts when a file disappears during archiving (ENOENT from os.Lstat in writeTarball)Evtl. vergeben @ciltocruz hat das vor 2 Tagen übernommen. Offenenhancement pr welcome
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 20/100
offen/docker-volume-backup#908 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
offen/docker-volume-backup#879 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
maintenance pr welcome
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
offen/docker-volume-backup#869 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation pr welcome
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
offen/docker-volume-backup#796 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in offen/docker-volume-backup
Ähnliche Issues
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
area/ui-schema good first issue type/bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 4 Tagen
-
A vessel you are not flying should draw dim grey, orbit and arrow (ADR 0041), not in its own colourOffenready-for-agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
jasonfen/terminal-space-program#1020 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
router-for-me/CLIProxyAPI#8573 ·
Maintainer antworten meist innerhalb von 9 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
sipeed/picoclaw#3477 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag