Meshery: [mesheryctl] Create `mesheryctl system check`

Created on 24 Oct 2020  ยท  14Comments  ยท  Source: layer5io/meshery

Child Issue- [mesheryctl] [child] Create mesheryctl exp preflight to verify environment readiness for a Meshery deloyment #2607

Current Behavior
Users are able to run mesheryctl system status to check whether Meshery containers are running or not in their local Docker environment (using docker-compose). Users are not, however, able to perform to other types of checks in-depth:

  1. check - a sophisticated check encompassing current environment and current Meshery deployment health. Should include aspects of system version and of system status.
  2. preflight - for verification of presence of dependencies and overall environment readiness for a Meshery deployment

Desired Behavior
mesheryctl should provide a utility to aid in the troubleshooting of Meshery deployments. This utility will need to run a number of health checks.

Implementation

  1. As a subcommand of the experimental command, create mesheryctl experimental system check.
  2. Invoke the collection of connectivity tests between Meshery server, its adapters, Kubernetes, and any connected add-ons like Grafana, Prometheus, Kubernetes permission verification, and Meshery version check.
  3. This utility should support a --preflight flag like so: mesheryctl system check --preflight, which only runs the Docker and Kubernetes checks.

Mockups

โžœ  ~ mesheryctl system check

Docker
--------------
โˆš Docker is running
โˆš docker-compose is available

Kubernetes API
--------------
โˆš can initialize the client
โˆš can query the Kubernetes API
โˆš has required level of privileges

Kubernetes Version
------------------
โˆš is running the minimum Kubernetes API version
โˆš is running the minimum kubectl version

Meshery Version
---------------
โˆš server is up-to-date (stable-v0.x.x)
โˆš cli is up-to-date (stable-v0.x.x)

Meshery Adapters
---------------
โˆš meshery-istio adapter is reachable and running
โˆš meshery-consul adapter is reachable and running
โˆš meshery-linkerd adapter is reachable and running
.
.
.
โˆš meshery-nginx-sm adapter is reachable and running
โˆš meshery-octarine adapter is reachable and running

Acceptance Tests

  1. _Meshery Preflight_

    • Users may or may not be installing to Docker, so failure of Docker being available should only be shown as a warning.

  1. _Meshery Version_

    • To verify the Meshery server version and the Meshery client version, this check should first attempt to use the /api/server/version endpoint on Meshery server and should use the mesheryctl system version function to check on the client version. It should inform the user if a later version of either server or client is available. It should warn the user if the server and client are not at the same version number.
  2. _Meshery Adapters_

    • To verify availability of Meshery adapters, this check should invoke the /api/mesh/adapter/ping endpoint on Meshery to run an ad-hoc connectivity tests for all known adapters.
    • A user may have disabled some or all of Meshery's adapters. Irrespective, all known adapters should be checked for availability.
  3. _Kubernetes_

    • Meshery requires "ClusterAdmin" role in order to be able to provide and manage service meshes. This check should verify that the Meshery ServiceAccount has the "ClusterAdmin" role assigned.
componenmesheryctl help wanted issuwillfix kinenhancement kinepic languaggo

All 14 comments

worth splitting this into multiple issues so that folks can pick up sections of this?

Yes, most certainly.

With that said I can look into this unless someone else wants to pick this up?

Yes, most assuredly.

Our conversation stopped just shy of me having reach down deep for another adverb.

Meshery Adapters
To verify availability of Meshery adapters, this check should invoke the `` endpoint on Meshery to run an ad-hoc connectivity tests for all known adapters.

What is the endpoint above? Just states ``

Here we are. Adapter ad-hoc ping test: /api/mesh/adapter/ping - https://github.com/layer5io/meshery/blob/master/handlers/mesh_ops_handlers.go#L268

URL Encoded Example:
http://localhost:9081/api/mesh/adapter/ping?adapter=meshery-consul%3A10002 (%3A being a colon)

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.

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

Hey @leecalcote is this open? Can I try this?

@piyushsingariya @leecalcote This seems like a big task. We should consider splitting it up...

@leecalcote @piyushsingariya We can first start with implementing preflight. And check should run preflight plus ping the adapters. How does that sound?

@navendu-pottekkat Agreed, preflight should be implemented first.

@leecalcote @piyushsingariya I have moved the preflight checks to #2607

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hexxdump picture hexxdump  ยท  4Comments

leecalcote picture leecalcote  ยท  3Comments

leecalcote picture leecalcote  ยท  3Comments

leecalcote picture leecalcote  ยท  4Comments

leecalcote picture leecalcote  ยท  4Comments