Contributing to Models Quick Start

Meshery Models are a way to represent the architecture of a system or application. Models are defined in JSON and can be used to visualize the components and relationships between them. This guide will walk you through the process of creating a new model.

Meshery Components are the building blocks of a model. Each component represents a different part of the system or application. Components can be anything from a database to a microservice to a server. Relationships define how components interact with each other. For example, a database component might have a relationship with a microservice component that represents the microservice’s dependency on the database.

Creating your first Meshery Model

The following instructions are a no-fluff guide to creating your own Meshery Models quickly. For more detailed information, see the Contributing to Models documentation.

Prerequisites

  1. Fork the meshery/meshery repository.
  2. Install the Meshery CLI by following the installation instructions.

Create a Model Definition

  1. In your meshery/meshery fork, open the template [spreadsheet](https://docs.google.com/spreadsheets/d/19JEpqvHrG8UL-Bc-An9UIcubf1NVhlfnQSN1TD7JOZ4/edit?gid=1308482975#gid=1308482975).
    • Or, optionally, use CSVs by navigating to mesheryctl/templates/templates-csvs directory.
  2. Edit the models sheet file to include your model definition.
    1. [Annotation-only Components] For models that contain annotation components, edit the components sheet file to include your component definitions.
  3. Generate your neww using a Meshery Server (optionally, use the Meshery Playground). Click the "Generate" button after navigating to Meshery UI --> Settings --> Registry.
  4. Or use Meshery CLI Or, opttionally, use Meshery CLI by executing the following command:mesheryctl registry generate --directory templates-csvs Review the generated components inside of the server/meshmodel directory under your model's name.
  5. Verify that your model is displayed in the Meshery UI under Settings->Registry->Models.

Congratulations! You have successfully created a new model.

Contributing a Model Definition

  1. Fork the meshery/meshery.io repository.
  2. Create a new branch in your fork of the meshery/meshery.io repository.
  3. Add your model definition to the collections/_models directory.
  4. Create a pull request to the meshery/meshery.io repository.
  5. Once your pull request is merged, your model will be available in the next Meshery release.

Next Steps

Contributing to Models

See the full Contributing to Models documentation for a detailed understanding of models and the many ways in which you can customize them.

We encourage you to get involved in the development of Meshery Models and to share your feedback.

Meshery Models are extensible

Meshery Models are designed to be extensible, allowing you to define new components as needed. If you have an idea for a new component, please create one and share it with the Meshery community.

Suggested Reading