Run preinstall manually
If the policy in your company does not allow to run anything from root automatically, you will have to do the preinstall steps manually.
Before you proceed to the steps described below, make sure, you've prepared the servers according to Preparation steps and executed precheck as described in SPA installation.
You may find on this page references to "VDS" acronym (Virtual Data Since). It is a former name for AutoML component (Automatic Machine Learning). "VDS" means "AutoML" in all cases.
Common steps
The common steps should be performed on each server.
Create the wfuser group.
Run as root:
groupadd wfuserCreate the runtime user and add to the group.
Run as root:
useradd -m -g wfuser wfuserCreate the installation directory.
Run as root:
mkdir /opt/workfusion chmod 0750 /opt/workfusion chown wfuser:wfuser /opt/workfusionInstall the common required packages.
Run as root:
yum -y install curl \ unzip \ openssl \ wget \ rsync \ python-setuptools \ coreutils \ sysstatEnsure that curl and openssl packages have versions at least not older than described in Required packages. You can check it as follows:
Run as root
rpm -q curl rpm -q openssl
SELinux configuration
SELinux can be either in enforcing, or permissive mode. There are no any special requirements in terms of SELinux configuration for Workfusion SPA.
Configure limits for the maximum number of open files and the number of processing units available.
Run as root
cat << EOF >> /etc/security/limits.conf * - nofile 200000 * - nproc 10240 EOFCreate the systemd service for supervisord.
Run as root:
cat << EOF > /etc/systemd/system/supervisord.service [Unit] Description=supervisord Requires=local-fs.target After=local-fs.target [Service] Type=simple User=wfuser Group=wfuser LimitNOFILE=200000 LimitNPROC=10240 ExecStartPre=/bin/bash -c 'while [ ! -f /opt/workfusion/python-site/bin/supervisord ]; do sleep 1; done; exit 0' ExecStart=/bin/bash -c 'source /opt/workfusion/environment.sh && /opt/workfusion/python-site/bin/supervisord -c /opt/workfusion/supervisord/conf/supervisord.conf' TimeoutSec=300 [Install] WantedBy=multi-user.target EOFEnable autostart for the supervisord service.
Run as root:
systemctl daemon-reload
systemctl enable supervisord
Cron configuration
Follow the instructions below only if some changes appeared in /etc/cron.allow or /etc/cron.deny or in PAM (Pluggable Authentication Modules) configurations.
Run as root:
cat << EOF >> /etc/cron.allow
wfuser
EOF
Check that wfuser isn't restricted through PAM policies. Otherwise, an error like this one appears:
[wfuser@rhel-server]$ crontab -e You (wfuser) are not allowed to access to (crontab) because of pam configuration.To enable the user to use cron in the login access control table file, use the following entry which allows wfuser to run Cron jobs:
Run as root:
$ vi /etc/security/access.conf ## Allow the coins user to run cron jobs +: wfuser : cron crond :0 #Ensure it is above the last entry: ## Deny all other users access by any means. -: ALL : ALLUnpack the Nginx binary and set a capability to bind it on port less then 1025.
note
You should run this step if your
config.ymlfile contains values for thenginx__portsettings below 1025. For example, if you setnginx_db_port: 80ornginx_db_port_ssl: 443(by default, these settings are 80/443), you should run this step on DB server. The same applies to all other servers. You don't need this step on AutoML agent servers because there is no Nginx there.Run as root:
mkdir -p /opt/workfusion/nginx/bin cd <PACKAGE_DIR> tar -xvf sources/nginx-rhel7-1.12.2.tar.gz --strip=1 -C /opt/workfusion/nginx/bin/ chown -R wfuser:wfuser /opt/workfusion /usr/sbin/setcap CAP_NET_BIND_SERVICE=+eip /opt/workfusion/nginx/bin/nginx
DB Server
Create the systemd service for disabling thp on server boot (required for mongodb).
Run as root:
cat << EOF > /etc/systemd/system/disable-thp.service [Unit] Description=Disable Transparent Huge Pages (THP) [Service] Type=simple ExecStart=/bin/sh -c "echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled && echo 'never' > /sys/kernel/mm/transparent_hugepage/defrag" TimeoutSec=300 [Install] WantedBy=multi-user.target EOFEnable disable-thp.service.
Run as root:
systemctl daemon-reload systemctl enable disable-thpInstall required packages for DB Server from RHEL repo.
Run as root
yum -y install libaio \ MySQL-python \ python-psycopg2
APP Server
Install required packages for APP Server from RHEL repo.
Run as root:
yum -y install libtiff \
libpng \
bzip2 \
libjpeg-turbo \
zlib \
xz \
ghostscript \
pango \
fftw-libs-double \
libXft \
libtool-ltdl \
libwmf-lite \
mariadb \
MySQL-python \
postgresql \
python-psycopg2
PM Server
Create the systemd service for disabling thp on server boot (required for mongodb).
Run as root:
cat << EOF > /etc/systemd/system/disable-thp.service [Unit] Description=Disable Transparent Huge Pages (THP) [Service] Type=simple ExecStart=/bin/sh -c "echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled && echo 'never' > /sys/kernel/mm/transparent_hugepage/defrag" TimeoutSec=300 [Install] WantedBy=multi-user.targetEnable disable-thp.service.
Run as root:
systemctl daemon-reload systemctl enable disable-thpInstall repo packages required for wfagent on APM Server.
Run as root:
yum -y install pcsc-lite-libs \ alsa-lib \ libXrandr \ libao \ libsamplerate \ libdrm \ libfontenc \ libpciaccess \ libXdamage \ libXdmcp \ libXfont \ libXmu \ libxshmfence \ libXt \ libXxf86vm \ mesa-libGL \ mesa-libglapi \ pixman \ xkeyboard-config \ xorg-x11-server-common \ xorg-x11-xauth \ xorg-x11-xkb-utils \ freerdp
AutoML Master
Configure sysctl parameters for AutoML master.
Create a new file with required sysctl parameters
/etc/sysctl.d/workfusion.conf.Do not edit the standard one as it will be overwritten by the system.
Run as root:
cat << EOF > /etc/sysctl.d/workfusion.conf net.ipv4.tcp_keepalive_time = 120 net.ipv4.tcp_keepalive_intvl = 15 net.ipv4.tcp_keepalive_probes = 5 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1 net.core.somaxconn = 65535 net.ipv4.ip_local_port_range = 9000 61000 fs.file-max = 2097152 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 16384 16777216 net.core.netdev_max_backlog = 16384 net.ipv4.tcp_max_syn_backlog = 8192 net.ipv4.tcp_syncookies = 1 EOFApply a configuration.
Run as root:
sysctl -p /etc/sysctl.d/workfusion.confInstall required packaged dependencies for AutoML.
Run as root:
yum -y install libevent \ nfs-utils \ boost \ redhat-lsb-coreSet up nfs-server.
caution
If AutoML server uses a separate NFS server, skip this step. For using a
separate NFS server, the following variables should be set in config.yml:
vds_nfs_hostname: NFS server hostnamevds_nfs_share: a share on the NFS server
If the variables above are not set (left blank), the NFS file-share should be configured on AutoML Master server.
Enable and start rpcbind.
Run as root:
systemctl enable rpcbind systemctl daemon-reload systemctl start rpcbindCreate directories to export.
Run as root:
mkdir /opt/workfusion/vds-data chmod 0750 /opt/workfusion/vds-data chown wfuser:wfuser /opt/workfusion/vds-dataModify the
/etc/exportsfile. Add the next line.Run as root:
cat << EOF >> /etc/exports /opt/workfusion/vds-data *(fsid=0,rw,async,no_root_squash,no_subtree_check,insecure) EOFStart nfs-server.
systemctl enable nfs-server systemctl start nfs-server
AutoML Agent
Before you proceed to the steps described below, make sure, you performed the common steps as described in the Preparation steps section.
Configure sysctl parameters for AutoML agent:
Create a new file with required sysctl parameters
/etc/sysctl.d/workfusion.conf.Do not edit the standard one as it will be overwritten by the system.
Run as root:
cat << EOF > /etc/sysctl.d/workfusion.conf net.ipv4.tcp_keepalive_time = 120 net.ipv4.tcp_keepalive_intvl = 15 net.ipv4.tcp_keepalive_probes = 5 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1 net.core.somaxconn = 65535 net.ipv4.ip_local_port_range = 9000 61000 fs.file-max = 2097152 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 16384 16777216 net.core.netdev_max_backlog = 16384 net.ipv4.tcp_max_syn_backlog = 8192 net.ipv4.tcp_syncookies = 1 EOFApply a configuration.
Run as root:
sysctl -p /etc/sysctl.d/workfusion.confInstall required packaged dependencies for AutoML.
Run as root:
yum -y install libevent \ nfs-utils \ boost \ redhat-lsb-coreCreate a directory for NFS share.
Run as root
mkdir /opt/workfusion/vds-data chmod 0750 /opt/workfusion/vds-data chown wfuser:wfuser /opt/workfusion/vds-dataAdd the next line to
/etc/fstab.Run as root:
cat << EOF >> /etc/fstab <vds_master_hostname>:/opt/workfusion/vds-data /opt/workfusion/vds-data nfs rw,rsize=8192,wsize=8192,timeo=14,intr 0 0 EOFMount NFS share.
Run as root:
mount /opt/workfusion/vds-data