forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mse-realizes-full-link-grayscale.yml
227 lines (227 loc) · 6.35 KB
/
mse-realizes-full-link-grayscale.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: MSE end-to-end canary release for ACK application.
zh-cn: 基于MSE实现ACK应用的全链路灰度。
Parameters:
ZoneId:
Type: String
Label:
en: Available Zone ID
zh-cn: 可用区ID
Description:
en: Availability Zone ID,<br><b>note: <font color='blue'>It is used to create
VSwitch and used for MSE gateway, MSE instance, and ACK cluster.</font></b>
zh-cn: 可用区ID。<br><b>注:用于创建VSwitch,并给MSE网关、MSE注册配置中心实例、ACK集群使用。
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
SecondaryZoneId:
Type: String
Label:
en: Secondary Available Zone ID
zh-cn: 备可用区ID
Description:
en: Availability Zone ID,<br><b>note: <font color='blue'>It is used to create
a backup VSwitch and used for the MSE gateway.</font></b>
zh-cn: 可用区ID。<br><b>注:用于创建备VSwitch,并给MSE网关使用。<font color='blue'>需要和ZoneId不在同一个可用区。</font></b>
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
ManagedKubernetesClusterName:
Type: String
Label:
en: Managed Kubernetes Cluster Name
zh-cn: ACK托管版集群名称
AssociationProperty: AutoCompleteInput
AssociationPropertyMetadata:
Length: 5
Prefix: cluster-for-mse-
CharacterClasses:
- Class: lowercase
min: 1
WorkerInstanceType:
Type: String
Label:
en: Worker Nodes Type
zh-cn: Worker节点规格
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ${ZoneId}
SystemDiskCategory: cloud_essd
CreateACKClusterParams:
NetworkPlugin: terway-eniip
Description:
en: It is recommended to use a new generation of ecs instances. If the instance
specification cannot be selected, please change the availability zone again.
zh-cn: 建议使用新一代的 ecs 实例,如果选择不到实例规格,请重新更换可用区。
WorkerSystemDiskSize:
Type: Number
Label:
en: Worker System Disk Size(GB)
zh-cn: Worker节点系统盘大小(GB)
Default: 40
MinValue: 40
MseMicroRegistryInstanceName:
Type: String
Label:
en: Microservices Registry Instance Name
zh-cn: 注册配置中心实例名称
Default: test
Resources:
ModuleAcsCsProvision:
Type: MODULE::ACS::CS::Provision
Version: default
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock: 192.168.0.0/16
VpcName: testvpc
DependsOn:
- ModuleAcsCsProvision
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: Vpc
CidrBlock: 192.168.0.0/24
VSwitchName: testvswitch
BackupVSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: SecondaryZoneId
VpcId:
Ref: Vpc
CidrBlock: 192.168.1.0/24
VSwitchName: testvswitch-backup
MseGateway:
Type: ALIYUN::MSE::Gateway
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
Name: test
BackupVSwitchId:
Ref: BackupVSwitch
InternetSlbSpec: slb.s2.small
Spec: MSE_GTW_2_4_200_c
Replica: 2
MseMicroRegistryInstance:
Type: ALIYUN::MSE::Cluster
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
ClusterAliasName:
Ref: MseMicroRegistryInstanceName
MseVersion: mse_pro
InstanceCount: 3
ClusterVersion: NACOS_2_0_0
ClusterType: Nacos-Ans
ClusterSpecification: MSE_SC_2_4_60_c
DiskType: alicloud-disk-ssd-multi-zone
NetType: privatenet
PubNetworkFlow: 0
WaitForAddressReady:
Type: ALIYUN::ROS::Sleep
DependsOn:
- MseGateway
- MseMicroRegistryInstance
Properties:
CreateDuration: 120
MseServiceSource:
Type: ALIYUN::MSE::ServiceSource
Properties:
GatewayUniqueId:
Ref: MseGateway
Name:
Ref: MseMicroRegistryInstance
Source: MSE
NatGateway:
Type: ALIYUN::VPC::NatGateway
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
ManagedKubernetesCluster:
Type: ALIYUN::CS::ManagedKubernetesCluster
DependsOn: NatGateway
Properties:
VpcId:
Ref: Vpc
VSwitchIds:
- Ref: VSwitch
PodVswitchIds:
- Ref: VSwitch
Name:
Ref: ManagedKubernetesClusterName
KubernetesVersion: 1.26.3-aliyun.1
ZoneIds:
- Ref: ZoneId
ServiceCidr: 172.16.0.0/16
ClusterSpec: ack.pro.small
LoadBalancerSpec: slb.s2.small
IsEnterpriseSecurityGroup: true
SnatEntry: true
NumOfNodes: 0
Platform: AliyunLinux
ImageType: AliyunLinux
Addons:
- Name: terway-eniip
Config: '{"IPVlan":"false","NetworkPolicy":"false","ENITrunking":"false"}'
- Name: csi-plugin
- Name: csi-provisioner
- Name: storage-operator
Config: '{"CnfsOssEnable":"false","CnfsNasEnable":"false"}'
- Name: nginx-ingress-controller
Config: '{"IngressSlbNetworkType":"internet","IngressSlbSpec":"slb.s2.small"}'
ProxyMode: ipvs
NodePools:
- NodePoolInfo:
Name: default-nodepool
ScalingGroup:
VSwitchIds:
- Ref: VSwitch
SystemDiskCategory: cloud_essd
SystemDiskPerformanceLevel: PL0
SystemDiskSize:
Ref: WorkerSystemDiskSize
InstanceTypes:
- Ref: WorkerInstanceType
LoginPassword: ''
KubernetesConfig:
Runtime: containerd
RuntimeVersion: 1.6.20
Count: 3
Outputs:
MseNacosAddress:
Value:
Fn::GetAtt:
- MseMicroRegistryInstance
- IntranetDomain
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- ZoneId
- SecondaryZoneId
Label:
en: Available Zone
zh-cn: 可用区
- Parameters:
- WorkerInstanceType
- WorkerSystemDiskCategory
- WorkerSystemDiskSize
Label:
en: ACK Configuration
zh-cn: ACK配置
- Parameters:
- MseMicroRegistryInstanceName
Label:
en: MSE Configuration
zh-cn: MSE配置
TemplateTags:
- acs:technical-solution:micro:MSE实现全链路灰度