set-up-wso2-open-banking
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSetting up WSO2 Open Banking
WSO2开放银行搭建
Set up WSO2 Open Banking Accelerator on:
- WSO2 Identity Server (IS)
- WSO2 API Manager (APIM) (required for OB3, optional for OB4)
- Optional WSO2 Streaming Integrator (SI) (OB3 data publishing only)
Rules:
- Collect all inputs first.
- Run steps in order.
- Stop on first failed check/command.
- Use skip logic for optional components.
- Use idempotent checks before destructive actions.
在以下产品上部署WSO2开放银行加速器:
- WSO2 Identity Server (IS)
- WSO2 API Manager (APIM)(OB3版本必需,OB4版本可选)
- 可选 WSO2 Streaming Integrator (SI)(仅OB3版本数据发布功能需要)
操作规则:
- 首先收集所有输入参数
- 按顺序执行所有步骤
- 首次遇到检查/命令失败时立即停止
- 对可选组件使用跳过逻辑
- 在执行破坏性操作前先做幂等性检查
Guardrails
防护规则
- Confirm before destructive actions (scripts, keystores/truststores, overwriting configs).
- Do not ask the user to paste secrets.
- Change only the files listed in this workflow.
- Run commands one by one (do not combine all commands into one script).
- 执行破坏性操作(脚本操作、密钥库/信任库修改、配置覆盖)前需确认
- 不要要求用户粘贴密钥信息
- 仅修改本工作流中列出的文件
- 逐个执行命令(不要将所有命令合并成一个脚本运行)
Execution contract
执行约定
- Do not execute any command until all required non-secret inputs are collected.
- During input collection, ask one question at a time.
- For secret values, require environment variables only (never ask to paste raw secrets).
- When a pre-check fails, stop immediately and report the exact failed check.
- For optional components (APIM/SI), skip all related steps explicitly and log the skip reason.
- Always print resolved paths before running commands there.
- 收集完所有必需的非密钥输入参数前,不要执行任何命令
- 收集输入参数时,每次仅询问一个问题
- 密钥值仅支持通过环境变量传入(绝对不要要求用户粘贴明文密钥)
- 预检查失败时立即停止,并上报具体失败的检查项
- 对于可选组件(APIM/SI),明确跳过所有相关步骤并记录跳过原因
- 执行目录下的命令前,始终打印解析后的路径
Input contract (collect first)
输入约定(优先收集)
If missing, use defaults.
- :
OB_VERSIONorOB3(default:OB4)OB4
参数缺失时使用默认值
- :
OB_VERSION或OB3(默认值:OB4)OB4
Version-specific inputs
版本专属输入项
- If , use OB3 inputs.
OB_VERSION=OB3 - If , use OB4 inputs.
OB_VERSION=OB4
- 若,使用 OB3 输入项
OB_VERSION=OB3 - 若,使用 OB4 输入项
OB_VERSION=OB4
Host inputs
主机输入项
- : default
IS_HOSThttps://localhost:9446 - : default
APIM_HOST(required only when APIM is selected)https://localhost:9443 - : default
SI_HOST(required only when SI is selected)https://localhost:9444
- : 默认值
IS_HOSThttps://localhost:9446 - : 默认值
APIM_HOST(仅选中APIM时需要)https://localhost:9443 - : 默认值
SI_HOST(仅选中SI时需要)https://localhost:9444
Database host inputs
数据库主机输入项
- : default
DB_HOSTlocalhost - : default
DB_PORT3306
- : 默认值
DB_HOSTlocalhost - : 默认值
DB_PORT3306
Workspace input
工作空间输入项
- : absolute path used to create the setup directory (default:
WORK_DIR)$pwd
- : 用于创搭建目录的绝对路径(默认值:
WORK_DIR)$pwd
Required environment variables (secrets)
必需环境变量(密钥类)
OB_AGENT_UPDATE_TOOL_USERNAMEOB_AGENT_UPDATE_TOOL_PASSWORDOB_AGENT_DATABASE_USERNAMEOB_AGENT_DATABASE_PASSWORD
All four must be set and non-empty before any command; stop and report the exact missing variable if not.
OB_AGENT_UPDATE_TOOL_USERNAMEOB_AGENT_UPDATE_TOOL_PASSWORDOB_AGENT_DATABASE_USERNAMEOB_AGENT_DATABASE_PASSWORD
执行任何命令前必须确保以上四个变量已设置且非空;若有缺失立即停止并上报具体缺失的变量
Primary workflow (do not reorder)
核心工作流(请勿调整顺序)
1. Prerequisites
1. 前置依赖检查
- Run preflight checks:
bash
java -version
command -v mysql
command -v curl
command -v keytool
command -v unzip- Stop if any required tool is missing.
- 运行预检命令:
bash
java -version
command -v mysql
command -v curl
command -v keytool
command -v unzip- 任何必需工具缺失时立即停止
2. Install accelerators into base products
2. 将加速器安装到基础产品中
-
Createand
<WORK_DIR>/wso2-open-banking-acceleratorinto it.cd -
Resolve and record canonical paths after extraction:
<IS_HOME>- (if
<APIM_HOME>)IS+APIM - (if OB3 data publishing requested)
<SI_HOME> - inside
<OB_IAM_ACCELERATOR_HOME><IS_HOME> - inside
<OB_AM_ACCELERATOR_HOME>(if<APIM_HOME>)IS+APIM - inside
<OB_SI_ACCELERATOR_HOME>(if OB3 data publishing)<SI_HOME>
-
A zip source is a URL if it starts with; otherwise treat it as a local path. Download only for URLs.
https:// -
Extract base product zips into the current directory.
-
Unzip accelerators into corresponding base product directories.
-
Path resolution rule:
- : extracted dir name starts with
<IS_HOME>and containswso2is-.bin - : extracted dir name starts with
<APIM_HOME>and containswso2am-.bin - : extracted dir name starts with
<SI_HOME>and containswso2si-.bin - : dir under
<OB_IAM_ACCELERATOR_HOME>containing<IS_HOME>.repository/conf/configure.properties - : dir under
<OB_AM_ACCELERATOR_HOME>containing<APIM_HOME>.repository/conf/configure.properties - : dir under
<OB_SI_ACCELERATOR_HOME>containing<SI_HOME>.repository/conf/configure.properties
-
Verify path existence before continuing:
<IS_HOME>/bin<OB_IAM_ACCELERATOR_HOME>/bin- and
<APIM_HOME>/binonly if<OB_AM_ACCELERATOR_HOME>/binIS+APIM
-
Version-specific branch:
- If , run set up IS connector.
OB3 - If OB3 data publishing requested, run set up data publishing.
- If
-
创建目录并进入该目录
<WORK_DIR>/wso2-open-banking-accelerator -
解压后解析并记录标准路径:
<IS_HOME>- (若选择
<APIM_HOME>部署模式)IS+APIM - (若需要OB3数据发布功能)
<SI_HOME> - 下的
<IS_HOME><OB_IAM_ACCELERATOR_HOME> - 下的
<APIM_HOME>(若选择<OB_AM_ACCELERATOR_HOME>部署模式)IS+APIM - 下的
<SI_HOME>(若使用OB3数据发布功能)<OB_SI_ACCELERATOR_HOME>
-
若压缩包源以开头则为URL,否则视为本地路径。仅URL类型需要下载
https:// -
将基础产品压缩包解压到当前目录
-
将加速器压缩包解压到对应基础产品的目录中
-
路径解析规则:
- :解压后目录名以
<IS_HOME>开头且包含wso2is-目录bin - :解压后目录名以
<APIM_HOME>开头且包含wso2am-目录bin - :解压后目录名以
<SI_HOME>开头且包含wso2si-目录bin - :
<OB_IAM_ACCELERATOR_HOME>下包含<IS_HOME>的目录repository/conf/configure.properties - :
<OB_AM_ACCELERATOR_HOME>下包含<APIM_HOME>的目录repository/conf/configure.properties - :
<OB_SI_ACCELERATOR_HOME>下包含<SI_HOME>的目录repository/conf/configure.properties
-
继续操作前验证路径是否存在:
<IS_HOME>/bin<OB_IAM_ACCELERATOR_HOME>/bin- 仅选择模式时校验
IS+APIM和<APIM_HOME>/bin<OB_AM_ACCELERATOR_HOME>/bin
-
版本专属分支操作:
- 若为,执行IS连接器搭建
OB3 - 若需要OB3数据发布功能,执行数据发布功能搭建
- 若为
3. Update base products and accelerators
3. 更新基础产品和加速器
-
Select relevant update binary by OS:
- macOS:
wso2update_darwin - Linux:
wso2update_linux - Windows:
wso2update_windows.exe
- macOS:
-
Verify the OS-specific update tool exists in each directory below.
<IS_HOME>/bin<OB_IAM_ACCELERATOR_HOME>/bin- (if
<APIM_HOME>/bin)IS+APIM - (if
<OB_AM_ACCELERATOR_HOME>/bin)IS+APIM - (if OB3 data publishing)
<SI_HOME>/bin - (if OB3 data publishing)
<OB_SI_ACCELERATOR_HOME>/bin
-
If missing, stop and tell the user their WSO2 subscription is likely missing. Ask them to contact WSO2 Online Support System to download the product or skip updates.
-
Run the update tool in each directory:
bash
./<WSO2UPDATE_BINARY> --username "$OB_AGENT_UPDATE_TOOL_USERNAME" --password "$OB_AGENT_UPDATE_TOOL_PASSWORD"-
根据操作系统选择对应的更新二进制文件:
- macOS:
wso2update_darwin - Linux:
wso2update_linux - Windows:
wso2update_windows.exe
- macOS:
-
验证以下每个目录中是否存在对应操作系统的更新工具
<IS_HOME>/bin<OB_IAM_ACCELERATOR_HOME>/bin- (若选择
<APIM_HOME>/bin模式)IS+APIM - (若选择
<OB_AM_ACCELERATOR_HOME>/bin模式)IS+APIM - (若使用OB3数据发布功能)
<SI_HOME>/bin - (若使用OB3数据发布功能)
<OB_SI_ACCELERATOR_HOME>/bin
-
若工具缺失,立即停止并告知用户大概率缺少WSO2订阅,引导用户联系WSO2在线支持系统下载产品或跳过更新步骤
-
在每个目录中运行更新工具:
bash
./<WSO2UPDATE_BINARY> --username "$OB_AGENT_UPDATE_TOOL_USERNAME" --password "$OB_AGENT_UPDATE_TOOL_PASSWORD"4. Configure MySQL database
4. 配置MySQL数据库
-
Verify MySQL >= 8.0 available, stop if not.
-
DB users already exist. Credentials are provided via environment variables.
-
Verify DB credentials by connecting to the DB. Stop if invalid.
MySQL check example:
bash
MYSQL_PWD="$OB_AGENT_DATABASE_PASSWORD" mysql -h "$DB_HOST" -P "$DB_PORT" -u "$OB_AGENT_DATABASE_USERNAME" -e "SELECT 1;"- Download compatible JDBC driver (MySQL 8 example):
bash
curl -L "https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/9.6.0/mysql-connector-j-9.6.0.jar" -o mysql-connector-j-9.6.0.jar-
Place the JDBC driver JAR:
- IS: copy the driver JAR into
<IS_HOME>/repository/components/lib - APIM: copy the driver JAR into
<APIM_HOME>/repository/components/lib - SI: copy the driver JAR into (if OB3 data publishing requires DB connectivity there)
<SI_HOME>/lib
- IS: copy the driver JAR into
-
Set and verifyand
DB_USERinDB_PASSmatch the environment variables. Do not print the values, report only<OB_IAM_ACCELERATOR_HOME>/repository/conf/configure.propertiesorMATCHper property. Stop on anyMISMATCH:MISMATCHbashgrep -q "^DB_USER=$OB_AGENT_DATABASE_USERNAME$" repository/conf/configure.properties && echo "DB_USER: MATCH" || echo "DB_USER: MISMATCH"
Note: Useon Windows.Select-String
- Update the following in :
<OB_IAM_ACCELERATOR_HOME>/repository/conf/configure.properties- DB connection properties
- Change DB name pattern from current value to
<DATE_PREFIX>_* - Hostnames for IS/APIM/SI
IS_PRODUCT=wso2is-<IS_VERSION>PRODUCT_CONF_PATH=repository/resources/wso2is-<IS_VERSION>-deployment.toml
<DATE_PREFIX>YYYYMMDD- Run IAM Accelerator scripts:
bash
cd <OB_IAM_ACCELERATOR_HOME>/bin
./merge.sh
./configure.sh-
If, repeat equivalent configuration + scripts in:
IS+APIM<OB_AM_ACCELERATOR_HOME>/repository/conf/configure.properties- (
<OB_AM_ACCELERATOR_HOME>/bin,merge.sh)configure.sh
-
If OB3 data publishing is requested, repeat equivalent configuration + scripts in:
<OB_SI_ACCELERATOR_HOME>/repository/conf/configure.properties- (
<OB_SI_ACCELERATOR_HOME>/bin,merge.sh)configure.sh
-
Create event-notification tables (OB4 only):
- Check if target tables already exist; skip if present.
- Run from
mysql.sqlagainst the consent DB.<IS_HOME>/dbscripts/financial-services/event-notifications - Default consent DB name:
<DATE_PREFIX>_*consentdb
-
验证MySQL版本 >= 8.0,不满足则停止
-
数据库用户已预先创建,凭证通过环境变量提供
-
通过连接数据库验证凭证有效性,无效则停止
MySQL检查示例:
bash
MYSQL_PWD="$OB_AGENT_DATABASE_PASSWORD" mysql -h "$DB_HOST" -P "$DB_PORT" -u "$OB_AGENT_DATABASE_USERNAME" -e "SELECT 1;"- 下载兼容的JDBC驱动(以MySQL 8为例):
bash
curl -L "https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/9.6.0/mysql-connector-j-9.6.0.jar" -o mysql-connector-j-9.6.0.jar-
放置JDBC驱动JAR包:
- IS: 将驱动JAR包复制到
<IS_HOME>/repository/components/lib - APIM: 将驱动JAR包复制到
<APIM_HOME>/repository/components/lib - SI: 将驱动JAR包复制到(若OB3数据发布功能需要数据库连接)
<SI_HOME>/lib
- IS: 将驱动JAR包复制到
-
设置并校验中的
<OB_IAM_ACCELERATOR_HOME>/repository/conf/configure.properties和DB_USER是否与环境变量匹配。不要打印数值,仅上报每个属性是DB_PASS(匹配)还是MATCH(不匹配)。出现任何MISMATCH则停止:MISMATCHbashgrep -q "^DB_USER=$OB_AGENT_DATABASE_USERNAME$" repository/conf/configure.properties && echo "DB_USER: MATCH" || echo "DB_USER: MISMATCH"
注意:Windows系统请使用命令Select-String
- 更新中的以下配置:
<OB_IAM_ACCELERATOR_HOME>/repository/conf/configure.properties- 数据库连接属性
- 将数据库名称模式从当前值修改为
<DATE_PREFIX>_* - IS/APIM/SI的主机地址
IS_PRODUCT=wso2is-<IS_VERSION>PRODUCT_CONF_PATH=repository/resources/wso2is-<IS_VERSION>-deployment.toml
<DATE_PREFIX>YYYYMMDD- 运行IAM加速器脚本:
bash
cd <OB_IAM_ACCELERATOR_HOME>/bin
./merge.sh
./configure.sh-
若选择模式,在以下路径重复相同的配置+脚本执行操作:
IS+APIM<OB_AM_ACCELERATOR_HOME>/repository/conf/configure.properties- (
<OB_AM_ACCELERATOR_HOME>/bin、merge.sh)configure.sh
-
若需要OB3数据发布功能,在以下路径重复相同的配置+脚本执行操作:
<OB_SI_ACCELERATOR_HOME>/repository/conf/configure.properties- (
<OB_SI_ACCELERATOR_HOME>/bin、merge.sh)configure.sh
-
创建事件通知表(仅OB4版本需要):
- 检查目标表是否已存在,存在则跳过
- 针对同意库执行下的
<IS_HOME>/dbscripts/financial-services/event-notifications脚本mysql.sql - 默认同意库名称:
<DATE_PREFIX>_*consentdb
5. Exchange Certificates
5. 交换证书
- Follow the exchange certificates guide.
- 遵循证书交换指南操作
6. Start servers and verify basic health
6. 启动服务并验证基础健康状态
Start order:
- IS: run the OS-specific startup script in
<IS_HOME>/bin
bash
./wso2server.(sh|bat) start- APIM (optional): run the OS-specific startup script in
<APIM_HOME>/bin
bash
./api-manager.(sh|bat) start- SI (optional): run the OS-specific startup script in
<SI_HOME>/bin
bash
./server.(sh|bat) startVerification checklist:
- IS, APIM, and SI hosts and ports are reachable
- No critical errors in selected components logs:
<IS_HOME>/repository/logs/wso2carbon.log- (if APIM selected)
<APIM_HOME>/repository/logs/wso2carbon.log - (if SI selected)
<SI_HOME>/wso2/server/logs/carbon.log
启动顺序:
- IS:在中运行对应操作系统的启动脚本
<IS_HOME>/bin
bash
./wso2server.(sh|bat) start- APIM(可选):在中运行对应操作系统的启动脚本
<APIM_HOME>/bin
bash
./api-manager.(sh|bat) start- SI(可选):在中运行对应操作系统的启动脚本
<SI_HOME>/bin
bash
./server.(sh|bat) start校验清单:
- IS、APIM和SI的主机和端口可访问
- 选中组件的日志中无严重错误:
<IS_HOME>/repository/logs/wso2carbon.log- (若选中APIM)
<APIM_HOME>/repository/logs/wso2carbon.log - (若选中SI)
<SI_HOME>/wso2/server/logs/carbon.log
Completion criteria (must satisfy all applicable)
完成标准(必须满足所有适用项)
- All selected components start successfully.
- Health/port checks pass for selected components only.
- No startup-blocking or critical errors in logs after 30 seconds (e.g., ERROR|FATAL).
- Accelerator configs and DB scripts are applied for selected components.
- Certificate exchange is complete for selected components.
- 所有选中的组件启动成功
- 仅选中的组件通过健康/端口检查
- 30秒后日志中无阻塞启动或严重错误(如ERROR|FATAL)
- 选中组件已应用加速器配置和数据库脚本
- 选中组件已完成证书交换
Failure handling
错误处理
- On any failed command:
- Stop immediately.
- Report the exact command, exit code, and path.
- Do not continue until user confirms remediation.
- 任何命令执行失败时:
- 立即停止
- 上报具体失败命令、退出码和执行路径
- 用户确认修复前不要继续操作