meshery / meshery-nighthawk

Distributed performance management
https://meshery.io
Apache License 2.0
31 stars 20 forks source link

Define new Meshery Nighthawk Model, Components, and Relationships #27

Closed leecalcote closed 6 months ago

leecalcote commented 9 months ago

Prologue

Meshery Models is the unit of packaging for infrastructure components (and their capabilities) and relationships.

Current Behavior

This adapter does not speak MeshOpsv2. In other words, it does not contain a set of components/capabilities to register with a Meshery Server.

Desired Behavior

  1. Each Model version will contain any number of components, icons, relationships, policies and so on.
  2. Model package name: meshery-nighthawk (already defined in build/model_metadata.json)
  3. ...

Implementation

  1. A component to codify the adapters capability for running Performance Tests.
  2. A component for a Performance Profile?
  3. A relationship between Performance Profile and any Kubernetes Service, Kubernetes Endpoint.... any network endpoint
  4. ...?

Acceptance Tests

  1. Upon connection to Meshery Server, this adapter should register its Model and each of its Model versions.

Contributor Guides and Resources

leecalcote commented 9 months ago

Assisted by @MUzairS15 with initial Model, Component, and Relationship definitions, this issue is largely earmarked for @gyohuangxin

gyohuangxin commented 9 months ago

@leecalcote @MUzairS15 Can you give some examples of the other adaptors' Model, so that I can understand it well?

MUzairS15 commented 9 months ago

@gyohuangxin Istio/Linkerd adapters are good examples to look upon. https://github.com/meshery/meshery-istio/tree/master/templates/meshmodel/components

hamza-mohd commented 8 months ago

FYI, here is the current status of a build from master:

make run
go mod tidy; \
    DEBUG=true GOPROXY=direct GOSUMDB=off go run main.go
go: downloading github.com/google/uuid v1.6.0
# github.com/meshery/meshery-nighthawk/build
build/config.go:24:31: undefined: adapter.MeshModelConfig
build/config.go:67:36: undefined: adapter.Manifests
# github.com/meshery/meshery-nighthawk/nighthawk
nighthawk/nighthawk.go:36:73: undefined: adapter.OAMRequest
make: *** [run] Error 1

I believe that all references to "OAM" are to go away.

MUzairS15 commented 8 months ago

https://github.com/meshery/meshery-nighthawk/pull/23 The adapter-library upgrade to v1 broke the master branch.

Actually the adapter-library releases are broken, v1.* releases are actually old than the v0.6.. and 0.7 releases.

MUzairS15 commented 8 months ago

I will fix the adapter-releases and revert the PR#23

leecalcote commented 8 months ago

I released a new version of the adapter library (v0.7.2) with a helm package upgrade.

I built, tagged, and pushed the first image of the adapter to docker hub.

I'm adding support for the adapter in Meshery UI...

leecalcote commented 8 months ago

https://github.com/meshery/meshery/pull/10361

gyohuangxin commented 8 months ago

@leecalcote @MUzairS15 I tried to understand the codebase, but I have a question. For every adapter, it always reads and creates component definitions from a URL: https://github.com/meshery/meshery-nighthawk/blob/f9ce9271795e55e177216bfa4511a436d1e127ef/main.go#L172

For meshery-istio, the default url is https://raw.githubusercontent.com/istio/istio/" + LatestVersion + "/manifests/charts/base/crds/crd-all.gen.yaml, which contains all Istio related CRDs.

For meshery-nighthawk, the default url is https://github.com/meshery/meshery-nighthawk/blob/f9ce9271795e55e177216bfa4511a436d1e127ef/build/config.go#L68, it doesn't exist yet.

So we should create a yaml file named /manifests/charts/crds.yaml and create CustomResourceDefinitions in the file. Then we can run make run to generate files named like xxx_meshmodel.json in /templates/meshmodel/components/v0.7.0/, is my understanding correct?

If yes, we don't have any definitions about Nighthawk currently, the component I can think of so far is the CustomResourceDefinition of Performance Profile, we can start from it. What do you think?

stale[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 6 months ago

This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue.