Loading...
Loading...
Compare original and translation side by side
OSS Bucket + DashScope (Bailian API Key) + FC App (ComfyUI + WebUI — two functions deployed via Devs template)OSS Bucket + DashScope (Bailian API Key) + FC App (ComfyUI + WebUI — 基于Devs模板部署的两个函数)Prerequisites (scripts/ runtime dependencies):
Dependency Min Version Check Command Purpose bash4.0+ bash --versionScript runtime CLIaliyun>= 3.3.7 aliyun versionAlibaba Cloud resource operations (3.3.7+ required for subcommand)ai-modepython33.6+ python3 --versionJSON parsing curlany curl --versionHTTP API calls If Aliyun CLI is not installed or version too low, seefor installation instructions. Then [MUST] runreferences/cli-installation-guide.mdto enable automatic plugin installation.aliyun configure set --auto-plugin-install true
前置依赖(脚本/运行时依赖):
依赖项 最低版本 检查命令 用途 bash4.0+ bash --version脚本运行时 CLIaliyun>= 3.3.7 aliyun version阿里云资源操作( 子命令需要3.3.7及以上版本)ai-modepython33.6+ python3 --versionJSON解析 curl任意版本 curl --versionHTTP API调用 若未安装Aliyun CLI或版本过低,请查看获取安装说明。 之后【必须】运行references/cli-installation-guide.md以启用插件自动安装功能。aliyun configure set --auto-plugin-install true
aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy"
aliyun plugin updatealiyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy"
aliyun plugin updatePre-check: Alibaba Cloud Credentials RequiredSecurity Rules:
- NEVER read, echo, or print AK/SK values
- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
with literal credential valuesaliyun configure set- ONLY use
to check credential statusaliyun configure listbashaliyun configure listCheck the output for a valid profile (AK, STS, or OAuth identity).If no valid profile exists, STOP here.
- Obtain credentials from Alibaba Cloud Console
- Configure credentials outside of this session
- Return and re-run after
shows a valid profilealiyun configure list
预检查:需要阿里云凭证安全规则:
- 禁止读取、回显或打印AK/SK值
- 禁止要求用户在对话或命令行中直接输入AK/SK
- 禁止使用
传入明文凭证值aliyun configure set- 仅允许使用
检查凭证状态aliyun configure listbashaliyun configure list检查输出中是否存在有效配置(AK、STS或OAuth身份)。若无有效配置,请在此停止。
- 从阿里云控制台获取凭证
- 在本会话外完成凭证配置
- 待
显示有效配置后再返回继续aliyun configure list
references/ram-policies.mdAliyunFCFullAccessAliyunOSSFullAccessdevs:CreateProjectdevs:RenderServicesByTemplatedevs:UpdateEnvironmentdevs:DeployEnvironmentdevs:ListEnvironmentsdevs:GetEnvironmentbash scripts/attach-policies.sh[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
- Read
to get the full list of permissions required by this SKILLreferences/ram-policies.md- Use
skill to guide the user through requesting the necessary permissionsram-permission-diagnose- Pause and wait until the user confirms that the required permissions have been granted
references/ram-policies.mdAliyunFCFullAccessAliyunOSSFullAccessdevs:CreateProjectdevs:RenderServicesByTemplatedevs:UpdateEnvironmentdevs:DeployEnvironmentdevs:ListEnvironmentsdevs:GetEnvironmentbash scripts/attach-policies.sh【必须】权限失败处理: 若执行过程中任何命令或API调用因权限错误失败,请遵循以下流程:
- 查看
获取本SKILL所需的完整权限列表references/ram-policies.md- 使用
Skill引导用户申请必要权限ram-permission-diagnose- 暂停操作,等待用户确认所需权限已授予
IMPORTANT: Parameter Confirmation — Before executing any command or API call, all parameters are either fixed values or auto-generated/created — no manual user input required.
| Parameter | Required | Description | Value |
|---|---|---|---|
| Yes | Deployment region (FC and OSS in the same region) | Fixed |
| Yes | OSS Bucket name | Auto-generated |
| Yes | Bailian (DashScope) API Key | Auto-created via |
| Yes | Devs project name | Auto-generated |
undefined重要提示:参数确认 — 执行任何命令或API调用前,所有参数均为固定值或自动生成/创建,无需用户手动输入。
| 参数 | 是否必需 | 描述 | 值 |
|---|---|---|---|
| 是 | 部署地域(FC与OSS需在同一地域) | 固定为 |
| 是 | OSS Bucket名称 | 自动生成 |
| 是 | Bailian(DashScope)API密钥 | 通过 |
| 是 | Devs项目名称 | 自动生成 |
undefined
---
---aliyun modelstudiosource scripts/create-api-key.shNote: Useto ensure thesourcevariable is exported to the current shell. The script automatically fetches the default workspace (or creates one if none exists), creates an API Key, and prints the full value.API_KEY
aliyun modelstudiosource scripts/create-api-key.sh注意:使用确保source变量导出至当前Shell。脚本会自动获取默认工作区(若不存在则创建)、生成API密钥并打印完整值。API_KEY
Note: The OSS CLI plugin uses theflag (not--ua) to set the User-Agent.--user-agent
ORDER.OPENDaliyun ossadmin open-oss-service --endpoint oss-admin.aliyuncs.com --force --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy 2>&1 || truealiyun oss mb "oss://$BUCKET_NAME" --region cn-hangzhou --ua AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deployaliyun oss stat "oss://$BUCKET_NAME" --ua AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy注意:OSS CLI插件使用参数(而非--ua)设置User-Agent。--user-agent
ORDER.OPENDaliyun ossadmin open-oss-service --endpoint oss-admin.aliyuncs.com --force --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy 2>&1 || truealiyun oss mb "oss://$BUCKET_NAME" --region cn-hangzhou --ua AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deployaliyun oss stat "oss://$BUCKET_NAME" --ua AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deployCreateProjecttemplateConfigproductionNote: CreateProject only creates the project and an empty environment — it does NOT trigger deployment automatically. You must follow up with RenderServicesByTemplate + UpdateEnvironment + DeployEnvironment to complete deployment.
aliyun devs create-project --body "{
\"name\": \"$PROJECT_NAME\",
\"spec\": {
\"templateConfig\": {
\"templateName\": \"animation-creation\",
\"parameters\": {
\"region\": \"cn-hangzhou\",
\"bailian_api_key\": \"$API_KEY\",
\"ossBucket\": \"$BUCKET_NAME\"
}
}
}
}" --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deployTemplate parameter notes (confirmed — do not modify):
: Fixedregioncn-hangzhou : Bailian API Key auto-created in Step 1bailian_api_key : OSS Bucket name created in Step 2 (withoutossBucketprefix)oss://- All parameters are passed via
, notparametersvariableValues
CreateProjecttemplateConfigproduction注意:CreateProject仅创建项目和空环境,不会自动触发部署。必须执行RenderServicesByTemplate + UpdateEnvironment + DeployEnvironment才能完成部署。
aliyun devs create-project --body "{
\"name\": \"$PROJECT_NAME\",
\"spec\": {
\"templateConfig\": {
\"templateName\": \"animation-creation\",
\"parameters\": {
\"region\": \"cn-hangzhou\",
\"bailian_api_key\": \"$API_KEY\",
\"ossBucket\": \"$BUCKET_NAME\"
}
}
}
}" --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy模板参数说明(已确认,请勿修改):
:固定为regioncn-hangzhou :步骤1中自动创建的Bailian API密钥bailian_api_key :步骤2中创建的OSS Bucket名称(不含ossBucket前缀)oss://- 所有参数通过
传递,请勿使用parametersvariableValues
All commands in this step use shell variables,MY_UID,PROJECT_NAME,BUCKET_NAME— make sure Step 1 and Parameter Confirmation have been executed.API_KEY
source scripts/setup-role.shNote: Useto ensure thesourcevariable is exported to the current shell. The script automatically checks whether the role exists and creates it if not. This role is the standard Devs role, typically auto-created when using the FC console's application feature for the first time.MY_UID
本步骤所有命令使用Shell变量,MY_UID,PROJECT_NAME,BUCKET_NAME— 确保已执行步骤1和参数确认。API_KEY
source scripts/setup-role.sh注意:使用确保source变量导出至当前Shell。脚本会自动检查角色是否存在,若不存在则创建。该角色为标准Devs角色,通常首次使用FC控制台应用功能时会自动创建。MY_UID
The following script automatically: renders the template → filters out custom-domain → adds roleArn → calls UpdateEnvironment. The agent does not need to handle JSON manually.
bash scripts/render-and-update.shKey notes (built into the script — no manual handling needed):
service is automatically filtered out (causes "Unknown service type" error)custom-domain is automatically addedroleArn- Uses
to pass data (--bodycannot correctly pass deeply nested JSON)--spec
以下脚本自动完成:渲染模板 → 过滤自定义域名 → 添加roleArn → 调用UpdateEnvironment。无需手动处理JSON。
bash scripts/render-and-update.sh关键说明(已内置到脚本中,无需手动处理):
- 自动过滤
服务(会导致「未知服务类型」错误)custom-domain- 自动添加
roleArn- 使用
传递数据(--body无法正确传递深层嵌套JSON)--spec
Built-in rate-limit protection: The script retries up to 3 times with 60-second intervals, and stops immediately on 404. Run the script directly — do not callmanually.deploy-environment
bash scripts/deploy-environment.sh内置限流保护:脚本最多重试3次,间隔60秒,遇到404错误立即停止。直接运行脚本,请勿手动调用。deploy-environment
bash scripts/deploy-environment.shbash scripts/poll-deploy-status.shbash scripts/poll-deploy-status.shWhy is a custom domain needed? FC trigger URLs () force a*.fcapp.runresponse header, causing the browser to download the HTML instead of rendering it. A custom domain (Content-Disposition: attachment) is required for the application to work properly.*.devsapp.net
Must use FC 2.0 API () to create the helper function: FC 3.0 does not supportaliyun fc-openin function names. The$plugin will be auto-installed via thefc-openconfiguration.--auto-plugin-install true
MY_UIDPROJECT_NAMEbash scripts/create-custom-domain.sh为何需要自定义域名?FC触发URL()强制添加*.fcapp.run响应头,导致浏览器下载HTML而非渲染页面。必须使用自定义域名(Content-Disposition: attachment)才能确保应用正常运行。*.devsapp.net
必须使用FC 2.0 API()创建辅助函数:FC 3.0不支持函数名称中包含aliyun fc-open。$插件将通过fc-open配置自动安装。--auto-plugin-install true
MY_UIDPROJECT_NAMEbash scripts/create-custom-domain.shhttp://${PROJECT_NAME}-web.fcv3.${MY_UID}.cn-hangzhou.fc.devsapp.net/⚠️ 安全提醒 — 展示访问 URL 时必须告知用户: 该 URL 可通过公网直接访问,请勿随意分享给不信任的人。未经授权的访问可能导致:
- 云资源被消耗: 每次访问都会消耗函数计算资源和百炼 API 调用额度,可能产生额外费用。
- 隐私信息泄露: 生成的动画故事、上传的图片等内容可能包含个人或敏感信息。
http://${PROJECT_NAME}-web.fcv3.${MY_UID}.cn-hangzhou.fc.devsapp.net/⚠️ 安全提醒 — 展示访问URL时必须告知用户: 该URL可通过公网直接访问,请勿随意分享给不信任的人。未经授权的访问可能导致:
- 云资源被消耗: 每次访问都会消耗函数计算资源和百炼API调用额度,可能产生额外费用。
- 隐私信息泄露: 生成的动画故事、上传的图片等内容可能包含个人或敏感信息。
PROJECT_NAMEMY_UIDBUCKET_NAMEAPI_KEY_IDundefinedPROJECT_NAMEMY_UIDBUCKET_NAMEAPI_KEY_IDundefined
---
---aliyun configure ai-mode disablealiyun configure ai-mode disablereferences/related-commands.mdKey limitation: First-time activation of FC has no CLI/API support — users must activate it manually in the console.Auto-activated: OSS service via(built into Step 2). Bailian workspace viaaliyun ossadmin open-oss-service(built into Step 1).aliyun modelstudio create-workspace
references/related-commands.md关键限制: FC首次激活无CLI/API支持 — 用户必须在控制台手动激活。已自动激活: 通过自动激活OSS服务(内置到步骤2)。通过aliyun ossadmin open-oss-service自动激活百炼工作区(内置到步骤1)。aliyun modelstudio create-workspace
cn-hangzhoucn-hangzhou| Reference | Description |
|---|---|
| references/ram-policies.md | RAM permission policies |
| references/related-commands.md | CLI/SDK command reference |
| references/verification-method.md | Deployment verification steps |
| references/acceptance-criteria.md | Acceptance criteria |
| references/cli-installation-guide.md | CLI installation guide |
| 参考文档 | 描述 |
|---|---|
| references/ram-policies.md | RAM权限策略 |
| references/related-commands.md | CLI/SDK命令参考 |
| references/verification-method.md | 部署验证步骤 |
| references/acceptance-criteria.md | 验收标准 |
| references/cli-installation-guide.md | CLI安装指南 |