Updated sequence diagrams (#144)
Before Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 182 KiB |
BIN
docs/diagrams/images/technical-architecture-archive.png
Normal file
After Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 86 KiB |
BIN
docs/diagrams/images/technical-architecture-cleanup.png
Normal file
After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 201 KiB |
BIN
docs/diagrams/images/technical-architecture-create.png
Normal file
After Width: | Height: | Size: 178 KiB |
Before Width: | Height: | Size: 190 KiB |
Before Width: | Height: | Size: 196 KiB |
BIN
docs/diagrams/images/technical-architecture-restore.png
Normal file
After Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 197 KiB |
BIN
docs/diagrams/images/technical-architecture-update.png
Normal file
After Width: | Height: | Size: 194 KiB |
@ -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
|
@ -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
|
31
docs/diagrams/src/technical-architecture-archive.mmd
Normal file
@ -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
|
@ -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
|
@ -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
|
14
docs/diagrams/src/technical-architecture-cleanup.mmd
Normal file
@ -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
|
@ -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
|
@ -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
|
41
docs/diagrams/src/technical-architecture-create.mmd
Normal file
@ -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
|
@ -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
|
@ -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
|
42
docs/diagrams/src/technical-architecture-restore.mmd
Normal file
@ -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
|
@ -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
|
@ -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
|
46
docs/diagrams/src/technical-architecture-update.mmd
Normal file
@ -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
|
@ -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
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Create via CLI sequence diagram</summary>
|
||||
|
||||
![Create](../diagrams/images/technical-architecture-create-via-cli.png)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Create via UI sequence diagram</summary>
|
||||
|
||||
![Create](../diagrams/images/technical-architecture-create-via-ui.png)
|
||||
|
||||
</details>
|
||||
|
||||
### 🔧 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)
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Update via CLI sequence diagram</summary>
|
||||
### 🔧 Deployment update
|
||||
|
||||
![Update](../diagrams/images/technical-architecture-update-via-cli.png)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Update via UI sequence diagram</summary>
|
||||
|
||||
![Update](../diagrams/images/technical-architecture-update-via-ui.png)
|
||||
|
||||
</details>
|
||||
![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
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Archive via CLI sequence diagram</summary>
|
||||
|
||||
![Archive](../diagrams/images/technical-architecture-archive-via-cli.png)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Archive via UI sequence diagram</summary>
|
||||
|
||||
![Archive](../diagrams/images/technical-architecture-archive-via-ui.png)
|
||||
|
||||
</details>
|
||||
![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"
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Cleanup via CLI sequence diagram</summary>
|
||||
|
||||
![Cleanup](../diagrams/images/technical-architecture-cleanup-via-cli.png)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Cleanup via UI sequence diagram</summary>
|
||||
|
||||
![Cleanup](../diagrams/images/technical-architecture-cleanup-via-ui.png)
|
||||
|
||||
</details>
|
||||
![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
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Restore via CLI sequence diagram</summary>
|
||||
|
||||
![Restore](../diagrams/images/technical-architecture-restore-via-cli.png)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Restore via UI sequence diagram</summary>
|
||||
|
||||
![Restore](../diagrams/images/technical-architecture-restore-via-ui.png)
|
||||
|
||||
</details>
|
||||
![Restore](../diagrams/images/technical-architecture-restore.png)
|
||||
|
||||
## 👨💻👩💻 How we use it
|
||||
|
||||
|