The standard Gateway setup/install is done under the assumption that the user who is creating the agent and plugins will be the sole user responsible for maintaining them. However, in some cases there might be a need for setting up Gateway on a server that is accessed by multiple individuals who made need to access and change agent/plugin configurations.
Information used by the agent to determine what plugins and what plugin configurations are accessible are stored in a data directory. By default, during installation (using the install.bat file in the windows directory of the zip file that is downloaded from the Data & Insights platform), the data directory will be mapped to the user’s “%LOCALAPPDATA%\socrata-ingress-agent” directory. This usually expands to something like “C:\Users\<user>\AppData\Local\socrata-ingress-agent\”
This is fine for instances where a single user is going to manage the agent, however, it becomes problematic when multiple users need to be able to configure the agent/plugins.
There are a few ways to update this. The easiest is to edit the install.bat file and change the lines stating:
--StartParams "--data-dir";"%LOCALAPPDATA%\socrata-ingress-agent" ^
--StartParams "--data-dir";"[YOUR DESIRED PATH]\socrata-ingress-agent" ^
*Note: you do not have to specify "socrata-ingress-agent" However, it may be clearer to include it.
After running or re-running the install.bat file as an administrator, the agent will now default to looking in the specified path.
Now that the agent is reading from a non-user-specific path, we need to ensure that the plugins are configured to use that path as well. To do that, we need to use the "--data-dir" flag when configuring the plugin, like so:
java -jar socrata-ingress-agent.jar --data-dir "[YOUR DESIRED PATH]\socrata-ingress-agent" --configure-plugin [plugin]:[plugin name]
To make this easier, you can also save this command to a “configure.bat” file in the agent home directory, so that future users will know to use that to configure the plugin, instead of having to remember the exact data directory.
After a configure.bat file is created, you simply need to double click on it to retrieve the plugin configuration.
In some cases, the plugins have already been configured by someone and they need to be made accessible to more users.
In that case, follow these steps:
Stop the service if it is running.
Grab the current data directory at "%LOCALAPPDATA%\socrata-ingress-agent\" directory and move it to the desired location
Edit the "install.bat" file as noted above
Re-run the install.bat file as an admin