This version (2013/11/21 18:44) is a draft.
Approvals: 0/1

Required Files


The two essential software components for installing LTU engine are:

  • LTU engine software: delivered as a .zip file (same file for both Linux and Windows).
  • LTU license file: a machine-specific license key necessary for installing and activating the software.

Installation Steps


  • Windows: Edit file c:/windows/system32/drivers/etc/hosts and add this: 127.0.0.1 YOUR_HOSTNAME_HERE_FROM_IP_CONFIG
  • Unzip the installation software to a temporary directory.
  • Copy the license file to the same temporary directory
  • Linux: logged in as “root”, in the temporary directory, execute the script install.sh
  • Windows: logged in as Administrator, from a command line window in the temporary directory, execute the script install.bat


All system components will be installed and lauched via this single command.

Upgrade Steps


  • Unzip the installation software to a temporary directory.
  • Linux: logged in as “root”, in the temporary directory, execute the script install.sh and follow the instructions.
  • Windows: logged in as Administrator, from a command line window, run sc stop ltuengine. Then go in the temporary directory, execute the script install.bat and follow the instructions.



Linux: logged in as root: /etc/init.d/ltud [option]
options: start, stop, status all, restart

Windows: logged in as Administrator: The service “ltuengine” may be stopped and restarted via the Services panel of the Windows Server Task Manager.


The procedures described below are not available for distributed installations. Also it is not yet possible to restore the installation directly on a different machine. For such cases please contact us at support@ltutech.com

Backup

To help you backup your LTU engine installation we have created a script located in the archive file given to you under the scripts directory. Note that this script is only available for versions of the product greater than 6.2.5. However if you wish to backup your installation but have an earlier version please contact us at support@ltutech.com

What this script does:

  • Save all your data related to your LTU engine installation in a single archive file.
  • Enables you to keep doing searches while the system is being backed up. However it is impossible to add or remove images during the backup i.e. the Modify API will not be available.


To backup your LTU engine installation run the following commands as root:

cd <directory/where/you/unzip/your/ltuengine/archive/>
./scripts/backup.sh <directory/to/you/ltuengine/installation>


The output of the backup script will tell you where the archive file is located. You can then move this file around to your own storage file system. Note that the backup file will get bigger as you add content to your LTU engine installation.

Restore

Important: If you're restoring your engine's backup on a fresh instance, please install the product first and then follow the procedure below.

The following steps can only be used to restore a backup file created via the backup script described above.

To restore your LTU engine installation run the following commands as root:

/etc/init.d/ltud stop
cd <directory/to/you/ltuengine/installation>
rm -rf <installation/directory>
tar xvf <path/to/your/archive/file> 
/etc/init.d/ltud start


The system will be back to the state it was in right before the backup.

LINUX

Before unzipping the ltu-engine.zip:


1. On your EC2 admin interface, go to Security policy:

  • add tcp port 8888
  • add tcp port 7789
  • add tcp port 8080
  • add tcp port 8081


2. System configuration :

  • Add your hostname to `/etc/hostname` and Refresh the hostname configuration:
$> echo "<hostname>" > /etc/hostname
$> hostname -F /etc/hostname


  • Add the external Amazon IP and hostname to `/etc/hosts`:
/etc/hosts
<external Amazon IP address>     <hostname>


  • Add the external Amazon IP address to `/etc/network/interfaces` as a loopback entry:
/etc/network/interfaces
iface lo:0 inet static 
  address <external Amazon IP address>
  netmask 255.255.255.255



WINDOWS

Before unzipping the ltu-engine.zip:

  1. Nothing special to do, except: on your EC2 admin interface, go to Security policy:
    • add tcp port 8888
    • add tcp port 7789
    • add tcp port 8080
    • add tcp port 8081
1 - On all hosts
  • Install unzip command.
  • Edit /etc/hosts in order to add all IP and hostnames of the hosts that will be used for the installation:
    • Make sure machine hostname do not refer to the loopback address (127.0.0.1) for license subsystem to work correctly.
  • Unzip ltu-engine archive
  • Copy the spec and the license files provided by JASTEC France in the extracted folder
2 - On kima hosts
  • Install rsync server
  • Configure rsync by editing /etc/rsyncd.conf:
    uid     = ltu
    gid     = ltu                                                                                                                                                                                                       
    list    = yes
    [saas]
    path = <install_dir>/data/ltu
    comment = sql lite folder for kima
    read only = false
    hosts allow = <database host> ( support mask 10.1.0.0/16 )
  • Edit /etc/default/rsync.conf and set RSYNC_ENABLE to true
  • Run “/etc/init.d/rsync start”
3 - On database host
  • Go to the ltu-engine extracted folder
  • Run ./install.sh -i <path_to_spec>
  • Run /etc/init.d/ltud stop all
  • Configure NFS to share <install_directory>/data among all cluster hosts:
    • Make sure NFS server is started at system start and words correctly
    • Edit /etc/exports:
<install_directory>/data/ 10.1.0.0/255.255.0.0(rw,sync,no_subtree_check,insecure)
  • restart nfs
4 - On non-database hosts
  • Go to the ltu-engine extracted folder
  • Run ./install.sh -i <path_to_spec> -n
  • Run “/etc/init.d/ltud stop all”
  • Configure you system to mount shared folder at the right place in /etc/fstab:
