Description
This document provides information about automating IIG installation.
Prerequisites:
Instance for IIG setup
Whitelist of N2N NAT IPs(QA: 23.20.165.255/32, PROD: 54.204.165.208/32)
FQDN, which connects to the Integration Gateway on HTTPS
Python 3.9 or higher
Docker 17.x or higher
SSL certificates(Chain cert and Private Key)
Info |
pip3 is mandatory for running these scripts, ensure python 3.9 has a pip3 package manager |
Info |
A Docker module is also needed along with the Docker RPM package, use the below command to install the module pip3 install docker |
Supported Platforms for Python and Docker
Platform | Docker | Python |
---|---|---|
CentOS | Yes | Yes |
Debian | Yes | Yes |
Red Hat Enterprise Linux | Yes | Yes |
Fedora | Yes | Yes |
openSUSE | Yes | Yes |
Amazon Linux | Yes | Yes |
Oracle Linux | Yes | Yes |
Note |
This Setup does not support Microsoft Windows |
Info |
Ensure that the operating system platform meets all the required prerequisites |
Downloading a tar file
Sign in to the Illuminate application(either QA or PROD) then select “New/Upgrade Installation” and choose the “Default Script” option.
Once you click “Submit” button a tar will be available to download
Setup Process
The IIG automation process is divided into THREE steps:
Installation process
In this step, the required Docker containers, dataport and nginx, will be installed.
SSL configuration process
SSL certificate configuration will be implemented at this stage.
Database configuration process
At this step, database configuration details will be added to establish a connection to the data source for the dataport.
Installation Process
Once you upload the tar file onto the server, untar the tar file using below command
tar -xvf iig-client.tar -C /opt
Go to the directory with the below command and run the install.py, this python service will create docker network and run the docker containers dataport and nginx
cd /opt/iig ./install.py
Note |
If the file has insufficient execute permissions, configure the permissions chmod +x install.py |
Verify the docker containers and the docker network
SSL Configuration Process
Run sslconfig.py python service, it will prompt you for a few mandatory details, please provide them
This step is a NAT IP check where it will ask if the NAT IP is whitelisted. Provide 'Y' if it is whitelisted; otherwise, the script will stop at this point
Select the specific IIG Setup environment. Please choose the environment number based on your requirement (e.g., 2)
This setup is a port check where it will ask if port 443 is open in the firewall rules.
In this step, you need to provide the Fully Qualified Domain Name (FQDN) that points to the IIG server. The script will create a
data/user.json
file under/opt/iig
to store the FQDN
The next section is about SSL certificates, where you need to enter the full path to the complete SSL certificate(chain cert) and the matching private key that are uploaded on the server. The script will also create a folder named
ssl
under/opt/iig
to store the SSL files
The SSL files and the Nginx configuration file will automatically uploaded into Nginx docker container
At the end of this script, the
/idp
dataport service is triggered to ensure that the SSL configuration has been applied successfully
Database Configuration Process
Run databaseconfig.py python service, it will prompt you for a database details, provide them according to the database provider
In this section, the script checks if the IIG server can reach the database host using the provided database host and port. If the connection is not successful, the script will exit at this point
In the Database Configuration section, the script will prompt you to select the database provider type. Choose the provider by selecting the corresponding number
After selecting the database provider type, the script will prompt you to enter the database information specific to the selected provider
Example: Oracle
Example: MySQL
In the next step, the script will prompt you to enter the authorization token from IlluminateApp. To obtain it, log in to the IlluminateApp UI, navigate to the 'Connections' tab, and add the DataPort URL
After adding the DataPort URL, click on 'Add Database Provider' and enter the required details. Once you click the 'Save' button, the authorization token will be generated
Copy the Authorization token and paste it on the server
After you press Enter, the script will automatically generate a curl command based on the selected database provider. Verify the details and respond with 'yes' or 'no'
The database properties will be added to the dataport, and the dataport container will restart automatically through the script
At the end, the folders
/opt/iig/ssl
and/opt/iig/data
are deleted, and the idp status is displayed. Finally, the script prompts you to confirm the deletion of the IIG setup Python scripts and the/opt/iig
folder
You can also check the idp status in the illuminateapp UI
APPENDIX-1: Integration Gateway setup for PROD on the same QA host/server
If the client wants to set up a PROD integration gateway on the QA host, they need to follow these steps
Run the install.py script with the argument
prod
. This will create a Docker network namediig_prod
, launch the Docker containerdataportProd
, and attach the Docker network to bothnginx
anddataportProd
./install.py prod
The script will ask for the fully qualified domain name attached to the server. Once entered, it will display the idp2 status
Run the databaseconfig.py Python service with the argument
prod
, and it will prompt you for the database details. Provide them according to the database provider
./databaseconfig.py prod
Note |
If no argument is provided the scripts will default to the QA setup |
APPENDIX-2: Integration Gateway and Nginx Upgrade
If the client wants to upgrade integration gateway(dataport or dataportProd) and Nginx, they need to follow these steps
Download the upgraded dataport tar file from the IlluminateApp UI and copy it to the server https://n2nservices.atlassian.net/wiki/spaces/CLOUD/pages/4175855666/IIG+Automation+version-2#Downloading-a-tar-file
Run the following command to back up the database properties stored in dataport
docker cp dataport:/usr/local/tomcat/webapps/idp/WEB-INF/classes/<yourdbfile>.properties /opt/
Run update.py with the argument
dataport
to update dataport to the latest version. The updated dataport will automatically attach to the existing Docker network, while the previous version will be renamed todataport.bk
and disconnect from the Docker network
./update.py dataport
Run the following command to restore the database properties in the upgraded dataport
docker cp /opt/<yourdbfile>.properties dataport:/usr/local/tomcat/webapps/idp/WEB-INF/classes/ docker exec --user root dataport chown n2ndataport:n2ndataport /usr/local/tomcat/webapps/idp/WEB-INF/classes/dbiig.properties docker restart dataport
Note |
To upgrade dataportProd hosted on the same server, replace the dataport argument with dataportProd and run the restore database properties commands |
To upgrade NGINX, run update.py with the
nginx
argument. This will copy the SSL certificates and config files from the existing NGINX to the new NGINX Docker container and automatically attach it to the existing Docker network. If dataport and dataportProd are hosted on the same server, the new NGINX container will connect to both the Docker networks that dataport and dataportProd are connected to. The previous version of NGINX will be renamed tonginx.bk
and disconnect from the Docker network
./update.py nginx
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article