pseudo code pas tres beau
This commit is contained in:
parent
4ab6585792
commit
5280829d60
@ -11,24 +11,78 @@ It then procedes to execute the right functions for the service.
|
|||||||
The deployer will call bash scripts specific to the service, as well as functions from libraries specific to setting the nginx configuration, the vpn, ssl certification, etc.
|
The deployer will call bash scripts specific to the service, as well as functions from libraries specific to setting the nginx configuration, the vpn, ssl certification, etc.
|
||||||
|
|
||||||
# Description
|
# Description
|
||||||
main.cpp
|
deploy_service(service)
|
||||||
- reads the instructions
|
{
|
||||||
- determines if the service is on the server
|
- determines if the service is on this server
|
||||||
if it is:
|
if it is:
|
||||||
- creates directories (secret, data, http) if necessary
|
- checks the environment
|
||||||
- calls the bash scripts specific to the service if they exist (deploy_as)
|
- creates directories (secret, data, http) if necessary
|
||||||
- calls the right deployment functions according to the instructions, from the deployment libraries
|
- calls the bash scripts specific to the service if they exist (deploy_as)
|
||||||
- calls the DNS service ?
|
- creates user and .env variables if necessary
|
||||||
- user creation ?
|
- calls the deployment functions from the libraries
|
||||||
- environment variables creation ?
|
}
|
||||||
|
|
||||||
Deployment libraries :
|
remove_service(service) //should there be some kind of less absolute removal?
|
||||||
- nginx configuration
|
{
|
||||||
|
- determines if the service is on this server
|
||||||
|
if it is:
|
||||||
|
- calls the removing bash scripts specific to the service if they exist
|
||||||
|
- calls the removing functions from the libraries
|
||||||
|
- deletes .env variables
|
||||||
|
- deletes directories
|
||||||
|
- deletes user
|
||||||
|
- removes from .csv //should this get done before by the sysadmin? but how to check that something was here if it has been removed ?
|
||||||
|
}
|
||||||
|
|
||||||
|
**main.cpp**
|
||||||
|
- reads the instructions
|
||||||
|
If deploy all:
|
||||||
|
- tests system requirements (/data/mounted)
|
||||||
|
- prepares Nginx
|
||||||
|
- prepares Docker
|
||||||
|
- prepares .env
|
||||||
|
for each service:
|
||||||
|
- deploy_service(service)
|
||||||
|
- cleans
|
||||||
|
else if deploy one service:
|
||||||
|
- deploy_service(service)
|
||||||
|
else if remove all:
|
||||||
|
for each service:
|
||||||
|
- remove_service(service)
|
||||||
|
- stop Docker
|
||||||
|
- stop wireguard
|
||||||
|
- stop Nginx
|
||||||
|
- cleans .env
|
||||||
|
- cleans
|
||||||
|
else if remove one service:
|
||||||
|
- remove_service(service)
|
||||||
|
|
||||||
|
**plugins/static libraries**
|
||||||
|
- nginx
|
||||||
preparation
|
preparation
|
||||||
deployment
|
deployment
|
||||||
reload
|
deployment
|
||||||
|
testing
|
||||||
|
cleaning
|
||||||
|
restart
|
||||||
|
restart
|
||||||
|
testing
|
||||||
|
cleaning
|
||||||
|
stop
|
||||||
- wireguard
|
- wireguard
|
||||||
- encryption
|
deploy (with and without namespace)
|
||||||
|
remove
|
||||||
|
- encryption
|
||||||
|
deploy
|
||||||
|
remove
|
||||||
- docker
|
- docker
|
||||||
|
preparation
|
||||||
|
deploy
|
||||||
|
remove
|
||||||
|
stop
|
||||||
|
clean
|
||||||
|
|
||||||
|
**functions/imports if too long**
|
||||||
|
- user creation
|
||||||
|
- environment variables handling
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user