使用 DB 设计工具建立一个 WPS Network Deployment 拓扑
2010-09-15 00:00:00 来源:WEB开发网引 言
Network Deployment(简称 ND),是由一组 WPS 服务器组成的集群。集群是一项关键技术,可以用于改进 WebSphere Process Server 环境的可用性和可伸缩性。
所谓的可用性,就是提供冗余的硬件或服务,在发生故障的时候保证提供个客户的服务不中断。
可伸缩性,就是这系统负载较大的时候,可以方便的增加额外的资源来平衡系统的负荷。
如果您想了解更多关于 WPS 拓扑的知识,请参阅 《 WebSphere Process Server V6.0.2 集群,第 1 部分:了解拓扑》。
数据库是 WPS 基础结构层的重要组成部分,用来实现 WPS 的操作持久性。在 V6 中,建立数据的脚本是在建立 WPS 概要文件和拓扑的时候才生成的。DBA 和 WPS 管理员的工作是串行的。例如:DBA 首先要提供 Common DB 的信息给 WPS 管理员,WPS 管理员根据这些信息建立 Profile,等到 Profile 建好了,才能将生成的数据库脚本个 DBA,然后 DBA 才能根据这些脚本建立 Common DB 的 TableSpace, Table 等。由于 WPS 建立概要文件和拓扑的时间都比较长,使用会造成资源的浪费。而现在 V7 中的 DB 设计工具(DB Design Generator tool)可以解决这个问题。
下面,我们来利用 DB Design Generator tool 来一步步的建立一个 WPS Remote messaging 拓扑。根据我们的统计,客户在使用 Oracle 的时候提问比较多,所以我们这里选择 Oracle 作为示例。
这篇文章主要包括下边几个部分:
前提准备。
建立 ND 前的准备工作,包括 WPS 的安装,数据库的安装。
使用 DB 设计工具,设计数据库,生成数据库脚本,和数据库设计文件。这部分是我们的重点,也是和以前建立 ND 不同的地方。
使用生成的数据库设计文件来建立一个 WPS 的集群环境,即 ND。
前提准备
安装 WPS 7.0
要实现本文示例的 ND 拓扑,需要在三台服务器上安装三个 WPS。
安装 Oracle 11g ,建立数据库。
我们需要建立如下五个数据库实例:
公用数据库 (WPRCSDB),包含 WebSphere Process Server 的配置和单元范围的数据。例如,有关某些 SCA 组件(业务规则、选择器、关系)的数据就存储在这里。此外,该数据库还包含失败事件数据。
Business Process Choreographer 数据库 (BPEDB),包含 Business Process Choreographer 数据,以及诸如流程和人工任务的模板数据、长时间运行的流程的状态信息等其他内容。如果配置了多个服务器或集群来运行业务流程和 / 或人工任务,则此数据可以在一个单元中存在多次。
Messaging Databases (ME DB),由 WebSphere Process Server 消息基础结构中运行的消息引擎用于持久化消息数据:事务上下文、消息有效负载和管理信息。
公共事件基础设施的数据库对象(Common Event Infrastructure Database,CEI DB),包含公共基础事件基础结构的数据。
Business Space DB,Business Space 是 IBM® 业务流程管理( Business Process Management )产品配备发布的通用 UI 架构。与它面向业务人员,采用 mashup 技术构建视图,可以轻松地被业务人员客户化定制,为业务人员提供了业务流程管理的良好视图。用户访问 Business Space 视图,可以查看业务流程管理产品在当前应用场景中的实时状态,从而对业务流程做出及时的反馈。
定义数据库用户。
user ID | Schema | 组件名称 | 所属数据库 | 作 用 |
USERCOMM | USERCOMM | WBI_CommonDB | Common DB | 存储 WPS 的基础配置信息 |
USERCEI00 | 无 | WBI_CEI_EVENT | CEI DB | 公共事件基础结构(CEI) |
USERBE00 | USERBE00 | WBI_BPC | BPEDB | Business Process Choreographer Explorer |
USERBPR00 | USERBPR00 | WBI_BPCEventCollector | BPEDB | Business Process Choreographer container configuration |
USERBS00 | USERBS00 | WBI_BSPACE | Business Space DB | Business Space |
SCASS00 | SCASS00 | WBI_SCA_SYS_ME | ME DB | WBI_SCA_SYS_ME,SCA 系统总线消息引擎 |
SCASS00 | SCAAP00 | WBI_SCA_APP_ME | ME DB | WBI_SCA_APP_ME,SCA 应用总线消息引擎 |
SCASS00 | BPCME00 | WBI_BPC_ME | ME DB | WBI_BPC_ME,Business Process Choreographe 总线消息引擎 |
SCASS00 | CEIME00 | WBI_CEI_ME | ME DB | WBI_CEI_ME,CEI 消息引擎 |
选择 WPS 与 Oracle 的连接方式
我们这里选择 thin 的方式连接,所以只需要将 oracle 的驱动拷贝到 WPS 服务器的一个目录下,例如 /export/Oracle_lib_11。(Oracle 的驱动可以官方网站上下载到 http://www.oracle.com/technology/software/tech/java/sqlj_jdbc /index.html)
使用 DB 设计工具,设计数据库,并且生成数据库脚本文件
这个部分主要包含以下内容:
DB 设计工具(DbDesignGenerator)初始化
配置 Common DB
配置 ME DB ,包含四个部分:配置 WBI_SCA_SYS_ME,WBI_SCA_APP_ME,WBI_BPC_ME,WBI_CEI_ME。
配置 CEI DB
配置 BPE DB
配置 Business Space DB
保存配置信息,生成数据库脚本文件
DB 设计工具初始化
首先进入 <WPS_HOME>/util/dbUtils/ ,运行 DbDesignGenerator.bat/sh (windows 平台为 DbDesignGenerator.bat,Unix/Linux 平台为 DbDesignGenerator.sh)
清单 1. DbDesignGenerator 初始化界面
[info] running DbDesignGenerator in interactive mode...
[info] Enter 'q' to quit without saving;
'-' for back to previous menu; '?' for help at any time.
[info] To accept the given default values, simply press the 'Enter' key.
[info] Please pick one of the following [design option(s)] :
(1)Create a database design for Standalone profile or Deployment Environment
(2)Create a database design for a single component (e.g. BPC, CEI etc)
(3)Edit an existing database design
(4)Generate database scripts from a database design
(5)exit [q]
这里有几个选项,
表示创建一个 Standalone 或 ND 环境的数据库设计文件。
可以为单独的组件,例如(Common DB , CEI 等)创建数据库设计文件。
编辑一个已经存在的数据库设计文件。
通过数据库设计文件生成脚本。
退出。
我们这些选择 1,创建一个 Standalone 或 ND 环境的数据库设计文件。
接下会出现新的选项,因为我们这里做的是一个 WPS 的 ND 拓扑, 所以这里我们选 3 ,
清单 2. 数据库模式选择画面
[info] Please pick one of the following [database pattern(s)] :
(1)wesb.nd.topology
(2)wesb.standalone
(3)wps.nd.topology
(4)wps.standalone
Please enter the number for the database pattern :3
接着就会出现了数据库配置画面,我们选 1,首先配置 Common DB。
清单 3. 数据库组件配置画面
[info] Please edit any database component with status of 'not complete' for requ
ired properties.
[info] Completed database components can be edited to change existing or default
ed property values.
[info] Design the 'master' component first, and then any parent components, sinc
e other components may inherit values from them.
[info] Please pick one of the following [database component(s)] :
(1)[CommonDB] WBI_CommonDB : [master] [status = not complete]
(2)[BPCReporting] WBI_BPCEventCollector : [status = not complete]
(3)[BPC] WBI_BPC : [status = not complete]
(4)[BSpace] WBI_BSPACE : [status = not complete]
(5)[CEI] WBI_CEI_EVENT : [status = not complete]
(6)[SibME] WBI_SCA_SYS_ME : [status = not complete]
(7)[SibME] WBI_BPC_ME : [parent = WBI_SCA_SYS_ME] [status = not complete]
(8)[SibME] WBI_CEI_ME : [parent = WBI_SCA_SYS_ME] [status = not complete]
(9)[SibME] WBI_SCA_APP_ME : [parent = WBI_SCA_SYS_ME] [status = not complet
e]
(10)[save and exit]
配置 Common DB
我们选 1,配置 Common DB,回车后就会出现如下的提示
清单 4. Common DB 配置画面 1
Please enter the number for the database component :1
-----------------------------------------------------------
[status] WBI_CommonDB is not complete with 1 remaining item(s):
[ 1 ] CommonDB.WBI_CommonDB : : DbType key is not set.
Edit this database component? (y/n) [default=y] :y
这里我们选择 y,编辑这个数据库组件
选择数据库的类型,因为我们用的是 Oracle,所以选择 8
清单 5. Common DB 配置画面 2 : 选择数据库的类型
[info] Please pick one of the following [database type(s)] :
(1)DB2-distributed
(2)DB2-iSeries
(3)DB2-zOS-8
(4)DB2-zOS-9
(5)Derby-embedded
(6)Derby-networkServer
(7)Informix
(8)Oracle
(9)SQL Server
Please enter the number for the database type :8
这里需要我们输入数据的信息
数据库名默认是 WPRCSDB,我们也可以定义自己的数据库名,例如 WPSCOMDB 。
输入 common db 的 user 和 schema,这里我们输入 usercomm。
因为我们是 ND,所以下边三项可以不输入,按回车继续。
清单 6. Common DB 配置画面 3: 输入数据库信息
[info] Please enter the values for the properties in the database objects section.
Database name(SID)[default=WPRCSDB] :WPSCOMDB
Database User name[default=] :usercomm
Database schema[default=] :usercomm
System user name(this is required
ONLY for creating the database as a part
of standalone profile creation.)[default=] :
System password(this is required
ONLY for creating the database as a part
of standalone profile creation.)[default=] :
Database Location(this is required
ONLY for creating the database as a part
of standalone profile creation.)[default=] :
[info] You have completed database objects
section properties needed for database scripts generation.
接下来进入数据源属性编辑选项,如果按 s 键可以跳过这个步骤,其他键继续。这里我们按其他键,编辑数据源属性。
首先要选择 Database provider,我们这里直接按 Enter 键,选择默认即可。
接下来输入数据库的主机名和端口号。
选择数据库的驱动类型,thin 的话不需要 oracle 的客户端,使用方便,这里我们选择 thin 的方式。
输入 common DB 数据源的用户名和密码,我们这里使用 usercomm。
JDBC 驱动的位置,WPS 服务器上 Oracle 驱动的位置,例如:/opt/Oracle_lib
清单 7. Common DB 配置画面 3 :数据源属性编辑
To skip data source properties, enter 's'; or enter anything else to continue :a
[info] Please pick one of the following [database provider(s)] :
(1)Oracle JDBC Driver # XA data source # Oracle JDBC Driver (XA)
Please enter the number for the database provider
[default=Oracle JDBC Driver # XA data source # Oracle JDBC Driver (XA)] :
[info] Please enter the values for the properties
in the data source properties section.
Database server host[default=] :9.181.125.140
Database server port[default=1521] :
[info] Please pick one of the following [Oracle driver type(s)] :
(1)oci8
(2)thin
Please enter the number for the Oracle driver type [default=thin] :
Data source user name[default=usercomm] :usercomm
Data source password[default=] :password
Oracle JDBC driver path[default=] :/opt/Oracle_lib
输入回车,完成 Common DB 的配置。
我们看到 CommonDB 的 status 已经由 not complete 变为 compete。
清单 8. Common DB 配置完成画面
[info] Please edit any database component with status of 'not complete' for requ
ired properties.
[info] Completed database components can be edited to change existing or default
ed property values.
[info] Design the 'master' component first, and then any parent components, sinc
e other components may inherit values from them.
[info] Please pick one of the following [database component(s)] :
(1)[CommonDB] WBI_CommonDB : [master] [status = complete]
(2)[BPCReporting] WBI_BPCEventCollector : [status = complete]
(3)[BPC] WBI_BPC : [status = complete]
(4)[BSpace] WBI_BSPACE : [status = not complete]
(5)[CEI] WBI_CEI_EVENT : [status = complete]
(6)[SibME] WBI_SCA_SYS_ME : [status = complete]
(7)[SibME] WBI_BPC_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(8)[SibME] WBI_CEI_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(9)[SibME] WBI_SCA_APP_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(10)[save and exit]
这里我们看到其他的一些配置,例如 CEI,BPC 也变为 complete。是因为 DB Design Generator tool 做了默认的配置,有时候默认配置并不能满足我们的要求,所以在本例中 CEI,BPC,ME 还需要我们手工配置。
配置 MEDB
配置 WBI_SCA_SYS_ME ,同时配置 MEDB 的数据源。
选择 6 配置 WBI_SCA_SYS_ME,选择数据库为 Oracle
清单 9. MEDB 配置,数据库选择画面
[info] Please edit any database component with status
of 'not complete' for required properties.
[info] Completed database components can be edited to
change existing or defaulted property values.
[info] Design the 'master' component first, and then
any parent components, since other components may inherit values from them.
[info] Please pick one of the following [database component(s)] :
(1)[CommonDB] WBI_CommonDB : [master] [status = complete]
(2)[BPCReporting] WBI_BPCEventCollector : [status = complete]
(3)[BPC] WBI_BPC : [status = complete]
(4)[BSpace] WBI_BSPACE : [status = not complete]
(5)[CEI] WBI_CEI_EVENT : [status = complete]
(6)[SibME] WBI_SCA_SYS_ME : [status = complete]
(7)[SibME] WBI_BPC_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(8)[SibME] WBI_CEI_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(9)[SibME] WBI_SCA_APP_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(10)[save and exit]
Please enter the number for the database component :6
-------------------------------------------------------------------------
----
[status] WBI_SCA_SYS_ME is complete with 0 remaining item(s):
Edit this database component? (y/n) [default=y] :
[info] Please pick one of the following [database type(s)] :
(1)DB2-distributed
(2)DB2-iSeries
(3)DB2-zOS-8
(4)DB2-zOS-9
(5)Derby
(6)Informix
(7)Oracle
(8)SQL Server
Please enter the number for the database type [default=Oracle] :
与 CommonDB 相似,User 和 Schema 我们输入前边预定好的 SCASS00,然后是数据源的信息,输入 MEDB 的数据库信息。
清单 10. WBI_SCA_SYS_ME 配置画面
[info] Please enter the values for the properties in
the database objects sectio
Database User name[default=usercomm] :SCASS00
Schema name[default=WPRSS00] : SCASS00
statementend - specify what to append at the end of statement[default=;] :
[info] You have completed database objects section
properties needed for database scripts generation.
To skip data source properties, enter 's'; or
enter anything else to continue :a
[info] Please pick one of the following [database provider(s)] :
(1)Oracle JDBC Driver # XA data source # Oracle JDBC Driver (XA)
Please enter the number for the database provider
[default=Oracle JDBC Driver #
XA data source # Oracle JDBC Driver (XA)] :
[info] Please enter the values for the properties in
the data source properties section.
Database name[default=WPSCOMDB] :MEDB
Database server host[default=9.181.125.140] :9.181.125.141
Database server port[default=1521] :
[info] Please pick one of the following [Oracle driver types(s)] :
(1)oci8
(2)thin
Please enter the number for the Oracle driver types [default=thin] :
[info] Please pick one of the following [createTables(s)] :
(1)false
(2)true
Please enter the number for the createTables [default=true] :1
Data source user name[default=usercomm] :WPRSS00
Data source password[default=******] :password
Oracle JDBC driver path[default=/opt/Oracle_lib] :
这边有个新选项,是否创建表,默认是 true, 如果你需要 WPS 自动创建表的话必须提前在 Oracle 里建好 user。例如,如果要让 WPS 自动创建 WBI_SCA_SYS_ME 的 Table,必须首先在 oracle 中创建 user :SCASS00,并赋予足够的权限。
WBI_BPC_ME 配置,这里只需要输入 Schema 名:BPCME00
清单 11.WBI_BPC_ME 配置画面
[info] Please edit any database component with status of 'not complete' for requ
[info] Completed database components can be edited to change existing or default
[info] Design the 'master' component first, and then any parent components, sinc
[info] Please pick one of the following [database component(s)] :
(1)[CommonDB] WBI_CommonDB : [master] [status = complete]
(2)[BPCReporting] WBI_BPCEventCollector : [status = complete]
(3)[BPC] WBI_BPC : [status = complete]
(4)[BSpace] WBI_BSPACE : [status = not complete]
(5)[CEI] WBI_CEI_EVENT : [status = complete]
(6)[SibME] WBI_SCA_SYS_ME : [status = complete]
(7)[SibME] WBI_BPC_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(8)[SibME] WBI_CEI_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(9)[SibME] WBI_SCA_APP_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(10)[save and exit]
Please enter the number for the database component :7
--------------------------------------------------------------------------------
----
[status] WBI_BPC_ME is complete with 0 remaining item(s):
Edit this database component? (y/n) [default=y] :
[info] Please enter value for the specified variables -
schemaName[default=WPRBM00] :BPCME00
[status] WBI_BPC_ME is complete with 0 remaining item(s):
WBI_CEI_ME ,输入 Schema 名: CEIME00
清单 12.WBI_CEI_ME 配置画面
[info] Please edit any database component with status of 'not complete' for requ
ired properties.
[info] Completed database components can be edited to change existing or default
ed property values.
[info] Design the 'master' component first, and then any parent components, sinc
e other components may inherit values from them.
[info] Please pick one of the following [database component(s)] :
(1)[CommonDB] WBI_CommonDB : [master] [status = complete]
(2)[BPCReporting] WBI_BPCEventCollector : [status = complete]
(3)[BPC] WBI_BPC : [status = complete]
(4)[BSpace] WBI_BSPACE : [status = not complete]
(5)[CEI] WBI_CEI_EVENT : [status = complete]
(6)[SibME] WBI_SCA_SYS_ME : [status = complete]
(7)[SibME] WBI_BPC_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(8)[SibME] WBI_CEI_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(9)[SibME] WBI_SCA_APP_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(10)[save and exit]
Please enter the number for the database component :8
------------------------------------------------------------------------------
[status] WBI_CEI_ME is complete with 0 remaining item(s):
Edit this database component? (y/n) [default=y] :
[info] Please enter value for the specified variables -
schemaName[default=WPRCM00] :CEIME00
[status] WBI_CEI_ME is complete with 0 remaining item(s):
WBI_SCA_APP_ME ,Schema 名:SCAAP00
清单 13. WBI_SCA_APP_ME 配置画面
[info] Please edit any database component
with status of 'not complete' for required properties.
[info] Completed database components
can be edited to change existing or defaulted property values.
[info] Design the 'master' component first,and then any parent components,
since other components may inherit values from them.
[info] Please pick one of the following [database component(s)] :
(1)[CommonDB] WBI_CommonDB : [master] [status = complete]
(2)[BPCReporting] WBI_BPCEventCollector : [status = complete]
(3)[BPC] WBI_BPC : [status = complete]
(4)[BSpace] WBI_BSPACE : [status = not complete]
(5)[CEI] WBI_CEI_EVENT : [status = complete]
(6)[SibME] WBI_SCA_SYS_ME : [status = complete]
(7)[SibME] WBI_BPC_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(8)[SibME] WBI_CEI_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(9)[SibME] WBI_SCA_APP_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(10)[save and exit]
Please enter the number for the database component :9
------------------------------------------------------------------------
[status] WBI_SCA_APP_ME is complete with 0 remaining item(s):
Edit this database component? (y/n) [default=y] :
[info] Please enter value for the specified variables -
schemaName[default=WPRSA00] :SCAAP00
[status] WBI_SCA_APP_ME is complete with 0 remaining item(s):
ME DB 配置完毕。
这里我们建立的 ME DB 中包含有四个 USER:SCASS00,SCASS00,BPCME00,CEIME00。这里我们指定了 SCASS00 为权限较高的用户,WPS 使用 SCASS00 来操作 ME DB。如果我们生成了 ME 的数据库脚本,可以看到这样的语句:
GRANT SELECT,INSERT,UPDATE ON SCAAP00.SIBOWNER TO WPRSS00;
GRANT SELECT,INSERT,UPDATE ON SCAAP00.SIBOWNERO TO WPRSS00;
当然,您也可以指定一个您自己的用户(不属于这四个用户 SCASS00,SCASS00,BPCME00,CEIME00),来操作 MEDB。区别是:您指定的用户需要自己手工创建,而 SCASS00,SCASS00,BPCME00,CEIME00 会由 DbDesignGenerator 来生成创建的脚本。
另外,这里的 DbDesignGenerator 目前只支持一个数据库实例来存放 Messaging Engine 的信息。如果您希望将它们分别存放到不同的数据库中的话,可以在创建 Deployment Environment 的时候, 在配置数据源的时候进行更改。
配置 CEI DB
CEIDB 的配置与 Common DB 类似,可参考下图进行配置:
清单 14. CEI DB 配置画面
[info] Please pick one of the following [database component(s)] :
(1)[CommonDB] WBI_CommonDB : [master] [status = complete]
(2)[BPCReporting] WBI_BPCEventCollector : [status = complete]
(3)[BPC] WBI_BPC : [status = complete]
(4)[BSpace] WBI_BSPACE : [status = not complete]
(5)[CEI] WBI_CEI_EVENT : [status = complete]
(6)[SibME] WBI_SCA_SYS_ME : [status = complete]
(7)[SibME] WBI_BPC_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(8)[SibME] WBI_CEI_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(9)[SibME] WBI_SCA_APP_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(10)[save and exit]
Please enter the number for the database component :5
------------------------------------------------------------------------------------
[status] WBI_CEI_EVENT is complete with 0 remaining item(s):
Edit this database component? (y/n) [default=y] :
[info] Please pick one of the following [database type(s)] :
(1)DB2-distributed
(2)DB2-iSeries
(3)DB2-zOS-8
(4)DB2-zOS-9
(5)Derby-embedded
(6)Derby-networkServer
(7)Informix
(8)Oracle
(9)SQL Server
Please enter the number for the database type [default=Oracle] :
[info] Please enter the values for the properties
in the database objects section.
Database location(this is required
ONLY for creating the database as a part of standalone profile creation.)[default=] :
System user name(this is required
ONLY for creating the database as a part of standalone profile creation.)[default=] :
System password(this is required
ONLY for creating the database as a part of standalone profile creation.)[default=] :
[info] You have completed database objects section
properties needed for database scripts generation.
To skip data source properties, enter 's'; or enter anything else to continue :a
[info] Please pick one of the following [database provider(s)] :
(1)Oracle JDBC Driver # XA data source # Oracle JDBC Driver (XA)
Please enter the number for the database provider
[default=Oracle JDBC Driver # XA data source # Oracle JDBC Driver (XA)] :
[info] Please enter the values for the properties in the data source properties section.
Database name[default=WPSCOMDB] :CEIDB
Database server host[default=9.181.125.140] :9.181.125.142
Database server port[default=1521] :
[info] Please pick one of the following [createTables(s)] :
(1)false
(2)true
Please enter the number for the createTables [default=true] :1
Data source user name[default=usercomm] :USERCEI00
Data source password[default=******] :password
Oracle JDBC driver path[default=/opt/Oracle_lib] :
[status] WBI_CEI_EVENT is complete with 0 remaining item(s):
配置 BPC DB
清单 15. BPC DB 配置画面
[info] Please edit any database component with status of 'not complete'
for required properties.
[info] Completed database components can be edited to change existing
or defaulted property values.
[info] Design the 'master' component first, and then any parent
components, since other components may inherit values from them.
[info] Please pick one of the following [database component(s)] :
(1)[CommonDB] WBI_CommonDB : [master] [status = complete]
(2)[BPCReporting] WBI_BPCEventCollector : [status = complete]
(3)[BPC] WBI_BPC : [status = complete]
(4)[BSpace] WBI_BSPACE : [status = not complete]
(5)[CEI] WBI_CEI_EVENT : [status = complete]
(6)[SibME] WBI_SCA_SYS_ME : [status = complete]
(7)[SibME] WBI_BPC_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(8)[SibME] WBI_CEI_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(9)[SibME] WBI_SCA_APP_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(10)[save and exit]
Please enter the number for the database component :3
------------------------------------------------------------------------------------
[status] WBI_BPC is complete with 0 remaining item(s):
Edit this database component? (y/n) [default=y] :
[info] Please pick one of the following [database type(s)] :
(1)DB2-distributed
(2)DB2-iSeries
(3)DB2-zOS-8
(4)DB2-zOS-9
(5)Derby
(6)Informix
(7)Oracle
(8)SQL Server
Please enter the number for the database type [default=Oracle] :
[info] Please enter the values for the
properties in the database objects section.
[info] Please pick one of the following [scenario(s)] :
(1)Configuration
(2)Migration
(3)Removal
Please enter the number for the scenario [default=Configuration] :
Database name (SID)[default=WPSCOMDB] :BPEDB
Database schema name / user
(leave empty to use implicit schema)[default=WPRBE00] :USERBE00
Password for database schema user[default=] :password
Use tablespaces (true/false)?[default=true] :
Tablespace directory
(only needed when using tablespaces)[default=] :/opt/orcl/bpetbs
Tablespace for audit log items
(leave default when not using tablespaces)[default=AUDITLOG] :
Tablespace for indexes for all tables
(leave default when not using tablespaces)[default=INDEXTS] :
Tablespace for instance items
(leave default when not using tablespaces)[default=INSTANCE] :
Tablespace for large objects for all tables
(leave default when not using tablespaces)[default=LOBTS] :
Tablespace for scheduler items
(leave default when not using tablespaces)[default=SCHEDTS] :
Tablespace for staff query items
(leave default when not using tablespaces)[default=STAFFQRY] :
Tabplespace for template items
(leave default when not using tablespaces)[default=TEMPLATE] :
Tablespace for work item tables and indexes
(leave default when not using tablespaces)[default=WORKITEM] :
[info] You have completed database objects section
properties needed for database scripts generation.
To skip data source properties, enter 's'; or enter anything else to continue :a
[info] Please pick one of the following [database provider(s)] :
(1)Oracle JDBC Driver (XA)
Please enter the number for the database provider [default=Oracle JDBC Driver (XA)] :
[info] Please enter the values for the properties
in the data source properties section.
Automatically create the database tables
when the database is accessed for the first time (true/false)?[default=true] :false
[info] Please pick one of the following [Oracle driver type(s)] :
(1)oci
(2)thin
Please enter the number for the Oracle driver type [default=thin] :
Database server host[default=9.181.125.140] :9.181.125.143
Database server port[default=1521] :
Data source user name[default=usercomm] :USERBE00
Data source password[default=******] :password
Oracle JDBC driver path[default=/opt/Oracle_lib] :
[status] WBI_BPC is complete with 0 remaining item(s):
注意:配置 TableSapce 的目录的时候,请确保您配置的目录有足够的硬盘空间。
配置 BPC Reporting DB
清单 16. BPC Reporting DB 配置画面
[info] Please edit any database component with status
of 'not complete' for required properties.
[info] Completed database components can be edited
to change existing or defaulted property values.
[info] Design the 'master' component first, and
then any parent components, since other components may inherit values from them.
[info] Please pick one of the following [database component(s)] :
(1)[CommonDB] WBI_CommonDB : [master] [status = complete]
(2)[BPCReporting] WBI_BPCEventCollector : [status = complete]
(3)[BPC] WBI_BPC : [status = complete]
(4)[BSpace] WBI_BSPACE : [status = not complete]
(5)[CEI] WBI_CEI_EVENT : [status = complete]
(6)[SibME] WBI_SCA_SYS_ME : [status = complete]
(7)[SibME] WBI_BPC_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(8)[SibME] WBI_CEI_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(9)[SibME] WBI_SCA_APP_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(10)[save and exit]
Please enter the number for the database component :2
------------------------------------------------------------------------------------
[status] WBI_BPCEventCollector is complete with 0 remaining item(s):
Edit this database component? (y/n) [default=y] :
[info] Please pick one of the following [database type(s)] :
(1)DB2-distributed
(2)DB2-iSeries
(3)DB2-zOS-8
(4)DB2-zOS-9
(5)Derby
(6)Oracle
Please enter the number for the database type [default=Oracle] :
[info] Please enter the values for the properties in the database objects section.
[info] Please pick one of the following [scenario(s)] :
(1)Configuration
(2)Removal
Please enter the number for the scenario [default=Configuration] :
Database name (SID)[default=WPSCOMDB] :BPEDB
Database schema name / user (leave empty to use implicit schema)
[default=WPRBC00] : USERBPR00
Password for database schema user[default=] :password
Use tablespaces (true/false)?[default=true] :
Tablespace directory (only needed when using tablespaces)[default=] :
Tablespace for Reporting function indexes
(leave default when not using tablespaces)[default=OBSVRIDX] :
Tablespace for Reporting function large objects
(leave default when not using tablespaces)[default=OBSVRLOB] :
Tablespace for Reporting function tables
(leave default when not using tablespaces)[default=OBSVRTS] :
[info] You have completed database objects
section properties needed for database scripts generation.
To skip data source properties, enter 's'; or enter anything else to continue :a
[info] Please pick one of the following [database provider(s)] :
(1)Oracle JDBC Driver (XA)
Please enter the number for the database provider [default=Oracle JDBC Driver (XA)] :
[info] Please enter the values for the properties in the data source properties section.
Automatically create the database tables
when the database is accessed for the first time (true/false)?[default=true] :false
[info] Please pick one of the following [Oracle driver type(s)] :
(1)oci
(2)thin
Please enter the number for the Oracle driver type [default=thin] :
Database server host[default=9.181.125.140] :9.18..125.143
Database server port[default=1521] :
Data source user name[default=usercomm] : USERBPR00
Data source password[default=******] :password
Oracle JDBC driver path[default=/opt/Oracle_lib] :
配置 Business Space DB
清单 17. Business Space DB 配置画面
[info] Please pick one of the following [database component(s)] :
(1)[CommonDB] WBI_CommonDB : [master] [status = complete]
(2)[BPCReporting] WBI_BPCEventCollector : [status = complete]
(3)[BPC] WBI_BPC : [status = complete]
(4)[BSpace] WBI_BSPACE : [status = not complete]
(5)[CEI] WBI_CEI_EVENT : [status = complete]
(6)[SibME] WBI_SCA_SYS_ME : [status = complete]
(7)[SibME] WBI_BPC_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(8)[SibME] WBI_CEI_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(9)[SibME] WBI_SCA_APP_ME : [parent = WBI_SCA_SYS_ME] [status = complete]
(10)[save and exit]
Please enter the number for the database component :4
------------------------------------------------------------------------------------
[status] WBI_BSPACE is not complete with 3 remaining item(s):
[ 1 ] BSpace.WBI_BSPACE : databaseObjects :
required property 'databaseUser' for DB_USER is empty.
[ 2 ] BSpace.WBI_BSPACE : authAlias :
required property 'userName' for userId is empty.
[ 3 ] BSpace.WBI_BSPACE : authAlias :
required property 'password' for DB_PASSWORD is empty.
Edit this database component? (y/n) [default=y] :
[info] Please pick one of the following [database type(s)] :
(1)DB2-distributed
(2)DB2-iSeries
(3)DB2-zOS-8
(4)DB2-zOS-9
(5)Derby-embedded
(6)Derby-networkServer
(7)Oracle
(8)SQL Server
Please enter the number for the database type [default=Oracle] :
[info] Please enter the values for the properties in the database objects section.
Database name (SID)[default=WPSCOMDB] :BSPDB
Database user name[default=] :USERBS00
Database schema name (must match the user name)[default=USERBS00] :
Prefix for tablespace names (0-4 characters)[default=BSP] :
Directory or file name prefix for tablespace files[default=BSP] :
[info] You have completed database objects section properties
needed for database scripts generation.
To skip data source properties, enter 's'; or enter anything else to continue :
[info] Please pick one of the following [database provider(s)] :
(1)Oracle JDBC Driver # XA data source # Oracle JDBC Driver (XA)
Please enter the number for the database provider
[default=Oracle JDBC Driver # XA data source # Oracle JDBC Driver (XA)] :
[info] Please enter the values for the properties in the data
source properties section.
Database server host[default=9.181.125.140] :9.181.125.144
Database server port[default=1521] :
[info] Please pick one of the following [Oracle driver type(s)] :
(1)oci8
(2)thin
Please enter the number for the Oracle driver type [default=thin] :
Data source user name[default=USERBS00] :
Data source password[default=] :password
Oracle JDBC driver path[default=/opt/Oracle_lib] :
[status] WBI_BSPACE is complete with 0 remaining item(s):
保存配置信息
现在 DB 的配置已经完成,我们输入 10 保存配置,并且生成 DB 脚本。
备份生成的 DB 脚本以及 DBDesign 文件为接下来的步骤做准备。
创建数据库,运行刚才生成的脚本建立数据库表。
注意:
现在的 WPS 版本(V7000,V7001),DbDesignGenerator 还不能生成 CEI DB 的脚本,我们需要使用安装 ND 时候生成的脚本(请参照下边的相关的步骤)。除了 CEI DB 脚本外,其他的 DB 脚本都可以正常生成,DBA 可以使用生成的脚本进行数据库的配置了。
有些脚本,例如:createSchema_CommonDB.sql ,如果直接运行会出错,需要你手将 CREATE USER USERCOMM IDENTIFIED BY &dbCommonPassword;,中的 &dbCommonPassword 改为你要设置的值。
创建 Profile 概要文件。
首先我们进入 , <WPS_HOME>/bin/ProfileManagement 目录下运行 pmt.sh/bat。
选择 Advanced profile creation,点击 Next。
图 1. 创建 DMGR Profile
查看原图(大图)
指定 Profile 的名字和目录。
指定 Node, Host 和 Cell 的名字。
指定管理员的用户名和密码。
指定证书信息,你可以使用 WPS 自动创建证书,也可以使用自己的证书。在示例中我们使用 WPS 来自动创建证书。
图 2. 指定证书信息
查看原图(大图)
查看原图(大图)
设置端口信息,点击 Next。
注意,到这一步我们就需要用的前面生成的数据库设计文件了。
选择“ Use a database design file for database configuration”,指定数据库设计文件的位置。因为在我们的生产环境中,我们绝大多数情况用的是远程数据库,所以需要将“Delay execution of database scripts (must select if using a remote database”选项也打上勾。
图 3. 指定数据库设计文件画面
查看原图(大图)
校验汇总信息,如果没有问题的话点击 Create 创建 :
图 4. 信息汇总
查看原图(大图)
接下来要创建 Custom Profile,因为比较简单,而且与本文要讲解的内容无关,这里就不再赘述。
43/ibm/console),点击 Servers -> Deployment Environments -> New …,输入 Deployment Environment 的名字,点击下一步。
图 5. 创建 DE
查看原图(大图)
查看原图(大图)
选择部署环境模式,这里我们使用 WPS 推荐的 Remote Messaging pattern。
图 6. 指定部署环境模式
查看原图(大图)
选择 Nodes,在 Remote Messaging pattern 中,至少要选择一个 Node。
图 7. 选择 Nodes
查看原图(大图)
配置 clusters,所有选项保持默认,点击 Next。
配置 REST service 的主机名和端口,这里也保持默认就好。
导入前边生成的数据库设计文件 wps.nd.topology.dbDesign,点击 Next。
图 8. 指定数据库设计文件
查看原图(大图)
可以看到,数据库的信息已经自动填入,就是我们前边用 DB Design Generator tool 配置的数据库信息,我们可以逐项确认一下 :
图 9. 数据库信息配置画面
查看原图(大图)
如果我们在 DB Design Generator tool 中 Create Table 是 true 的话,这边 Create Tables 的选项会自动选中,因为这边所以的数据库数据库操作都是由 DBA 来做,所以将所有的勾都去掉。
配置 BPC,按画面提示输入必要的信息,点击 Next。
校验信息并且点击 “Finish and Generate Environment”创建 Network Deployment。
图 10 信息汇总
查看原图(大图)
因为 CEI DB 的脚本在 DbDesignGenerator 中没有生成,所以我们需要使用创建完 Deployment Environment 后自动生成的脚本。
在 DMGR Node,在 <WPS_HOME>/profiles/<Dmgr profile>/databases/event 目录先取得脚本,拷贝到 CEI DB 数据库所在的服务器,运行 cr_event_oracle.sh 或 cr_event_oracle.bat,运行格式如下:
cr_event_oracle.bat password SYSUSER SYSPASSWORD
sid=CEIDB
oracleHome=oracle_root\app\oracle\product\11.1.0\server
这样我们的 ND 拓扑就建立完备,启动 ND,验证是否建立成功。
验证 ND 是否建立成功
登入控制台,点击 Servers -> Deployment Environments ,选择我们刚才建好的 DB,点击 Start。
稍等一会后我们再次点击 Deployment Environments,如果状态有红色的 X 变为绿色的箭头,说明 ND 已经启动成功。
点击 Resources->JDBC->Data Sources,选择所有的数据源,点击 Test connection ,检测数据库是否能够正确连通。
点击 Applications->Application Types->WebSphere enterprise applications,检查自动安装的应用是否正常启动。
登入您的 WPS 服务器,检查 SystemOut.log 日志文件中是否有错误,例如:
/home/wps7/profiles/D1/logs/dmgr/SystemOut.log,
/home/wps7/profiles/C2/logs/bank.AppTarget.suse108Node01.0。
如果这些都检测通过,那么恭喜你,您的 ND 已经建立成功。
结束语
本文介绍了 WPS V7 的新功能,DB 设计工具(DB Design Generator tool)。通过 DB Design Generator tool,WPS 管理员和 DBA 都可以只关注自己负责的那部分工作,提高 WPS 部署的效率。
赞助商链接