Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix template issue #157

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
401 changes: 401 additions & 0 deletions compute-nest-best-practice/opensource/puppet/open-source-puppet.yml

Large diffs are not rendered by default.

167 changes: 167 additions & 0 deletions compute-nest-best-practice/opensource/puppet/puppet-enterprise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: Puppet 企业版
en: Puppet Enterprise
Parameters:
ZoneId:
Type: String
Label:
zh-cn: 可用区
en: Availability Zone
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
InstanceType:
Type: String
Label:
zh-cn: Server 实例类型
en: Server Instance Type
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ${ZoneId}
PuppetPassword:
Type: String
Label:
zh-cn: Puppet 密码
en: Puppet Password
Description:
zh-cn: Puppet登录密码,长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)。
en: Puppet login password, Length 8-30, must contain three(Capital letters,
lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol
in).
ConstraintDescription:
zh-cn: 长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)。
en: Length 8-30, must contain three(Capital letters, lowercase letters, numbers,
()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).
AllowedPattern: '[0-9A-Za-z\_\-\&:;''<>,=%`~!@#\(\)\$\^\*\+\|\{\}\[\]\.\?\/]+$'
MinLength: 8
MaxLength: 30
NoEcho: true
CommonName:
Type: String
Default: puppet-enterprise
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock: 192.168.0.0/16
VpcName:
Fn::Sub: ${CommonName}-vpc
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: Vpc
SecurityGroupName:
Fn::Sub: ${CommonName}-sg
SecurityGroupIngress:
- Priority: 1
PortRange: "-1/-1"
NicType: intranet
SourceCidrIp: 0.0.0.0/0
IpProtocol: all
SecurityGroupEgress:
- Priority: 1
PortRange: "-1/-1"
DestCidrIp: 0.0.0.0/0
NicType: intranet
IpProtocol: all
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: Vpc
CidrBlock: 192.168.0.0/24
VSwitchName:
Fn::Sub: ${CommonName}-${ZoneId}-vsw
PuppetServer:
Type: ALIYUN::ECS::InstanceGroup
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Ref: SecurityGroup
ImageId: centos_7_9_x64_20G_alibase_
SystemDiskCategory: cloud_essd
SystemDiskSize: 120
AllocatePublicIP: true
IoOptimized: optimized
Password:
Ref: PuppetPassword
InstanceType:
Ref: InstanceType
MaxAmount: 1
HostName: puppet-primary-server
InstanceName: puppet-primary-server
InstallPuppetServer:
Type: ALIYUN::ECS::RunCommand
Properties:
InstanceIds:
- Ref: PuppetServer
Type: RunShellScript
Sync: true
Timeout: 1800
CommandContent:
Fn::Sub:
- |
#!/bin/bash

wget 'https://image-test3.oss-cn-shenzhen.aliyuncs.com/puppet-enterprise-2023.5.0-el-7-x86_64.tar.gz' >/dev/null 2>&1
echo "`date +'%Y-%m-%dT%H:%M:%S'` download complete"
tar -xzf puppet-enterprise-2023.5.0-el-7-x86_64.tar.gz
echo "`date +'%Y-%m-%dT%H:%M:%S'` tar complete"

echo y | ./puppet-enterprise-2023.5.0-el-7-x86_64/puppet-enterprise-installer > /tmp/puppet-installer.log
echo "installer: $?" >> /tmp/puppet-installer.log
echo "`date +'%Y-%m-%dT%H:%M:%S'` puppet enterprise install complete" >> /tmp/puppet-installer.log

puppet infrastructure console_password --password=${PuppetPassword}
echo "`date +'%Y-%m-%dT%H:%M:%S'` console password set complete" >> /tmp/puppet-installer.log

