Skip to main content
Version: v3&v6

开启/关闭 Automation

Automation 模块需要授权证书有该模块的授权才能显示

配置参数

配置项类型示例描述
enable_automationbooleantrue是否开启流程自动化模块

操作步骤:

配置开启 Automation

登陆 ONES 服务器,进入当前运行中实例的安装目录

cd /data/ones/pkg/ones-example-3.14.xxxxx

修改<enable_automation>配置项的值为true

./json-util -config config.json -operator add -key enable_automation -valtype bool -value true

重启容器

注意:执行以下命令将造成 ONES 服务暂时不可用

进入 screen 终端,执行common.sh脚本后选择 2 号选项,交互输入证书名称,注意只需要证书名称,等待命令执行完成

系统提示没有screen命令时,请通过yum install -y screen命令安装

sudo screen -S ones
sudo bash common.sh

交互示例

[root@localhost ones-example-3.14.xxxxx]# sudo bash common.sh
the team_uuid is
BGwiSTx3

1.pull_image
2.local_upgrade(Unconventional upgrade)
3.open_automation
4.open_performance_pro
5.init
6.change_emailPsd
7.Not Yet Open
8.Not Yet Open
9.mysqlport_open
10.mysql5.7_ex
11.first_select_login
12.wps_install
13.replace_binary
14.replace_ssl
15.enable_plugin
16.change_port
17.skip_backup_to_upgrade
18.get_audit_log_info
19.mysql8_ex(Use with caution)

If mysqlrootuser is not root,Please pass the first parameter as mysqlrootuser!!Dedicated to external database
please input your select :2
Successfully copied 11.3kB to /data/ones/pkg/ones-sop-test2-3.12.613087/dockerconfig.json
please input the path of ssl file like .pem/.crt/..:test.pem
please input the path of ssl file .key:test.key

当观察到如下输出,则重启已经完成。稍等几分钟后 ONES 服务将可以正常访问,Automation 配置完成

15:29:15.764114 [SQL] SELECT COUNT(1) FROM marketplace_app_installed []
15:29:15.765044 [SQL] SHOW TABLES LIKE 'app_install_record' []
15:29:15.766297 [SQL] SELECT COUNT(1) FROM app_install_record []
2023/05/29 15:29:15 P3039: Table true Data false
2023/05/29 15:29:15 P3069: Table true Data true
15:29:15.767277 [SQL] begin; []
15:29:15.767694 [SQL] SELECT uuid, create_time, status, name, owner, logo, expire_time, scale, type, visibility FROM organization LIMIT 1; []
2023/05/29 15:29:15 --- start transaction org_uuid: D1X4EdeP---
15:29:15.768948 [SQL] SELECT uuid FROM team WHERE org_uuid=? AND status=?; [1:"D1X4EdeP" 2:1]
15:29:15.770020 [SQL] SELECT * FROM license WHERE org_uuid=?; [1:"D1X4EdeP"]
2023/05/29 15:29:15 P3069 already migrated, skip.
15:29:15.771617 [SQL] commit; []
[INFO] 2023/05/29 15:29:15 upgrade success!!

验证

检查服务是否正常

重构完成后检查服务状态需要下图的服务正常启动

cd /data/ones/pkg/ones-example-3.14.xxxxx
./onesconfigure ss

检查功能是否正常

登陆 ONES 系统,进入「配置中心」-「流程自动化配置」页面,新建任意一条自动化规则,如果新建成功,则表明 automation 可以正常工作

配置关闭 Automation

登陆 ONES 服务器,进入当前运行中实例的安装目录

cd /data/ones/pkg/ones-example-3.14.xxxxx

修改<enable_automation>配置项的值为false

./json-util -config config.json -operator add -key enable_automation -valtype bool -value false

重启容器

注意:执行以下命令将造成 ONES 服务暂时不可用

进入 screen 终端,执行common.sh脚本后选择 2 号选项,交互输入证书名称,注意只需要证书名称,等待命令执行完成

系统提示没有screen命令时,请通过yum install -y screen命令安装

sudo screen -S ones
sudo bash common.sh

交互示例

[root@localhost ones-example-3.14.xxxxx]# sudo bash common.sh
the team_uuid is
BGwiSTx3

