GUI Node Installation

Overall Installation Steps

The high-level steps for installing and configuring the N2ACD administrative and Flow Editor GUIs are:

  1. Determine the server(s) that will supply the GUI logical component, bearing in mind the supported operating systems and minimum server requirements.
  2. Ensure the installation pre-requisites are met.
  3. Install the GUI package.
  4. Perform any required post-installation steps.
  5. Update the Flow Editor configuration as desired.
  6. Update the administrative GUI configuration as desired.
  7. Optionally, apply the recommended Apache security configuration.

Installation Pre-requisites

OS-specific Setup

Refer to the specific Red Hat or Debian instructions for any pre-requisites as required.

Apache 2

Apache 2 must be installed prior to installing the N2ACD GUI package. The package to install will depend on your OS type:

RHEL 8 Other RPM-based Systems DEB-based Systems
sudo dnf install httpd sudo yum install httpd sudo apt-get install apache2

The N2ACD GUI package expects that the relevant Apache 2 configuration directory exists. Again, this varies depending on your OS type:

RPM-based Systems DEB-based Systems
/etc/httpd /etc/apache2

Finally, the apachectl program must exist (it is installed as part of the Apache 2 package) and Apache must be running.

Enabling Compression

By default Apache will not necessarily compress files served to clients. On RedHat8 based systems, this can be changed by adding deflate configuration:

echo "AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript" > /etc/httpd/conf.d/deflate.conf

Restart Apache to have the new functionality loaded:

systemctl restart httpd

Installation Steps

Follow the appropriate installation steps depending on your installation sources.

From N-Squared Repository

Execute the instructions specific to your operating system:

RHEL 8 Other RPM-based Systems DEB-based Systems
sudo dnf install n2acd-gui sudo yum install n2acd-gui sudo apt-get install n2acd-gui

As Manual Installation

Transfer the provided package file to the target node, then follow the instructions specific to your operating system.

Execute (adjusting as appropriate for package location and version details) the following:

RPM-based Systems DEB-based Systems
sudo rpm -Uvh /path/to/n2acd-gui-M.m.p-b.noarch.rpm sudo dpkg -i /path/to/n2acd-gui_M.m.p-b_all.deb

Post-Installation Steps

Default Application

After installation, there is no default behaviour for Apache to automatically navigate to an N2ACD application when a site root request is received. It is recommended that either the administrative GUI or the Flow Editor be chosen as the default application to route to if no other selection is made. Follow the instructions in the appropriate section below to achieve this.

Administrative GUI As Default

To set the administrative GUI as the default application, edit the appropriate file for your OS type:

RPM-based Systems DEB-based Systems
/etc/httpd/n2acd-admin.conf /etc/apache2/n2acd-admin.conf

Add the following line to the top of the file:

RedirectMatch ^/$ /n2acd-admin/

Restart Apache to apply the change:

apachectl restart

Flow Editor As Default

To set the Flow Editor as the default application, edit the appropriate file for your OS type:

RPM-based Systems DEB-based Systems
/etc/httpd/n2acd-fe.conf /etc/apache2/n2acd-fe.conf

Add the following line to the top of the file:

RedirectMatch ^/$ /n2acd-fe/

Restart Apache to apply the change:

apachectl restart

API Integration

The installed configuration files for the GUI assume that the API is co-installed on the GUI node. These files may therefore require updating in other installation topographies.

If more than one API instance is used, it is expected that some form of load-balancing is used to select an API instance for each API query (e.g. a VIP address, or DNS or other load-balancing proxy). The load-balancing address is then used as the configured address for all API requests from the GUI.

In single API instances where co-hosting is not used, the remote API address must be used as the configured address for API requests.

Flow Editor GUI

To update the API address for the Flow Editor GUI, edit the following file:

RPM-based Systems DEB-based Systems
/etc/httpd/conf.d/n2acd-fe.conf /etc/apache2/conf-enabled/n2acd-fe.conf

In the file, update the value REPLACE_WITH_API_ADDRESS to the API instance or loadshare proxy destination as required in the below lines:

