Introduction

介绍

การแนะนำ


Overview

概观

ภาพรวม

This document is intended to describe the steps required to deploy Joget Large Enterprise Edition (LEE) in a clustered environment for scalability and redundancy.

本文旨在描述在集群环境中部署Joget Workflow Large Enterprise Edition(LEE)以实现可伸缩性和冗余性所需的步骤。

บทความนี้มีจุดมุ่งหมายเพื่ออธิบายขั้นตอนที่จำเป็นในการปรับใช้ Joget Workflow Large Enterprise Edition (LEE) ในสภาพแวดล้อมแบบคลัสเตอร์เพื่อให้สามารถปรับขยายได้และมีความซ้ำซ้อน

Requirements

要求

ความต้องการ

In order for clustering to work, the Large Enterprise Edition is required. The standard Enterprise Edition will not work due to licensing restrictions. Clustering requires several layers to be prepared and configured:

为了使群集起作用,需要大型企业版。由于许可限制,标准企业版将不起作用。集群需要准备和配置几个层:

เพื่อให้คลัสเตอร์ทำงานได้ต้องใช้เวอร์ชัน Large Enterprise Edition เนื่องจากข้อจำกัดสิทธิ์การใช้งาน Standard Enterprise Edition จะไม่ทำงาน คลัสเตอร์ต้องเตรียมและกำหนดค่าหลายเลเยอร์:

Architecture

架构

สถาปัตยกรรม

There are many ways to design the clustering architecture, but the core concepts will be similar. In this document, the architecture used is as follows:

设计集群架构的方法有很多,但核心概念是相似的。在本文档中,使用的架构如下所示:

มีหลายวิธีในการออกแบบสถาปัตยกรรมคลัสเตอร์ แต่แนวคิดหลักคล้ายกัน ในเอกสารนี้สถาปัตยกรรมที่ใช้มีดังนี้:


Deployment and Configuration Guide

部署和配置指南

คู่มือการปรับใช้และการกำหนดค่า

This guide describes the steps required to setup Joget LEE clustering. The exact steps will depend on the actual products used in each layer.

本指南介绍了安装Joget Workflow LEE集群所需的步骤。确切的步骤将取决于每层中使用的实际产品。

คู่มือนี้อธิบายขั้นตอนที่จำเป็นในการติดตั้งคลัสเตอร์ Joget Workflow LEE ขั้นตอนที่แน่นอนจะขึ้นอยู่กับผลิตภัณฑ์จริงที่ใช้ในแต่ละชั้น

IMPORTANT: Please note that there is minimal configuration required in Joget LEE itself, and almost all the work is done on the separate layers so it is vital to ensure that you have sufficient expertise in your chosen products.

重要提示:请注意,Joget Workflow LEE本身需要很少的配置,几乎所有的工作都是在单独的层上完成的,因此确保您在所选产品中拥有足够的专业知识至关重要。

หมายเหตุสำคัญ: โปรดทราบว่า Joget Workflow LEE นั้นมีการกำหนดค่าขั้นต่ำและงานเกือบทั้งหมดจะทำในชั้นที่แยกต่างหากดังนั้นจึงเป็นสิ่งสำคัญที่จะต้องแน่ใจว่าคุณมีความเชี่ยวชาญเพียงพอในผลิตภัณฑ์ที่คุณเลือก


Pre-Deployment Requirements

预部署要求

ข้อกำหนดก่อนการปรับใช้

Before the clustering installation can be done, the following prerequisites are needed:

在可以完成集群安装之前,需要以下先决条件:

ก่อนที่จะสามารถทำการติดตั้งแบบคลัสเตอร์จำเป็นต้องมีข้อกำหนดเบื้องต้นต่อไปนี้:

Shared file directory

共享文件目录

ไดเรกทอรีไฟล์ที่แชร์

Common directory to be accessed by the application servers with read/write permissions. This directory is used to store shared configuration files, system generated files, and uploaded files. Verify that the shared directory is mounted on the application servers and that files can be accessed with read and write permissions.

公用目录由具有读/写权限的应用程序服务器访问。该目录用于存储共享配置文件,系统生成的文件和上传的文件。验证共享目录是否安装在应用程序服务器上,并且可以通过读取和写入权限访问文件。

