Skip to content

Commit

Permalink
Init computenest project.
Browse files Browse the repository at this point in the history
      on-behalf-of: @org [email protected]
  • Loading branch information
aliyun-computenest committed Dec 18, 2024
1 parent f87f24c commit bdae880
Show file tree
Hide file tree
Showing 5 changed files with 438 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .computenest/.computenest_parameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ServiceType: private
ArtifactSourceType: DockerCompose
ServiceBuildRegion: ap-southeast-1
RepoName: aliyun-computenest/quickstart-authorizer
DockerComposeEnvPath: .env.test
RegionId: cn-hangzhou
CustomParameters: ''
DockerComposeYamlPath: docker-compose.yaml
Owner: LYH-RAIN
Branch: main
Platform: github
21 changes: 21 additions & 0 deletions .computenest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 代码仓库结构

## 文档目录说明:
```
.
├── README.md - README
├── docs - 服务文档相关文件
│ └── index.md
├── resources - 服务资源文件
│ ├── icons
│ │ └── service_logo.png - 服务logo
│ └── artifact_resources - 部署物相关资源文件
├── ros_templates - 服务ROS模板目录,支持多模板
│ └── template.yaml - ROS模板,ROS模板引擎根据该模板会自动创建出所有的资源
├── config.yaml - 服务配置文件,服务构建过程中会使用计算巢命令行工具computenest-cli,computenest-cli会基于该配置文件构建服务
├── preset_parameters.yaml - (该文件只有托管版有)服务商预设参数,如VpcId,VSwitchId等,该ros模板内容会渲染为表单方便服务商填写
```

## 其他
关于ROS模板,请参见 [资源编排](https://help.aliyun.com/zh/ros)
关于computenest-cli请参见 [computenest-cli](https://pypi.org/project/computenest-cli/)
63 changes: 63 additions & 0 deletions .computenest/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Service:
RegionId: cn-hangzhou
DeployType: ros
OperationMetadata:
StatusOperationConfigs:
- TemplateName: 'ECS单机版'
SupportOperations:
- Start
- Stop
- Restart
SupportBackup: true
ModifyParametersConfig:
- TemplateName: ECS单机版
Operation:
- Name: 变更ECS实例规格
Description: 变更ECS实例规格
Type: Custom
Parameters:
- EcsInstanceType
- Name: 变更ECS实例密码
Description: 变更ECS实例密码
Type: Custom
Parameters:
- InstancePassword
DeployMetadata:
SupplierDeployMetadata:
ArtifactRelation:
ecs_image_quickstart-authorizer:
ArtifactId: ${Artifact.EcsImage.ArtifactId}
ArtifactVersion: draft
TemplateConfigs:
- Name: ECS单机版
Url: 'ros_templates/template.yaml'
AllowedRegions:
- ap-southeast-1
ServiceType: private
ServiceInfo:
Locale: zh-CN
ShortDescription: demo
Image: 'resources/icons/service_logo.png'
Artifact:
EcsImage:
ArtifactType: EcsImage
ArtifactName: ecs_image_quickstart-authorizer
Description: quickstart-authorizer EcsImage
SupportRegionIds:
- ap-southeast-1
ArtifactBuildProperty:
CodeRepo:
Platform: github
Owner: LYH-RAIN
RepoName: aliyun-computenest/quickstart-authorizer
Branch: main
RegionId: ap-southeast-1
CommandType: RunShellScript
CommandContent: |-
mkdir -p /root/application
if [ -e "/root/code/." ]; then cp -r "/root/code/." "/root/application/"; fi
cd /root/application
cp .env.test ./.env
sed -i 's/pull_policy: always/pull_policy: if_not_present/g' docker-compose.yaml
docker compose -f docker-compose.yaml build
docker compose -f docker-compose.yaml pull || true;
Binary file added .computenest/resources/icons/service_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bdae880

Please sign in to comment.