docs/static/v0.7/guides/configuration-management/generating-models/index.html
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.
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:
Registrant Github:
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
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.
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:
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.
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.