ไดเรกทอรีสาธารณะเข้าถึงได้โดยแอปพลิเคชันเซิร์ฟเวอร์ที่มีสิทธิ์อ่าน / เขียน ไดเรกทอรีนี้ใช้เพื่อจัดเก็บไฟล์การกำหนดค่าที่แชร์ไฟล์ที่สร้างจากระบบและไฟล์ที่อัพโหลด ตรวจสอบว่ามีการติดตั้งไดเร็กทอรีที่ใช้ร่วมกันบนแอปพลิเคชันเซิร์ฟเวอร์และไฟล์นั้นสามารถเข้าถึงได้ด้วยสิทธิ์การอ่านและเขียน

Shared database

共享数据库

ฐานข้อมูลที่แชร์

Common database to be accessed by the application servers with permission to select, update, delete, create and alter tables. Verify that the application servers can connect and query the shared database.

公用数据库由具有选择,更新,删除,创建和更改表的权限的应用程序服务器访问。验证应用程序服务器是否可以连接和查询共享数据库。

ฐานข้อมูลสาธารณะเข้าถึงได้โดยเซิร์ฟเวอร์แอปพลิเคชันที่มีสิทธิ์ในการเลือกอัปเดตลบสร้างและเปลี่ยนตาราง ตรวจสอบว่าเซิร์ฟเวอร์แอปพลิเคชันสามารถเชื่อมต่อและสอบถามฐานข้อมูลที่ใช้ร่วมกัน

Application servers

应用服务器

แอปพลิเคชันเซิร์ฟเวอร์

Java web application server to be installed and running on each server in the cluster. Verify that each application server has been installed correctly and can be accessed with a web browser.

Java Web应用程序服务器将在群集中的每个服务器上安装并运行。验证每个应用程序服务器是否已正确安装,并且可以通过Web浏览器进行访问。

เซิร์ฟเวอร์เว็บแอปพลิเคชัน Java จะถูกติดตั้งและทำงานบนแต่ละเซิร์ฟเวอร์ในคลัสเตอร์ ตรวจสอบว่าแต่ละเซิร์ฟเวอร์แอปพลิเคชันได้รับการติดตั้งและเข้าถึงได้อย่างถูกต้องผ่านเว็บเบราว์เซอร์

Session replication

会话复制

การจำลองแบบเซสชัน

Session replication to be configured on the application servers and network. Verify that session replication has been configured for each application server and the network.

会话复制要在应用程序服务器和网络上配置。验证是否为每个应用程序服务器和网络配置了会话复制。

การทำซ้ำเซสชันถูกกำหนดค่าบนแอปพลิเคชันเซิร์ฟเวอร์และเครือข่าย ตรวจสอบว่ามีการกำหนดค่าการจำลองแบบเซสชันสำหรับแต่ละแอปพลิเคชันเซิร์ฟเวอร์และเครือข่าย

Load balancer

负载平衡器

โหลดบาลานเซอร์

Load balancer (hardware or software) to be installed and configured to direct traffic for requests beginning with /jw to the application servers. Verify that the load balancer has been installed and configured correctly so that web traffic is directed to the individual application servers.

要安装和配置负载平衡器(硬件或软件),以便将以/ jw开头的请求的流量导向应用程序服务器。验证是否已正确安装并配置了负载平衡器,以便将Web流量导向到各个应用程序服务器。

เมื่อต้องการติดตั้งและกำหนดค่าตัวโหลดบาลานซ์ (ฮาร์ดแวร์หรือซอฟต์แวร์) เพื่อกำหนดทิศทางทราฟฟิกที่ร้องขอโดยเริ่มต้นด้วย / jw ไปยังแอปพลิเคชันเซิร์ฟเวอร์ ตรวจสอบว่าโหลดบาลานเซอร์ติดตั้งอย่างถูกต้องและกำหนดค่าให้นำทราฟฟิกของเว็บไปยังเซิร์ฟเวอร์แอปพลิเคชันแต่ละตัวโดยตรง


Joget Clustering Configuration

Joget工作流集群配置