# Proxy branding requests.
ProxyPass        /n2acd-fe/localisation/style.css   http://REPLACE_WITH_API_ADDRESS/jarvis-agent/n2acd-fe/api/branding
ProxyPassReverse /n2acd-fe/localisation/style.css   http://REPLACE_WITH_API_ADDRESS/jarvis-agent/n2acd-fe/api/branding

# Proxy localisation requests.
ProxyPass        /n2acd-fe/localisation/i18n.js     http://REPLACE_WITH_API_ADDRESS/jarvis-agent/n2acd-fe/api/branding
ProxyPassReverse /n2acd-fe/localisation/i18n.js     http://REPLACE_WITH_API_ADDRESS/jarvis-agent/n2acd-fe/api/branding

# Proxy keepalive requests.
ProxyPass        /n2acd-fe/keepalive                http://REPLACE_WITH_API_ADDRESS/jarvis-agent/n2acd-fe/__status
ProxyPassReverse /n2acd-fe/keepalive                http://REPLACE_WITH_API_ADDRESS/jarvis-agent/n2acd-fe/__status

# Proxy all Jarvis requests/
ProxyPass        /n2acd-fe/jarvis-agent             http://REPLACE_WITH_API_ADDRESS/jarvis-agent
ProxyPassReverse /n2acd-fe/jarvis-agent             http://REPLACE_WITH_API_ADDRESS/jarvis-agent

# Proxy management Jarvis requests if required.
#ProxyPass        /jarvis-agent                     http://REPLACE_WITH_API_ADDRESS/jarvis-agent
#ProxyPassReverse /jarvis-agent                     http://REPLACE_WITH_API_ADDRESS/jarvis-agent

Administrative GUI

Apache Configuration

To update the Apache configuration for the N2ACD administrative GUI, edit the following file:

RPM-based Systems DEB-based Systems
/etc/httpd/conf.d/n2acd-admin.conf /etc/apache2/conf-enabled/n2acd-admin.conf

In the file, update the value REPLACE_WITH_API_ADDRESS to the API instance or loadshare proxy destination as required in the below lines:

# Proxy keepalive requests.
ProxyPass        /n2acd-admin/keepalive            http://REPLACE_WITH_API_ADDRESS/jarvis-agent/n2acd-admin/__status
ProxyPassReverse /n2acd-admin/keepalive            http://REPLACE_WITH_API_ADDRESS/jarvis-agent/n2acd-admin/__status

# Proxy application Jarvis requests.
ProxyPass        /n2acd-admin/jarvis-agent         http://REPLACE_WITH_API_ADDRESS/jarvis-agent
ProxyPassReverse /n2acd-admin/jarvis-agent         http://REPLACE_WITH_API_ADDRESS/jarvis-agent

# Proxy management Jarvis requests if required.
#ProxyPass        /jarvis-agent                    http://REPLACE_WITH_API_ADDRESS/jarvis-agent
#ProxyPassReverse /jarvis-agent                    http://REPLACE_WITH_API_ADDRESS/jarvis-agent

If the GUI node is not on the same node as the API, uncomment the final two lines in the above section. These should remain commented for co-hosted installations of the GUI and API to avoid infinite looping.

Jarvis Configuration

If the ACD API is not co-located with the GUI node, in the file /usr/share/n2acd/gui/jarvis-proxy.json, locate the following section:

{
  "/jarvis-agent": {
    "target": "http://jarvis-host/",
    "secure": false
  }
}

Update the value of the target parameter to match the ACD API address. Alternately, you may add an entry to the GUI node’s hosts file or DNS lookups to redirect jarvis-host to the API as desired.

Firewall

The firewall (if any) on the GUI node must be updated to allow:

The exact commands to do this will depend both on the firewall on your platform and also which port(s) are in use. For example, to allow the default Apache ports when using firewalld, the commands might be:

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
service firewalld restart

SELinux

If SELinux is in use, Apache must be allowed to read and execute back-end code and initiate proxy connections. To enable this, execute:

sudo setsebool -P httpd_can_network_connect 1
sudo setsebool -P httpd_read_user_content 1 

Branding and Customization

The N2ACD Flow Editor may have theming and branding applied to it to match your specific requirements.

Branding files should be placed in /var/lib/n2acd-fe/html/branding and its brand subdirectories, following the N2ACD Flow Editor branding instructions.