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 16, 2024
1 parent 450fee8 commit f073f6f
Show file tree
Hide file tree
Showing 5 changed files with 473 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .computenest/.computenest_parameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ServiceType: private
AllowedRegions:
- ap-southeast-1
ArtifactSourceType: DockerCompose
RepoName: aliyun-computenest/mongodb
DockerComposeEnvPath: .env.example
RegionId: cn-hangzhou
CustomParameters:
- NoEcho: false
Type: String
AllowedPattern: ''
Label: UserName
ConstraintDescription: ''
Default: admin
Name: MONGO_INITDB_ROOT_USERNAME
- NoEcho: true
Type: String
AssociationProperty: ALIYUN::ECS::Instance::Password
AllowedPattern: ''
Label: Password
ConstraintDescription: ''
Name: MONGO_INITDB_ROOT_PASSWORD
DockerComposeYamlPath: docker-compose.yaml
Owner: Alicloud-ComputeNest
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/)
65 changes: 65 additions & 0 deletions .computenest/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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_mongodb:
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_mongodb
Description: mongodb EcsImage
SupportRegionIds:
- ap-southeast-1
ArtifactBuildProperty:
CodeRepo:
Platform: github
Owner: Alicloud-ComputeNest
RepoName: aliyun-computenest/mongodb
Branch: main
RegionId: ap-southeast-1
CommandType: RunShellScript
CommandContent: |-
mkdir -p /root/application
if [ -e "/root/code/docker-compose.yaml" ]; then cp -r "/root/code/docker-compose.yaml" "/root/application/"; fi
if [ -e "/root/code/.env.example" ]; then cp -r "/root/code/.env.example" "/root/application/"; fi
if [ -e "/root/code/mongodata" ]; then cp -r "/root/code/mongodata" "/root/application/"; fi
cd /root/application
cp .env.example ./.env
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 f073f6f

Please sign in to comment.