Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make install operation compliant with SMP protos #185

Open
DelusionalOptimist opened this issue Aug 5, 2021 · 9 comments
Open

make install operation compliant with SMP protos #185

DelusionalOptimist opened this issue Aug 5, 2021 · 9 comments
Labels
area/lifecycle Lifecycle management (install, uninstall, configure) related issue/willfix This will be worked on kind/enhancement New feature or request

Comments

@DelusionalOptimist
Copy link
Contributor

Background
We're trying to enforce SMP protos wherever possible in all the adapters so as to ensure there is only a single source of truth. This is really helpful for maintaining multiple clients efficiently (i.e Meshery UI and mesheryctl).

Current Behavior
The adapter has 2 keys specifying Consul installation operation.

Consul182DemoOperation = "consul_182_demo"
Consul191DemoOperation = "consul_191_demo"

These are not compliant with SMP protos.

Desired Behavior
We should prolly modify this operation name to be in accordance with Consul's SMP name https://github.com/service-mesh-performance/service-mesh-performance/blob/1de8c93d8cba4ba8c1120fe09b7bf6ce0aa48c83/spec/service_mesh.pb.go#L33

@DelusionalOptimist DelusionalOptimist added kind/enhancement New feature or request area/lifecycle Lifecycle management (install, uninstall, configure) related labels Aug 5, 2021
@DelusionalOptimist
Copy link
Contributor Author

@mgfeller thoughts?

@mgfeller
Copy link
Contributor

@DelusionalOptimist I had a look (finally) and compared to the Linkerd code. I see the point of using SMP protos, of course.
Is there a design document or similar that documents how adapter.Operation and specifically its fields are intended to be used?

In the Consul adapter, templates and AdditionalProperties are different for each version. How would that be handled if following the Linkerd code example? I still think it should be possible to specify these details per version, imho it cannot be expected that these are in general the same for all versions of a specific service mesh, or that all service meshes follow this assumption.

From that example, I deduce that there should only be one operation to install different service mesh versions. Is my understanding correct?

@DelusionalOptimist
Copy link
Contributor Author

DelusionalOptimist commented Aug 23, 2021

@DelusionalOptimist I had a look (finally) and compared to the Linkerd code. I see the point of using SMP protos, of course.
Is there a design document or similar that documents how adapter.Operation and specifically its fields are intended to be used?

