-
Notifications
You must be signed in to change notification settings - Fork 35
/
pai-rec-deploy-recommendation-solution.yml
130 lines (130 loc) · 3.54 KB
/
pai-rec-deploy-recommendation-solution.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
ROSTemplateFormatVersion: '2015-09-01'
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- ZoneId
- BucketName
TemplateTags:
- acs:technical-solution:cloud-migration:PAI-Rec全链路推荐系统开发方案-tech_solu_140
Hidden:
- CommonName
Parameters:
CommonName:
Default: pai_rec
Type: String
BucketName:
AssociationPropertyMetadata:
Length: 5
Prefix: pai-rec-
CharacterClasses:
- Class: lowercase
min: 1
Description:
zh-cn: 3到63个字符,不以连字符(-)开头和结尾,可以包含小写字母、数字和连字符(-);<br>备注:<font color='blue'><b>需要保证整个网络的唯一性,已经存在的无法创建</b></font>
en: '3 to 63 characters, not beginning and ending with a hyphen (-), can contain lowercase letters, Numbers and hyphens (-);<br>Note: <font color=''blue''><b>need whole network uniqueness, already existing can not be created.</b></font>'
MinLength: 3
Label:
zh-cn: OSS Bucket名称
en: Bucket Name
AllowedPattern: ^[a-z0-9]+[a-z0-9\-]*[a-z0-9]+$
ConstraintDescription:
zh-cn: 3 到 63 个字符,不以连字符 (-) 开头和结尾,可以包含小写字母、数字和连字符 (-)
en: 3 to 63 characters, not beginning and ending with a hyphen (-), can contain lowercase letters, Numbers and hyphens (-)
MaxLength: 63
AssociationProperty: AutoCompleteInput
Type: String
ZoneId:
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
AssociationPropertyMetadata:
AutoSelectFirst: true
Type: String
Label:
zh-cn: 可用区ID
en: Available Zone ID
Resources:
RandomString:
Type: ALIYUN::RandomString
Properties:
length: 8
character_classes:
- class: lowercase
min: 1
- class: digits
min: 1
OssBucket:
Type: ALIYUN::OSS::Bucket
Properties:
BucketName:
Ref: BucketName
HologramInstance:
Type: ALIYUN::Hologram::Instance
Properties:
GatewayCount: 2
ZoneId:
Ref: ZoneId
PaymentType: PostPaid
Cpu: 32
PricingCycle: Hour
Endpoints:
- Type: Intranet
- AlternativeEndpoints: Null
Endpoint: Null
VpcInstanceId: Null
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
Type: VPCSingleTunnel
- Type: Internet
InstanceName:
Fn::Sub: ${CommonName}-Hologram
InstanceType: Warehouse
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
VpcName:
Fn::Sub: ${CommonName}-vpc
CidrBlock: 192.168.0.0/16
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
VSwitchName:
Fn::Sub: ${CommonName}-vsw
VpcId:
Ref: Vpc
CidrBlock: 192.168.1.0/24
ZoneId:
Ref: ZoneId
PaiWorkspace:
Type: ALIYUN::PAI::Workspace
Properties:
DisplayName:
Fn::Sub: ${CommonName}_${RandomString.value}
EnvTypes:
- prod
Description:
Fn::Sub: ${CommonName}_${RandomString.value}
WorkspaceName:
Fn::Sub: ${CommonName}_${RandomString.value}
Outputs:
Console@HologramInstanceId:
Value:
Fn::GetAtt:
- HologramInstance
- InstanceId
Console@BucketDomainName:
Value:
Fn::GetAtt:
- OssBucket
- DomainName
Console@BucketName:
Value:
Fn::GetAtt:
- OssBucket
- Name
Console@PaiWorkspace:
Value:
Fn::GetAtt:
- PaiWorkspace
- WorkspaceName