Installation of Unica Link in Native Mode

Dependencies

  • bash (Bourne Again SHell)
  • ksh (KornShell)
  • libnsl
  • GNU sed
  • MongoDB server

Accessing Unica Link on HTTP through load balancer HTTPS URL

This section describes the accessing of Unica Link on HTTP through load balancer HTTPS URL and internally routed to link by using nginx or any other load balancer.

For accessing Unica Link through load balancer URL, you need to set three context rules as follows:

  • hip-rest - It must be redirected to the rest port.
  • tx-server - It must be redirected to the client/node port.
  • link client - It must use the client port.

See note for the tx-server context rules:

  • The nginx tx-server context communicate to link node via the Link node/client port, not directly to link tomcat through the tomcat port (Link server).
  • The connection from the Link node/client to the backend server will run through the settings which we have under client → outbound in config.yaml (Link node/client redirection to tomcat/link server).

Native System Configuration

Native system configuration includes:
  • changing the temporary directory, or
  • removing noexec from the /tmp directory.

Changing the Link Temporary Directory

To change the Link temporary directory, complete the following steps:

  1. Create a new directory. Ensure that the noexec option is not used for mounting of the location.
  2. Check the output of the mount. For example, run the following commands:
    mkdir /opt/hiptmp
    chmod 777 /opt/hiptmp
  3. Add a new line to tomcat-context/install/restapi/tomcat/setenv.sh to specify the new directory. For example:
    export JAVA_OPTS="$JAVA_OPTS Djava.io.tmpdir=/opt/hiptmp"
  4. For the long and short workers, modify the existing lines in config.yaml. For example:
    longTaskProcessJvmOptions="-Xmx2g -Djava.io.tmpdir=/opt/hiptmp"
    shortTaskProcessJvmOptions="-Djava.io.tmpdir=/opt/hiptmp"
  5. Restart Link.

Changing the Mount Option for /tmp

The /tmp directory must be mounted with noexec. To verify, run the following commands:

mount | grep /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)

If /tmp directory is already mounted with noexec, you can change the mount option for /tmp directory. To change the the mount option for /tmp directory, complete the following steps:

  1. Ensure that you are using root user privileges.
  2. Edit /etc/fstab and remove noexec from the mount options of /tmp.
  3. Either:
    1. Reboot the system, or
    2. Run the following command:
      mount -o remount /tmp

Configuration

To configure most properties of Link, use the file config.yaml.

Review the config.yaml file before you perform the installation to confirm that all default options are as expected.

To reconfigure after installation, update those files, and restart Link.

You will notice several directories specified in the configuration files. If you, or the group you install as, lack Read/Write access to these directories, contact a system administrator to create the directories and transfer ownership.

If you are installing as a non-root user, use ports above 1024 to avoid permission issues. The default ports are:
Tomcat (REST API + Server): HTTPS 8443, HTTP 8080
UI Client: HTTPS 4443

Installation

Read the Link Utility documentation before following the installation steps. You may need to adjust commands according to your use-case.
  1. The following commands are intended for a quick-start scenario:
    1. Use the following command to generate configuration:
      ./Link configure -–generate
    2. Change the Unica Journey/Unica Campaign/Unica Platform properties under <Link installer>/ integration-context/apps/ and place the connectors under <Link installer>/ integration-context/connectors.
    3. Enable the Unica application to embed the Link UI. Customize the Link configuration by changing the value of the contentSecurityPolicy parameter in <Link installer>/Config.yaml file. The value is list of URLs that point to Unica journey and Unica Campaign web application servers. For example, the URLs can be http://ipaddress:port or http://hostname:port which point to Unica journey and Unica Campaign web application servers.

      If the URLs are not set correctly, Unica cannot access link in iframe and you will see error while loading link in iframe.

    4. ./Link configure --type native --integration unica
    5. ./Link install
    6. Change the kafkalink properties under <Link-install>/integration-context/install/.
    7. Either start all components or continue to the troubleshooting section for any errors.
      ./Link start
  2. When Link is up and running, navigate to the location that is set for the environment variable files and create a new folder tmp.

    Refer to the file config.yaml, present in the installation location, to see the folder path that is set for the files parameter. The default path is /opt/hip-rest. If the default path is /opt/hip-rest, the tmp folder file path is /opt/hip-rest/tmp.

Installing Link Offline

For installing Link offline, Internet access is not required. Link offline installation can be done, only with MongoDB preinstalled.

Manually updating Apache Tomcat 9 for the Link application

This procedure defines the steps to manually update the installed Apache Tomcat 9 software for the Link application. If the currently installed version of Apache Tomcat 9 has a security issue that is resolved in a later version, you can follow these steps to update it.

Important: Ensure that you back up the <Link installation folder>tomcat-context/install/restapi/ folder.

To manually update Apache Tomcat 9 for Link application on Linux native platform, complete the following steps:

  1. Download the latest Linux binaries of Apache Tomcat 9 in tar.gz format from the official Apache Tomcat website.
  2. Open a Linux terminal window and change the current directory to the Link installation directory <Link installation folder>.
    Important: Ensure that you are logged in as the same user who initially installed the Link application.
  3. Execute the following commands to stop and uninstall the current Link installation:
    ./Link stop
    ./Link uninstall
  4. Change the current directory to the installation directory <Link installation folder>/tomcat-context, run the following command:
    cd <Link installation folder>/tomcat-context
  5. Create a temporary folder and extract the contents of Link hip-core.tar.gz to it, run the following command:
    mkdir tmp
    tar -xf hip-core.tar.gz -C tmp
  6. Copy the downloaded tar.gz binaries into <Link installation folder>/tomcat-context/tmp/restapi/tomcat folder.
  7. Open the dtxtomcat.ini configuration file located at <Link installation folder>/tomcat-context/tmp/restapi/tomcat/ location using a Text Editor. Update the string TomcatVersion=9.0.XX to match the version of the downloaded Apache Tomcat 9 from Step 1. Save the changes.
  8. Update the Link hip-core.tar.gz file by running the following command from the <Link installation folder>/tomcat-context/tmp folder:
    tar -czf ../hip-core.tar.gz .
  9. Change the current directory to the Link installation directory <Link installation folder>, by running the following command:
    cd <Link installation folder>
  10. Execute the following commands to install and start Link:
    ./Link install
    ./Link start