API Node Installation
Overall Installation Steps
The high-level steps for installing and configuring N2PTF API nodes are:
- Ensure the installation pre-requisites are met.
- Install the API package.
- Perform any required post-installation steps.
- Update the API configuration as desired.
- 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
Apache must be installed prior to installing the N2PTF API package. The package to install will depend on your OS type:
| RHEL 9 | Other RPM-based Systems | DEB-based Systems |
|---|---|---|
sudo dnf install httpd |
sudo yum install httpd |
sudo apt-get install apache2 |
The N2PTF API package expects that the relevant Apache 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 package) and Apache must be running.
Perl
The N2PTF API node requires several Perl packages to be available prior to installation. The package names may vary depending on your OS type.
Note: If installing from an N-Squared repository dependency resolution will be completed automatically.
| RPM-based Systems | DEB-based Systems |
|---|---|
perl or perl-interpreter >= 1:5.12 perl(B) perl(DBI) perl(DBD::Pg) perl(Data::Compare) perl(Data::Dumper) perl(Date::Format) perl(DateTime::Format::Pg) perl(Digest) perl(Getopt::Long) perl(JSON) perl(List::MoreUtils) perl(MIME::Base64) perl(POSIX) perl(Scalar::Util) perl(Storable) perl(Time::Local) perl(XML::LibXML) perl(boolean) perl(strict) perl(warnings) |
perl >= 5.12 perl-base perl-modules libdbi-perl libdata-compare-perl libtimedate-perl libdatetime-format-pg-perl libjson-perl liblist-moreutils-perl libxml-libxml-perl libboolean-perl |
For each of these packages (or with all as one command), execute the instructions specific to your operating system:
| RHEL 9 | Other RPM-based Systems | DEB-based Systems |
|---|---|---|
sudo dnf install <package(s)> |
sudo yum install <package(s)> |
sudo apt-get install <package(s)> |
Jarvis
The N-Squared application Jarvis must be installed. Follow the installation steps for this, noting any prerequisites.
Note: If installing from an N-Squared repository Jarvis will automatically be installed.**
The N2PTF API package also expects that the default Jarvis configuration directory exists:
/etc/jarvis
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 9 | Other RPM-based Systems | DEB-based Systems |
|---|---|---|
sudo dnf install n2ptf-api |
sudo yum install n2ptf-api |
sudo apt install n2ptf-api |
Post-Installation Steps
Firewall
The firewall (if any) on the API node must be updated to allow:
- Inbound user and API requests on the listening Apache port(s).
- Outbound requests to the N2SVCD runtime nodes.
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 initiate proxy connections. To enable this, execute:
sudo /usr/sbin/setsebool -P httpd_can_network_connect 1
Session Security
Jarvis allows for session security to be increased by configuring a number of configuration parameters. In particular, the following parameters may be updated:
app=>csrf_protectionapp=>cross_origin_protectionapp=>xsrf_protectionapp.sessiondb.parameter=>Pathapp.sessiondb.parameter=>Domainapp.sessiondb.parameter=>Secure
Refer to the Jarvis documentation for more details. Further information is also available in the documentation for the Perl modules CGI::Session and CGI::Cookie.