การกำหนดค่า Joget คลัสเตอร์

It is important to ensure that the pre-deployment requirements have been verified. Once verified, the Joget specific steps are as follows:

确保预部署要求已得到验证,这一点非常重要。一旦通过验证,Joget Workflow的具体步骤如下:

มันเป็นสิ่งสำคัญเพื่อให้แน่ใจว่าข้อกำหนดก่อนการปรับใช้จะได้รับการตรวจสอบความถูกต้อง เมื่อตรวจสอบแล้วขั้นตอนเฉพาะของ Joget Workflow มีดังนี้:

Datasource Configuration

数据源配置

การกำหนดค่าแหล่งข้อมูล

Configure the datasource properties files in the shared directory

在共享目录中配置数据源属性文件

กำหนดค่าไฟล์คุณสมบัติแหล่งข้อมูลในไดเรกทอรีที่ใช้ร่วมกัน

  1. Copy all the files and directories from the wflow directory of a Joget LEE bundle into the shared file directory.

    将文件app_datasource.propertiesapp_datasource-default.properties从标准Joget安装的wflow目录复制到共享文件目录中。

    คัดลอกไฟล์และไดเร็กทอรีทั้งหมดจากไดเร็กทอรี wflow ของบันเดิล Joget LEE ไปยังไดเร็กทอรีไฟล์ที่แบ่งใช้

  2. Edit app_datasource-default.properties and set the database connection settings for the shared database, e.g. for MySQL, change the bold values below:

    编辑app_datasource-default.properties并设置共享数据库(例如MySQL)的数据库连接设置,更改下面的粗体值:

    แก้ไข app_datasource-default.properties และตั้งค่าการเชื่อมต่อฐานข้อมูลสำหรับฐานข้อมูลที่ใช้ร่วมกัน (เช่น MySQL) และเปลี่ยนค่าตัวหนาดังต่อไปนี้:



workflowDriver=com.mysql.jdbc.Driver
workflowUrl=jdbc\:mysql\://host\:port/database_name?characterEncoding\=UTF-8
workflowUser=username
profileName=
workflowPassword=password

Application Deployment and Configuration

应用程序部署和配置

การปรับใช้และการกำหนดค่าแอปพลิเคชัน

Deploy the Joget WAR file to the application servers and configure the startup properties to point to the shared directory.

将Joget WAR文件部署到应用程序服务器,并将启动属性配置为指向共享目录。

ปรับใช้ไฟล์ Joget WAR กับแอปพลิเคชันเซิร์ฟเวอร์และกำหนดค่าคุณสมบัติเริ่มต้นให้ชี้ไปที่ไดเร็กทอรีที่แบ่งใช้

  1. Deploy the WAR file jw.war from the LEE bundle to each of the application servers e.g. for Apache Tomcat, copy the files into the webapps directory

    将WAR文件jw.warjwdesigner.war从LEE包中部署到每个应用服务器,例如Apache Tomcat,将这些文件复制到tomcat webapps目录

    ปรับใช้ไฟล์ WAR jw.war และ jwdesigner.war จากแพ็คเกจ LEE ไปยังแต่ละเซิร์ฟเวอร์แอปพลิเคชันเช่น Apache Tomcat และคัดลอกไฟล์เหล่านี้ไปยังไดเรกทอรี tomcat webapps

  2. Add the following Java options in the application server startup e.g. for Apache Tomcat, modify the JAVA_OPTS line

    在应用程序服务器启动中添加Java -wflow.home = shared_directory_path选项,例如,对于Apache Tomcat,请修改JAVA_OPTS行

    เพิ่มตัวเลือก Java ต่อไปนี้ในแอปพลิเคชันเซิร์ฟเวอร์เริ่มต้นเช่น สำหรับ Apache Tomcat ให้แก้ไขบรรทัด JAVA_OPTS

    Note: You can download the wflow-cluster.jar from here. The "wflow-cluster.jar" option must be added before any other "-javaagent" option.

export JAVA_OPTS="-Xmx1024M -Dwflow.home=/shared_directory_path -javaagent:/shared_directory_path/wflow-cluster.jar -javaagent:/path_to/lib/aspectjweaver-1.8.5.jar -javaagent:/shared_directory_path/glowroot/glowroot.jar"

