Hello All,
A while back I published (A bit quietly) a module that could enable some better version control of tags, and I am not sure if I ever published it here. So I figured I would share it for all of those that will not have access to 8.3 for some time!
Currently it supports the following features:
- Allows REST endpoints that can do tag imports/exports/edits based off of provided JSON content.
- Adds the ability to auto-import tags based off of a config file located in the gateways data directory. This will allow a gateway to import a collection of exported tags on startup automatically.
- Adds some designer UI controls to trigger the import/export by hand if desired.
- Export/Import tags through a heirarchical folder structure that is a bit easier to version control than just a single mega-JSON file. This exports the tags in the same folders structure they represent in the tag provider, and exports an individual file per tag, or per UDT instance.
I just updated the current release to v1.1.0 at: GitHub - design-group/ignition-tag-cicd-module: An Ignition Module to add features that enhance CICD capabilities for tags.
To configure the auto-import on startup just add a config to data/modules/com.bwdesigngroup.ignition.tag_cicd/tag-cicd-config.json
with a structure matching the following
[
{
"provider": "default",
"baseTagPath": "", # Implies the root of the provider, and will include UDTs by default in `_types_`
"sourcePath": "data/tags",
"individualFilesPerObject": true,
"collisionPolicy": "o"
},
]
Keep in mind, the sourcePath
referenced in the file is a path from the perspective of the gateway, so reference paths start at the Ignition installation directory. If using the import/export REST APIs this is the same, they are from the perspective of the gateway every time, not your host.
To export based off that saved config file, go ahead and press the export button located in the toolbar:
And then select the tags based off what you want to export:
Keep in mind, this will only work after you have setup the config file. Without that, it wouldn't know what to export or where!
If anyone finds anything, or would like specific features, feel free to create an issue
for them.
We'll see what happens after 8.3 with the new file system content for tags, my understanding is this does things a bit differently, so it may still have a place there and time will tell!