Deployment mode tag definition

Hello, is it possible to create deployment mode override for tag definitions?

I have the mode=prod active. I have tag provider plc_data. In other modes, the plc’s aren’t connected, so I want to change the paths to the prod’s OPC connection.

at http://localhost:8088/app/services/tags I created the prod override, but that only created config/resources/prod/ignition/tag-provider/plc_data directory structure. I would expect that the config/resources/prod/ignition/tag-definition/plc_data will be also created from the config/resources/core/ignition/tag-definition/plc_data structure.

Is there a way to do this? Can I just copy the directory? Is it safe?

Deployment modes are an overlay on the base resource configuration defined in (generally) the 'core' resource collection:

You can copy resources from core to a deployment mode at any time, you'll just have to re-scan your config directory afterwards if you do it while the gateway is running.

But conceptually it's important to only copy the specific paths/resources you actually want to override in the deployment mode, not absolutely everything, or you're giving up most of the benefit of the inheritance cascade.

2 Likes

OK, I needed to do stop and start the gateway. Now it works. I need to do more testing. I would like to update the prod GW during runtime.

Thanks for the reply. Unfortunately, I am missing something. I created a testing environment and started the GW in mode=crash.

I did:

cp -r config/resources/core/ignition/tag-definition/plc_data/* \
config/resources/crash/ignition/tag-definition/plc_data/

I did GW Scan File system,

git add config/resources/crash/*;

git commit -m “create crash plc_data copy”

Then I deleted tags via designer in plc_data tag provider and I imported my modified tags.json.

I get:

git status
...
...
modified:   config/resources/core/ignition/tag-definition/plc_data/plc_data/PV03_26/Valves_PCSAuto/tags.json
...
...

I see the core tag-definitions were modified. I expected that the crash definitions are active and that they would be modified.

ignition81
crash
Ignition standard 8.3.3 (b2026012009)

OK, I needed to do stop and start the gateway. Now it works. I need to do more testing. I would like to update the prod GW during runtime.

Thanks. It looks like a problem with the Designer. I created copy of tag definition from core to prod:

2003@ignition-prod:/work(main)$ cat ignition.conf | grep mode=
wrapper.java.additional.7=-Dignition.config.mode=prod

2003@ignition-prod:/work(main)$ ll config/resources/core/ignition/tag-definition/plc_data
total 4K
drwxrwxrwx    1 2003     2003         318 Sep 29 12:20 lab
drwxrwxrwx    1 2003     2003         408 Oct 28 11:37 plc_data
-rw-r--r--    1 2003     2003         135 Feb 26 11:43 unary-resource.json
2003@ignition-prod:/work(main)$ ll config/resources/prod//ignition/tag-definition/plc_data
total 4K
drwxr-xr-x    1 2003     2003         318 Feb 26 11:38 lab
drwxr-xr-x    1 2003     2003         408 Feb 26 11:38 plc_data
-rw-r--r--    1 2003     2003         135 Feb 26 11:38 unary-resource.json

git add .
git ci -m "cp plc tag def core to prod"

I did scan Filesytem, both for gateway and projects. I did it two times. I opened designer and created New Tag in plc_data root. The file was created config/resources/core/ignition/tag-definition/plc_data/tags.json. Which is wrong I think.

OK, I closed the Designer. Then I did:

2003@ignition-prod:/work(main)$ git st
On branch main
Your branch is ahead of 'origin/main' by 1 commit.

        modified:   config/resources/core/ignition/tag-definition/plc_data/unary-resource.json
        modified:   projects/minifactory/com.inductiveautomation.perspective/session-props/props.json
        modified:   projects/minifactory/com.inductiveautomation.perspective/session-props/resource.json

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        config/resources/core/ignition/tag-definition/plc_data/tags.json

git checkout . #reverts ...plc_data/unary-resource.json and session-props
rm config/resources/core/ignition/tag-definition/plc_data/tags.json

I did scan Filesytem, both for gateway and projects. I did it two times. I opened designer and I still see the New Tag in the plc_data root.

I did rename the New Tag to New Tag Edit. I did git status and I see:

git st
On branch main
Your branch is ahead of 'origin/main' by 1 commit.

        modified:   projects/minifactory/com.inductiveautomation.perspective/session-props/props.json
        modified:   projects/minifactory/com.inductiveautomation.perspective/session-props/resource.json

I bit expected the tags.json would be created again, but it seems its just in some buffer memory.

LATER:
My patience went off. I did restart the production GW. I opened the Designer and the New Tag is gone! I created tag Tag Later in the root of plc_data. And it works! The Filesystem Scan is broken in relation to the Designer. Somehow.

2003@ignition-prod:/work(main)$ git st
On branch main
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   config/resources/prod/ignition/tag-definition/plc_data/unary-resource.json
        modified:   projects/minifactory/com.inductiveautomation.perspective/session-props/props.json
        modified:   projects/minifactory/com.inductiveautomation.perspective/session-props/resource.json

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        config/resources/prod/ignition/tag-definition/plc_data/tags.json

no changes added to commit (use "git add" and/or "git commit -a")

2003@ignition-prod:/work(main)$ cat config/resources/prod/ignition/tag-definition/plc_data/tags.json
[
  {
    "valueSource": "memory",
    "name": "Tag Later",
    "tagType": "AtomicTag"
  }

To expand on this topic slightly we are looking to do something similar and have different tags for our production and dev environments. Basically we would have the tags configured as memory tags in the dev environment and as OPC tags in the production environment, seeing as we don’t have the field equipment connected for dev.

Is there a way to import tag definitions for each deployment mode through the tag importer on the designer or does this have to be manually overridden using the json files? It seems whenever I do an import there it always imports to core regardless of the mode that the gateway is started in.