License Activation

许可证激活

การเปิดใช้งานใบอนุญาต

Activate license for each server. Each server has a unique system key and requires a separate license activation.

激活每个服务器的许可证。每台服务器都有一个唯一的系统密钥,需要单独的许可证激活。

เปิดใช้งานใบอนุญาตสำหรับแต่ละเซิร์ฟเวอร์ แต่ละเซิร์ฟเวอร์มีรหัสระบบที่ไม่ซ้ำกันและต้องมีการเปิดใช้งานใบอนุญาตแยกต่างหาก

  1. For each of the application servers, use the browser to directly access the Joget web console bypassing the load balancer e.g. http://server1:8080/jw/web/console/home

    对于每个应用程序服务器,使用浏览器直接访问Joget Web控制台,绕过负载平衡器,例如 {+} http:// server1:8080 / jw / web / console / home +

    สำหรับแต่ละแอปพลิเคชันเซิร์ฟเวอร์ให้ใช้เบราว์เซอร์เพื่อเข้าถึง Joget เว็บคอนโซลโดยตรงผ่านตัวโหลดบาลานซ์เช่น http://server1:8080/jw/web/console/home

  2. Request for license and activate it using the link in the web console footer.

    请求许可证并使用的Web控制台页脚中的链接激活它。

    ร้องขอใบอนุญาตและเปิดใช้งานโดยใช้ลิงก์ในส่วนท้ายของคอนโซลเว็บ



Post-Deployment Testing

部署后测试

การทดสอบหลังการปรับใช้

Once the pre-deployment and clustering configuration has been done, the testing is a matter of using a web browser to access the load balancer.

一旦完成了预部署和集群配置,测试就是使用的Web浏览器访问负载平衡器。

เมื่อการกำหนดค่าล่วงหน้าและการทำคลัสเตอร์เสร็จสิ้นแล้วการทดสอบเป็นเรื่องของการใช้เว็บเบราว์เซอร์เพื่อเข้าถึงตัวโหลดบาลานซ์


Sample Installation and Configuration

示例安装和配置

ตัวอย่างการติดตั้งและการกำหนดค่า


This sample describes an installation using the following products:

本示例介绍使用以下产品进行的安装:

ตัวอย่างนี้อธิบายการติดตั้งโดยใช้ผลิตภัณฑ์ต่อไปนี้:

Joget

Joget工作流程

Joget เวิร์กโฟลว์

Joget DX LEE

Load Balancer

负载平衡器

โหลดบาลานเซอร์

Apache HTTP Web Server 2.4 with mod_proxy and mod_balancer (proxy and load balancing modules) running on Ubuntu 18.04

Apache HTTP Web服务器2.4与在Ubuntu 18.04上运行的mod_proxy和mod_balancer(代理和负载平衡模块)

Apache HTTP Web Server 2.4 พร้อม mod_proxy และ mod_balancer (พร็อกซีและโมดูลการปรับสมดุลโหลด) ที่ทำงานบน Ubuntu 18.04

Application Servers

应用服务器

เซิร์ฟเวอร์แอปพลิเคชัน

Apache Tomcat 8.5 running on Ubuntu 18.04

运行在Ubuntu 18.04上的Apache Tomcat 8.5

Apache Tomcat 8.5 ทำงานบน Ubuntu 18.04

Shared File Directory

共享文件目录

ไดเรกทอรีไฟล์ที่ใช้ร่วมกัน

NFS on Ubuntu 18.04

NFS 18.04上的NFS

NFS บน Ubuntu 18.04

Shared Database

共享数据库

ฐานข้อมูลที่ใช้ร่วมกัน

MySQL 5.7 on Ubuntu 18.04

Ubuntu 18.04上的MySQL 5.7

MySQL 5.7 บน Ubuntu 18.04

IMPORTANT: Please note that this is not a comprehensive guide and does not cover production-level requirements e.g. user permissions, network and database security, etc. Please ensure that these are covered by your system, network and database administrators.

