Solution Template
Setting up a Solution Template
Setting up a solution template allows you to share a common application/connector configuration across different businesses or Connectivity platforms. A solution template can be either an application template or a connector template. All applications/connectors created from the same template share the same configurations.
A solution template can save your time by grouping your applications/connectors together for better management. You have the option to update the source template and synchronize updated configuration to all solutions created by your source template.
The template also allows you to add your own lua scripts to be executed before each template deployment. Lua script is used to configure the services in the deployed solution.
This page assumes you are familiar with the relationship between applications and connectors. And you intend to make a template to make sure your new application/connector contains the same configuration.
Note
You are required to provide an access token to your GitHub or Azure DevOps repository to the platform. For maintenability, please use a service-account to create a token to reduce the need to change the token after a member leaves the project. In addition, for security, please consider the least privilege approach and only provide a token with read-only access to your repository.
Steps to create personal token for Solution Template.
We recommend our users to use a service account to generate a personal token. For Azure DevOps repositories:
- Login to Azure DevOps.
- Select User-settings icon, then go to "Personal access tokens".
- From there, click "+ New Token" button to add a new token.
- For the expiration time, Azure DevOps can provide a year-long token.
- For least privilege policy, user can just check the "Read" box under Code.
General Solution Template structure.
The solution template consists of murano.yaml, service yaml files, and lua scripts (.lua files):
- Murano.yaml consists of a template's configurations (file and folder filter and so on).
- Service yaml files are placed inside services folder, you can have add more services to your template by adding and removing the yaml files.
- For available services, please check the list of services available in Service APIs.
- By adding a yaml file with service API name (e.g. timer.yaml). You are adding a service to the template.
- By removing a yaml file with service API name, You are removing the service from the template's future deployment.
- Lua scripts are placed inside modules folder, services folder, or init.lua:
- Within module folder, you can place lua scripts and re-use them in other parts of the template.
- Within service folder, you can create default service event scripts.
- Within init.lua, the script will be executed in every deployment.
Setting up an application template
We provide a zip file containing basic services required to create an application template. Extract the zip file and create a GitHub or Azure DevOps repository.
- The default services includes Webasset, Webservice, Websocket.
- The endpoint folder includes the endpoints you intend to include in the application.
Setting up a connector template
We provide a zip file containing basic services required to create a connector template. Extract the zip file and create a GitHub or Azure DevOps repository.
Note
For more configuration details, please check README.md in the zip file.
Publish a solution template to the marketplace
From Connectivity Platform UI's publish tab. You can publish a template by providing the GitHub url or the Azure DevOps url with access token. Platform expects the default branch to be "master". You have the option to choose other branches by including branch name in the url. Such as GitHub's /tree/{branch-name} or Azure DevOps's version=GB{Branch-name}.
- Azure DevOps repo Url example:
- Azure Devops repo Url with branch example:
Creating a solution without creating solution template
The platform provides an option to create a solution directly from a repository without creating the template.
- From Connectivity Platform UI, you can create a solution from a standalone template repository.