---
title: Json文件说明
description: "所有JSON文件中OmniShuffle的安装目录、用户、包上传位置、ZooKeeper与Spark用户名均需按实际修改。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2300/bds/kunpengbds_omniruntime_20_0180.html
sourcePath: /source/zh/kunpengboostkithistory/2300/bds/kunpengbds_omniruntime_20_0180.html
indexId: 45434510cc52b1f1e5b7f318940fbb50721fb8e03ac17fb93f16bb3bcf75a11c78
---
# Json文件说明

所有JSON文件中OmniShuffle的安装目录、用户、包上传位置、ZooKeeper与Spark用户名均需按实际修改。


#### create user.json

```
{
"Name": "null",
"Description": "null",
"TasksSequence": [
{
"TaskType": "ExcuteCommand",
"Name": "创建nologin用户ockadmin",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "useradd ockadmin",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "ockadmin加入属组ockadmin",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "usermod -a -G ockadmin ockadmin",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "设置ockadmin用户密码",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "passwd ockadmin",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_OUTPUT_COMMAND",
"ExpectPrint": "passwd: all authentication tokens updated successfully.",
"OutPutCommands": [
{
"echoInfo": "New password:",
"command": "输入用户密码"
},
{
"echoInfo": "Retype new password:",
"command": "确认用户密码"
},
]
}
},
{
"TaskType": "ExcuteCommand",
"Name": "设置ockadmin用户的limits",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "echo \"ockadmin  hard    nofile  102400\" >> /etc/security/limits.conf",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
]
}
```


#### check.json

```
{
	"Name": "null",
	"Description": "null",
	"TasksSequence": [
		{
			"TaskType": "ExcuteCommand",
			"Name": "检查Spark是否安装",
			"Description": "",
			"TimeOut": 60,
			"ExceptionHandle": {
				"Retry": 0,
				"WaitBeforeRetry": 10,
				"ExitMode": "ExitWorkFlow"
			},
			"Path": "",
			"Command": "echo $SPARK_HOME",
			"CheckForSuccess": {
				"CheckErrorCode": false,
				"ExpectErrorCode": -1,
				"DeterminePrintMode": "JUDGMENT_MSG_TRUE",
				"ExpectPrint": "spark"
			}
		},
		{
			"TaskType": "ExcuteCommand",
			"Name": "检查numactl",
			"Description": "",
			"TimeOut": 60,
			"ExceptionHandle": {
				"Retry": 0,
				"WaitBeforeRetry": 10,
				"ExitMode": "ExitWorkFlow"
			},
			"Path": "",
			"Command": "numactl -s",
			"CheckForSuccess": {
				"CheckErrorCode": true,
				"ExpectErrorCode": 0,
				"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
				"ExpectPrint": ""
			}
		},
		{
			"TaskType": "ExcuteCommand",
			"Name": "检查GCC版本是否为7.3",
			"Description": "",
			"TimeOut": 60,
			"ExceptionHandle": {
				"Retry": 0,
				"WaitBeforeRetry": 10,
				"ExitMode": "ExitWorkFlow"
			},
			"Path": "",
			"Command": "gcc -v",
			"CheckForSuccess": {
				"CheckErrorCode": true,
				"ExpectErrorCode": 0,
				"DeterminePrintMode": "JUDGMENT_MSG_TRUE",
				"ExpectPrint": "gcc version 7.3.0"
			}
		},
		{
			"TaskType": "ExcuteCommand",
			"Name": "检查expect",
			"Description": "",
			"TimeOut": 60,
			"ExceptionHandle": {
				"Retry": 0,
				"WaitBeforeRetry": 10,
				"ExitMode": "ExitWorkFlow"
			},
			"Path": "",
			"Command": "expect -v",
			"CheckForSuccess": {
				"CheckErrorCode": true,
				"ExpectErrorCode": 0,
				"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
				"ExpectPrint": ""
			}
		},
		{
			"TaskType": "ExcuteCommand",
			"Name": "检查ifconfig",
			"Description": "",
			"TimeOut": 60,
			"ExceptionHandle": {
				"Retry": 0,
				"WaitBeforeRetry": 10,
				"ExitMode": "ExitWorkFlow"
			},
			"Path": "",
			"Command": "ifconfig",
			"CheckForSuccess": {
				"CheckErrorCode": true,
				"ExpectErrorCode": 0,
				"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
				"ExpectPrint": ""
			}
		},
		{
			"TaskType": "ExcuteCommand",
			"Name": "检查haveged.service服务是否运行",
			"Description": "",
			"TimeOut": 600,
			"ExceptionHandle": {
				"Retry": 0,
				"WaitBeforeRetry": 10,
				"ExitMode": "ExitWorkFlow"
			},
			"Path": "",
			"Command": " systemctl status haveged.service",
			"CheckForSuccess": {
				"CheckErrorCode": true,
				"ExpectErrorCode": 0,
				"DeterminePrintMode": "JUDGMENT_MSG_TRUE",
				"ExpectPrint": "active (running)"
			}
		},
		
	]
}
```