sed -i '34i "puppet_enterprise::profile::console::proxy::http_redirect::server_name": "${ServerAddress}"' /etc/puppetlabs/enterprise/conf.d/pe.conf
puppet agent -t >> /tmp/puppet-installer.log
echo "agent1: $?" >> /tmp/puppet-installer.log
sleep 60
puppet agent -t >> /tmp/puppet-installer.log
echo "agent2: $?" >> /tmp/puppet-installer.log
- ServerAddress:
Fn::Select:
- 0
- Fn::GetAtt:
- PuppetServer
- PublicIps
Outputs:
ServerEcsLoginAddress:
Description:
zh-cn: Server Ecs登陆地址。
en: Server Ecs login address.
Value:
Fn::Sub: https://ecs-workbench.aliyun.com/?instanceType=ecs&regionId=${ALIYUN::Region}&instanceId=${PuppetServer}
PuppetEnterpriseConsoleURL:
Description:
zh-cn: Puppet Enterprise 登录地址
en: Puppet Enterprise Login URL
Value:
Fn::Sub:
- https://${ServerAddress}/
- ServerAddress:
Fn::Select:
- 0
- Fn::GetAtt:
- PuppetServer
- PublicIps
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- ZoneId
- InstanceType
- PuppetPassword
Hidden:
- CommonName
TemplateTags:
- acs:integrate:computenest:puppet-enterprise
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Parameters:
- ecs.gn7i-c16g1.4xlarge
- ecs.gn7i-c32g1.8xlarge
- ecs.gn7i-c48g1.12xlarge
Description:
en: This solution requires GPU computing type gn7i series servers. If there are no instance specifications that meet the conditions, please change the region.
zh-cn: 此方案需要 GPU 计算型 gn7i 系列服务器,如果没有满足条件的实例规格,请更换地域。
InstancePassword:
NoEcho: true
Type: String
Expand Down Expand Up @@ -196,7 +199,7 @@ Outputs:
Metadata:
ALIYUN::ROS::Interface:
TemplateTags:
- 'acs:technical-solution:ai:AIGC文本生成3D模型'
- 'acs:technical-solution:ai:文本生成3D模型'
ParameterGroups:
- Parameters:
- ImageId
Expand Down
16 changes: 14 additions & 2 deletions documents/solution/ai/lingjun-LLAMA-2-best-practice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,26 @@ Parameters:
Description:
en: custom OSS bucket name. Default:bucket-llm.
zh-cn: 自定义对象存储桶的名称。 默认为bucket-llm
Default: bucket-llm
AssociationProperty: AutoCompleteInput
AssociationPropertyMetadata:
Length: 5
Prefix: bucket-llm-
CharacterClasses:
- Class: lowercase
min: 1
Resources:
ModuleVpcAndVswitch:
DependsOn:
- AutoEnableOSS
Type: MODULE::ACS::VPC::OptionalVpcAndVSwitch
Properties:
ZoneId:
Ref: ZoneId
Version: default
AutoEnableOSS:
Type: ALIYUN::ROS::AutoEnableService
Properties:
ServiceName: OSS
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
Expand Down Expand Up @@ -89,4 +101,4 @@ Metadata:
- ZoneId
- BucketName
TemplateTags:
- acs:technical-solution:ai:LLAMA-2全托管灵骏最佳实践
- acs:technical-solution:ai:通过PAI-灵骏分布式训练和部署Llama2模型方案
4 changes: 2 additions & 2 deletions documents/solution/ai/pai-ai-painting-solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ Resources:
- MountTargetDomain
properties:
resource_type: model
mount_path: /data-nas
mount_path: /code/stable-diffusion-webui/data-nas
containers:
- image: eas-registry-vpc.ap-southeast-1.cr.aliyuncs.com/pai-eas/stable-diffusion-webui:4.1
script: ./webui.sh --listen --port 8000 --skip-version-check --no-hashing
--no-download-sd-model --skip-install --api --filebrowser --cluster-status
--sd-dynamic-cache --data-dir /data-nas
--sd-dynamic-cache --data-dir /code/stable-diffusion-webui/data-nas
port: 8000
meta:
type: SDCluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ Parameters:
zh-cn: 加速域名
en: Accelerated domain name
Description:
zh-cn: 加速域名是指接入CDN,用于加速源站的域名。该示例为image.example.com。
en: Accelerated domain name refers to the domain name of the access CDN used to accelerate the source site. The example is image.example.com.
Default: image.example.com
zh-cn: 加速域名是指接入CDN,用于加速源站的域名。请填写您账号下的域名。
en: Accelerated domain name refers to the domain name of the access CDN used to accelerate the source site. Please fill in the domain name under your account.
BucketName:
Type: String
Label:
Expand All @@ -34,18 +33,29 @@ Parameters:
Description:
en: The name must be 3 to 63 bytes in length, The name must start and end with a lowercase letter or digit.The name can contain only lowercase letters, digits, and hyphens (-).;<br><b>note:<font color='blue'>A bucket name must be globally unique within OSS. Bucket names cannot be changed after the bucket is created.</b></font>
zh-cn: 长度为3~63个字符,必须以小写字母或数字开头和结尾,可以包含小写字母、数字和连字符(-);<br><b>注:<font color='blue'>需要全网唯一性,已经存在的不能在创建。</b></font>
Default: image-example-test
AssociationProperty: AutoCompleteInput
AssociationPropertyMetadata:
Length: 6
Prefix: image-example-
CharacterClasses:
- Class: lowercase
min: 1
Resources:
OssBucket:
Type: ALIYUN::OSS::Bucket
DependsOn: AutoEnableOSS
Properties:
BucketName:
Ref: BucketName
DeletionForce: true
OpenCdnService:
AutoEnableCDN:
Type: ALIYUN::ROS::AutoEnableService
Properties:
ServiceName: DCDN
ServiceName: CDN
AutoEnableOSS:
Type: ALIYUN::ROS::AutoEnableService
Properties:
ServiceName: OSS
Domain:
Type: ALIYUN::CDN::Domain
Properties:
Expand All @@ -61,7 +71,7 @@ Resources:
Ref: Scope
DomainName:
Ref: DomainName
DependsOn: OpenCdnService
DependsOn: AutoEnableCDN
DomainRecord:
Type: ALIYUN::DNS::DomainRecord
Properties:
Expand Down Expand Up @@ -111,4 +121,4 @@ Metadata:
- DomainName
- BucketName
TemplateTags:
- acs:technical-solution:cdn-and-video-cloud:使用CDN加速OSS上存储的文件资源分发
- acs:technical-solution:cdn-and-video-cloud:文件下载加速及成本优化
7 changes: 7 additions & 0 deletions documents/solution/cdn-and-video-cloud/dcdn-acceleration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ Parameters:
AllowedPattern: '[0-9A-Za-z\_\-\&:;''<>,=%`~!@#\(\)\$\^\*\+\|\{\}\[\]\.\?\/]+$'
MinLength: 8
MaxLength: 30
NoEcho: true
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
DependsOn:
- AutoEnableDCDN
Properties:
CidrBlock: 192.168.0.0/16
VSwitch:
Expand Down Expand Up @@ -150,6 +153,10 @@ Resources:
Ref: DomainName
Scope:
Ref: Scope
AutoEnableDCDN:
Type: ALIYUN::ROS::AutoEnableService
Properties:
ServiceName: DCDN
Outputs:
Cname:
Description: CNAME
Expand Down
27 changes: 23 additions & 4 deletions documents/solution/database/dts-cache-synchronization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Parameters:
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ${ZoneId}
Default: ecs.c5.large
SystemDiskCategory:
Type: String
Label:
Expand All @@ -39,7 +38,6 @@ Parameters:
LocaleKey: DiskCategory
InstanceType: ${InstanceType}
ZoneId: ${ZoneId}
Default: cloud_efficiency
InstancePassword:
Type: String
Label:
Expand Down Expand Up @@ -116,7 +114,6 @@ Parameters:
Engine: MySQL
Category: HighAvailability
DBInstanceStorageType: cloud_essd
Default: 'rds.mysql.t1.small'
RedisInstanceClass:
Type: String
Label:
Expand Down Expand Up @@ -170,6 +167,7 @@ Parameters:
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
DependsOn: AliyunDTSDefaultRole
Properties:
CidrBlock: 192.168.0.0/16
VSwitch:
Expand Down Expand Up @@ -254,6 +252,8 @@ Resources:
DBInstanceStorageType: cloud_essd
SecurityIPList: 0.0.0.0/0
AllocatePublicConnection: true
SlaveZoneIds:
- Ref: ZoneId
RedisInstance:
Type: ALIYUN::REDIS::Instance
Properties:
Expand Down Expand Up @@ -352,6 +352,25 @@ Resources:
- Whitelist
- SecurityGroupIngress_22
- SecurityGroupIngress_3306
AliyunDTSDefaultRole:
Type: 'ALIYUN::RAM::Role'
Properties:
RoleName: AliyunDTSDefaultRole
Description: DTS默认使用此角色来访问您在其他云产品中的资源。
AssumeRolePolicyDocument:
Version: '1'
Statement:
- Action: 'sts:AssumeRole'
Effect: Allow
Principal:
Service:
- dts.aliyuncs.com
MaxSessionDuration: 3600
IgnoreExisting: true
DeletionForce: true
PolicyAttachments:
System:
- AliyunDTSRolePolicy
Outputs:
RdsInstanceInnerConnectionString:
Description:
Expand Down Expand Up @@ -389,4 +408,4 @@ Metadata:
Label:
default: Dts
TemplateTags:
- acs:technical-solution:database:通过DTS实现MySQL与Redis缓存同步一致性方案
- acs:technical-solution:database:实时同步RDS与Redis构建缓存一致性
Loading
Loading