"swarm exec" support
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- docker, docker-compose, go
- 領域
- devops, infrastructure
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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)
- 主要言語
- Go
- スター
- 4.1k
- フォーク
- 157
- 平均マージ
- 4時間 35分
- マージ済み PR(30日)
- 15
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
offen/docker-volume-backup のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
offen/docker-volume-backup#910 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Backup aborts when a file disappears during archiving (ENOENT from os.Lstat in writeTarball)対応中かも @ciltocruz が 2 日前に担当しました。 オープンenhancement pr welcome
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
offen/docker-volume-backup#908 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
offen/docker-volume-backup#879 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
maintenance pr welcome
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
offen/docker-volume-backup#869 ·
メンテナーはふだん 1 日以内に返信
-
documentation pr welcome
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
offen/docker-volume-backup#796 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
offen/docker-volume-backup の issue をすべて見る
似ている issue
-
area/ui-schema good first issue type/bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
router-for-me/CLIProxyAPI#8573 ·
メンテナーはふだん 9 日以内に返信
-
bug: minute-granularity sync timestamp makes e2e tests asserting "Already in sync" fail sporadicallyオープンbug package:cmd priority:3-low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
docToolchain/Bausteinsicht#761 ·
メンテナーはふだん 1 日以内に返信
-
Flaky test: kb TestUnknownLabelValuesAreFoldedNotExported fails when the start epoch contains 799オープンarea/knowledge kind/bug priority/p1 status/accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openagentix/openagentix#253 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
quii/learn-go-with-tests#934 · コメント 1 件 ·