Differences

This shows you the differences between two versions of the page.

Link to this comparison view

engine:7.8:distributed [2017/04/07 16:20]
127.0.0.1 external edit
engine:7.8:distributed [2018/02/01 18:15]
Line 1: Line 1:
-===== Distributed installation of LTU engine ===== 
- 
-== 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'':​ 
- 
-<​code>​ 
-    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 ) 
-</​code>​ 
- 
-  * 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'':​ 
-<​file>​ 
-<​install_directory>/​config/​ 10.1.0.0/​255.255.0.0(rw,​sync,​no_subtree_check,​insecure) 
-<​install_directory>/​data/​ 10.1.0.0/​255.255.0.0(rw,​sync,​no_subtree_check,​insecure) 
-</​file>​ 
-    * 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'':​ 
-<​file>​ 
-<​database_host>:<​install_dir>/​config <​install_dir>/​config nfs rw,​noatime,​sync 0 0 
-<​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 
-</​file>​ 
-  * 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: 
-      * <​code>​for host in list_of_hosts;​ do ssh-keyscan -t rsa $host >> ~/​.ssh/​known_hosts;​ done</​code>​ 
-    * 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''​ 
- 
-===== Specifications example ===== 
- 
-<​code>​ 
-{ 
-  "​DB_HOSTNAME":​ "​URI_SERVER_PRIMARY_MASTER",​ 
-  "​MANAGER_HOSTNAME":​ "​URI_SERVER_PRIMARY_MASTER",​ 
-  "​HOSTS":​ { 
-    "​URI_SERVER_PRIMARY_MASTER":"​chiwa",​ 
-    "​URI_SERVER_SECONDARY":"​chiwa"​ 
-  }, 
-  "​INSTALL_TYPE":​ "​chiwa",​ 
-  "​KIMA_NB_CORES":​ "​3",​ 
-  "​OPENMP_NUM_THREADS":​ "​1",​ 
-  "​PROCESSOR_NB_CORES":​ "​2",​ 
-  "​SERVICES":​ { 
-    "​frontoffice":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​license":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​weki":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER",​ 
-      "​URI_SERVER_SECONDARY"​ 
-    ], 
-    "​storage":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​log_database":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​si_database":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​app_worker":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​db_creator":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​admin_worker":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​app_database":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​manager":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​other":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​messaging":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ], 
-    "​kima":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER",​ 
-      "​URI_SERVER_SECONDARY"​ 
-    ], 
-    "​processor":​ [ 
-      "​URI_SERVER_SECONDARY"​ 
-    ], 
-    "​dispatcher":​ [ 
-      "​URI_SERVER_PRIMARY_MASTER"​ 
-    ] 
-  }, 
-  "​WEKI_KIMA_NB_CONNECTIONS":​ "​4",​ 
-  "​WEKI_NB_CORES":​ "​3"​ 
-} 
-</​code>​ 
- 
- 
-===== Mirroring / Failover & Scalability / Sharding ===== 
- 
-LTU engine provides the possibility to mirror services and to share its content on many servers. 
- 
- 
-^ Feature (main service) ​    ^ Mirroring / Failover ​ ^ Horizontal scalability / Sharding ​ ^ Vertical scalability / Adding CPU or Memory ​ ^ 
-| AddImage (processor) ​      | Yes                   | Yes                                | Yes, with more CPU                           | 
-| SearchImage (weki & kima)  | Yes                   | Yes                                | Yes with more CPU                            | 
-| Bigger Database ​           | -                     | Yes                                | Yes with more Memory ​                        | 
-| DeleteImages (processor) ​  | Yes                   | No                                 | No                                           | 
- 
- 
-===== Procedure to add a new service in Engine Cluster (a weki in our example): ​ ===== 
- 
- 
-  * check that /​opt/​ltuengine/​config is shared on every machine 
-  * update /​opt/​ltuengine/​config/​ltuengine.spec 
-  * connect as ltu on the main server (database), add you server, its type and site in hw_server: 
-    * insert into hw_server (hostname, type, id_site) values ('​paris-02.multi.fr.ltutech.net',​ '​weki',​ '​paris'​);​ 
-  * connect as ltu on the server hosting the service, and run :  
-    * ltusaas-generate-config-files -i ./​config/​ltuengine.spec -m WEKI -o ./​run/​cache/​config/​ 
-    * ltud start weki 
-  * connect as ltu on the dispatcher 
-    * ltusaas-generate-config-files -i ./​config/​ltuengine.spec -m DISPATCHER -o ./​run/​cache/​config/​ 
-    * ltud restart dispatcher