重要说明 :请注意,这不是一个全面的指南,不包括生产级别的要求,例如用户权限,网络和数据库安全性等。请确保这些要求由系统,网络和数据库管理员负责。

หมายเหตุสำคัญ: โปรดทราบว่านี่ไม่ใช่คู่มือที่ครอบคลุมและไม่รวมข้อกำหนดระดับการผลิตเช่นการอนุญาตผู้ใช้เครือข่ายและความปลอดภัยฐานข้อมูลเป็นต้น โปรดตรวจสอบให้แน่ใจว่าข้อกำหนดเหล่านี้เป็นความรับผิดชอบของผู้ดูแลระบบเครือข่ายและฐานข้อมูล

Create a Shared File Directory

创建一个共享文件目录

สร้างไดเรกทอรีไฟล์ที่แชร์

Share a file directory to be accessed by the application servers. This directory is used to store configuration files, system generated files, and uploaded files.
In this sample, the shared file directory will be a directory /export/wflow in the file server

共享应用程序服务器要访问的文件目录。该目录用于存储配置文件,系统生成的文件和上传的文件。
在此示例中,共享文件目录将是文件服务器中的目录 / export / wflow  

แชร์ไดเร็กทอรีไฟล์ที่จะเข้าถึงโดยแอปพลิเคชันเซิร์ฟเวอร์ ไดเรกทอรีนี้ใช้เพื่อจัดเก็บไฟล์การกำหนดค่าไฟล์ที่สร้างโดยระบบและไฟล์ที่อัพโหลด ในตัวอย่างนี้ไดเร็กทอรีไฟล์ที่แบ่งใช้จะเป็นไดเร็กทอรีในไฟล์เซิร์ฟเวอร์ / export / wflow


In the file server, install the NFS server

在文件服务器中,安装NFS服务器

ในไฟล์เซิร์ฟเวอร์ติดตั้งเซิร์ฟเวอร์ NFS

sudo apt-get install portmap nfs-kernel-server

Create shared directory and set permission

创建共享目录并设置权限

สร้างไดเรกทอรีที่ใช้ร่วมกันและตั้งค่าการอนุญาต

sudo mkdir -p /export/wflow
sudo chown nobody:nogroup /export/wflow

Configure NFS to export the shared directory, edit /etc/exports to export the directory to the local 192.168.1.0 subnetwork with your favourite editor

配置NFS导出共享目录,编辑 / etc / exports 将目录导出到本地192.168.1.0子网中

กำหนดค่า NFS เพื่อส่งออกไดเรกทอรีที่ใช้ร่วมกัน, แก้ไข / etc / exports เพื่อส่งออกไดเรกทอรีไปยังเครือข่ายย่อย 192.168.1.0 ท้องถิ่นด้วยโปรแกรมแก้ไขที่คุณโปรดปราน

sudo vim /etc/exports 

The /etc/exports should contain the following:

/etc/exports 应包含以下内容:

/ etc / exports ควรประกอบด้วยสิ่งต่อไปนี้:

/export/wflow 192.168.1.0/255.255.255.0(rw,no_subtree_check,async)

Export the shares and restart NFS service

导出共享并重新启动NFS服务

ส่งออกการแชร์และรีสตาร์ทเซอร์วิส NFS

sudo exportfs -ra
sudo service nfs-kernel-server restart 


Mount the Shared Directory in the Application Servers

将共享目录挂载到应用程序服务器中

เมาท์ไดเรกทอรีที่ใช้ร่วมกันในแอปพลิเคชันเซิร์ฟเวอร์

In the application servers, install the NFS client

在应用程序服务器中,安装NFS客户端

ในแอปพลิเคชันเซิร์ฟเวอร์ให้ติดตั้ง NFS client

apt-get install nfs-common

Create new directory /opt/joget/shared/wflow to mount the shared directory and set the directory permissions

创建新目录 / opt / joget / shared / wflow 来挂载共享目录并设置目录权限

สร้างไดเร็กทอรีใหม่ / opt / joget / shared / wflow เพื่อไดเร็กทอรีที่แบ่งใช้และตั้งค่าการอนุญาตไดเร็กทอรี

