Open invidian opened 4 years ago
I do agree we should revise the naming we use but I'm not sure about "stack". Some thoughts:
I always try to stick to the way I naturally think about the problem when trying to figure out the correct data model. For example:
"I want a cluster with components X and Y deployed on the AWS platform".
From the above, I can extract 3 key terms:
Now, the question is how they relate to one another:
"My cluster has 2 components."
The above hints at a one-to-many relationship between "cluster" and "component", namely a cluster contains one or more components.
"My cluster runs on AWS."
This one is a bit trickier for figuring out the data model as it's not so obvious what "runs on" mean, however since we don't control the AWS layer I would argue that the platform (AWS/Packet etc.) is a dimension of "cluster", i.e. this cluster is of type AWS (just like "this cluster is of size 3"). To demonstrate the "wrong" direction, I wouldn't try to say "my AWS has 2 clusters" :confused:
To help with solving #603, we should define how the lokoctl application flow should look like and then refactor existing code to match that flow.
I would imagine something like this:
Load configuration ~files~ -
lokoctl
tasks are driven by configuration and we aim for that to be the source of the truth for the actions (e.g. #142). This means regardless of the task, we should always try to read the configuration.Notes:
With configuration loaded, we should validate it, to ensure we work on the valid data (#23). This should also give user a quick feedback if there are any issues with the configuration.
Notes:
With valid configuration, CLI sub-command will be controlling which action to execute. As our execution flow is driven by the configuration, action methods should be associated with the configuration itself.
Notes:
component apply
sub-command.Extra notes:
configuration
effectively means cluster (+ components), so perhaps we could choose some more specific term for it. Perhapsstack
? See also #364.