Replies: 14 comments 43 replies
-
@kalantar This is an excellent summary. I'm wondering if we can distill the above down to an MVP version (and maximize reuse of the base CLI commands) as follows.
gen is a subcommand you get for free from the base CLI. The specific template for k8s might need to be supplied in the kubectl plugin layer what you get for free from the base CLI you now get deletion for free using the above functionality as follows To summarize, the only additional command we need to implement for
@huang195 FYI. |
Beta Was this translation helpful? Give feedback.
-
If I remember correctly, we said
- we can defer most of the optional arguments till later
- `--last` should be omitted for now in favor of `v0.7` style.
…On Mon, Nov 8, 2021 at 3:57 PM Srinivasan Parthasarathy < ***@***.***> wrote:
Also... just so we remember, we don't need ginkgo / env-tests for this
type of functionality. If we structure the plugin appropriately, we should
be able to get away with unit testing with fake clients as in this example
<https://github.com/kubernetes/client-go/blob/master/examples/fake-client/main_test.go>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1046 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5DHZIQJG7JAKEXBHOSX2DULA2SDANCNFSM5HTST4WA>
.
|
Beta Was this translation helpful? Give feedback.
-
I’m seeing an apparent dichotomy in approaches. These are driven by contending demands: the desire to provide a simple, natural user experience and the desire to minimize the develop/test effort. In concrete terms we see this tradeoff in how we think, for example, about the The most natural extension to Kubernetes would be that However, this approach requires additional work (distinguishing between local and remote) and therefore additional testing. An alternative approach (described in the comments), is to This alternative requires additional work/knowledge on the part of the user who must distinguish the difference between local/remote experiments and must have some notion of implementation: I should fetch it and query; if I want an update, I should fetch it again and so on. It is not the “natural” Kubernetes approach. I’m not sure how to think long term. Should we consider the first approach as the ideal approach BUT implement the second as a way to make faster progress. (Indeed, if we find that it doesn’t confuse users we might even stick with it). The full implementation can come over time. This would be similar to the way we are thinking about installing iter8: starting with Or should we really think about a model that fetches (and caches) and operates locally. How would we expect this to work in a non-kubernetes environment such as edge? If the first approach is the one that makes sense there maybe it makes sense here too. |
Beta Was this translation helpful? Give feedback.
-
A few comments from today's playback. The difference between
and if user wants to run the experiment remotely, it would be
The exact syntax might be wrong, but hopefully you get the point. I think it would be less confusing to users when we make the Moreover, the whole point of providing a When I was looking at Tekton catalog a few weeks ago, tools are packaged in units of container images, and they have example yaml files that show users how to run these images as part of a Tekton task. I wonder if we're trying to roll too much "features" into iter8 command line. |
Beta Was this translation helpful? Give feedback.
-
During the previous playback on That's how we ended up with the commands we saw during the playback In addition run and runr, there is also assert and assertr, gen and genr. Do you have thoughts on what the remote versions for these commands need to look like? In particular, if you could provide an end-to-end set of commands to run a specific tutorial, it might help clarify further. For example, how should the user write the simplest possible load testing experiment inside Kubernetes, and assert SLOs, and generate a report out of it? If they created a few experiments, how can day delete a specific one of them? Conceptually, with the kubectl plugin user gets the ability to run and inspect experiments locally, as well as remotely. In terms of the commands, what should the end-to-end experiment interaction look like (not just for firing remote experiments, but also listing, debugging, reporting, asserting and deleting them)? This is design question for the plugin. |
Beta Was this translation helpful? Give feedback.
-
Let me make sure I understand these subcommands correctly first.
If this is somewhat along the line of what is being implemented, to not having to implement a separate
The [name of the secret] could be obtained by some
so users don't have to find out what is the corresponding secret name of the last experiment. Similarly, |
Beta Was this translation helpful? Give feedback.
-
From the perspective of the generic ### list all remote experiments (k stands for k8s)
kubectl iter8 k get
### run an experiment locally
kubectl iter8 run
### run an experiment remotely
kubectl iter8 k run
### assert a local experiment
kubectl iter8 assert -c ...
### assert a remote experiment
kubectl iter8 k assert -c ...
### assert a remote experiment with timeout
kubectl iter8 k assert -c completed,nofailure,slos -t 5m
### generate a report from a local experiment
kubectl iter8 gen
### generate a report from a remote experiment
kubectl iter8 k gen
### delete a remote experiment
kubectl iter8 k delete In other words, every remote command is now a subcommand of |
Beta Was this translation helpful? Give feedback.
-
I wonder if a config file ( |
Beta Was this translation helpful? Give feedback.
-
A few thoughts. In trying to determine the commands, I think the user should not be aware of underlying implementation. Today, we may implement It is hard to auto-magically determine if a command should be local or remote. In principle, one might first look to see if there is a k8s context, then figure out if there is a remote experiment otherwise assume local. However, this is heuristic and may not match what the user intends. I think the user does think about local vs remote. I think it is ok to capture this in the commands. Remote execution at least has 2 additional requirements: list and delete. I also don't like We should not assume that since the current implementation adds all the k8s specific options to every command that this is a requirement. There is a lot I don't know here yet. For example, I thought i was going to get the commands displayed by group (local/remote) and I don't. Let's not make the assumption that this can't be fixed. |
Beta Was this translation helpful? Give feedback.
-
So kubectl plugin is basically an executable file named in a certain way placed in the execution path. I wonder if we can make
it's a
it's a This means we need to be able to tell within the |
Beta Was this translation helpful? Give feedback.
-
I think |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
No. I suggest this because we are writing a |
Beta Was this translation helpful? Give feedback.
-
While I agree they are meaningless, I also think that it is |
Beta Was this translation helpful? Give feedback.
-
For discussion of the CLI needed for a kubectl plugin for iter8. An iter8 CLI can be used to run experiments locally (as a local process). The kubectl plugin extends this function to include the ability to run experiments in a container in a kubernetes cluster. In particular, we envision it running in a kuberneties Job.
Support is needed throughout the experiment lifecycle. Some of these are common to local experiments, others unique to remote (kubernetes) experiments. A design goal is to use common commands where ever possible.
The proposed commands are intentionally simple. Defaults are assumed and minimal options are expressed. This represents the simplest form of the commands. Extensions can be considered in the future. A few are mentioned at the end.
A suggested priority for each command is documented. If not specified, it is high.
1. Authoring Experiments
[kubectl] iter8 verify
- verifies that the experiment (defined inexperiment.yaml
) is valid. In particular, that it is compatible with any expressediter8version
. It is expected that an implementation will start simple (and incomplete) and be developed over time. medium priority[kubectl] iter8 lint
- Implements the verification done byiter8 verify
) and suggests best practices that might improve an experiment. For example, it is valid to have multipleassess-version
tasks. However, only the last such task will be used by Iter8.iter8 lint
would identify multiple tasks as inconsistent with best practice. As withiter8 verify
this is expected start simple and be extended over time. low priority2. Running Experiments
[kubectl] iter8 run
- Runs the experiment (defined inexperiment.yaml
) locally.kubectl iter8 generate [-t target]
- Generates a manifest (yaml string) defining the Kubernetes resources that should be deployed to run the experiment (defined inexperiment.yaml
) in the cluster. To generate and deploy an experiment, use :kubectl iter8 generate | kubectl apply -f -
.The -t option identifies a target of the generation. By default, this is standard kubernetes. An alternative allows for objects specific to Code Engine.
3. Observing Experiments
kubectl get
- list experiments found in the current Kubernetes context. This list is displayed in tabular format with the following headers:Fields
COMPLETED
,FAILED
, andWINNER FOUND
are all boolean. If no winner is found, theWINNER
is empty.medium priority
[kubectl] iter8 report [-o output_format]
- generates information about the current state of the most recent experiment (in the current Kubernetes context). The set of valid output formats, the default format, and the details of each is TBD.[kubectl] iter8 assert [-t timeout] (-c condition)+
- Evaluates the specified conditions against the most recent experiment (in the current Kubernetes context). Valid conditions are:completed
,failed
,winnerfound
, andwinner=<label>
.kubectl iter8 manifest
- retrieves the yaml manifest of all kubernetes objects related to the most recent experiment (in the current Kubernetes context).kubectl iter8 logs
- display the logs for the execution of the most recent experiment (in the current Kubernetes context). medium priority4. Deleting Experiments
To delete the Kubernetes objects related to an experiment, use:
kubectl iter8 manifest | kubectl delete -f -
Extensions
Where commands assume an experiment is defined in a (local) file
experiment.yaml
, we may want to add an option:-f <filename|URL>
to allow an arbitrary file either local or accessible via HTTP.Where an assumption of the latest experiment is made, we may want to allow the option to specify the experiment name.
A global option
-v
might be offered to control output verbosity.Beta Was this translation helpful? Give feedback.
All reactions