hashgraph / solo

An opinionated CLI tool to deploy and manage standalone test networks.
Apache License 2.0
25 stars 7 forks source link

Solo: Tool State should be stored in the K8S Cluster with the actual deployment #38

Open nathanklick opened 11 months ago

nathanklick commented 11 months ago

Description

Solo currently stores all CLI argument values used to initialize the last network deployment in the user's home directory under the .solo/solo.config file.

This is brittle and does not scale across multiple engineers and staff members. Additionally, the current configuration file only stores the most recently used CLI options and values. This does not work well when managing multiple deployments which may be configured differently.

State

State of a given deployment should consist of the values which drive deployment decisions made by Solo. Also the state of a given deployment should describe critical properties of the actual deployment, such as the number of consensus nodes deployed and the features enabled.

Certain command line options and other values which should not be include in state are things like logging levels of the Solo tool or other user specific values. Additionally, values which can be directly derived from the actual K8S deployment and manifests such as Helm values files should not be included in the state.

Storage

The state of a given deployment should be stored in the Kubernetes cluster alongside the actual deployment and within the deployment's namespace. The state may be stored a K8S configmap, secrets, or instance of a CRD.

Locking

The operations for a given deployment must be limited to a single engineer/user at a time. Therefore, locking should be implemented using the K8S cluster and deployment namespace. The lock should be implemented as Custom Resource Definition (CRD) and actual locks created using versioned instances of the CRD.

### Tasks
- [ ] https://github.com/hashgraph/solo/issues/43
leninmehedy commented 8 months ago
leninmehedy commented 2 months ago

Here is the Notion doc: https://www.notion.so/swirldslabs/Multi-user-and-Multi-cluster-Support-Solo-State-and-Lease-Mechanism-DRAFT-8b013e8befe04e3daffc889619c851c1?pvs=4