Some users are interested in "preconfiguring" an Ignition Gateway. That is, configuring an instance of an installation, and then moving the installation files to a new server. This can be useful in cases where you're attempting to push out new Ignition installations via command-line interface to multiple separate systems.
Normally, you need to install Ignition manually on each of these systems and walkthrough the commissioning process to create an initial user and select an Ignition edition, which defeats the purpose of this whole deployment strategy. Thus, the following example will demonstrate how to deploy a preconfigured Ignition Gateway that has already been commissioned and is ready to start up.
Locate the EULA hash from your existing Ignition Gateway. You will find the hash in the commissioning.json
file in Gateway's installation directory: %installDirectory%/data/commissioning.json
.
Note: You'll only find this file on systems that have completed the commissioning process.
Part of the commissioning process involves accepting the EULA. The steps in this guide involve skipping the commissioning process, including the EULA. Thus, to be able to follow along with this guide you'll need to review the terms in the EULA and manually accept them on a separate system.
Open the file in a text editor, and copy the value for the eulaSetup.eula
key, including the quotation marks. For example, assuming a file looked like the entry below, you would copy "XXXXX" (the actual hash will be much longer). Save this value for later, as we'll need to reference it in a future step.
{
"isCommissioned": "COMMISSIONED",
"connections.useSsl": "false",
"eulaSetup.eula": "XXXXX"
}
Next, take the Ignition installer and unzip it into a directory that's easily accessible. This directory will be the base directory that we'll ultimately end up deploying to on one or more different servers.
In the base directory, edit the Gateway's configuration file (ignition.conf) using the text editor of your choice. The file is located at %baseDirectory%/data/ignition.conf
Part of the installation process normally includes an edition selection, but we can bypass that by modifying the configuration file to explicitly state which edition the Gateway should be set to. Located the "Java Additional Parameters" line in the configuration file. The should have some entries like the following:
# Java Additional Parameters
wrapper.java.additional.1=-Ddata.dir=data
#wrapper.java.additional.2=-Xdebug
#wrapper.java.additional.3=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000
at the end of that section, add the following:
wrapper.java.additional.2=-Dedition=%value%
Where %value% is the edition, you want the deployed system to use: "edge" for Ignition Edge, and "maker" for Ignition Maker. For "standard" edition, simply omit the "=%value%" portion. For example, the file should look something like the following when configuring for Standard edition:
# Java Additional Parameters
wrapper.java.additional.1=-Ddata.dir=data
#wrapper.java.additional.2=-Xdebug
#wrapper.java.additional.3=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000
wrapper.java.additional.2=-Dedition
And the file would look like the following if deploying Edge edition:
# Java Additional Parameters
wrapper.java.additional.1=-Ddata.dir=data
#wrapper.java.additional.2=-Xdebug
#wrapper.java.additional.3=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000
wrapper.java.additional.2=-Dedition=edge
- Save the changes you made to the configuration file.
Also in %baseDirectory%/data/
, create a text file and call it commissioning.json.
Edit the newly created commissioning file, and set contents to the following:
{
"isCommissioned": "COMMISSIONING",
"connections.useSsl": "false",
"eulaSetup.accepted": "true",
"eulaSetup.eula": "xxxxxxxxxxxxxxxxxxxxx",
"authSetup.username": "admin",
"authSetup.password": "[e811cfc7]fc3b28ad5f73331c94790129f0931437ac31d59376b0e4b15df580a8841ba165"
}
The JSON above does a couple of things, but notably defines an initial user on the new system. The user is "admin", with a password of "password". Later, we'll restore from our Gateway backup which will replace this initial user, but for now, we simply need to have a user to bypass commissioning.
In the same commissioning file, replace the value of the eulaSetup.eula
key with the value you took from step 2.
Save the commissioning file.
At this point, you're ready to deploy. Take the contents of your base directory, move them to a new server, and perform a normal ZIP installation. When the Gateway starts, it will bypass the commissioning process and the Gateway will immediately startup.
Once the Gateway is running, you can use the admin user we configured earlier to access the newly deployed instance of Ignition. From here, you can restore from the Gateway Backup file mentioned in the requirements section of this guide. You can do this from command-line which would look something like the following:
gwcmd --restore /path/to/your/GWBK