forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wordpress-cluster.yml
864 lines (831 loc) · 24.8 KB
/
wordpress-cluster.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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建WordPress集群,含VPC、ECS、SLB、RDS资源,自动配置网络与负载均衡,支持自定义实例规格、数量及数据库配置。
en: Create a WordPress cluster, including VPC, ECS, SLB, and RDS resources, automatically configure network and load balancing, and support customized instance specifications, quantity, and database configuration.
Parameters:
VpcCidrBlock:
Type: String
Label:
en: VPC Cidrblock
zh-cn: VPC网段
Description:
en: 'The IP address range of the VPC in the CIDR block form. You can use the
following IP address ranges and their subnets: 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16'
zh-cn: 专有网络的网段,可选值:10.0.0.0/8,172.16.0.0/12,192.168.0.0/16。
Default: 10.0.0.0/8
AllowedValues:
- 192.168.0.0/16
- 172.16.0.0/12
- 10.0.0.0/8
ZoneId:
Type: String
Label:
en: Zone ID
zh-cn: 可用区ID
Description:
en: The available zone ID, you should confirm the zone support ECS、VPC、VSwitch
or not.
zh-cn: 可用区ID,需确认所选可用区下是否支持ECS、VPC、VSwitch等资源。
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
VSwitchCidrBlock:
Type: String
Label:
en: VSwitch CidrBlock
zh-cn: VSwitch网段
Description:
en: VSwitch subnet which is within VPC.
zh-cn: 交换机网段,必须为VPC子网段。
Default: 10.0.10.0/24
InstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例规格
Description:
en: <font color='blue'><b>1.Before selecting the model please confirm that the
current available zone under the model is in stock, some models need to be
reported in advance</b></font><br><font color='blue'><b>2.List of optional
models</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU 4GiB Intranet
bandwidth1Gbps In-grid sending and receiving packages30MillionPPS</font>]<br></b>[ecs.c5.xlarge
<font color='green'>4vCPU 8GiB Intranet bandwidth1.5Gbps In-grid sending and
receiving packages50MillionPPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU
16GiB Intranet bandwidth2.5Gbps In-grid sending and receiving packages80MillionPPS</font>]
zh-cn: <font color='blue'><b>1.选择机型前请先确认当前可用区下该机型是否有货,部分机型需要提前报备</b></font><br><font
color='blue'><b>2.可选机型列表</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU
4GiB 内网带宽1Gbps 内网收发包30万PPS</font>]<br></b>[ecs.c5.xlarge <font color='green'>4vCPU
8GiB 内网带宽1.5Gbps 内网收发包50万PPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU
16GiB 内网带宽2.5Gbps 内网收发包80万PPS</font>]
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ZoneId
ImageId:
Type: String
Label:
en: Image ID
zh-cn: 镜像ID
Description:
en: 'Instance Image ID. see detail: <b><a href=''https://www.alibabacloud.com/help/doc-detail/112977.html''
target=''_blank''><font color=''blue''>Find the mirror</font></a></b>'
zh-cn: 实例镜像,详见:<b><a href='https://help.aliyun.com/document_detail/112977.html'
target='_blank'><font color='blue'>查找镜像</font></a></b>
AssociationProperty: ALIYUN::ECS::Image::ImageId
AssociationPropertyMetadata:
InstanceType: ${InstanceType}
SupportedImageOwnerAlias:
- system
- self
- others
Default: centos_7_04_64_20G_alibase_201701015.vhd
InstancePassword:
Type: String
Label:
en: Instance Password
zh-cn: 实例密码
Description:
en: The 8-30 long login password of instance, consists of the uppercase, lowercase
letter and number. <br> special characters include()`~!@#$%^&*_-+=|{}[]:;'<>,.?/
zh-cn: 长度8-30,必须包含大写字母、小写字母、数字、特殊符号三个;<br>特殊字符包括:()`~!@#$%^&*_-+=|{}[]:;'<>,.?/
ConstraintDescription:
en: 'Length 8-30, must contain upper case letters, lower case letters, Numbers,
special symbols three; special characters include: ()`~!@#$%^&*_-+=|{}[]:;''<>,.?/'
zh-cn: 长度8-30,必须包含大写字母、小写字母、数字、特殊符号三种;特殊字符包括:()`~!@#$%^&*_-+=|{}[]:;' <>,.?/
AllowedPattern: '[0-9A-Za-z\_\-&:;''<>,=%`~!@#\(\)\$\^\*\+\|\{\}\[\]\.\?\/]+$'
MinLength: '8'
MaxLength: '30'
NoEcho: true
NumberOfNode:
Type: Number
Label:
en: Instances Amount
zh-cn: 服务器数量
Description:
en: Number of WordPress instances.
zh-cn: WordPress服务器数量
Default: 3
MinValue: 1
MaxValue: 100
SystemDiskCategory:
Type: String
Label:
en: System Disk Type
zh-cn: 系统盘类型
Description:
en: '<font color=''blue''><b>Optional values:</b></font><br>[cloud_efficiency: <font color=''green''>Efficient Cloud Disk</font>]<br>[cloud_ssd: <font color=''green''>SSD Cloud Disk</font>]<br>[cloud_essd: <font color=''green''>ESSD Cloud Disk</font>]<br>[cloud: <font color=''green''>Cloud Disk</font>]<br>[ephemeral_ssd: <font color=''green''>Local SSD Cloud Disk</font>]'
zh-cn: '<font color=''blue''><b>可选值:</b></font><br>[cloud_efficiency: <font color=''green''>高效云盘</font>]<br>[cloud_ssd: <font color=''green''>SSD云盘</font>]<br>[cloud_essd: <font color=''green''>ESSD云盘</font>]<br>[cloud: <font color=''green''>普通云盘</font>]<br>[ephemeral_ssd: <font color=''green''>本地SSD盘</font>]'
AssociationProperty: ALIYUN::ECS::Disk::SystemDiskCategory
AssociationPropertyMetadata:
LocaleKey: DiskCategory
InstanceType: ${InstanceType}
ZoneId: ZoneId
LoadBalancerSpec:
Type: String
Label:
en: Specifications
zh-cn: 规格
Description:
en: Instance specifications,</br>see detail:</b><a href='https://www.alibabacloud.com/help/doc-detail/85939.html'
target='_blank'><b><font color='blue'>Performance Support Type</b></font></a>
zh-cn: 实例规格,</br>详见:</b><a href='https://help.aliyun.com/document_detail/85939.html'
target='_blank'><b><font color='blue'>性能保障型</b></font></a>
Default: slb.s1.small
Category:
AssociationPropertyMetadata:
LocaleKey: RDSCategory
Default: Null
Required: false
AllowedValues:
- Basic
- HighAvailability
- cluster
Label:
zh-cn: 实例系列
en: Category
Type: String
DBInstanceClass:
Type: String
Label:
en: Instance Class
zh-cn: 实例类型
Description:
en: Database instance type. Refer the RDS database instance type.<a href='https://www.alibabacloud.com/help/doc-detail/26312.htm'
target='_blank'>View RDS resources type</a>
zh-cn: '数据库实例类型, <br>详见: <a href=''https://help.aliyun.com/document_detail/26312.html''
target=''_blank''><b><font color=''blue''>实例规格表</font></b></a>.'
AssociationProperty: ALIYUN::RDS::Instance::InstanceType
AssociationPropertyMetadata:
Engine: MySQL
Category: ${Category}
EngineVersion: ${EngineVersion}
ZoneId: ${ZoneId}
Default: rds.mysql.s1.small
EngineVersion:
Type: String
Label:
en: Engine Version
zh-cn: 数据库引擎版本
Description:
en: RDS MySQL Engine Version
zh-cn: RDS MySQL 数据库版本号
AssociationProperty: ALIYUN::RDS::Engine::EngineVersion
AssociationPropertyMetadata:
Engine: MySQL
Default: '8.0'
DBInstanceStorage:
Type: Number
Label:
en: Storage Size
zh-cn: 存储空间
Description:
en: 'Incrementing in every 5G, unit: GB'
zh-cn: 数据库存储空间,每5GB进行递增。
ConstraintDescription:
en: 'Incrementing in every 5G, unit: GB'
zh-cn: 每5GB进行递增。
Default: 50
MinValue: 5
MaxValue: 2000
DBName:
Type: String
Label:
en: DB Name
zh-cn: 数据库名
Description:
en: Name of WordPress database
zh-cn: WordPress数据库名
ConstraintDescription:
en: Consist of 2 to 64 characters of lowercase letters, underline. Must begin
with a letter and be end with an alphanumeric character
zh-cn: 由 2 到 64 个小写字母组成,下划线。必须以字母开头,以字母数字字符结尾
Default: wordpress
MinLength: 2
MaxLength: 64
DBUser:
Type: String
Label:
en: DB Username
zh-cn: 数据库账号
Description:
en: Username of WordPress database
zh-cn: WordPress数据库账号
ConstraintDescription:
en: Consist of 2 to 64 characters of lowercase letters, underline. Must begin
with a letter and be end with an alphanumeric character
zh-cn: 由 2 到 64 个小写字母组成,下划线。必须以字母开头,以字母数字字符结尾
Default: wpuser
MinLength: 2
MaxLength: 16
DBPassword:
Type: String
Label:
en: DB Password
zh-cn: 数据库密码
Description:
en: The password of WordPress database consists of 8 to 32 characters of alphanumeric
characters, hyphen and underline
zh-cn: WordPress数据库密码,由8~32位大小写字母、数字、下划线、连字符组成。
ConstraintDescription:
en: Consist of 8 to 32 characters of alphanumeric characters, hyphen and underline
zh-cn: 由 8 到 32 个字母数字字符、连字符和下划线组成
MinLength: 8
MaxLength: 32
NoEcho: true
Resources:
LoadBalancer:
Type: ALIYUN::SLB::LoadBalancer
Properties:
LoadBalancerName: wordpress_cluster_slb
LoadBalancerSpec:
Ref: LoadBalancerSpec
Metadata:
ALIYUN::ROS::Designer:
id: 1b916f2d-e2ab-4de2-9396-4b8a689e6bb0
AttachEcs:
Type: ALIYUN::SLB::BackendServerAttachment
Properties:
BackendServers:
- ServerId:
Fn::Select:
- '0'
- Fn::GetAtt:
- WebServerGroup
- InstanceIds
Weight: 100
- ServerId:
Fn::Select:
- '1'
- Fn::GetAtt:
- WebServerGroup
- InstanceIds
Weight: 100
- ServerId:
Fn::Select:
- '2'
- Fn::GetAtt:
- WebServerGroup
- InstanceIds
Weight: 100
LoadBalancerId:
Ref: LoadBalancer
Metadata:
ALIYUN::ROS::Designer:
id: ff981e44-120b-4ab6-a9f7-6074722c67d9
CreateListener_80:
Type: ALIYUN::SLB::Listener
Properties:
BackendServerPort: '80'
Bandwidth: 100
HealthCheck:
HealthyThreshold: 3
HttpCode: http_2xx,http_3xx,http_4xx,http_5xx
Interval: 2
Timeout: 5
UnhealthyThreshold: 3
ListenerPort: '80'
LoadBalancerId:
Ref: LoadBalancer
Protocol: http
Scheduler: wrr
Metadata:
ALIYUN::ROS::Designer:
id: b2de87c0-335e-4bce-a2d3-a51d446a9826
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName: wordpress_cluster
Metadata:
ALIYUN::ROS::Designer:
id: 91397d67-139d-4543-9837-011eaa5d153a
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: Vpc
SecurityGroupEgress:
- DestCidrIp: 0.0.0.0/0
IpProtocol: all
NicType: internet
PortRange: -1/-1
Priority: 1
- DestCidrIp: 0.0.0.0/0
IpProtocol: all
NicType: intranet
PortRange: -1/-1
Priority: 1
SecurityGroupIngress:
- IpProtocol: tcp
NicType: internet
PortRange: 22/22
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: tcp
NicType: internet
PortRange: 80/80
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: all
NicType: intranet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
SecurityGroupName: wordpress_cluster_sg
Metadata:
ALIYUN::ROS::Designer:
id: 6d704692-b4a7-456e-b849-70b9620b694f
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: Vpc
CidrBlock:
Ref: VSwitchCidrBlock
Metadata:
ALIYUN::ROS::Designer:
id: 92cfb4b0-a0b8-4799-b794-2db985da169e
ECSSnatGateWay:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Fn::GetAtt:
- SecurityGroup
- SecurityGroupId
ImageId:
Ref: ImageId
InstanceType:
Ref: InstanceType
InternetMaxBandwidthOut: 80
Password:
Ref: InstancePassword
Tags:
- Key: ECS_SNAT_GATEWAY
Value: ecs_snat_gateway
UserData:
Fn::Replace:
- ros-notify:
Fn::GetAtt:
- ECSSnatGateWayConditionHandle
- CurlCli
- Fn::Join:
- ''
- - '#!/bin/sh'
- '
'
- PostRouting=
- Ref: VSwitchCidrBlock
- '
'
- SourceRouting=`ifconfig eth0|grep inet|awk '{print $2}'|tr -d 'addr:'`
- '
'
- "echo 'net.ipv4.ip_forward=1'>> /etc/sysctl.conf \n"
- "sysctl -p \n"
- "iptables -t nat -I POSTROUTING -s $PostRouting -j SNAT --to-source\
\ $SourceRouting \n"
- 'apt-get update
'
- 'apt-get install -y curl
'
- 'ros-notify -d ''{"data" : " docker swarm created"}''
'
Metadata:
ALIYUN::ROS::Designer:
id: cd2b9302-2c40-4415-85c9-dc760dc405f8
ECSSnatGateWayConditionHandle:
Type: ALIYUN::ROS::WaitConditionHandle
Properties: {}
Metadata:
ALIYUN::ROS::Designer:
id: 35ef19c0-6a54-4b3e-8812-e66544479f81
ECSSnatGateWayGroupWaitCondition:
Type: ALIYUN::ROS::WaitCondition
Properties:
Count: 1
Handle:
Ref: ECSSnatGateWayConditionHandle
Timeout: 600
DependsOn: ECSSnatGateWay
Metadata:
ALIYUN::ROS::Designer:
id: 19bd9481-b987-4b95-abb6-a580a63bcc7b
Database:
Type: ALIYUN::RDS::DBInstance
Properties:
VPCId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
DBInstanceClass:
Ref: DBInstanceClass
DBInstanceDescription: DataBase
DBInstanceStorage:
Ref: DBInstanceStorage
DBMappings:
- CharacterSetName: utf8
DBName:
Ref: DBName
Engine: MySQL
Category:
Ref: Category
EngineVersion:
Ref: EngineVersion
MasterUserPassword:
Ref: DBPassword
MasterUsername:
Ref: DBUser
SecurityIPList: 0.0.0.0/0
DependsOn: ECSSnatGateWayGroupWaitCondition
Metadata:
ALIYUN::ROS::Designer:
id: 384f5613-a9f7-42db-92a6-83869fa70ca5
VRoute:
Type: ALIYUN::ECS::Route
Properties:
DestinationCidrBlock: 0.0.0.0/0
NextHopId:
Fn::GetAtt:
- ECSSnatGateWay
- InstanceId
RouteId:
Fn::GetAtt:
- Vpc
- VRouterId
RouteTableId:
Fn::GetAtt:
- Vpc
- RouteTableId
Metadata:
ALIYUN::ROS::Designer:
id: 9507d15d-30c2-4647-b05b-eae353015a5c
WebServerGroup:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Ref: SecurityGroup
ImageId:
Ref: ImageId
AllocatePublicIP: true
InstanceType:
Ref: InstanceType
IoOptimized: optimized
MaxAmount:
Ref: NumberOfNode
Password:
Ref: InstancePassword
SystemDiskCategory:
Ref: SystemDiskCategory
UserData:
Fn::Replace:
- ros-notify:
Fn::GetAtt:
- WebServerGroupConditionHandle
- CurlCli
- Fn::Join:
- ''
- - '#!/bin/sh'
- '
'
- DatabaseUser=
- Ref: DBUser
- '
'
- DatabasePwd=
- Ref: DBPassword
- '
'
- DatabaseName=
- Ref: DBName
- '
'
- DatabaseHost=
- Fn::GetAtt:
- Database
- InnerConnectionString
- '
'
- 'WebRootPath=''/var/www/html''
'
- 'ApacheIndex=''Options Indexes FollowSymLinks''
'
- 'ApacheIndexReplace=''Options FollowSymLinks''
'
- 'mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
'
- 'wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
'
- 'yum makecache
'
- "yum install -y unzip zip \n"
- "yum install -y curl httpd mysql-server php56 php56-php-mysql \n"
- "rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm \n"
- "rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm \n"
- "yum install -y php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64\
\ php56w-gd.x86_64 php56w-imap.x86_64 php56w-ldap.x86_64 php56w-mysql.x86_64\
\ php56w-pdo.x86_64 php56w-odbc.x86_64 php56w-process.x86_64 php56w-xml.x86_64\
\ php56w-xmlrpc.x86_64 \n"
- 'chkconfig httpd on
'
- '#wget http://wordpress.org/latest.tar.gz
'
- '#tar -xzvf latest.tar.gz
'
- "wget https://ros-template-resources.oss-cn-beijing.aliyuncs.com/WordPress/WordPress.zip\
\ \n"
- "unzip WordPress.zip \n"
- "mv WordPress-master wordpress \n"
- 'sed -i "s/database_name_here/$DatabaseName/" wordpress/wp-config-sample.php
'
- 'sed -i "s/username_here/$DatabaseUser/" wordpress/wp-config-sample.php
'
- 'sed -i "s/password_here/${DatabasePwd:-$DatabasePwdDef}/" wordpress/wp-config-sample.php
'
- 'sed -i "s/localhost/$DatabaseHost/" wordpress/wp-config-sample.php
'
- 'mv wordpress/wp-config-sample.php wordpress/wp-config.php
'
- 'cp -a wordpress/* $WebRootPath
'
- 'rm -rf wordpress*
'
- 'service httpd stop
'
- 'usermod -d $WebRootPath apache &>/dev/null
'
- 'chown apache:apache -R $WebRootPath
'
- 'sed -i "s/$ApacheIndex/$ApacheIndexReplace/" /etc/httpd/conf/httpd.conf
'
- 'service httpd start
'
- 'ros-notify -d ''{"data" : "Install Wordpress"}''
'
DependsOn: Database
Metadata:
ALIYUN::ROS::Designer:
id: b792aef6-7a17-4718-a210-ffa908da73d6
WebServerGroupConditionHandle:
Type: ALIYUN::ROS::WaitConditionHandle
Properties: {}
Metadata:
ALIYUN::ROS::Designer:
id: 646fdbaa-e458-4900-8d95-125d0ea706e5
WebServerGroupWaitCondition:
Type: ALIYUN::ROS::WaitCondition
Properties:
Count:
Ref: NumberOfNode
Handle:
Ref: WebServerGroupConditionHandle
Timeout: 900
DependsOn: WebServerGroup
Metadata:
ALIYUN::ROS::Designer:
id: 10fffab5-c18e-4a65-9763-31fcffaa351a
Outputs:
JumpHostIp:
Description:
en: The jump host IP.
zh-cn: 跳转主机IP。
Value:
Fn::GetAtt:
- ECSSnatGateWay
- PublicIp
WordPressUrl:
Description:
en: WordPress URL.
zh-cn: WordPress 网址。
Value:
Fn::Join:
- ''
- - http://
- Fn::GetAtt:
- LoadBalancer
- IpAddress
- :80
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcCidrBlock
- ZoneId
- VSwitchCidrBlock
Label:
default:
en: VPC
zh-cn: 专有网络
- Parameters:
- InstanceType
- ImageId
- SystemDiskCategory
- NumberOfNode
- InstancePassword
Label:
default:
en: ECS
zh-cn: 云服务器
- Parameters:
- LoadBalancerSpec
Label:
default:
en: SLB
zh-cn: 负载均衡
- Parameters:
- Category
- EngineVersion
- DBInstanceClass
- DBInstanceStorage
- DBName
- DBUser
- DBPassword
Label:
default:
en: RDS
zh-cn: 数据库
TemplateTags:
- acs:example:网络:创建WordPress集群并配置VPC的SNAT功能访问Internet
ALIYUN::ROS::Designer:
08aba2f4-d888-4f7b-846e-433455b410e3:
source:
id: 10fffab5-c18e-4a65-9763-31fcffaa351a
target:
id: 646fdbaa-e458-4900-8d95-125d0ea706e5
z: 1
10fffab5-c18e-4a65-9763-31fcffaa351a:
position:
x: 57
y: 83
size:
height: 60
width: 60
z: 0
19bd9481-b987-4b95-abb6-a580a63bcc7b:
position:
x: 55
y: 269
size:
height: 60
width: 60
z: 0
1b916f2d-e2ab-4de2-9396-4b8a689e6bb0:
position:
x: 398
y: -77
size:
height: 60
width: 60
z: 0
35ef19c0-6a54-4b3e-8812-e66544479f81:
position:
x: 55
y: 357
size:
height: 60
width: 60
z: 0
384f5613-a9f7-42db-92a6-83869fa70ca5:
position:
x: 345
y: 197
size:
height: 60
width: 60
z: 2
3c076721-c8e6-46b9-82ef-e77afd6af71f:
source:
id: cd2b9302-2c40-4415-85c9-dc760dc405f8
target:
id: 6d704692-b4a7-456e-b849-70b9620b694f
z: 1
4df89a92-7821-461c-96fd-7e2f4582dbcd:
source:
id: b2de87c0-335e-4bce-a2d3-a51d446a9826
target:
id: 1b916f2d-e2ab-4de2-9396-4b8a689e6bb0
z: 1
646fdbaa-e458-4900-8d95-125d0ea706e5:
position:
x: 57
y: 173
size:
height: 60
width: 60
z: 0
6d704692-b4a7-456e-b849-70b9620b694f:
position:
x: 349
y: 343
size:
height: 60
width: 60
z: 1
7b3b2104-2abe-4b34-8d46-a0b103f21b17:
source:
id: ff981e44-120b-4ab6-a9f7-6074722c67d9
target:
id: cd2b9302-2c40-4415-85c9-dc760dc405f8
z: 1
7bc7c909-36d3-4d8f-acb6-08f4706084a0:
source:
id: 9507d15d-30c2-4647-b05b-eae353015a5c
target:
id: cd2b9302-2c40-4415-85c9-dc760dc405f8
z: 1
7c11fd1c-4e95-46fa-aaa8-85f9a2990df9:
source:
id: ff981e44-120b-4ab6-a9f7-6074722c67d9
target:
id: b792aef6-7a17-4718-a210-ffa908da73d6
z: 1
91397d67-139d-4543-9837-011eaa5d153a:
embeds:
- 92cfb4b0-a0b8-4799-b794-2db985da169e
- 6d704692-b4a7-456e-b849-70b9620b694f
position:
x: 199
y: 123
size:
height: 306
width: 353
z: 0
92cfb4b0-a0b8-4799-b794-2db985da169e:
embeds:
- 384f5613-a9f7-42db-92a6-83869fa70ca5
- b792aef6-7a17-4718-a210-ffa908da73d6
- cd2b9302-2c40-4415-85c9-dc760dc405f8
position:
x: 221
y: 146
size:
height: 185
width: 309
z: 1
9507d15d-30c2-4647-b05b-eae353015a5c:
position:
x: 579
y: 199
size:
height: 60
width: 60
z: 0
a25689f8-5320-4ca2-b2c7-3049f5223f18:
source:
id: b792aef6-7a17-4718-a210-ffa908da73d6
target:
id: 6d704692-b4a7-456e-b849-70b9620b694f
z: 1
b2de87c0-335e-4bce-a2d3-a51d446a9826:
position:
x: 461
y: 33
size:
height: 60
width: 60
z: 0
b792aef6-7a17-4718-a210-ffa908da73d6:
position:
x: 248
y: 199
size:
height: 60
width: 60
z: 2
cd2b9302-2c40-4415-85c9-dc760dc405f8:
position:
x: 439
y: 199
size:
height: 60
width: 60
z: 2
f44a9707-0858-437e-a7ba-1b2f58ad8eeb:
source:
id: ff981e44-120b-4ab6-a9f7-6074722c67d9
target:
id: 1b916f2d-e2ab-4de2-9396-4b8a689e6bb0
z: 1
f47af994-9393-4cad-a128-b090ebe5b022:
source:
id: 19bd9481-b987-4b95-abb6-a580a63bcc7b
target:
id: 35ef19c0-6a54-4b3e-8812-e66544479f81
z: 1
ff981e44-120b-4ab6-a9f7-6074722c67d9:
position:
x: 340
y: 32
size:
height: 60
width: 60
z: 0