sudo mkdir -p /opt/joget/shared/wflow
sudo chmod 777 /opt/joget/shared/wflow

Mount the shared directory.

安装共享目录。

เมาท์ไดเรกทอรีที่ใช้ร่วมกัน

sudo mount -t nfs wflow:/export/wflow /opt/joget/shared/wflow

Test read-write permissions to confirm that the directory sharing works.

测试读写权限以确认目录共享是否有效。

ทดสอบสิทธิ์ในการอ่าน - เขียนเพื่อยืนยันว่าการแชร์ไดเรกทอรีใช้งานได้

echo test123 > /opt/joget/shared/wflow/test.txt

Create a Shared Database

创建一个共享数据库

สร้างฐานข้อมูลที่ใช้ร่วมกัน

Install MySQL ( https://help.ubuntu.com/18.04/serverguide/mysql.html)

安装MySQL( https://help.ubuntu.com/14.04/serverguide/mysql.html

ติดตั้ง MySQL ( https://help.ubuntu.com/18.04/serverguide/mysql.html)

sudo apt-get install mysql-server

Create a database called jwedb accessible to the application servers.

创建一个名为 jwedb 的应用程序服务器可访问的数据库。

สร้างฐานข้อมูลชื่อ jwedb ที่สามารถเข้าถึงได้โดยเซิร์ฟเวอร์แอปพลิเคชัน

mysql -u root 

Run the following MySQL commands to create a blank database

运行以下MySQL命令来创建一个空白数据库

เรียกใช้คำสั่ง MySQL ต่อไปนี้เพื่อสร้างฐานข้อมูลเปล่า

create database jwedb;
quit

Populate the newly created database with the Joget database schema

使用Joget数据库模式填充新创建的数据库

เติมฐานข้อมูลที่สร้างขึ้นใหม่ด้วยสคีมาฐานข้อมูล Joget

mysql -uroot jwedb < /path/to/jwdb-mysql.sql

Configure database permissions

配置数据库权限

กำหนดค่าการอนุญาตฐานข้อมูล

mysql -u root 

Run the following MySQL commands to grant permissions to user joget and password joget

运行以下MySQL命令来授予用户 joget 和密码 joget的权限

รันคำสั่ง MySQL ต่อไปนี้เพื่อให้สิทธิ์แก่ผู้ใช้ joget และรหัสผ่าน joget

grant all privileges on jwedb.* to 'joget'@'%' identified by 'joget';
flush privileges;
quit

Configure MySQL to listen to database connections from remote hosts. Edit the my.cnf file with your favourite editor

配置MySQL以侦听来自远程主机的数据库连接。用你最喜欢的编辑器编辑my.cnf文件

กำหนดค่า MySQL เพื่อฟังการเชื่อมต่อฐานข้อมูลจากโฮสต์ระยะไกล แก้ไขไฟล์ my.cnf ด้วยโปรแกรมแก้ไขที่คุณชื่นชอบ

sudo vim /etc/mysql/my.cnf 

Comment away the bind-address directive by adding a # in front of the line

通过在行前添加#来注释掉bind-address指令

แสดงความคิดเห็นเกี่ยวกับคำสั่ง bind-address โดยการเพิ่ม # ไว้ด้านหน้าของบรรทัด

#bind-address = 127.0.0.1 

Restart MySQL

重新启动MySQL

รีสตาร์ท MySQL

sudo service mysql restart

In the application server, test a remote connection to the database server database_host

在应用程序服务器中,测试到数据库服务器database_host的远程连接  

ในแอ็พพลิเคชันเซิร์ฟเวอร์ทดสอบการเชื่อมต่อรีโมตกับฐานข้อมูลเซิร์ฟเวอร์ database_host

mysql -h database_host -u joget -p



Deploy Application Servers

部署应用程序服务器

ปรับใช้เซิร์ฟเวอร์แอปพลิเคชัน

Install Apache Tomcat on each of the application servers. In each application server, run the following to extract tomcat into /opt/joget:

在每个应用程序服务器上安装Apache Tomcat。在每个应用程序服务器中,运行以下命令将tomcat解压缩到/ opt / joget中:

ติดตั้ง Apache Tomcat บนแต่ละแอปพลิเคชันเซิร์ฟเวอร์ ในแต่ละเซิร์ฟเวอร์แอปพลิเคชันให้เรียกใช้สิ่งต่อไปนี้เพื่อแยก Tomcat ลงใน / opt / joget:

sudo mkdir -p /opt/joget/
sudo tar xvfz apache-tomcat-8.5.41.tar.gz /opt/joget/

Start each application server

启动每个应用服务器

เริ่มแต่ละเซิร์ฟเวอร์แอปพลิเคชัน

sudo cd /opt/joget/apache-tomcat-8.5.41
sudo ./bin/catalina.sh start

Open a web browser and access each server to confirm that http://server:8080/jw

打开Web浏览器并访问每个服务器以确认 http://server:8080/jw

เปิดเว็บเบราว์เซอร์และเข้าถึงแต่ละเซิร์ฟเวอร์เพื่อยืนยัน http://server:8080/jw



Configure Application Server Session Replication

配置应用服务器会话复制

กำหนดค่า Application Server Session Replication

Configure Tomcat for clustering by editing apache-tomcat-8.5.41/conf/server.xml. Add jvmRoute="node01" to the Engine tag and uncomment the Cluster tag.

通过编辑apache-tomcat-8.0.20 / conf / server.xml配置Tomcat进行集群。将 jvmRoute =“node01” 添加 Engine 标记并取消注释 Cluster 标记。

กำหนดค่า Tomcat สำหรับการทำคลัสเตอร์โดยแก้ไข apache-tomcat-8.5.41 / conf / server.xml เพิ่ม jvmRoute = "node01" ไปยังแท็ก Engine และไม่ใส่เครื่องหมายข้อคิดเห็นแท็ก Cluster

<Engine name="Catalina" defaultHost="localhost" jvmRoute="node01">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

Configure local domain IP. Verify that the local server name resolves to the IP and not 127.0.1.1. Assuming the server name is server1 and the IP is 192.168.1.10, edit /etc/hosts and set:

配置本地域IP。验证本地服务器名称解析为IP而不是127.0.1.1。假设服务器名称为server1,IP为192.168.1.10,请编辑/ etc / hosts并设置:

กำหนดค่า IP ของโดเมนท้องถิ่น ตรวจสอบว่าชื่อ local server แก้ไขเป็น IP และไม่ใช่ 127.0.1.1 สมมติว่าชื่อเซิร์ฟเวอร์คือ server1 และ IP คือ 192.168.1.10 แก้ไข / etc / hosts และตั้งค่า:

192.168.1.10 server1

Verify multicast is enabled between the application servers by running ifconfig and look for MULTICAST. Try http://blogs.agilefaqs.com/2009/11/08/enabling-multicast-on-your-macos-unix/ if there are issues.

Restart the Tomcat servers.

通过运行 ifconfig 验证应用程序服务器之间的组播是否启用并查找MULTICAST。 如果有问题, 请尝试 http://blogs.agilefaqs.com/2009/11/08/enabling-multicast-on-your-macos-unix/

重新启动Tomcat服务器。

ตรวจสอบว่ามีการเปิดใช้งานมัลติคาสต์ระหว่างเซิร์ฟเวอร์แอปพลิเคชันโดยการเรียกใช้ ifconfig และค้นหา MULTICAST ลอง http://blogs.agilefaqs.com/2009/11/08/enabling-multicast-on-your-macos-unix/ หากมีปัญหา รีสตาร์ทเซิร์ฟเวอร์ Tomcat

sudo cd /opt/joget/apache-tomcat-8.5.41
sudo ./bin/catalina.sh stop
sudo ./bin/catalina.sh start

Verify session replication working between the application servers. The catalina.out log file in apache-tomcat-8.5.41/logs should show something similar to:

验证应用程序服务器之间的会话复制。apache-tomcat-8.0.20 / logs中的 catalina.out 日志文件应显示类似于:

ตรวจสอบการจำลองแบบเซสชันระหว่างแอปพลิเคชันเซิร์ฟเวอร์ ไฟล์บันทึก catalina.out ใน apache-tomcat-8.0.20 / logs ควรแสดงดังนี้:

INFO: Starting clustering manager at localhost#/jw
Jan 17, 2016 11:21:32 AM org.apache.catalina.ha.session.DeltaManager getAllClusterSessions
INFO: Manager [localhost#/jw], requesting session state from org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0, 0, 1}:4001,{127, 0, 0, 1},4001, alive=55733886, securePort=-1, UDP Port=-1, id={-57 118 -98 -98 110 -38 64 -68 -74 -25 -29 101 46 103 5 -48 }, payload={}, command={}, domain={}, ]. This operation will timeout if no session state has been received within 60 seconds.
Jan 17, 2016 11:21:32 AM org.apache.catalina.ha.session.DeltaManager waitForSendAllSessions
INFO: Manager [localhost#/jw]; session state send at 1/17/16 11:21 AM received in 104 ms.

More information on Tomcat clustering is at http://tomcat.apache.org/tomcat-8.5-doc/cluster-howto.html

有关Tomcat集群的更多信息,请参阅 http://tomcat.apache.org/tomcat-8.5-doc/cluster-howto.html

ข้อมูลเพิ่มเติมเกี่ยวกับการจัดกลุ่ม Tomcat อยู่ที่ http://tomcat.apache.org/tomcat-8.5-doc/cluster-howto.html


Configure Load Balancer

配置负载平衡器

กำหนดค่าตัวโหลดบาลานซ์

In the load balancer server, install Apache HTTP Server 

在负载平衡器服务器中,安装Apache HTTP Server  

บนเซิร์ฟเวอร์ load balancer ติดตั้ง Apache HTTP Server

sudo apt-get install apache2

Install proxy and balancer modules

安装代理和平衡器模块

ติดตั้งโมดูลพร็อกซีและบาลานเซอร์

sudo a2enmod headers proxy proxy_balancer proxy_http

Configure a new site with the proxy and balancer modules. Create a new file in /etc/apache2/sites-available, named jwsite

使用代理和平衡器模块配置新站点。在/etc/apache2/sites-available中创建一个名为jwsite的新文件

กำหนดค่าไซต์ใหม่ด้วยโมดูลพร็อกซีและบาลานเซอร์ สร้างไฟล์ใหม่ใน / etc / apache2 / sites-available ชื่อ jwsite

sudo vim /etc/apache2/sites-available/jwsite.conf 

Add the contents

添加内容

เพิ่มเนื้อหา

NameVirtualHost *
<VirtualHost *>
	DocumentRoot "/var/www/jwsite" 
	ServerName localhost
	ServerAdmin support@example.com
	DirectoryIndex index.html index.htm 
	<Proxy balancer://wscluster>
		BalancerMember ws://server1:8080 route=node01
		BalancerMember ws://server2:8080 route=node02
		Order deny,allow
		Allow from all
	</Proxy>
	ProxyPass /jw/web/applog balancer://wscluster/jw/web/applog stickysession=JSESSIONID|jsessionid
	ProxyPassReverse /jw/web/applog balancer://wscluster/jw/web/applog
	<Proxy balancer://cluster>
		BalancerMember http://server1:8080 route=node01
		BalancerMember http://server2:8080 route=node02
		Order deny,allow
		Allow from all
	</Proxy> 
	ProxyPass /jw balancer://cluster/jw stickysession=JSESSIONID|jsessionid
	ProxyPassReverse /jw balancer://cluster/jw
	ProxyPreserveHost On
</VirtualHost>

Enable the new site and restart Apache

启用新的站点并重新启动Apache

เปิดใช้งานไซต์ใหม่และรีสตาร์ท Apache

sudo a2ensite jwsite
sudo service apache2 reload



Deploy and Configure Joget LEE

部署和配置Joget工作流LEE

ปรับใช้และกำหนดค่า Joget LEE

Deploy and configure Joget LEE as described earlier in 2.2 Joget Clustering Configuration

如前面2.2 Joget集群配置中所述部署和配置Joget Workflow LEE  

ปรับใช้และกำหนดค่า Joget LEE ตามที่อธิบายไว้ก่อนหน้าใน 2.2 Joget Clustering Configuration