docs/static/v0.8/guides/configuration-management/creating-models/index.html
Meshery offers two primary ways to bring models into your system: Create and Import.
This section walks you through the Create workflow — perfect for users who want full control over naming, styling, and categorizing their models while sourcing CRDs from GitHub or ArtifactHub.
Tip: If you don’t have any files yet, start with Create. You can always export or re-import your model later.
Meshery UI
The URL Create feature allows you to create models in Meshery by providing URLs to source repositories or package registries. Here's how to use it:
Go to the Registry section in the Meshery UI. Click the create button to start creating a new model.
Enter the following names for your model:
cert-managerCert ManagerSelect the appropriate Category and Subcategory from the dropdowns. If your model doesn't match any available category, choose Uncategorized to ensure it can be easily located later.
Customize your model's appearance:
Note: If you don't provide custom styling, Meshery's default values will be used.
Specify the source for your model by entering one of the following URL types:
git://github.com/[organization]/[repository]/[branch]/path/to/crdsgit://github.com/cert-manager/cert-manager/master/deploy/crdshttps://artifacthub.io/packages/search?ts_query_web={model-name}Check the sourceURL column in the Meshery Integration Sheet and try one of the listed sources.
When a model is marked for visual annotation only, it means the model will be used purely for visualization and diagramming purposes within Meshery's interface, rather than for actual infrastructure management.
Review your model details. If everything looks good, click "Generate" to create your model.
Meshery will process the provided source URL, extract the necessary information, and create the model based on the specified details.
If you want to make any changes before generation, you can go back to the previous steps using the navigation buttons and edit the details as needed.
Once the model is successfully generated, a confirmation message will appear. You'll be able to view the model along with its components and relationships directly in the Registry page.
If any issues occur, Meshery will display an error message detailing what went wrong so you can correct it and try again.
A notification will also appear in the Notification Center to confirm whether the operation succeeded or failed, providing additional context if needed.
Once a model is generated, it cannot be deleted from the Meshery UI. If you no longer wish to use it, you may mark it as ignored instead. mesheryctl
Meshery Server is not required to generate models. The Meshery CLI can be used to generate models. Model and Component generation logic is MeshKit. mesheryctl and Meshery Server both utilize MeshKit’s libraries for ongoing programmatic generation of models and components.
Using CSV
Inside your forked Meshery repository, you'll find the templates-csvs directory containing three essential CSV files:
` mesheryctl/templates/templates-csvs/
├── models.csv # Define model metadata and core properties
├── components.csv # Specify individual components and their characteristics
└── relationships.csv # Define how components interact and connect
`
Creating your model involves modifying these CSV files to match your specific requirements. When making changes, you have two valuable references at your disposal: the existing entries in the CSV files serve as practical examples, while the integration spreadsheet provides comprehensive documentation of all possible fields and their purposes.
Once you've customized your CSV files, you can generate your model using a single command. Ensure you're in the root directory of your forked Meshery repository, as this maintains the correct file path relationships:
mesheryctl registry generate --directory templates-csvs --model "YOUR_MODEL_NAME"
After successful generation, your model's files will be created in the Meshery server's model directory. You can find these files at meshery/server/meshmodel/[YOUR_MODEL_NAME]/. Take time to review these generated files to ensure they accurately reflect your intended model structure.
If you encounter issues during the generation process, you can use these diagnostic approaches to identify and resolve problems:
~/.meshery/logs/registry/ to understand specific generation issues.Using Integration Spreadsheet
Before you begin working with the Integration Spreadsheet, you'll need to complete several important setup steps:
Start by creating your own copy of the Meshery Integration Sheet:
Set up your Google Cloud environment with these steps:
Set up your credentials in your local environment:
base64 -w 0 /path/to/your-service-account-creds.json [For Linux users]
base64 -b 0 -i /path/to/your-service-account-creds.json [For MacOS users]
echo 'export SHEET_CRED="paste-base64-output-here"' >> ~/.bashrc
source ~/.bashrc
Once your environment is set up, you can begin working with the spreadsheet:
The integration spreadsheet contains existing model definitions that serve as practical examples. You can either create a new entry following the patterns in existing rows, or practice by generating an existing model first to understand the process. Each row represents a complete model definition, use them as reference for creating a new row.
Use mesheryctl to generate your models. Make sure to run the command inside your forked meshery/meshery repo
mesheryctl registry generate --spreadsheet-id "YOUR_SPREADSHEET_ID" --spreadsheet-cred "$SHEET_CRED" --model "YOUR_MODEL_NAME"
The command will:
~/.meshery/logs/registry/The model will be generated in meshery/server/meshmodels/[YOUR_MODEL_NAME]
Meshery CLI has a set of commands that pertain to the lifecycle management of models:
mesheryctl registry - interact with and update spreadsheetsmesheryctl models - interact with and update Meshery Servermesheryctl component - interact with and update Meshery Servermesheryctl relationships - interact with and update Meshery Server