| 当前版本 | 旧版本 | 是否需要加密 | 是否需要加签 |
|---|---|---|---|
| v1.0.0 | - | 否 | 是 |
{
"task_id": 0,
"task_type": "Deployment",
"task_name": "string",
"resources": [
{
"resource": {
"device_name": "string",
"region": "string",
"gpu_name": "string",
"gpu_count": 0,
"gpu_memory": 0,
"memory": 0,
"cpu_cores": 0
},
"region_name": "string",
"mark": "string",
"weight": 0
}
],
"scheduler_strategy": {
"mode": "Unrestricted"
},
"points": 0,
"deployment_yaml": "string",
"task_qos": {
"class": "Guaranteed"
},
"share_disk_volumes": [
{
"name": "string"
}
],
"share_mem_volumes": [
{
"name": "string",
"size_limit": 0
}
],
"services": [
{
"service_id": 0,
"service_name": "string",
"service_image": "string",
"resource_weight": {
"cpu_weight": 0,
"mem_weight": 0,
"gpu_weight": 0
},
"health_checks": {
"liveness_probe": {
"switch": true,
"probe_type": "httpGet",
"path": "string",
"port": 0,
"initial_delay_seconds": 0,
"period_seconds": 0,
"timeout_seconds": 0,
"failure_threshold": 0
},
"startup_probe": {
"switch": true,
"probe_type": "httpGet",
"path": "string",
"port": 0,
"initial_delay_seconds": 0,
"period_seconds": 0,
"timeout_seconds": 0,
"failure_threshold": 0
},
"readiness_probe": {
"switch": true,
"probe_type": "httpGet",
"path": "string",
"port": 0,
"initial_delay_seconds": 0,
"period_seconds": 0,
"timeout_seconds": 0,
"failure_threshold": 0
}
},
"remote_ports": [
{
"url": "string",
"service_port": 0
}
],
"storage_config": [
{
"storage_id": 0,
"target_dir": "string"
}
],
"share_storage_config": [
{
"storage_id": 0,
"target_dir": "string"
}
],
"share_mem_config": [
{
"target_dir": "string",
"volume_name": "string"
}
],
"share_disk_config": [
{
"target_dir": "string",
"volume_name": "string"
}
],
"env": [
{
"name": "string",
"value": "string"
}
],
"start_script": {
"command": [
"string"
],
"args": [
"string"
]
},
"repository_account": {
"repository_username": "string",
"repository_password": "string"
},
"is_update_repository": "string"
}
]
}curl --location 'https://openapi.suanli.cn/api/task/deployment/update' \
--header 'token;' \
--header 'timestamp: {{$date.millisecondsTimestamp}}' \
--header 'version: 1.0.0' \
--header 'sign_str;' \
--header 'Content-Type: application/json' \
--data '{
"task_id": 0,
"task_type": "Deployment",
"task_name": "string",
"resources": [
{
"resource": {
"device_name": "string",
"region": "string",
"gpu_name": "string",
"gpu_count": 0,
"gpu_memory": 0,
"memory": 0,
"cpu_cores": 0
},
"region_name": "string",
"mark": "string",
"weight": 0
}
],
"scheduler_strategy": {
"mode": "Unrestricted"
},
"points": 0,
"deployment_yaml": "string",
"task_qos": {
"class": "Guaranteed"
},
"share_disk_volumes": [
{
"name": "string"
}
],
"share_mem_volumes": [
{
"name": "string",
"size_limit": 0
}
],
"services": [
{
"service_id": 0,
"service_name": "string",
"service_image": "string",
"resource_weight": {
"cpu_weight": 0,
"mem_weight": 0,
"gpu_weight": 0
},
"health_checks": {
"liveness_probe": {
"switch": true,
"probe_type": "httpGet",
"path": "string",
"port": 0,
"initial_delay_seconds": 0,
"period_seconds": 0,
"timeout_seconds": 0,
"failure_threshold": 0
},
"startup_probe": {
"switch": true,
"probe_type": "httpGet",
"path": "string",
"port": 0,
"initial_delay_seconds": 0,
"period_seconds": 0,
"timeout_seconds": 0,
"failure_threshold": 0
},
"readiness_probe": {
"switch": true,
"probe_type": "httpGet",
"path": "string",
"port": 0,
"initial_delay_seconds": 0,
"period_seconds": 0,
"timeout_seconds": 0,
"failure_threshold": 0
}
},
"remote_ports": [
{
"url": "string",
"service_port": 0
}
],
"storage_config": [
{
"storage_id": 0,
"target_dir": "string"
}
],
"share_storage_config": [
{
"storage_id": 0,
"target_dir": "string"
}
],
"share_mem_config": [
{
"target_dir": "string",
"volume_name": "string"
}
],
"share_disk_config": [
{
"target_dir": "string",
"volume_name": "string"
}
],
"env": [
{
"name": "string",
"value": "string"
}
],
"start_script": {
"command": [
"string"
],
"args": [
"string"
]
},
"repository_account": {
"repository_username": "string",
"repository_password": "string"
},
"is_update_repository": "string"
}
]
}'{
"code": "0000",
"message": "success",
"data": null
}