@mgfeller there is the meshery-adapters spec (look whom I'm pointing to it XD) but I doubt its depth covers this.

In the Consul adapter, templates and AdditionalProperties are different for each version. How would that be handled if following the Linkerd code example? I still think it should be possible to specify these details per version, imho it cannot be expected that these are in general the same for all versions of a specific service mesh, or that all service meshes follow this assumption.

Hmmm... I see versions are hard coded. There is no way to install a version other than the two specified. We'll also need to support installing consul based on GH release tag.

I think we're mainly using additionalProperties for storing info on helm charts to use? If 1.8.2 is a special case, instead of storing the chart in a different template, can we fetch the chart from the helm repo and override some values (values.yaml) on the fly, i.e before applying it? (meshkit supports this I think)

From that example, I deduce that there should only be one operation to install different service mesh versions. Is my understanding correct?

In nutshell, yes. We shouldn't be hard coding versions anywhere.

ICYMI, in current state of adapters, OSM, Istio and some others, the installation operation supports supplying a custom version. However, this isn't still exposed to users and working on meshops to for this is not what we're planning to do right now. For now, we fetch the latest release tag from github and install that version.
Also, we're moving away from using their CLIs as the primary method. Instead, we fetch the version specific chart from their helm repo and apply it to install the service mesh.
We plan to present users the ability to specify their service mesh version using patterns.
Let's try to bring in these abilities in this adapter as well as a step towards supporting service mesh patterns for Consul?

@mgfeller
Copy link
Contributor

@DelusionalOptimist it got quite a bit clearer after today's meeting 👍

v1.8.2 is not special, when I upgraded the adapter to support this version, there was no meshery-adapter-library, no meshkit, and thus no Helm-support in Meshery. v1.9.1 was implement when all of that was in place, and I didn't prioritize changing the installation method of v1.8.2 to Helm. Current Consul version is 1.10.

Namespace is handled explicitly and merged into templates on the fly, this was necessary due to how namespaces were used in the chart/manifest (as far as I can remember), maybe this has changed by now, I haven't had a chance to look at this.

I still think it cannot be excluded that we need to be able to set different variable values for different versions eventually, or override our default values, in a good way of course.

Also, it would be nice to have more detailed description of the operation attributes, how they are intended to be used, and the assumptions behind them. Note to self as well, of course 😄

As discussed today, I'll have a look at the Istio adapter to gain more insight (might take a while, though). Of course, service mesh pattern support is desirable also for Consul.

Anyone is of course welcome to pick this issue.

@mgfeller
Copy link
Contributor

mgfeller commented Aug 25, 2021

Actually, some of my concerns from yesterday are addressed in this adapter, namely testing of new releases that are downloaded on the fly. There are BATS end-to-end tests here that can be leveraged to test e.g. the 2 latest releases. The workflow could be triggered by a cron job and run daily.

// @DelusionalOptimist @leecalcote @sayantan1413 @Utkarsh-pro

@DelusionalOptimist
Copy link
Contributor Author

@DelusionalOptimist it got quite a bit clearer after today's meeting

Nice!! Thanks for being on the call 🙌

Also, it would be nice to have more detailed description of the operation attributes, how they are
intended to be used, and the assumptions behind them. Note to self as well, of course smile

Yes it would. I'll make sure we have a section regarding this in the spec 😄

As discussed today, I'll have a look at the Istio adapter to gain more insight (might take a while, though). Of course, service mesh pattern support is desirable also for Consul.

Sounds good : )

@DelusionalOptimist
Copy link
Contributor Author

Actually, some of my concerns from yesterday are addressed in this adapter, namely testing of new releases that are downloaded on the fly. There are BATS end-to-end tests here that can be leveraged to test e.g. the 2 latest releases. The workflow could be triggered by a cron job and run daily.

Yes @mgfeller, I agree. Testing adapters is something we need to lay more emphasis on as we add new
functionality.

Other than running tests daily, one thing to do at build time might be modifying the workflow which generates components to also take care of running tests to ensure that any of those generated components are not faulty and if so, they're not committed.

Other than this we would also need to be able to validate that the components for older versions, added in bulk in PRs like meshery/meshery-istio#266 are accurate.

A question though. Will we also need to validate the components that the user fetches during run-time? If so, would the mechanism of validation will be testing using BATS in that case as well?

@mgfeller
Copy link
Contributor

@DelusionalOptimist I think some sort of validation would be very useful, not quite sure which ones, though. By "components the user fetches during runtime" do you refer to service mesh versions that have not been baked into the adapter at build time?

BATS deploys Consul mesh and applications to a cluster (KinD in the GH workflow) so that would not be suitable for runtime checks.

If these BATS tests are run daily and test the latest versions (two, for instance, or all since the last time the adapter was built) then there is potentially only a small window where a user could fetch a newer version that hasn't been tested yet.

@DelusionalOptimist
Copy link
Contributor Author

By "components the user fetches during runtime" do you refer to service mesh versions that have not been baked into the adapter at build time?

Yes, precisely.

BATS deploys Consul mesh and applications to a cluster (KinD in the GH workflow) so that would not be suitable for runtime checks.

If these BATS tests are run daily and test the latest versions (two, for instance, or all since the last time the adapter was built) then there is potentially only a small window where a user could fetch a newer version that hasn't been tested yet.

Ooh... yes, makes much sense ✔️

@saurabh100ni saurabh100ni added the issue/stale Issue has not had any activity for an extended period of time label Oct 19, 2023
@saurabh100ni saurabh100ni added issue/willfix This will be worked on and removed issue/stale Issue has not had any activity for an extended period of time labels Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/lifecycle Lifecycle management (install, uninstall, configure) related issue/willfix This will be worked on kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants