Create a Solution
A solution allows you to provide a preconfigured OPC router project—or a reusable part of it—so that other project engineers can incorporate it into their own configuration with just a few inputs.
Creating a solution essentially consists of three tasks:
- Selecting suitable project components
- Transferring the files into the specified Solution Gallery structure
- Defining variable values as parameters so that the solution can be reused in different projects
Prerequisites
Before you create a solution, check the following points:
- Use the YAML configuration of a standard OPC Router project as a starting point. An RPE file cannot be used as the basis for a solution.
- In the simplest case, your project contains only the files that are actually intended to be reused in your solution, such as connections, plug-in configurations, or program data.
- Identify project-specific values that need to be adjusted when inserted into another project, such as URLs, paths, access credentials, filenames, or plugin-specific identifiers.
- Check whether additional programs, drivers, or libraries are required. These files must be provided along with the solution.
Recommended Procedure
1. Prepare the Source Project
First, create your project. We recommend that you prepare your OPC Router project so that it contains exactly the state you want to provide as a template. You will later transfer the required files from this project into the solution.
To do this, remove everything that should not be part of the reusable solution, such as test connections, plug-ins that are no longer needed, or project-specific auxiliary configurations.
2. Create a Solution Folder
Create a new folder to serve as the working folder for the solution.
3. Transfer Relevant Files
Next, copy only the project files you actually need from the prepared source project into the appropriate target structure of the solution. When doing so, expand the folder structure only as much as is necessary for these files.
If you are looking for the YAML structure of the current OPC Router project, you will find it by default at C:\ProgramData\inray\OPC Router 5\config\versioned.
Under Plugins, include only the plug-ins that are to be deployed, and under ConnectionGroups, include only the groups and sub-structures that are actually needed for this purpose. A complete copy of the entire project structure is not required.
Typical contents include:
- Files under
configfor connections, plug-ins, and other project configurations - Files under
programfor additional programs or libraries that must be included with the solution
The complete file and folder structure is described under File and Folder Structure of the Solution.
4. Create solution.yaml
Create a solution.yaml file at the solution level. In this file, you describe the solution from both a business and technical perspective and define the values that the user should customize during import.
In particular, define the following:
- Display name and short description
- Optional tags and an icon
- Compatible OPC router versions
- Parameters for project-specific values
The complete field description can be found under Fields in solution.yaml and Parameterization.
5. Parameterize project files
In the imported project files, replace all variable values with the parameters defined in solution.yaml.
A parameter is referenced in the format ${parameter_id}. Use parameters wherever the user is expected to enter or select their own values during import.
Example of parameterizing the host address of a REST client transfer object using the hostname parameter:
HostAddress: http://${hostname}:51779/api/ProductionData
Typical candidates for parameters are:
- Server and endpoint addresses
- Credentials or secret references
- File names and paths
- Identifiers that must be unique in the target project
6. Add a description for users
If necessary, add a Markdown description at the solution level, for example description_de.md. This description is displayed in the Solution Gallery and helps users when using the solution.
Include at least the following:
- the purpose of the solution
- the prerequisites that must be met in the target project
- which parameters must be specified during import
- what adjustments are typically still required after import
Recommendation for Quality Assurance
Test the solution before publication or internal deployment by performing a test import into a separate OPC Router project.
In particular, verify the following:
- The solution is displayed in the Solution Gallery.
- The description is clear and complete.
- All required parameters are requested.
- The parameter values are correctly substituted in the target files.
- After the import, the project is functionally coherent and technically operational.