Installation is carried out from the image ibatyr-ubuntu-2X.04-v2.XX.0-replication.iso (OC+WAF) on a virtual or physical server. Servers on which you plan to install iBatyr WAF must meet the minimum system requirements from section 2.1.
First you need to install the OS (an example of OS installation is given in Appendix B). After installation and authentication to the OS, the WAF installation will automatically start.
Before installing a Management cluster of two nodes, you should allocate three IP addresses from the same subnet - one for each node and one for Virtual IP, which will always be associated with this master node.
Next you need to do the following:
In the window that appears, select installation with replication (see screenshot 56).
Screenshot 56 - Selecting Installation Type
In the next window that appears, select the main node (see screenshot 57).
Screenshot 57 - Selecting Primary Node
In the next window, enter the password for interaction between the main (master) node and the backup (slave) (see screenshot 58).
Screenshot 58 - Password for communication between primary and backup nodes
Next, you need to confirm the password (see screenshot 59).
Screenshot 59 – Password Confirmation
Then enter the IP address of the primary node (see screenshot 60).
Screenshot 60 - Primary Node IP Address
Then enter the address of the backup node (see screenshot 61).
Screenshot 61 - Backup Node IP Address
Next, enter the VIP address (see screenshot 62).
Screenshot 62 - VIP Address
In the window that appears, select simple installation on one node (see screenshot 63).
Screenshot 63 - Selecting Installation Type
Next, in the installation mode selection window, select Reverse proxy (see screenshot 64).
Screenshot 64 - Selecting Installation Mode
Then, in the appropriate windows, specify the IP address and port of the protected application (see screenshot 65, screenshot 66). The values entered at this stage can be changed after installation.
Screenshot 65 - Protected Application IP Addresses
Screenshot 66 – Protected Application Port
Display overview information about the installation results for verification using the command:
sudo grep -A 1 RECAP /var/tmp/install.log
The indicator of successful installation will be the absence of installation errors “failed=0” (see screenshot 67).

Screenshot 67 – Installation without errors
To check if ports correspond to services, use the command (see Screenshot 68):
ss -ntl

Screenshot 68 – Service Port Mapping
Ports for services must correspond to:
nginx: port 8443;
ibatyr-dashboard: port 5088;
mongod: port 27017;
ibatyr-analyzer@0: port 6666;
ibatyr-redis@mgmt: port 6378;
ibatyr-redis@0: port 6379;
ibatyr-nginx: the port you specified when installing WAF;
sshd: port 22;
postgresql: port 5432.
Next, you need to check the status of the cluster using the sudo crm status command (see screenshot 69).

Screenshot 69 - Cluster Health Check Results
Then initialize the replication slot by restarting the pgsql resource with the command (see screenshot 70):
sudo crm resource restart pgsql

Screenshot 70 - Initializing the replication slot
When this command is executed, the resource will first go into Slaves status (see screenshot 71). You need to wait for it to return to Masters state (see screenshot 72). The cluster status is checked with the following command:
sudo crm status

Screenshot 71 – Slaves Status

Screenshot 72 – Master Status
If the allocated addresses have a mask other than 255.255.255.0 (24), then you need to change the mask in the configuration file for the waf-virtual-ip VIP resource. To do this you should:
Run the command sudo crm configure edit.
In the vim editor that opens, find the resource in the file and change cidr_netmask=24 to the desired mask (see screenshot 73).

Screenshot 73 – Changing the netmask
For security reasons, SSH access was denied to the waf user during installation. If you need to allow such access, then in the configuration file /etc/sshd/sshd_config you should delete the last line DenyUsers waf and restart the service using the command (see screenshot 74):
sudo systemctl restart sshd
Screenshot 74 – SSH Permission