#### install.json

```
{
"Name": "null",
"Description": "null",
"TasksSequence": [
{
"TaskType": "FileTransfer",
"Name": "传输文件包",
"Description": "文件传输到的位置（远端环境），用户自定义推荐使用ockadmin用户的home目录",
"TimeOut": 600,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"TransferDirection": "ToRemoteHost",
"Protocol": "SFTP",
"LocalPath": "D:\\shell\\ock\\BoostKit-omnishuffle_1.3.0.tar.gz",
"RemotePath": "/home/ockadmin"
},
{
"TaskType": "ExcuteCommand",
"Name": "解压软件安装包",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin",
"Command": "tar -zxvf BoostKit-omnishuffle_1.3.0.tar.gz",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "解压内层软件安装包",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin",
"Command": "tar -zxvf BoostKit-omnishuffle_1.3.0.tar.gz",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "解压内层部署包OCKUtils",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin/BoostKit-omnishuffle_1.3.0",
"Command": "tar -zxvf omnishuffleUtils_euleros-aarch64.tar.gz",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "输入spark version",
"Description": "若环境Spark版本是3.1,sed 'spark-3.1'赋值到远端环境common_params.sh文件spark_version参数,若环境Spark版本是其他，同理",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "sed -i 's/^spark_version.*/spark_version=\"spark-3.1\"/g' /home/ockadmin/BoostKit-omnishuffle_1.3.0/omnishuffleUtils/common/common_params.sh",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "赋予ockadmin用户/home/ockadmin下文件使用权限",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "chown -R ockadmin:ockadmin /home/ockadmin",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "以ockadmin账户安装OmniShuffle",
"Description": "若不带参数则为默认文件夹
~
/opt",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "su - ockadmin -c 'sh /home/ockadmin/BoostKit-omnishuffle_1.3.0/omnishuffleUtils/bin/ock_install.sh'",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_TRUE",
"ExpectPrint": "ock installed successfully"
}
},
]
}
```


#### distribute.json

```
{
"Name": "null",
"Description": "null",
"TasksSequence": [
{
"TaskType": "FileTransfer",
"Name": "分发配置文件ock.conf",
"Description": "分发修改后的配置文件",
"TimeOut": 600,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"TransferDirection": "ToRemoteHost",
"Protocol": "SFTP",
"LocalPath": "D:\\shell\\conf\\ock.conf",
"RemotePath": "/home/ockadmin/opt/ock/conf"
},
{
"TaskType": "FileTransfer",
"Name": "分发配置文件mf.conf",
"Description": "",
"TimeOut": 600,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"TransferDirection": "ToRemoteHost",
"Protocol": "SFTP",
"LocalPath": "D:\\shell\\conf\\mf.conf",
"RemotePath": "/home/ockadmin/opt/ock/conf"
},
{
"TaskType": "ExcuteCommand",
"Name": "修改ock.conf里security.client.principle的两个参数",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin/opt/ock/conf",
"Command": "sed -i \"s#security.client.principle.*#security.client.principle=zkcli/$(hostname)@HUAWEI.COM#g\" ock.conf",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},

]
}
```


#### certificate.json

