Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Table of Contents | ||||
---|---|---|---|---|
|
...
本文旨在描述在集群环境中部署This document is intended to describe the steps required to deploy Joget Workflow Large Enterprise Edition (LEE) in a clustered environment for scalability and redundancy.
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:
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:
This guide describes the steps required to setup Joget Workflow LEE clustering. The exact steps will depend on the actual products used in each layer.
Warning |
---|
IMPORTANT: Please note that there is minimal configuration required in Joget Workflow 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. |
...
Edition(LEE)以实现可伸缩性和冗余性所需的步骤。
为了使群集起作用,需要大型企业版。由于许可限制,标准企业版将不起作用。集群需要准备和配置几个层:
设计集群架构的方法有很多,但核心概念是相似的。在本文档中,使用的架构如下所示:
本指南介绍了安装Joget Workflow LEE集群所需的步骤。确切的步骤将取决于每层中使用的实际产品。
Warning |
---|
重要提示:请注意,Joget Workflow LEE本身需要很少的配置,几乎所有的工作都是在单独的层上完成的,因此确保您在所选产品中拥有足够的专业知识至关重要。 |
在可以完成集群安装之前,需要以下先决条件:
公用目录由具有读/写权限的应用程序服务器访问。该目录用于存储共享配置文件,系统生成的文件和上传的文件。验证共享目录是否安装在应用程序服务器上,并且可以通过读取和写入权限访问文件。
公用数据库由具有选择,更新,删除,创建和更改表的权限的应用程序服务器访问。验证应用程序服务器是否可以连接和查询共享数据库。
Java Web应用程序服务器将在群集中的每个服务器上安装并运行。验证每个应用程序服务器是否已正确安装,并且可以通过Web浏览器进行访问。
会话复制要在应用程序服务器和网络上配置。验证是否为每个应用程序服务器和网络配置了会话复制。
要安装和配置负载平衡器(硬件或软件),以便将以/ jw开头的请求的流量导向应用程序服务器。验证是否已正确安装并配置了负载平衡器,以便将Web流量导向到各个应用程序服务器。
确保预部署要求已得到验证,这一点非常重要。一旦通过验证,Joget Workflow的具体步骤如下:
在共享目录中配置数据源属性文件
...
Before the clustering installation can be done, the following prerequisites are needed:
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.
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.
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.
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 (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.
It is important to ensure that the pre-deployment requirements have been verified. Once verified, the Joget Workflow specific steps are as follows:
Configure the datasource properties files in the shared directory
Code Block |
---|
workflowDriver=com.mysql.jdbc.DriverworkflowUrl=jdbc\:mysql\://host\:port/database_name?characterEncoding\=UTF-88 workflowUser=usernameusername profileName= workflowPassword=password |
Deploy Joget WAR files to the application servers and configure the startup properties to point to the shared directory.
将Joget WAR文件部署到应用程序服务器,并将启动属性配置为指向共享目录。
Code Block |
---|
export JAVA_OPTS ="-XX:MaxPermSize=“ - XX:MaxPermSize = 128m -Xmx1024M -Dwflow.home = / shared_directory_path"path” |
Activate license for each server. Each server has a unique system key and requires a separate license activation.
激活每个服务器的许可证。每台服务器都有一个唯一的系统密钥,需要单独的许可证激活。
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.
This sample describes an installation using the following products:
一旦完成了预部署和集群配置,测试就是使用的Web浏览器访问负载平衡器。
本示例介绍使用以下产品进行的安装:
Joget工作流程Joget Workflow | Joget Workflow v5 LEE |
Load Balancer负载平衡器 | Apache HTTP Web Server 2.4 with mod_proxy and mod_balancer (proxy and load balancing modules) running on Ubuntu 14.04 |
Application Servers | Apache Tomcat 8.0 running on Ubuntu 14.04 |
Shared File Directory | NFS on Ubuntu 14.04 |
Shared Database | MySQL 5.5 on Ubuntu 14.04 |
Warning |
---|
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. |
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
Web服务器2.4与在Ubuntu 14.04上运行的mod_proxy和mod_balancer(代理和负载平衡模块) | |
应用服务器 | 运行在Ubuntu 14.04上的Apache Tomcat 8.0 |
共享文件目录 | NFS 14.04上的NFS |
共享数据库 | Ubuntu 14.04上的MySQL 5.5 |
Warning |
---|
重要说明:请注意,这不是一个全面的指南,不包括生产级别的要求,例如用户权限,网络和数据库安全性等。请确保这些要求由系统,网络和数据库管理员负责。 |
共享应用程序服务器要访问的文件目录。该目录用于存储配置文件,系统生成的文件和上传的文件。
在此示例中,共享文件目录将是文件服务器中的目录/ export / wflow
在文件服务器中,安装NFS服务器In the file server, install the NFS server
Code Block |
---|
sudo apt-get install portmap nfs-kernel-server
|
创建共享目录并设置权限Create shared directory and set permission
Code Block |
---|
sudo mkdir -p /export/wflow sudo chown nobody:nogroup /export/wflow |
Configure NFS to export the shared directory, edit 配置NFS导出共享目录,编辑/ etc / exports to export the directory to the local 192将目录导出到本地192.168.1.0 subnetwork with your favourite editor0子网中
Code Block |
---|
sudo vim /etc/exports |
The 在/etc/exports should contain the following:中应包含以下内容:
Code Block |
---|
/export/wflow 192.168.1.0/255.255.255.0(rw,no_subtree_check,async)
|
导出共享并重新启动NFS服务Export the shares and restart NFS service
Code Block |
---|
sudo exportfs -ra
sudo service nfs-kernel-server restart |
在应用程序服务器中,安装NFS客户端In the application servers, install the NFS client
Code Block |
---|
apt-get install nfs-common |
Create new directory 创建新目录/ opt / joget / shared / wflow to mount the shared directory and set the directory permissions来挂载共享目录并设置目录权限
Code Block |
---|
sudo mkdir -p /opt/joget/shared/wflow sudo chmod 777 /opt/joget/shared/wflowwflow |
Mount the shared directory.安装共享目录。
Code Block |
---|
sudo mount -t nfs wflow:/export/wflow /opt/joget/shared/wflow |
测试读写权限以确认目录共享是否有效。Test read-write permissions to confirm that the directory sharing works.
Code Block |
---|
echo test123 > /opt/joget/shared/wflow/test.txt |
安装MySQL(Install MySQL (https://help.ubuntu.com/14.04/serverguide/mysql.html))
Code Block |
---|
sudo apt-get install mysql-server |
创建一个名为jwedb的应用程序服务器可访问的数据库。Create a database called jwedb accessible to the application servers.
Code Block |
---|
mysql -u root
|
运行以下MySQL命令来创建一个空白数据库Run the following MySQL commands to create a blank database
Code Block |
---|
create database jwedb; quit |
Populate the newly created database with the Joget database schema使用Joget数据库模式填充新创建的数据库
Code Block |
---|
mysql -uroot jwedb < /path/to/jwdb-mysql.sql |
Configure database permissions配置数据库权限
Code Block |
---|
mysql -u root
|
运行以下MySQL命令来授予用户joget和密码joget的权限Run the following MySQL commands to grant permissions to user joget and password joget
Code Block |
---|
grant all privileges on jwedbjwdb.* 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文件
Code Block |
---|
sudo vim /etc/mysql/my.cnf |
Comment away the bind-address directive by adding a # in front of the line通过在行前添加#来注释掉bind-address指令
Code Block |
---|
#bind#bind-address = 127.0.0.1 |
Restart MySQL重新启动MySQL
Code Block |
---|
sudo service mysql restart |
In the application server, test a remote connection to the database server 在应用程序服务器中,测试到数据库服务器database_host的远程连接
Code Block |
---|
mysql -h database_host -u joget -p |
在每个应用程序服务器上安装Apache Tomcat。在每个应用程序服务器中,运行以下命令将tomcat解压缩到Install Apache Tomcat on each of the application servers. In each application server, run the following to extract tomcat into / opt / joget:joget中:
Code Block |
---|
sudo mkdir -p /opt/joget/ sudo tar xvfz apache-tomcat-8.0.20.tar.gz /opt/joget/ |
Start each application server启动每个应用服务器
Code Block |
---|
sudo cd /opt/joget/apache-tomcat-8.0.20 sudo ./bin/catalina.sh start |
Open a web browser and access each server to confirm that 打开Web浏览器并访问每个服务器以确认http://server:8080/jw
通过编辑apacheConfigure Tomcat for clustering by editing apache-tomcat-8.0.20 / conf / server.xml. Addxml配置Tomcat进行集群。将 jvmRoute ="node01" to the Engine tag and uncomment the Cluster tag.“node01” 添加到Engine标记并取消注释Cluster标记。
Code Block |
---|
<Engine name="Catalina" defaultHost="localhost" jvmRoute="node01"> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> > |
配置本地域IP。验证本地服务器名称解析为IP而不是127Configure 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.1。假设服务器名称为server1,IP为192.168.1.10, edit 10,请编辑/ etc / hosts and set:hosts并设置:
Code Block |
---|
192.168.1.10 server1 |
通过运行ifconfig验证应用程序服务器之间的组播是否启用并查找MULTICAST。 如果有问题,请尝试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. 。
重新启动Tomcat服务器。
Code Block |
---|
sudo cd /opt/joget/apache-tomcat-8.0.20 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.0.20 / logs should show something similar to:logs中的catalina.out日志文件应显示类似于:
Code Block |
---|
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 有关Tomcat集群的更多信息,请参阅 http://tomcat.apache.org/tomcat-8.0-doc/cluster-howto.html
在负载平衡器服务器中,安装Apache In the load balancer server, install Apache HTTP Server
Code Block |
---|
sudo apt-get install apache2 |
安装代理和平衡器模块Install proxy and balancer modules
Code Block |
---|
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 jwsiteavailable中创建一个名为jwsite的新文件
Code Block |
---|
sudo vim /etc/apache2/sites-available/jwsite.conf
|
Add the contents添加内容
Code Block |
---|
NameVirtualHost * <VirtualHost *> DocumentRoot "/var/www/jwsite" ServerName localhost ServerAdmin support@mycompany.com DirectoryIndex index.html index.htm <Proxy balancer://cluster> BalancerMember http://server1:8080 route=node01 BalancerMember http://server2:8080 route=node02 Order deny,allow Allow from all </Proxy> ProxyPreserveHost On ProxyPass /jw balancer://cluster/jw stickysession=JSESSIONID ProxyPassReverse /jw balancer://cluster/jw </VirtualHost> |
Enable the new site and restart Apache启用新的站点并重新启动Apache
Code Block |
---|
sudo a2ensite jwsite sudo service apache2 reload |
Deploy and configure Joget Workflow LEE as described earlier in 如前面2.2 Joget Clustering ConfigurationJoget集群配置中所述部署和配置Joget Workflow LEE