How to open a file from a Gateway Network remote gateway

I’ve tried to see if I can use system.file.fileExists in the Designer’s Script Console to no avail… Any Suggestions

What does ‘open a file’ mean, exactly? Also, any arbitrary file, or a single particular file? The former is a massive security problem.

actually the Ignition.conf file to edit for memory allocations

Why would you want to do this via the gateway network, rather than remote access directly to the gateway you want to edit?

Memory allocation is not something that should need to be consistently changed.
If you want to spin up repeated matching configurations, use Docker containers. Or use EAM, since you can push out .gwbks and those contain the ignition.conf file.
Manipulating the state of multiple gateways like this feels like a very bad idea to me even if you do get it working.

1 Like

because it is cumbersome when you have an Enterprise, and they have not setup EAM yet, each site has three gateways with different allocations

I would like to develop a script to imploy to the gateways from what we call the Front End Gateway… doing it via remote is cumbersome

Reasoning for doing this aside, I suppose one could create a utility UDT that could be “poked” to perform local changes via a Tag Event script. You could then deploy an instance of this UDT to your remote tag providers over the gateway network. Alternatively, if you have access to the designer of these remote gateways, you could also implement a message handler to perform your desired updates to local files and trigger those via gateway network messaging. Lots of ways to get this done I think.

If your remote nodes are Linux and you have SSH capability to the remote nodes, I’d look into an Ansible playbook to perform these kinds of provisioning activities across groups of hosts.

2 Likes

thank you Kevin