Imitate gateway/designer project export and import process manually

We have a gateway in which all of the Perspective projects are versioned controlled. Whenever there are changes made to the projects on the gateway, those changes are pushed to a remote repository. What this means in practice is we'll navigate to the Ignition installation directory, then go to the data/projects folder and do a git push from there.

The full path for a default installation on Windows is

C:\Program Files\Inductive Automation\Ignition\data\projects

and from that location is where we run the push command. The contents of the directory look something like:

-> projects
    -> .resources
    -> Project1
    -> Project2
    -> ...
    -> ProjectN
        -> com.inductiveautomation.perspective
        -> ignition
        -> project.json

My first question is if this is the best location within the Ignition folder structure to version control. In other words, am I capturing all project-specific files from the /data/projects directory (this is an all Perspective project)?

Assuming I'm version controlling from the right location - how would I reverse this process on a new gateway? I'm looking to mimic the Gateway and Designer project export/import features programmatically, either from a shell script or from a module.

[Yes, I'm aware of this doc - it doesn't confirm or deny that something like this is doable or practical]

Hi YF129701,

You have found the correct path to implement version control inside of Ignition. All project resources are located in the /data/projects/ folder. Can you elaborate on what you mean by reversing the process on a new gateway? Are you asking how to import/export the project onto a new gateway using Git?

I suppose I am... Say I want to pull my version controlled projects to a brand new gateway. How would I do this? When I did a simple test, the projects wouldn't show up in the designer launcher. Is there some other step I would need to do in my script so that the gateway, client and designer scopes all would pick up on the new projects?

How long did you wait? The gateway will wait 5 minutes between filesystem scans, by default. You can override that in the short term, to make it faster, and in an upcoming 8.1.X release we're going to expose a hook & scripting function that allows you to programmatically invoke a filesystem scan.

1 Like

Ahh this is probably it... I didn't wait long at all, I ran the appropriate commands, made sure the projects were in the correct directory and then checked the designer launcher (and I believe gateway project's page).

+100 for exposing the hook... Is there a way to do this right now from a module or a script? This is a feature within a module I'm building, so that would be very convenient.

Not at the moment, no. Whatever we end up implementing will likely happen ~soon (early 2023?), as a helpful feature for users in exactly your situation. Better overall VCS support is still planned, but this is an easy "win" we should've done a long time ago.

1 Like

Sweet! The module will likely be at the stage where this will be useful around then anyway, so this is good enough for me.

Regarding your earlier point, I'll try cloning the projects into those directories again and waiting at least 5 minutes to see if that'll solve the issue I'm having.