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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
{ "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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
{ "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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
{ "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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
{ "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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
{ "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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
{ "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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
{ "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": "" } }, ] } |
父主题: 相关参考