Run preinstallation 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 Preinstall Steps and executed Precheck as described in the Run Pre-Installation Checks section.
Common steps
The common steps should be performed for each server before installation of server specific components.
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 \ libselinux-python \ wget \ rsync \ python-setuptools \ coreutilsSet SELinux to permissive mode.
Run as root:
cat << EOF > /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=permissive # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted EOFConfigure 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 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 supervisord service.
Run as root:
systemctl daemon-reload systemctl enable supervisordUnpack nginx binary and set capability to bind it on port less than 1025.
This step is needed only if you are going to bind nginx on port below 1025.
This means that you should run this step if your
config.ymlfile contains values fornginx_<server_role>_portsettings below 1025, andautomate_preinstall_stepis set tofalse, for example:
automate_preinstall_steps: false nginx_<server_role>_port: '80' nginx_<server_role>_port_ssl: '443'This step should be run only on the
<server_role>server for which nginx port is set below 1025 inconfig.yml.This step should not be executed on a separate VDS Slave server in case of the VDS Cluster type of installation as there should be no Nginx on VDS Slave by design.
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 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 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
VDS Master
Configure sysctl parameters for VDS master
- Create the new file with required sysctl parameters
/etc/sysctl.d/workfusion.conf.
caution
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 EOF- Apply the configuration.
Run as root:
sysctl -p /etc/sysctl.d/workfusion.conf- Create the new file with required sysctl parameters
Install required packaged dependencies for VDS.
Run as root:
yum -y install libevent \ nfs-utils \ boost \ redhat-lsb-coreSet up nfs-server. If VDS 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), then NFS file-share should be configured on VDS Master server.
- Enable and start rpcbind.
Run as root:
systemctl enable rpcbind systemctl daemon-reload systemctl start rpcbind- Create directories that we are going to export.
Run as root
mkdir /opt/workfusion/vds-data chmod 0750 /opt/workfusion/vds-data chown wfuser:wfuser /opt/workfusion/vds-data- Modify the export file
/etc/exports, 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) EOF- Start nfs-server.
systemctl start nfs-server
VDS Slave
Before you proceed to the steps described below, make sure, you've performed the common steps as described in Preinstall Steps.
Configure sysctl parameters for VDS slave.
- Create a file with required sysctl parameters
/etc/sysctl.d/workfusion.conf.
caution
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 EOF- Apply the configuration:
Run as root:
sysctl -p /etc/sysctl.d/workfusion.conf- Create a file with required sysctl parameters
Install required packaged dependencies for VDS.
Run as root:
yum -y install libevent \ nfs-utils \ boost \ redhat-lsb-coreCreate 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