<database_host>:<install_dir>/data/ltu/storage <install_dir>/data/ltu/storage nfs rw,noatime,sync 0 0
<database_host>:<install_dir>/data/ltu/queue <install_dir>/data/ltu/queue nfs rw,noatime,sync 0 0
<database_host>:<install_dir>/data/ltu/query <install_dir>/data/ltu/query nfs rw,noatime,sync 0 0
<database_host>:<install_dir>/data/ltu/reports <install_dir>/data/ltu/reports nfs rw,noatime,sync 0 0
<database_host>:<install_dir>/data/ltu/ftp <install_dir>/data/ltu/ftp nfs rw,noatime,sync 0 0
  • Create folders:
    • mkdir -p <install_dir>/data/ltu/{storage,queue,query,reports,ftp}
  • Mount all folders:
    • mount -a
5 - On database host
  • Generate and distribute a suitable ssh configuration for ltu user:
    • ssh-keygen -t rsa -P“” # will generate ssh key
    • cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys # will add this key to the authorized keys
    • Run the following command will add all cluster hosts to the known_hosts file:
      • for host in [<list_of_hosts>]; do ssh-keyscan -t rsa $host » ~/.ssh/known_hosts; done
    • Copy the .ssh folder located in the ltu home directory on every hosts
  • /etc/init.d/ltud start all
6 - On all other hosts
  • /etc/init.d/ltud start all

I can't start LTU engine because license server can't start under CentOS 6?

Run /opt/ltuengine/deps/license/lmhostid, if you have something like this: The FLEXnet host ID of this machine is “000000000000”. You need to rename your ethernet interface to eth0. To do that you will need to:

  • /etc/sysconfig/network-scripts/ifcfg-NAME_OF_YOUR_INTERFACE to /etc/sysconfig/network-scripts/ifcfg-eth0
  • Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and modify the first line to DEVICE=“eth0”
  • Edit /etc/udev/rules.d/70-persistent-net.rules and modify the NAME=“NAME_OF_YOUR_INTERFACE” to NAME=“eth0”

I have a local issue with my installation. (FATAL: invalid value for parameter)

Console output:

FATAL:  invalid value for parameter "lc_messages": "en_US.UTF-8"
pg_ctl: could not start server
Examine the log output.
Couldn't start the database.
Couldn't install the database service.
  • You need to install locales en_US.UTF8.

I want to deactivate the image storage for an application

This procedure can't be revert !

Run this:

su - ltu
ltud stop collector
ltud stop weki
export MY_APPLICATION_KEY='....................'
dir_to_delete=`psql -p 7791 saas_si -qtc "update application_property set value=false from application where application_property.name='save_ref_image' and application.id_application=application_property.id_application and application.application_key='$MY_APPLICATION_KEY';select sw_conf.value || '/' || client.folder_path || '/' || application_property.value from application, application_property, sw_conf, client where application.id_application = application_property.id_application and client.id_client = application.id_client and sw_conf.name='storage_root_folder_path' and application_key='$MY_APPLICATION_KEY' and application_property.name='folder_path';"`
rm -rf $dir_to_delete/*
ltud start collector
ltud start weki

I want to change my cores configuration


license feature configuration keys role
weki_nb_cores WEKI_NB_CORES * OPENMP_NUM_THREADS number of weki threads
processor_nb_cores PROCESSOR_NB_CORES * OPENMP_NUM_THREADS number of processor threads
kima_nb_cores KIMA_NB_CORES * OPENMP_NUM_THREADS number of launched kima threads
kima_nb_connections WEKI_KIMA_NB_CONNECTIONS maximum number of weki connections on kima
  • Update the configuration file: add the key/value you want to /opt/ltuengine/config/ltuengine.spec


  • Let's take an example:

My license allows me to a kima_nb_cores = 8 and I rarely make simultaneous requests. In this case, I can decide to reduce KIMA_NB_CORES in favor of OPENMP_NUM_THREADS:

"KIMA_NB_CORES": 2,
"OPENMP_NUM_THREADS": 4,


  • Once you updated the spec file, you must re-generate the configuration files to take your changes into account:
su - ltu
ltusaas-generate-config-files -i /opt/ltutengine/config/ltuengine.spec -m all -o /opt/ltu/env/run/cache/config
ltud restart all

I want to forward logs to syslog


  • Edit your spec file located here: /opt/ltutengine/config/ltuengine.spec
  • Update and add these lines:
    "SYSLOG_HANDLER_LOG_LEVEL": "INFO",
    "SYSLOG_LOG_FORMAT_PREFIX": "saas-standalone",
    "SYSLOG_LOG_FORMAT": "%(SYSLOG_LOG_FORMAT_PREFIX)s[%%(threadName)s] %%(levelname)s [%%(name)s::%%(funcName)s] %%(message)s",
    "SYSLOG_FACILITY": "LOG_LOCAL7",
    "ENABLE_SYSLOG": "True",
    "ENABLE_FILE_LOGGING": "False",


  • Then run this command to reload your configuration:
su - ltu
ltusaas-generate-config-files -i /opt/ltutengine/config/ltuengine.spec -m all -o /opt/ltu/env/run/cache/config
ltud restart all