This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git
commit 189dac61d3a0cbf70ba4f4145e5f9d41c9cb9abf Author: Lei Zhang <[email protected]> AuthorDate: Fri Aug 9 17:31:36 2019 +0800 SCB-1411 Update docs --- docs/fsm/how_to_use_fsm.md | 14 ++++++++++---- docs/fsm/how_to_use_fsm_zh.md | 14 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/fsm/how_to_use_fsm.md b/docs/fsm/how_to_use_fsm.md index da3de4e..3756524 100644 --- a/docs/fsm/how_to_use_fsm.md +++ b/docs/fsm/how_to_use_fsm.md @@ -4,7 +4,13 @@ The state machine mode save completed transaction data to elasticsearch -* run elasticsearch with docker +* run postgress + + ```bash + docker run -d -e "POSTGRES_DB=saga" -e "POSTGRES_USER=saga" -e "POSTGRES_PASSWORD=password" -p 5432:5432 postgres + ``` + +* run elasticsearch ```bash docker run --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:6.6.2 @@ -16,8 +22,8 @@ The state machine mode save completed transaction data to elasticsearch ```bash java -jar alpha-server-${version}-exec.jar \ --spring.datasource.url=jdbc:postgresql://0.0.0.0:5432/saga?useSSL=false \ - --spring.datasource.username=saga-user \ - --spring.datasource.password=saga-password \ + --spring.datasource.username=saga \ + --spring.datasource.password=password \ --spring.profiles.active=prd \ --alpha.feature.akka.enabled=true \ --alpha.feature.akka.transaction.repository.type=elasticsearch \ @@ -54,7 +60,7 @@ The state machine mode save completed transaction data to elasticsearch Transaction Details - Compensated  - + Transaction Details - Failed  diff --git a/docs/fsm/how_to_use_fsm_zh.md b/docs/fsm/how_to_use_fsm_zh.md index d6e1a58..7564d01 100644 --- a/docs/fsm/how_to_use_fsm_zh.md +++ b/docs/fsm/how_to_use_fsm_zh.md @@ -4,6 +4,12 @@ 状态机模式使用 Elasticsearch 存储已结束的事务数据 +* 启动 Postgress + + ```bash + docker run -d -e "POSTGRES_DB=saga" -e "POSTGRES_USER=saga" -e "POSTGRES_PASSWORD=password" -p 5432:5432 postgres + ``` + * 启动 Elasticsearch ```bash @@ -16,8 +22,8 @@ ```bash java -jar alpha-server-${version}-exec.jar \ --spring.datasource.url=jdbc:postgresql://0.0.0.0:5432/saga?useSSL=false \ - --spring.datasource.username=saga-user \ - --spring.datasource.password=saga-password \ + --spring.datasource.username=saga \ + --spring.datasource.password=password \ --spring.profiles.active=prd \ --alpha.feature.akka.enabled=true \ --alpha.feature.akka.transaction.repository.type=elasticsearch \ @@ -36,7 +42,7 @@ ```base alpha.feature.akka.enabled=true ``` - + * WEB管理界面 在浏览器中打开 http://localhost:8090/admin @@ -56,7 +62,7 @@ 事务明细-补偿  - + 事务明细-失败 