```
{
"Name": "null",
"Description": "null",
"TasksSequence": [
{
"TaskType": "FileTransfer",
"Name": "上传agent_node_list文件",
"Description": "远端路径为软件安装包解压后的certificate位置",
"TimeOut": 600,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"TransferDirection": "ToRemoteHost",
"Protocol": "SFTP",
"LocalPath": "D:\\shell\\conf\\agent_node_list",
"RemotePath": "/home/ockadmin/opt/ock/ucache/23.0.0/linux-aarch64/sbin/security"
},
{
"TaskType": "FileTransfer",
"Name": "上传CA_node_list文件",
"Description": "",
"TimeOut": 600,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"TransferDirection": "ToRemoteHost",
"Protocol": "SFTP",
"LocalPath": "D:\\shell\\conf\\CA_node_list",
"RemotePath": "/home/ockadmin/opt/ock/ucache/23.0.0/linux-aarch64/sbin/security"
},
{
"TaskType": "ExcuteCommand",
"Name": "agent_node_list更改属主为ockadmin",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin/opt/ock/ucache/23.0.0/linux-aarch64/sbin/security",
"Command": "chown ockadmin:ockadmin agent_node_list",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "CA_node_list更改属主为ockadmin",
"Description": "",
"TimeOut": 600,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin/opt/ock/ucache/23.0.0/linux-aarch64/sbin/security",
"Command": "chown ockadmin:ockadmin CA_node_list",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "cert",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "su - ockadmin -c 'bash $OCK_HOME/ucache/23.0.0/linux-aarch64/sbin/security/cert_manager.sh 运维用户 ockadmin ockadmin Sparkadmin'",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_OUTPUT_COMMAND",
"ExpectPrint": "SUCCESS",
"OutPutCommands": [
{
"echoInfo": "Enter OPS user password:",
"command": "输入实际用户密码"
},
{
"echoInfo": "Enter Agent password:",
"command": "输入实际Agent密码"
},
{
"echoInfo": "Enter CA password:",
"command": "输入实际CA密码"
},

]
}
},

]}
```


#### start.json

```
{
"Name": "null",
"Description": "null",
"TasksSequence": [
{
"TaskType": "ExcuteCommand",
"Name": "启动OCK",
"Description": "",
"TimeOut": 600,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "$OCK_HOME/ucache/$OCK_VERSION/linux-$(arch)/sbin/ock-start-ockd.sh",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_TRUE",
"ExpectPrint": "ockd started successfully"
}
},

]
}
```


#### stop.json

```
{
"Name": "null",
"Description": "null",
"TasksSequence": [
{
"TaskType": "ExcuteCommand",
"Name": "停止OmniShuffle",
"Description": "",
"TimeOut": 300,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "$OCK_HOME/ucache/$OCK_VERSION/linux-$(arch)/sbin/ock-stop-ockd.sh",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_TRUE",
"ExpectPrint": "ockd stop successfully"
}
},

]
}
```


#### upgrade.json

```
{
"Name": "null",
"Description": "null",
"TasksSequence": [
{
"TaskType": "FileTransfer",
"Name": "上传待升级的软件安装包",
"Description": "",
"TimeOut": 600,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"TransferDirection": "ToRemoteHost",
"Protocol": "SFTP",
"LocalPath": "D:\\shell\\ock\\BoostKit-omnishuffle_1.3.0.tar.gz",
"RemotePath": "/home/ockadmin/opt"
},
{
"TaskType": "ExcuteCommand",
"Name": "解压BoostKit-ock-bigdata-spark包",
"Description": "",
"TimeOut": 600,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin/opt",
"Command": "tar -xvf BoostKit-omnishuffle_1.3.0.tar.gz'",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "进行升级",
"Description": "",
"TimeOut": 600,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin/opt",
"Command": "su - ockadmin -c '$OCK_HOME/ucache/$OCK_VERSION/linux-$(arch)/bin/upgrade -o BoostKit-omnishuffle_1.3.0.tar.gz'",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},

]
}
```


#### uninstall.json

```
{
"Name": "null",
"Description": "null",
"TasksSequence": [
{
"TaskType": "ExcuteCommand",
"Name": "卸载OmniShuffle",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "",
"Command": "sh  $OCK_MG/ock_uninstall.sh",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_TRUE",
"ExpectPrint": "Ock uninstalled successfully"
}
},
{
"TaskType": "ExcuteCommand",
"Name": "删除上传的tar包",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin",
"Command": "rm -rf BoostKit-omnishuffle_1.3.0.tar.gz",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "删除解压后的tar包",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin",
"Command": "rm -rf BoostKit-omnishuffle_1.3.0.tar.gz",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "删除解压后的文件",
"Description": "",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/ockadmin",
"Command": "rm -rf BoostKit-omnishuffle_1.3.0",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "删除sparkadmin安全密钥文件",
"Description": "开启安全特性后需加入此部分",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/sparkadmin",
"Command": "rm -rf huawei",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},
{
"TaskType": "ExcuteCommand",
"Name": "删除zookeeperadmin安全密钥文件",
"Description": "开启安全特性后需加入此部分",
"TimeOut": 60,
"ExceptionHandle": {
"Retry": 0,
"WaitBeforeRetry": 10,
"ExitMode": "ExitWorkFlow"
},
"Path": "/home/zookeeperadmin",
"Command": "rm -rf huawei",
"CheckForSuccess": {
"CheckErrorCode": true,
"ExpectErrorCode": 0,
"DeterminePrintMode": "JUDGMENT_MSG_FALSE",
"ExpectPrint": ""
}
},

]
}
```
