Technical topology low-code editing tool.
Leto modelizer is an application that can help you generate infrastructure code without you having to write any code! One of theirs main qualities is that you can choose:
- which languages you can provide with this application
Or
- Implements your own plugin
Or
- Override existing plugins
If your company take care only of terraform files, you just have to install terraform before build this app and deploy it.
If you only want your own language component (maybe based on existing plugins), you can implement/override existing plugin and just install your plugin definition.
For now, we don't have many plugins to offer you, but follow us and in the next (few) months you will see new plugins (like Jenkins or Kubernetes).
Plugin to manage terraform files, by default it comes with aws provider definition.
Plugin to manage github action files.
| Leto-modelizer | Supported version | ||
|---|---|---|---|
| Plugin-core | Terrator-plugin | Githubator-plugin | |
| 1.0.0 | = 0.13.0 = 0.14.0 |
= 0.1.12 | 🚫 |
| 1.1.0 | = 0.15.2 | = 0.2.0 | = 0.1.1 |
| 1.2.0 | = 0.16.0 | = 0.3.0 | = 0.2.0 |
| 1.3.0 | = 0.21.0 | = 0.7.0 | = 0.2.5 |
| next version | = 0.22.0 | = 0.7.1 | = 0.3.0 |
Run npm install to let npm retrieve all dependencies and especially our cli to easily install your plugins 😉.
Then you just have to know two things about your plugins:
- it's name
- it's repository url
To install plugin, run this command npm run plugin:install.
You can choose between installing official or custom plugins.
The leto-modelizer-plugin-cli.json file, at the root of Leto Modelizer, contains the list of official plugins provided by the team. Each plugin is represented by an object containing the name, repository URL and version of the plugin.
Choose Official plugins to select from the list of official plugins, one or more plugin(s) to install.
Choose Custom plugin to install a specific plugin not referenced as an official plugin.
Examples with official plugins:
- terrator-plugin:
- plugin name:
terrator-plugin - git repository url:
https://github.com/ditrit/terrator-plugin.git#0.7.1
- plugin name:
- githubator-plugin:
- plugin name:
githubator-plugin - git repository url:
https://github.com/ditrit/githubator-plugin.git#0.3.0
- plugin name:
Options repository-name and repository-url can be added with the npm run plugin:install command to bypass cli prompts.
# Example with terraform plugin
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.7.1"
# Example with github action plugin
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.3.0"Now that your plugin is installed, you can continue to install other plugins with the same command if you want.
When you have installed all the desired plugins, please run this commands npm run plugin:init to complete all plugins' installation.
We are using Leto-Modelizer-Api authentication (as a backend). To configure it, you must fill the configuration inside global.config.json root file.
We have administration view Leto-Modelizer-Admin, for users who have admin role, to manage users, groups and roles.
{
"backend": {
"url": "http://localhost:1337",
"appId": "leto-modelizer-api-dev",
"adminUrl": "http://localhost:9000"
}
}To get authentication setup, backend.url and backend.appId are mandatory.
To get administration view, all the fields inside backend are mandatory.
Here's a description of each key in the provided configuration:
url: the url of the backend.appId: the application ID of the backend.adminUrl: the url of the administration application.
NOTE:: If the previous configuration is not present in the configuration file, Leto-Modelizer will be launched with the backend mode deactivated. NOTE:: For now, there is no UI associated to the backend, but the UI for the admin is coming soon !
Once you have installed and initialized all your plugins, run this command to build the app:
npm run build
It will generate the built application in the dist folder.
To build this app with docker (the two main plugins for terraform & github are included), please use this command:
docker build . -t leto-modelizerOnce your image is built, to run the associated container please use this command:
docker run -p 8080:80 leto-modelizerSee nginx configuration.
- Using templates from a remote repository
TEMPLATE_LIBRARY_BASE_URL is used to define the url of a template library you want to use. To have more information on how to build your own template library, please visit leto-modelizer-templates-library. To define TEMPLATE_LIBRARY_BASE_URL, go to your repository, open the index.json file (which contains all the metadata of your templates) in raw mode and get the url to the branch name, without including the file name.
# Example with the leto-modelizer-templates-library repository that contains all default templates for leto-modelizer.
TEMPLATE_LIBRARY_BASE_URL="https://raw.githubusercontent.com/ditrit/leto-modelizer-templates-library/main" npm run buildTo be able to access external resources for your templates, you need to set a reverse proxy named template-library. You can see an example below of an nginx.conf file:
http {
server {
listen 80;
location /template-library {
proxy_pass TEMPLATE_LIBRARY_BASE_URL; # replace by your url
}
}
}Same for your Leto-Modelizer-Api, you need to set a reverse proxy named backend. You can see an example below of an nginx.conf file:
http {
server {
listen 1337;
location /backend {
proxy_pass YOUR_URL; # replace by your url
}
}
}NOTE: You can use the global configuration file global.config.json to define environment variables like so :
{
"templateLibrary": "YOUR_TEMPLATE_LIBRARY_BASE_URL",
"backend": {
"url": "YOUR_URL",
"appId": "YOUR_APP_ID",
}
}- Allow to keep
data-cyattribute in html
KEEP_CYPRESS_ATTRIBUTE is used to keep all data-cy attribute in the generated html.
KEEP_CYPRESS_ATTRIBUTE=true npm run build

