本镜像为Concourse CI/CD平台提供专用资源支持,旨在集成并执行Cycloid平台的核心功能。通过该资源,用户可在Concourse流水线中自动化触发terracost(基础设施成本估算)和infrapolicy(基础设施策略检查)等Cycloid特性,实现部署前的成本管控与合规性验证。
在Concourse管道配置中声明资源类型,指定镜像来源:
yamlresource_types: - name: cycloid-resource type: docker-image source: repository: [镜像仓库地址] # 替换为实际镜像仓库路径 tag: [版本标签] # 如"latest"或具体版本号
定义资源实例,设置Cycloid连接参数:
yamlresources: - name: cycloid-feature-check type: cycloid-resource source: cycloid_api_url: https://[cycloid-instance].com # Cycloid实例API地址 cycloid_api_token: ((cycloid-api-token)) # 通过Concourse变量存储API令牌 timeout: "300s" # 可选,设置功能执行超时时间 log_level: "info" # 可选,设置日志级别(debug/info/warn/error)
在Job计划中通过get或put步骤触发功能执行:
yamljobs: - name: infrastructure-validation plan: - get: infrastructure-code # 获取基础设施代码(如Terraform文件) - get: cycloid-feature-check params: action: "terracost" # 指定执行功能:"terracost"或"infrapolicy" tf_plan_path: "./infrastructure-code/terraform.plan" # Terraform计划文件路径 policy_path: "./infrastructure-code/policy" # 策略文件路径(infrapolicy时需指定)
| 参数名 | 类型 | 描述 | 适用功能 | 是否必填 |
|---|---|---|---|---|
| cycloid_api_url | string | Cycloid平台API访问地址 | 所有 | 是 |
| cycloid_api_token | string | Cycloid平台API认证令牌 | 所有 | 是 |
| action | string | 执行动作,取值"terracost"或"infrapolicy" | 所有 | 是 |
| tf_plan_path | string | Terraform计划文件路径 | terracost | 是 |
| policy_path | string | 策略文件或目录路径 | infrapolicy | 是 |
| timeout | string | 执行超时时间(如"300s") | 所有 | 否 |
| log_level | string | 日志输出级别(debug/info/warn/error) | 所有 | 否 |
yamlresource_types: - name: cycloid-resource type: docker-image source: repository: cycloid/concourse-resource tag: latest resources: - name: terraform-code type: git source: uri: [***] branch: main - name: cycloid-checker type: cycloid-resource source: cycloid_api_url: [***] cycloid_api_token: ((cycloid-token)) log_level: "debug" jobs: - name: pre-deploy-validation plan: - get: terraform-code trigger: true - task: generate-tf-plan config: platform: linux image_resource: type: docker-image source: {repository: hashicorp/terraform, tag: 1.6.0} inputs: - name: terraform-code outputs: - name: tf-plan run: path: sh args: - -c - | cd terraform-code terraform init terraform plan -out=../tf-plan/terraform.plan - get: cycloid-checker params: action: "terracost" tf_plan_path: "./tf-plan/terraform.plan" - get: cycloid-checker params: action: "infrapolicy" policy_path: "./terraform-code/policy" tf_plan_path: "./tf-plan/terraform.plan"
来自真实用户的反馈,见证轩辕镜像的优质服务
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像加速服务
在 Docker Desktop 配置镜像加速
Docker Compose 项目配置加速
Kubernetes 集群配置 Containerd
在宝塔面板一键配置镜像加速
Synology 群晖 NAS 配置加速
飞牛 fnOS 系统配置镜像加速
极空间 NAS 系统配置加速服务
爱快 iKuai 路由系统配置加速
绿联 NAS 系统配置镜像加速
QNAP 威联通 NAS 配置加速
Podman 容器引擎配置加速
HPC 科学计算容器配置加速
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名加速
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429