Generating Models
Generating Models annotation and existing custom resource definition (CRD) into Meshery. The platform supports generation from URL, csv you can generate models using either the Meshery CLI or the Meshery UI.
Generate Models Using Meshery CLI
Step 1: Install Meshery CLI
Before you can use the Meshery CLI to generate a Model, you must first install it. You can install Meshery CLI by following the instructions.
Step 2: Generate the Model
Model can generated in 2 different format URL, CSV
. A template file is required that contains some required properties: Registrant, Model name, Model DisplayName, Category. The template file is only required when you use URL for generation of model from a crd. This command enable users to import their new models from CRD and existing Meshery Model
mesheryctl model generate -f [file/url]
The supported registrant for generating from URL is github
and artifacthub
.The URL format must be in this order.
Registrant Artifacthub
:
- https://artifacthub.io/packages/search?ts_query_web={ model-name }
- https://istio-release.storage.googleapis.com/charts/base-1.19.0-alpha.1.tgz&sa=D&source=editors&ust=1726839249773905&usg=AOvVaw0j88gkt6FOS1LLSRCYq95X
Registrant Github
:
- git:://github.com/cert-manager/cert-manager/master/deploy/crds
- https://github.com/UffizziCloud/uffizzi_controller/releases/download/uffizzi-controller-2.0.1/uffizzi-controller-2.0.1.tgz&sa=D&source=editors&ust=1726839320133140&usg=AOvVaw2AryFwXIPKFnWRjRRTApzp
Example :
mesheryctl model generate -f "git:://github.com/cert-manager/cert-manager/master/deploy/crds" -t template.json
Note: A -r
flag is present to skip registaration. If the flag is used then no new model would be registered though they would be generated and stored inside .meshery/models
directory.
The template.json
can be viewed here.In template.json if the field isAnnotaion
is true then we would only consider that component as an annotation (svg icon) rather than a normal component.
Example :
mesheryctl model generate -f "git:://github.com/cert-manager/cert-manager/master/deploy/crds" -t template.json -r
Generate Models Using Meshery UI
Step 1: Access the Meshery UI
To generate a model into Meshery using the Meshery UI, you must first install Meshery
Step 2: Navigate to Registry under Settings Page
Once you have accessed the Meshery UI, navigate to the Registry under Settings. This page can be accessed by clicking on the Settings on the top right on setting icon and then selecting βRegistryβ and then choose model.
Step 3: Generate the Model
On the Registry page, you can generate your model by clicking the Generate button. You have two options for input: URL or CSV. Below are the steps for both methods:
From CSV
-
Upload CSV Files: You can generate your model by uploading a components model CSV. Uploading a relationships CSV is optional.
-
Template CSV: If you donβt have a CSV file ready, you can use our Spreasheet template to create one. Simply fill in your details, download the template as csv, and upload it to generate your model.
From URL
-
Paste URL: Enter the URL of your model.
-
Fill in Values: After entering the URL, you will be prompted to fill in the values corresponding to your modelβs details.
-
Specify Options: Lastly, specify if the model is an annotation or if you wish to register it.
Once you complete these steps, click Next to continue with the model generation process.
Suggested Reading
- Configuring your Cloud Native Infrastructure and Applications - Learn how to use Meshery Designs effectively
- Creating a Meshery Design - Learn how to create a Meshery design from scratch or from a template.
- Exporting Models - Exporting Meshery Model as an OCI or Compress file
- Envoy WASM Filter Management - Meshery provides the ability to manage WASM filters for data plane proxies for agility, maintainability, diversity, reliability and isolation, security, and speed.
- Importing Designs - Learn how to import your existing designs and your existing infrastructure configurations into Meshery as you to manage, operate, and observe your cloud native infrastructure more effectively.
- Importing Models - Importing Existing Model and CRD-based Infrastructure Configurations into Meshery as Model
- Cloud Native Design Patterns - Meshery applies DRY principle when managing the configuration of cloud native infrastructure .
- Push or Pull a Model Image - Push or pull a model image to or from an OCI-compatible image repository.