1.pull_image
2.local_upgrade(Unconventional upgrade)
3.open_automation
4.open_performance_pro
5.init
6.change_emailPsd
7.Not Yet Open
8.Not Yet Open
9.mysqlport_open
10.mysql5.7_ex
11.first_select_login
12.wps_install
13.replace_binary
14.replace_ssl
15.enable_plugin
16.change_port
17.skip_backup_to_upgrade
18.get_audit_log_info
19.mysql8_ex(Use with caution)

If mysqlrootuser is not root,Please pass the first parameter as mysqlrootuser!!Dedicated to external database
please input your select :2
Successfully copied 11.3kB to /data/ones/pkg/ones-sop-test2-3.12.613087/dockerconfig.json
please input the path of ssl file like .pem/.crt/..:test.pem
please input the path of ssl file .key:test.key

当观察到如下输出,则重启已经完成。稍等几分钟后 ONES 服务将可以正常访问,Automation 配置完成

15:29:15.764114 [SQL] SELECT COUNT(1) FROM marketplace_app_installed []
15:29:15.765044 [SQL] SHOW TABLES LIKE 'app_install_record' []
15:29:15.766297 [SQL] SELECT COUNT(1) FROM app_install_record []
2023/05/29 15:29:15 P3039: Table true Data false
2023/05/29 15:29:15 P3069: Table true Data true
15:29:15.767277 [SQL] begin; []
15:29:15.767694 [SQL] SELECT uuid, create_time, status, name, owner, logo, expire_time, scale, type, visibility FROM organization LIMIT 1; []
2023/05/29 15:29:15 --- start transaction org_uuid: D1X4EdeP---
15:29:15.768948 [SQL] SELECT uuid FROM team WHERE org_uuid=? AND status=?; [1:"D1X4EdeP" 2:1]
15:29:15.770020 [SQL] SELECT * FROM license WHERE org_uuid=?; [1:"D1X4EdeP"]
2023/05/29 15:29:15 P3069 already migrated, skip.
15:29:15.771617 [SQL] commit; []
[INFO] 2023/05/29 15:29:15 upgrade success!!

验证

重启容器完成后执行检查服务状态命令

./onesconfigure ss

当观察到结果没有 camunda-bpm组件时,则关闭成功

[root@localhost ones-example-3.14.xxxxx]# ./onesconfigure ss
docker run programs info:
authorization FATAL Exited too quickly (process log may have details)
clickhouse RUNNING pid 51, uptime 0:02:20
copy-project-web EXITED May 30 02:09 PM
copy-wiki-web EXITED May 30 02:09 PM
crond RUNNING pid 164, uptime 0:02:20
elasticsearch RUNNING pid 245, uptime 0:02:20
kafka RUNNING pid 4238, uptime 0:01:57
mysql RUNNING pid 44, uptime 0:02:20
ones-ai-audit-log-sync RUNNING pid 105, uptime 0:02:20
ones-ai-bi-sync-canal RUNNING pid 4779, uptime 0:01:53
ones-ai-bi-sync-etl RUNNING pid 4824, uptime 0:01:52
ones-ai-binlog-event-sync RUNNING pid 4886, uptime 0:01:52
ones-ai-canal RUNNING pid 4831, uptime 0:01:52
ones-ai-devops-api RUNNING pid 177, uptime 0:02:20
ones-ai-project-api RUNNING pid 4677, uptime 0:01:55
ones-ai-third-importer FATAL Exited too quickly (process log may have details)
ones-ai-wiki-api RUNNING pid 40, uptime 0:02:20
ones-ai-wiz-convert RUNNING pid 98, uptime 0:02:20
ones-ai-wiz-editor RUNNING pid 265, uptime 0:02:20
ones-data-collector RUNNING pid 294, uptime 0:02:20
openresty RUNNING pid 252, uptime 0:02:20
performance-api RUNNING pid 59, uptime 0:02:20
plugin_hostboot RUNNING pid 160, uptime 0:02:20
plugin_platform RUNNING pid 188, uptime 0:02:20
plugin_service_proxy RUNNING pid 198, uptime 0:02:20
project-es-river RUNNING pid 55, uptime 0:02:20
rabbitmq RUNNING pid 43, uptime 0:02:20
redis RUNNING pid 75, uptime 0:02:20
unoconv RUNNING pid 39, uptime 0:02:20
wiki-es-river RUNNING pid 66, uptime 0:02:20
zookeeper RUNNING pid 41, uptime 0:02:20