diff --git a/docs/diagrams/images/technical-architecture-archive-via-cli.png b/docs/diagrams/images/technical-architecture-archive-via-cli.png deleted file mode 100644 index 68695cf..0000000 Binary files a/docs/diagrams/images/technical-architecture-archive-via-cli.png and /dev/null differ diff --git a/docs/diagrams/images/technical-architecture-archive-via-ui.png b/docs/diagrams/images/technical-architecture-archive-via-ui.png deleted file mode 100644 index 1b5b93e..0000000 Binary files a/docs/diagrams/images/technical-architecture-archive-via-ui.png and /dev/null differ diff --git a/docs/diagrams/images/technical-architecture-archive.png b/docs/diagrams/images/technical-architecture-archive.png new file mode 100644 index 0000000..971661c Binary files /dev/null and b/docs/diagrams/images/technical-architecture-archive.png differ diff --git a/docs/diagrams/images/technical-architecture-cleanup-via-cli.png b/docs/diagrams/images/technical-architecture-cleanup-via-cli.png deleted file mode 100644 index ab1adf6..0000000 Binary files a/docs/diagrams/images/technical-architecture-cleanup-via-cli.png and /dev/null differ diff --git a/docs/diagrams/images/technical-architecture-cleanup-via-ui.png b/docs/diagrams/images/technical-architecture-cleanup-via-ui.png deleted file mode 100644 index 04aae35..0000000 Binary files a/docs/diagrams/images/technical-architecture-cleanup-via-ui.png and /dev/null differ diff --git a/docs/diagrams/images/technical-architecture-cleanup.png b/docs/diagrams/images/technical-architecture-cleanup.png new file mode 100644 index 0000000..174e6d4 Binary files /dev/null and b/docs/diagrams/images/technical-architecture-cleanup.png differ diff --git a/docs/diagrams/images/technical-architecture-create-via-cli.png b/docs/diagrams/images/technical-architecture-create-via-cli.png deleted file mode 100644 index 31ee000..0000000 Binary files a/docs/diagrams/images/technical-architecture-create-via-cli.png and /dev/null differ diff --git a/docs/diagrams/images/technical-architecture-create-via-ui.png b/docs/diagrams/images/technical-architecture-create-via-ui.png deleted file mode 100644 index d7cefce..0000000 Binary files a/docs/diagrams/images/technical-architecture-create-via-ui.png and /dev/null differ diff --git a/docs/diagrams/images/technical-architecture-create.png b/docs/diagrams/images/technical-architecture-create.png new file mode 100644 index 0000000..e3126a1 Binary files /dev/null and b/docs/diagrams/images/technical-architecture-create.png differ diff --git a/docs/diagrams/images/technical-architecture-restore-via-cli.png b/docs/diagrams/images/technical-architecture-restore-via-cli.png deleted file mode 100644 index 2d554db..0000000 Binary files a/docs/diagrams/images/technical-architecture-restore-via-cli.png and /dev/null differ diff --git a/docs/diagrams/images/technical-architecture-restore-via-ui.png b/docs/diagrams/images/technical-architecture-restore-via-ui.png deleted file mode 100644 index 7bbeeed..0000000 Binary files a/docs/diagrams/images/technical-architecture-restore-via-ui.png and /dev/null differ diff --git a/docs/diagrams/images/technical-architecture-restore.png b/docs/diagrams/images/technical-architecture-restore.png new file mode 100644 index 0000000..ddb297e Binary files /dev/null and b/docs/diagrams/images/technical-architecture-restore.png differ diff --git a/docs/diagrams/images/technical-architecture-update-via-cli.png b/docs/diagrams/images/technical-architecture-update-via-cli.png deleted file mode 100644 index 5059914..0000000 Binary files a/docs/diagrams/images/technical-architecture-update-via-cli.png and /dev/null differ diff --git a/docs/diagrams/images/technical-architecture-update-via-ui.png b/docs/diagrams/images/technical-architecture-update-via-ui.png deleted file mode 100644 index b57a450..0000000 Binary files a/docs/diagrams/images/technical-architecture-update-via-ui.png and /dev/null differ diff --git a/docs/diagrams/images/technical-architecture-update.png b/docs/diagrams/images/technical-architecture-update.png new file mode 100644 index 0000000..28186d4 Binary files /dev/null and b/docs/diagrams/images/technical-architecture-update.png differ diff --git a/docs/diagrams/src/technical-architecture-archive-via-cli.mmd b/docs/diagrams/src/technical-architecture-archive-via-cli.mmd deleted file mode 100644 index c95ded4..0000000 --- a/docs/diagrams/src/technical-architecture-archive-via-cli.mmd +++ /dev/null @@ -1,37 +0,0 @@ -sequenceDiagram - participant octo CLI - participant Octopod Server - participant PostgreSQL - participant UI - participant Octopod Server/BgWorker - participant Octopod Server/StatusUpdater - participant ControlScripts - participant KubeAPI - octo CLI->>Octopod Server: archive(name) - Octopod Server->>PostgreSQL: status=ArchivePending - alt name not found - PostgreSQL-->>Octopod Server: error: name not found - Octopod Server-->>octo CLI: error: name not found - else - PostgreSQL-->>Octopod Server: ok - Octopod Server-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Octopod Server->>Octopod Server/BgWorker: archive - Octopod Server-->>octo CLI: done - Octopod Server/BgWorker->>ControlScripts: archive - ControlScripts->>KubeAPI: archive deployment - KubeAPI-->>ControlScripts: done - ControlScripts-->>Octopod Server/BgWorker: done - Octopod Server/BgWorker->>PostgreSQL: write logs - Octopod Server/BgWorker-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Note over Octopod Server/StatusUpdater: wait 5 minutes - loop check deployment status every 30 seconds - Octopod Server/StatusUpdater->>PostgreSQL: status=Archived/ArchivePending - Octopod Server/StatusUpdater-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - end - end diff --git a/docs/diagrams/src/technical-architecture-archive-via-ui.mmd b/docs/diagrams/src/technical-architecture-archive-via-ui.mmd deleted file mode 100644 index 03e33e2..0000000 --- a/docs/diagrams/src/technical-architecture-archive-via-ui.mmd +++ /dev/null @@ -1,36 +0,0 @@ -sequenceDiagram - participant UI - participant Octopod Server - participant PostgreSQL - participant Octopod Server/BgWorker - participant Octopod Server/StatusUpdater - participant ControlScripts - participant KubeAPI - UI->>Octopod Server: archive(name) - Octopod Server->>PostgreSQL: status=ArchivePending - alt name not found - PostgreSQL-->>Octopod Server: error: name not found - Octopod Server-->>UI: error: name not found - else - PostgreSQL-->>Octopod Server: ok - Octopod Server-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Octopod Server->>Octopod Server/BgWorker: archive - Octopod Server-->>UI: done - Octopod Server/BgWorker->>ControlScripts: archive - ControlScripts->>KubeAPI: archive deployment - KubeAPI-->>ControlScripts: done - ControlScripts-->>Octopod Server/BgWorker: done - Octopod Server/BgWorker->>PostgreSQL: write logs - Octopod Server/BgWorker-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Note over Octopod Server/StatusUpdater: wait 5 minutes - loop check deployment status every 30 seconds - Octopod Server/StatusUpdater->>PostgreSQL: status=Archived/ArchivePending - Octopod Server/StatusUpdater-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - end - end diff --git a/docs/diagrams/src/technical-architecture-archive.mmd b/docs/diagrams/src/technical-architecture-archive.mmd new file mode 100644 index 0000000..a95395c --- /dev/null +++ b/docs/diagrams/src/technical-architecture-archive.mmd @@ -0,0 +1,31 @@ +sequenceDiagram + participant User + participant Octopod Frontend + participant Octopod Backend + participant Control Scipts + participant Octopod DB + + User ->>+ Octopod Frontend: Archive deployment + activate Octopod Frontend + + Octopod Frontend ->>+ Octopod Backend: Archive deployment + + + Octopod Backend ->>+ Control Scipts: archive – Archive the deployment + Control Scipts -->>- Octopod Backend: Deployment archive started + + Octopod Backend ->>+ Octopod DB: Set deployment state to ArchivePending + Octopod DB -->>- Octopod Backend: Deployment status set + + loop + Octopod Backend ->>+ Control Scipts: archive_check – Is the deployment archived? + Control Scipts -->>- Octopod Backend: deployment is not archived + end + + Octopod Backend ->>+ Control Scipts: archive_check – Is the deployment archived? + Control Scipts -->>- Octopod Backend: deployment is archived! + + Octopod Backend ->>+ Octopod DB: Set deployment state to Archived + Octopod DB -->>- Octopod Backend: Deployment status set + + deactivate Octopod Backend diff --git a/docs/diagrams/src/technical-architecture-cleanup-via-cli.mmd b/docs/diagrams/src/technical-architecture-cleanup-via-cli.mmd deleted file mode 100644 index 8d30664..0000000 --- a/docs/diagrams/src/technical-architecture-cleanup-via-cli.mmd +++ /dev/null @@ -1,20 +0,0 @@ -sequenceDiagram - participant octo CLI - participant Octopod Server - participant PostgreSQL - participant UI - participant Octopod Server/BgWorker - participant Octopod Server/StatusUpdater - participant ControlScripts - participant KubeAPI - octo CLI->>Octopod Server: cleanup(name) - Octopod Server->>Octopod Server/BgWorker: cleanup - Octopod Server-->>octo CLI: done - Octopod Server/BgWorker->>ControlScripts: cleanup - ControlScripts->>KubeAPI: cleanup deployment - KubeAPI-->>ControlScripts: done - ControlScripts-->>Octopod Server/BgWorker: done - Octopod Server->>PostgreSQL: delete config and logs - Octopod Server/BgWorker-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info diff --git a/docs/diagrams/src/technical-architecture-cleanup-via-ui.mmd b/docs/diagrams/src/technical-architecture-cleanup-via-ui.mmd deleted file mode 100644 index f0e261a..0000000 --- a/docs/diagrams/src/technical-architecture-cleanup-via-ui.mmd +++ /dev/null @@ -1,19 +0,0 @@ -sequenceDiagram - participant UI - participant Octopod Server - participant PostgreSQL - participant Octopod Server/BgWorker - participant Octopod Server/StatusUpdater - participant ControlScripts - participant KubeAPI - UI->>Octopod Server: cleanup(name) - Octopod Server->>Octopod Server/BgWorker: cleanup - Octopod Server-->>UI: done - Octopod Server/BgWorker->>ControlScripts: cleanup - ControlScripts->>KubeAPI: cleanup deployment resources - KubeAPI-->>ControlScripts: done - ControlScripts-->>Octopod Server/BgWorker: done - Octopod Server->>PostgreSQL: delete config and logs - Octopod Server/BgWorker-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info diff --git a/docs/diagrams/src/technical-architecture-cleanup.mmd b/docs/diagrams/src/technical-architecture-cleanup.mmd new file mode 100644 index 0000000..661352f --- /dev/null +++ b/docs/diagrams/src/technical-architecture-cleanup.mmd @@ -0,0 +1,14 @@ +sequenceDiagram + participant Octopod Backend + participant Control Scipts + participant Octopod DB + + activate Octopod Backend + + Octopod Backend ->>+ Control Scipts: cleanup – Clean up deployment resouces + Control Scipts -->>- Octopod Backend: Deployment resouces cleaned up + + Octopod Backend ->>+ Octopod DB: Delete everything related to the deployment + Octopod DB -->>- Octopod Backend: Everything deleted + + deactivate Octopod Backend diff --git a/docs/diagrams/src/technical-architecture-create-via-cli.mmd b/docs/diagrams/src/technical-architecture-create-via-cli.mmd deleted file mode 100644 index 0405b21..0000000 --- a/docs/diagrams/src/technical-architecture-create-via-cli.mmd +++ /dev/null @@ -1,41 +0,0 @@ -sequenceDiagram - participant octo CLI - participant Octopod Server - participant PostgreSQL - participant UI - participant Octopod Server/BgWorker - participant Octopod Server/StatusUpdater - participant ControlScripts - participant KubeAPI - octo CLI->>Octopod Server: create(name, tag, [override]) - Octopod Server->>PostgreSQL: store config, status=CreatePending - alt name already exists - PostgreSQL->>Octopod Server: error: deployment already exists - Octopod Server-->>octo CLI: error: deployment already exists - else - alt tag not found - Octopod Server-->>octo CLI: error: tag not found - else - PostgreSQL-->>Octopod Server: ok - Octopod Server-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Octopod Server->>Octopod Server/BgWorker: create - Octopod Server-->>octo CLI: done - Octopod Server/BgWorker->>ControlScripts: create - ControlScripts->>KubeAPI: create deployment - KubeAPI-->>ControlScripts: done - ControlScripts-->>Octopod Server/BgWorker: done - Octopod Server/BgWorker->>PostgreSQL: write logs - Octopod Server/BgWorker-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Note over Octopod Server/StatusUpdater: wait 5 minutes - loop check deployment status every 30 seconds - Octopod Server/StatusUpdater->>PostgreSQL: status=Running/Failure - Octopod Server/StatusUpdater-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - end - end - end diff --git a/docs/diagrams/src/technical-architecture-create-via-ui.mmd b/docs/diagrams/src/technical-architecture-create-via-ui.mmd deleted file mode 100644 index 49bb8f5..0000000 --- a/docs/diagrams/src/technical-architecture-create-via-ui.mmd +++ /dev/null @@ -1,40 +0,0 @@ -sequenceDiagram - participant UI - participant Octopod Server - participant PostgreSQL - participant Octopod Server/BgWorker - participant Octopod Server/StatusUpdater - participant ControlScripts - participant KubeAPI - UI->>Octopod Server: create(name, tag, [override]) - Octopod Server->>PostgreSQL: store config, status=CreatePending - alt name already exists - PostgreSQL-->>Octopod Server: error: deployment already exists - Octopod Server-->>UI: error: deployment already exists - else - alt tag not found - Octopod Server-->>UI: error: tag not found - else - PostgreSQL-->>Octopod Server: ok - Octopod Server-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Octopod Server->>Octopod Server/BgWorker: create - Octopod Server-->>UI: done - Octopod Server/BgWorker->>ControlScripts: create - ControlScripts->>KubeAPI: create deployment - KubeAPI-->>ControlScripts: done - ControlScripts-->>Octopod Server/BgWorker: done - Octopod Server/BgWorker->>PostgreSQL: write logs - Octopod Server/BgWorker-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Note over Octopod Server/StatusUpdater: wait 5 minutes - loop check deployment status every 30 seconds - Octopod Server/StatusUpdater->>PostgreSQL: status=Running/Failure - Octopod Server/StatusUpdater-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - end - end - end diff --git a/docs/diagrams/src/technical-architecture-create.mmd b/docs/diagrams/src/technical-architecture-create.mmd new file mode 100644 index 0000000..0553ad2 --- /dev/null +++ b/docs/diagrams/src/technical-architecture-create.mmd @@ -0,0 +1,41 @@ +sequenceDiagram + participant User + participant Octopod Frontend + participant Octopod Backend + participant Control Scipts + participant Octopod DB + + User ->>+ Octopod Frontend: Create deployment + activate Octopod Frontend + + Octopod Frontend ->>+ Octopod Backend: Create deployment + Octopod Backend ->>+ Control Scipts: config_check – Check deployment config + Control Scipts ->>- Octopod Backend: Deployment config OK + Octopod Backend ->>+ Octopod DB: Create deployment + Octopod DB -->>- Octopod Backend: Deployment Created + + Octopod Backend -->> Octopod Frontend: Delpoyment created + Octopod Frontend -->>- User: Close deployment popup + + Octopod Backend ->>+ Control Scipts: info – Get deployment metadata + Control Scipts -->>- Octopod Backend: Deployment metadata + + Octopod Backend ->>+ Octopod DB: Set deployment metadata + Octopod DB -->>- Octopod Backend: Deployment metadata set + + + Octopod Backend ->>+ Control Scipts: create – Create the delpoyment + Control Scipts -->>- Octopod Backend: Deployment creation started + + loop + Octopod Backend ->>+ Control Scipts: check – Is the deployment up? + Control Scipts -->>- Octopod Backend: deployment is not up + end + + Octopod Backend ->>+ Control Scipts: check – Is the deployment up? + Control Scipts -->>- Octopod Backend: deployment is up! + + Octopod Backend ->>+ Octopod DB: Set deployment state to Running + Octopod DB -->>- Octopod Backend: Deployment status set + + deactivate Octopod Backend diff --git a/docs/diagrams/src/technical-architecture-restore-via-cli.mmd b/docs/diagrams/src/technical-architecture-restore-via-cli.mmd deleted file mode 100644 index 6ecfad9..0000000 --- a/docs/diagrams/src/technical-architecture-restore-via-cli.mmd +++ /dev/null @@ -1,41 +0,0 @@ -sequenceDiagram - participant octo CLI - participant Octopod Server - participant PostgreSQL - participant UI - participant Octopod Server/BgWorker - participant Octopod Server/StatusUpdater - participant ControlScripts - participant KubeAPI - octo CLI->>Octopod Server: restore(name) - Octopod Server->>PostgreSQL: status=CreatePending - alt name not found - PostgreSQL-->>Octopod Server: error: name not found - Octopod Server-->>octo CLI: error: name not found - else - alt tag not found - Octopod Server-->>octo CLI: error: tag not found - else - PostgreSQL-->>Octopod Server: ok - Octopod Server-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Octopod Server->>Octopod Server/BgWorker: create - Octopod Server-->>octo CLI: done - Octopod Server/BgWorker->>ControlScripts: create - ControlScripts->>KubeAPI: restore deployment - KubeAPI-->>ControlScripts: done - ControlScripts-->>Octopod Server/BgWorker: done - Octopod Server/BgWorker->>PostgreSQL: write logs - Octopod Server/BgWorker-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Note over Octopod Server/StatusUpdater: wait 5 minutes - loop check deployment status every 30 seconds - Octopod Server/StatusUpdater->>PostgreSQL: status=Running/Failure - Octopod Server/StatusUpdater-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - end - end - end diff --git a/docs/diagrams/src/technical-architecture-restore-via-ui.mmd b/docs/diagrams/src/technical-architecture-restore-via-ui.mmd deleted file mode 100644 index 1d74815..0000000 --- a/docs/diagrams/src/technical-architecture-restore-via-ui.mmd +++ /dev/null @@ -1,40 +0,0 @@ -sequenceDiagram - participant UI - participant Octopod Server - participant PostgreSQL - participant Octopod Server/BgWorker - participant Octopod Server/StatusUpdater - participant ControlScripts - participant KubeAPI - UI->>Octopod Server: restore(name) - Octopod Server->>PostgreSQL: status=CreatePending - alt name not found - PostgreSQL-->>Octopod Server: error: name not found - Octopod Server-->>UI: error: name not found - else - alt tag not found - Octopod Server-->>UI: error: tag not found - else - PostgreSQL-->>Octopod Server: ok - Octopod Server-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Octopod Server->>Octopod Server/BgWorker: create - Octopod Server-->>UI: done - Octopod Server/BgWorker->>ControlScripts: create - ControlScripts->>KubeAPI: restore deployment - KubeAPI-->>ControlScripts: done - ControlScripts-->>Octopod Server/BgWorker: done - Octopod Server/BgWorker->>PostgreSQL: write logs - Octopod Server/BgWorker-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Note over Octopod Server/StatusUpdater: wait 5 minutes - loop check deployment status every 30 seconds - Octopod Server/StatusUpdater->>PostgreSQL: status=Running/Failure - Octopod Server/StatusUpdater-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - end - end - end diff --git a/docs/diagrams/src/technical-architecture-restore.mmd b/docs/diagrams/src/technical-architecture-restore.mmd new file mode 100644 index 0000000..189b648 --- /dev/null +++ b/docs/diagrams/src/technical-architecture-restore.mmd @@ -0,0 +1,42 @@ +sequenceDiagram + participant User + participant Octopod Frontend + participant Octopod Backend + participant Control Scipts + participant Octopod DB + + User ->>+ Octopod Frontend: Restore deployment + activate Octopod Frontend + + Octopod Frontend ->>+ Octopod Backend: Restore deployment + Octopod Backend ->>+ Control Scipts: config_check – Check deployment config + Control Scipts ->>- Octopod Backend: Deployment config OK + + Octopod Backend -->> Octopod Frontend: Delpoyment restore started + Octopod Frontend -->>- User: Deployment restore started + + + Octopod Backend ->>+ Control Scipts: info – Get deployment metadata + Control Scipts -->>- Octopod Backend: Deployment metadata + + Octopod Backend ->>+ Octopod DB: Set deployment metadata + Octopod DB -->>- Octopod Backend: Deployment metadata set + + Octopod Backend ->>+ Control Scipts: unarchive – Unarchive the delpoyment + Control Scipts -->>- Octopod Backend: Deployment unarchiving started + + Octopod Backend ->>+ Octopod DB: Set deployment state to CreatePending + Octopod DB -->>- Octopod Backend: Deployment status set + + loop + Octopod Backend ->>+ Control Scipts: check – Is the deployment up? + Control Scipts -->>- Octopod Backend: deployment is not up + end + + Octopod Backend ->>+ Control Scipts: check – Is the deployment up? + Control Scipts -->>- Octopod Backend: deployment is up! + + Octopod Backend ->>+ Octopod DB: Set deployment state to Running + Octopod DB -->>- Octopod Backend: Deployment status set + + deactivate Octopod Backend diff --git a/docs/diagrams/src/technical-architecture-update-via-cli.mmd b/docs/diagrams/src/technical-architecture-update-via-cli.mmd deleted file mode 100644 index b68cb91..0000000 --- a/docs/diagrams/src/technical-architecture-update-via-cli.mmd +++ /dev/null @@ -1,41 +0,0 @@ -sequenceDiagram - participant octo CLI - participant Octopod Server - participant PostgreSQL - participant UI - participant Octopod Server/BgWorker - participant Octopod Server/StatusUpdater - participant ControlScripts - participant KubeAPI - octo CLI->>Octopod Server: create(name, tag, [override]) - Octopod Server->>PostgreSQL: store config, status=UpdatePending - alt name not found - PostgreSQL-->>Octopod Server: error: name not found - Octopod Server-->>octo CLI: error: name not found - else - alt tag not found - Octopod Server-->>octo CLI: error: tag not found - else - PostgreSQL-->>Octopod Server: ok - Octopod Server-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->UI: deployments info - Octopod Server->>Octopod Server/BgWorker: update - Octopod Server-->>octo CLI: done - Octopod Server/BgWorker->>ControlScripts: update - ControlScripts->>KubeAPI: upgrade deployment - KubeAPI-->>ControlScripts: done - ControlScripts-->>Octopod Server/BgWorker: done - Octopod Server/BgWorker->>PostgreSQL: write logs - Octopod Server/BgWorker-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->UI: deployments info - Note over Octopod Server/StatusUpdater: wait 5 minutes - loop check deployment status every 30 seconds - Octopod Server/StatusUpdater->>PostgreSQL: status=Running/Failure - Octopod Server/StatusUpdater-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->UI: deployments info - end - end - end diff --git a/docs/diagrams/src/technical-architecture-update-via-ui.mmd b/docs/diagrams/src/technical-architecture-update-via-ui.mmd deleted file mode 100644 index 94e84fe..0000000 --- a/docs/diagrams/src/technical-architecture-update-via-ui.mmd +++ /dev/null @@ -1,40 +0,0 @@ -sequenceDiagram - participant UI - participant Octopod Server - participant PostgreSQL - participant Octopod Server/BgWorker - participant Octopod Server/StatusUpdater - participant ControlScripts - participant KubeAPI - UI->>Octopod Server: create(name, tag, [override]) - Octopod Server->>PostgreSQL: store config, status=UpdatePending - alt name not found - PostgreSQL-->>Octopod Server: error: name not found - Octopod Server-->>UI: error: name not found - else - alt tag not found - Octopod Server-->>UI: error: tag not found - else - PostgreSQL-->>Octopod Server: ok - Octopod Server-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Octopod Server->>Octopod Server/BgWorker: update - Octopod Server-->>UI: done - Octopod Server/BgWorker->>ControlScripts: update - ControlScripts->>KubeAPI: upgrade deployment - KubeAPI-->>ControlScripts: done - ControlScripts-->>Octopod Server/BgWorker: done - Octopod Server/BgWorker->>PostgreSQL: write logs - Octopod Server/BgWorker-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - Note over Octopod Server/StatusUpdater: wait 5 minutes - loop check deployment status every 30 seconds - Octopod Server/StatusUpdater->>PostgreSQL: status=Running/Failure - Octopod Server/StatusUpdater-xUI: event FrontendPleaseUpdateEverything - UI->>Octopod Server: get deployments info - Octopod Server-->>UI: deployments info - end - end - end diff --git a/docs/diagrams/src/technical-architecture-update.mmd b/docs/diagrams/src/technical-architecture-update.mmd new file mode 100644 index 0000000..a30c8ea --- /dev/null +++ b/docs/diagrams/src/technical-architecture-update.mmd @@ -0,0 +1,46 @@ +sequenceDiagram + participant User + participant Octopod Frontend + participant Octopod Backend + participant Control Scipts + participant Octopod DB + + User ->>+ Octopod Frontend: Update deployment + activate Octopod Frontend + + Octopod Frontend ->>+ Octopod Backend: Update deployment + Octopod Backend ->>+ Control Scipts: config_check – Check deployment config + Control Scipts ->>- Octopod Backend: Deployment config OK + + Octopod Backend -->> Octopod Frontend: Delpoyment update started + Octopod Frontend -->>- User: Close deployment popup + + + Octopod Backend ->>+ Octopod DB: Update deployment config + Octopod DB -->>- Octopod Backend: Deployment config updated + + + Octopod Backend ->>+ Control Scipts: info – Get deployment metadata + Control Scipts -->>- Octopod Backend: Deployment metadata + + Octopod Backend ->>+ Octopod DB: Set deployment metadata + Octopod DB -->>- Octopod Backend: Deployment metadata set + + Octopod Backend ->>+ Control Scipts: update – Update the delpoyment + Control Scipts -->>- Octopod Backend: Deployment update started + + Octopod Backend ->>+ Octopod DB: Set deployment state to UpdatePending + Octopod DB -->>- Octopod Backend: Deployment status set + + loop + Octopod Backend ->>+ Control Scipts: check – Is the deployment up? + Control Scipts -->>- Octopod Backend: deployment is not up + end + + Octopod Backend ->>+ Control Scipts: check – Is the deployment up? + Control Scipts -->>- Octopod Backend: deployment is up! + + Octopod Backend ->>+ Octopod DB: Set deployment state to Running + Octopod DB -->>- Octopod Backend: Deployment status set + + deactivate Octopod Backend diff --git a/docs/en/Technical_architecture.md b/docs/en/Technical_architecture.md index 12af990..f176a17 100644 --- a/docs/en/Technical_architecture.md +++ b/docs/en/Technical_architecture.md @@ -68,156 +68,29 @@ A _Docker Image_ with [_control scripts_](#-control-scripts) should be provided ## Process view -Here we provide sequence diagrams for every basic operation that can be performed in _Octopod_. These operations call [_control scripts_](#-control-scripts). On the diagrams, they are labeled as _ControlScripts_. +Here we provide sequence diagrams for every basic operation that can be performed in _Octopod_. These operations call [_control scripts_](#-control-scripts). On the diagrams, they are labeled as _Control Scripts_. -### ✨ Create +### ✨ Deployment creation -_Create_ – creates a new deployment. The main inputs include the name of the deployment, the _Docker Image tag_ and optional configurations. A more detailed description can be found in the [control scripts documentation](Control_scripts.md#-create). - -The arguments are forwarded to the [_create_](Control_scripts.md#-create) script which in turn creates the deployment in the _Kubernetes cluster_. It might call something like: - -```bash -helm upgrade --install --namespace "$namespace" "$name" "$deployment_chart" \ - --set "global.project-name=$project_name" \ - --set "global.base-domain=$base-domain" \ - --set "app.tag=$tag" \ - --set "app.env.foo=$app_env_configuration_1" \ - --set "app.bar=$deployment_configuration_1" \ - --wait \ - --timeout 300 -``` - -
- Create via CLI sequence diagram - -![Create](../diagrams/images/technical-architecture-create-via-cli.png) - -
- -
- Create via UI sequence diagram - -![Create](../diagrams/images/technical-architecture-create-via-ui.png) - -
- -### 🔧 Update - -_Update_ – updates an existing deployment. The main inputs include the name of the deployment, the _Docker Image tag_ and optional configurations. A more detailed description can be found in the [control scripts documentation](Control_scripts.md#-update). - -_configurations_ are read from the database and merged with the new changes. All arguments are forwarded to the [_update_](Control_scripts.md#-update) script which in turn updates the specified deployment with the new parameters in the _Kubernetes cluster_. It might call something like: - -```bash -helm upgrade --install --namespace "$namespace" "$name" "$deployment_chart" \ - --set "global.project-name=$project_name" \ - --set "global.base-domain=$base-domain" \ - --set "app.tag=$tag" \ - --set "app.env.foo=$app_env_configuration_1" \ - --set "app.bar=$deployment_configuration_1" \ - --wait \ - --timeout 300 -``` +![Create](../diagrams/images/technical-architecture-create.png) -
- Update via CLI sequence diagram +### 🔧 Deployment update -![Update](../diagrams/images/technical-architecture-update-via-cli.png) - -
- -
- Update via UI sequence diagram - -![Update](../diagrams/images/technical-architecture-update-via-ui.png) - -
+![Update](../diagrams/images/technical-architecture-update.png) ### 🗃 Archive -_Delete_ – archives a deployment. It should only free the computational resources (_Pods_). _Persistent Volumes_ should not be deleted ― they are cleared in the [_cleanup_](#-cleanup) process. This operation can be undone with the [_restore_](#-restore) command. - -The main argument is the name that identifies the deployment. A more detailed description can be found in the [control scripts documentation](Control_scripts.md#-archive). - -The arguments are forwarded to the [_delete_](Control_scripts.md#-archive) script which in turn frees the computational resources. It might call something like: - -```bash -helm delete "$name" --purge -``` - -
- Archive via CLI sequence diagram - -![Archive](../diagrams/images/technical-architecture-archive-via-cli.png) - -
- -
- Archive via UI sequence diagram - -![Archive](../diagrams/images/technical-architecture-archive-via-ui.png) - -
+![Archive](../diagrams/images/technical-architecture-archive.png) ### 🚮 Cleanup -_Cleanup_ – releases **all** resources captured by the deployment. -The main argument is the name that identifies the deployment. A more detailed description can be found in the [control scripts documentation](Control_scripts.md#-cleanup). It can only be called after [_archive_](#-archive) has been executed. - -The arguments are forwarded to the [_cleanup_](Control_scripts.md#-cleanup) script which in turn frees all resources captured by the given deployment. It might call something like: - -```bash -kubectl delete pvc -n "$namespace" "$name-postgres-pvc" -kubectl delete certificate -n "$namespace" "$name-postgres-cert" -``` - -
- Cleanup via CLI sequence diagram - -![Cleanup](../diagrams/images/technical-architecture-cleanup-via-cli.png) - -
- -
- Cleanup via UI sequence diagram - -![Cleanup](../diagrams/images/technical-architecture-cleanup-via-ui.png) - -
+![Cleanup](../diagrams/images/technical-architecture-cleanup.png) ### 🔁 Restore -_restore_ – restores an archived deployment in the state it was last in. Calls the same _script_ that is called in [_create_](#-create). - -The main argument is the name that identifies the deployment. A more detailed description can be found in the [control scripts documentation](Control_scripts.md#-create). It can only be called after [_archive_](#-archive) has been executed. - -All necessary setup information is read from the database: _configurations_ and the _Docker Image tag_. The arguments are forwarded to the [_create_](Control_scripts.md#-create) script which in turn recreates the deployment. It might call something like: - -```bash -helm upgrade --install --namespace "$namespace" "$name" "$deployment_chart" \ - --set "global.project-name=$project_name" \ - --set "global.base-domain=$base-domain" \ - --set "app.tag=$tag" \ - --set "app.env.foo=$app_env_configuration_1" \ - --set "app.bar=$deployment_configuration_1" \ - --wait \ - --timeout 300 -``` - -
- Restore via CLI sequence diagram - -![Restore](../diagrams/images/technical-architecture-restore-via-cli.png) - -
- -
- Restore via UI sequence diagram - -![Restore](../diagrams/images/technical-architecture-restore-via-ui.png) - -
+![Restore](../diagrams/images/technical-architecture-restore.png) ## 👨‍💻👩‍💻 How we use it