Loading...
Loading...
Alibaba Cloud E-HPC Instant Computing Platform Job Management Toolkit, supporting operations such as creation/submission, query, detail retrieval, log query, and deletion of E-HPC Instant (EHPC Instant/ehpcinstant) jobs. It is used when users need to create jobs, query job lists, get job details, delete jobs, or query job logs.
npx skill4agent add aliyun/alibabacloud-aiops-skills alibabacloud-ehpc-instant-job-skill[MUST] Must first attempt to read thefile, strictly prohibited to skip this check step../jobconfig/pre-config.json
- File exists and read successfully: Load the parameter values, prompt the user that the pre-configuration has been loaded and display a summary of key parameters, then proceed to Step 2.
- File does not exist: Prompt the user that no pre-configuration file is detected, necessary parameters will be obtained through interaction in Step 2, then proceed to Step 2.
- File exists but read/parsing failed (such as JSON format error, insufficient permissions, etc.): Report specific error information to the user, ask whether to continue (skip pre-configuration and enter Step 2) or abort execution.
aliyun versionaliyun configure set --auto-plugin-install truealiyun plugin updatealiyun--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skillbashaliyun configure ai-mode enable aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skill" aliyun plugin updateAlibaba Cloud CLI provides AI Mode. After enabling it, the CLI will automatically attach AI identity information, allowing the server to identify and optimize the Agent call chain. [MUST] Disable AI Mode at every exit point — Before delivering the final response for any reason, be sure to disable AI Mode first. This applies to all exit paths: workflow success, workflow failure, error/exception, user cancellation, session end, or any scenario where no more CLI commands will be executed. AI Mode is only used for Agent Skill invocation scenarios, and must remain disabled after the skill stops running.bashaliyun configure ai-mode disable
cn-shanghaialiyun ehpcinstant CreateJob \
--region cn-shanghai \
--JobName 'container-job' \
--Tasks '[{
"TaskSpec": {
"TaskExecutor": [{
"Container": {
"Image": "registry.cn-shanghai.aliyuncs.com/registry/image:tag",
"Command": "[\"/bin/sh\", \"-c\", \"python /app/main.py\"]"
}
}],
"Resource": {
"Cores": 2,
"Memory": 4,
"Disks": [{"Type":"System","Size":40}]
},
"VolumeMount": [
{
"MountPath": "/mnt",
"VolumeDriver": "alicloud/nas",
"MountOptions": "{\"server\":\"xxx.cn-shanghai.nas.aliyuncs.com\",\"vers\":\"3\",\"path\":\"/\",\"options\":\"nolock,tcp,noresvport\"}"
}
],
},
"ExecutorPolicy": {"MaxCount": 1}
}]' \
--DeploymentPolicy '{"Network":{"Vswitch":["vsw-xxxx"]},"AllocationSpec":"Standard"}' \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skillaliyun ehpcinstant CreateJob \
--region cn-shanghai \
--JobName 'longrunning-job' \
--JobDescription 'Long-running VM job' \
--Tasks '[{
"TaskSpec": {
"TaskExecutor": [{
"VM": {
"Image": "m-xxxx",
"Script": "base64_encoded_script"
}
}],
"Resource": {
"Disks": [{"Type":"System","Size":50}],
"InstanceTypes": ["ecs.c6.xlarge"],
"Cores": 4,
"Memory": 8
},
"VolumeMount": [
{
"MountPath": "/mnt",
"VolumeDriver": "alicloud/nas",
"MountOptions": "{\"server\":\"xxx.cn-shanghai.nas.aliyuncs.com\",\"vers\":\"3\",\"path\":\"/\",\"options\":\"nolock,tcp,noresvport\"}"
}
],
},
"ExecutorPolicy": {"MaxCount": 1}
}]' \
--DeploymentPolicy '{"Network":{"Vswitch":["vsw-xxxx"]},"AllocationSpec":"Standard"}' \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skill# Basic list query
aliyun ehpcinstant ListJobs --region cn-shanghai \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skill
# Pagination query (recommended for large number of jobs)
aliyun ehpcinstant ListJobs --region cn-shanghai --PageSize 10 --PageNumber 1 \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skill
# Conditional filtering (by status, time, etc.)
aliyun ehpcinstant ListJobs --region cn-shanghai --Filter '{"Status":"Running"}' \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skillaliyun ehpcinstant GetJob --region cn-shanghai --JobId 'job-xxxx' \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skillaliyun ehpcinstant DescribeJobResults --region cn-shanghai --JobId 'job-sh145rw47pegztzdpu7s' --TaskName Task0 --ArrayIndex 0 \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skill# Delete single job
aliyun ehpcinstant DeleteJobs --region cn-shanghai --JobSpec '[{"JobId":"job-xxxx"}]' \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skill
# Batch deletion (safe method)
aliyun ehpcinstant DeleteJobs --region cn-shanghai --JobSpec '[{"JobId":"job-xxxx"},{"JobId":"job-yyyy"}]' \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ehpc-instant-job-skill[MUST] Idempotent Deletion Principle — When a user requests to delete a job, even if querying via GetJob or ListJobs confirms the job no longer exists, the Agent must still call the DeleteJobs API with the corresponding JobId. The DeleteJobs API is idempotent: it deletes the job if it exists, and returns a standard NotFound response if it does not exist. It is strictly prohibited for the Agent to skip the API call on the grounds of "job does not exist" — the server must confirm the final status.
/home/admin/.openclaw/workspace/skills/ehpcinstant-job-skill/scripts/create_container_job.shcreate_vm_job_batch.shcreate_vm_job_longrunning.shlist_jobs.shget_job.shdelete_jobs.shscripts/sdk/create_container_job.pycreate_vm_job_batch.pycreate_vm_job_longrunning.pylist_jobs.pyget_job.pydelete_jobs.pyaliyun ehpcinstantaliyun ehpc| Issue | Root Cause | Solution |
|---|---|---|
| InvalidCommand Error | Incorrect Command parameter format | Use the correct JSON array format: |
| Authentication Failed | Incorrect AccessKey configuration or insufficient permissions | Check the |
| Image Does Not Exist | Incorrect image ID or region mismatch | Confirm the image ID is correct and in the same region, refer to references/instant-image.md |
| Network Configuration Error | Incorrect VSwitch ID or unavailable | Check VSwitch ID and security group configuration, refer to references/vswitch.md |
| Insufficient Resource Quota | Account quota limits | Contact Alibaba Cloud to increase quota, or adjust resource configuration |
| Command Execution Failed | Incorrect command path in container | Ensure the command is executable in the image environment, use absolute paths |
Application-Case-Timestampprod-training-20260411aliyun ehpcinstant <ApiName> --help| Risk Level | Operation Type | Agent Code of Conduct |
|---|---|---|
| Low Risk | Query operations (list, get, check, describe) | Execute directly, no additional confirmation required |
| Medium Risk | Configuration operations (configure, modify, update) | Prompt the scope of impact, execute after obtaining user confirmation |
| High Risk | Creation/deletion operations (create, delete, remove) | Must display all configuration information completely, execute only after explicit user confirmation |
[MUST] Prohibit Skipping API Calls — When the Agent performs operations such as deletion, it must not skip the actual API call based on query results (such as GetJob returning NotFound) and self-judge "no operation needed". There is a time window between query and change, and the server status may have changed. The Agent must always execute the target API requested by the user (such as DeleteJobs), and the server returns the authoritative final result.