From e2aa60189c8b46a2236f9e002f237078bce1cb93 Mon Sep 17 00:00:00 2001 From: Matias Date: Sun, 17 Feb 2019 10:48:30 -0300 Subject: [PATCH] Adding module documentation --- server/README.md | 62 +++++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/server/README.md b/server/README.md index 6607a6cfd..6d5616a45 100644 --- a/server/README.md +++ b/server/README.md @@ -1,33 +1,51 @@ +# Superalgos Operations Server Module -## AA Operations Server +The Superalgos Operations Server manages the clone life cycle inside the **Superalgos Ecosystem**. +The main function includes storing the metadata information of the clones and handling the interaction with the orchestration software which is [Kubernetes](https://Kubernetes.io). -Server side functions support the business rules for the module. +# Execution sequence +The operations module (or Clones) integrates with other system modules to enable secure and encapsulated execution. On the clone creation process the encapsulation is achieved by deploying a **Cloud** Image on a **Kubernates** container. +- [Keys](https://github.com/Superalgos/KeyVaultModule): Manages the signature of the messages sent to the external exchanges. +- [Teams](https://github.com/Superalgos/TeamsModule): Provide team and bot authorization. +- [Cloud](https://github.com/Superalgos/AACloud): Receive the execution parameters and runs an independent instance of the platform. -## Available Methods +```mermaid +sequenceDiagram +User ->> Keys: createKey +User ->> Keys: getAvailableKeys +User ->> Clones: createClone +Clones ->> Keys: getAvailableKeys +Clones ->> Keys: authorizeCloneToUseKey +Keys ->> Clones: geCloneTeamAndBot +Keys ->> Teams: getTeamMembers +Keys -->> Clones: authorizeCloneToUseKey +Clones ->> Cloud: createClone +Cloud ->> Keys: signTransaction +Cloud ->> Clones: updateExection -# Active clones List -- List active personal clones -- List active team clones (future release) +Note left of Cloud: signTransaction and
updateExection are
called n number
of times +User ->> Clones: getCloneExecutionInformation +Cloud ->> Clones: cloneExecutionComplete +User ->> Clones: deleteClone +Clones ->> Keys: releaseKey +``` -# History clone List -- List history personal clones -- List history team clones (future release) +> Details about all available methods can be found at the GraphQL endpoint. -# Get clone by id -- Get existing clones corresponding to the clone ids passed by parameter and returns: - - Clone id - - Team id - - Bot id +## List active clones +- List the clones created by the user that are currently running on the virtual machine. +- List the running clones of the teams who the user is authorized to manage (future release) -# Add new clones: - Receive a list of clones, create each of them and return the newly created clone. +## List history clones +- List the clones owned by the user that were completed and deleted +- List the finalised clones of the teams who the user is authorized to manage (future release) + +## Add new clones A clone can be created: - - As a personal clone (run from the personal user folder) - - As a team clone (on competitions, run from the team folder) + - As a personal clone (the source code will be the one on the personal user folder) + - As a team clone (the source code will be the one on the main team folder) Who can create each type: - Personal clones are managed by the user who creates it, not visible for any other user. - - Team clones are managed by any ADMIN type team member (on the team member role attribute), - and all team admins will see it listed. + - Team clones are managed by any ADMIN type team member (on the team member role attribute), and all team admins will see it listed. - - Events Module: - At enroll time, the clone is created and the authId is sent +> Written with [StackEdit](https://stackedit.io/).