forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
low-cost-offline-big-data-analysis.yml
1791 lines (1782 loc) · 70.2 KB
/
low-cost-offline-big-data-analysis.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
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 搭建基于抢占式ECS与OSS的大数据离线分析平台,含PoC测试环境与Hadoop配置。
en: Constructing a large-scale offline data analysis platform based on preemptible
Elastic Compute Service (ECS) instances and Object Storage Service (OSS), inclusive
of Proof of Concept (PoC) testing environment and Hadoop configuration.
Conditions:
IfSpotPriceLimit:
Fn::Equals:
- 0
- Ref: SpotPriceLimit
Parameters:
UserName:
Type: String
Label:
en: Subaccount Username
zh-cn: 子账户用户名
Description:
en: 'Specifies a user name of up to 64 characters.Format: ^[a-za-z0-9 \ @\ -_]+$.'
zh-cn: 指定用户名,最多包含64个字符。格式:^[a-zA-Z0-9\.@\-_]+$。
ConstraintDescription:
en: 'Specifies a user name of up to 64 characters.Format: ^[a-za-z0-9 \ @\ -_]+$.'
zh-cn: '[1, 64]位最多包含64个字符。格式:^[a-zA-Z0-9\.@\-_]+$。'
Default: test-hadoop
MinLength: 1
UserPassword:
Type: String
Label:
en: Subaccount Password
zh-cn: 子账户密码
Description:
en: Specify password, 8-30 digits, password must meet password strength requirements,
composed of upper and lower case letters and Numbers.
zh-cn: 指定密码,8-30位,密码必须符合密码强度要求,由大小写字母和数字组成。
ConstraintDescription:
en: ' [8, 30] bits are composed of upper and lower case letters and Numbers'
zh-cn: '[8, 30]位由大小写字母和数字组成。'
MinLength: 8
MaxLength: 30
NoEcho: true
VpcCidrBlock:
Type: String
Label:
en: VPC CIDR Block
zh-cn: 专有网络网段
Description:
en: 'The IP address range of the VPC in the CIDR Block form; <br>you can use
the following IP address ranges: <br><font color=''green''>[10.0.0.0/8]</font><br><font
color=''green''>[172.16.0.0/12]</font><br><font color=''green''>[192.168.0.0/16]</font>'
zh-cn: 专有网络IP地址段范围,<br>您可以使用以下的IP地址段:<br><font color='green'>[10.0.0.0/8]</font><br><font
color='green'>[172.16.0.0/12]</font><br><font color='green'>[192.168.0.0/16]</font>
Default: 192.168.0.0/16
AllowedValues:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
ZoneId:
Type: String
Label:
en: VSwitch Availability Zone
zh-cn: 交换机可用区
Description:
en: Availability zone ID,<br><b>note: <font color='blue'>Before selecting, please
confirm that the Availability Zone supports the specification of creating
RDS、SLB and ECS resources</font></b>
zh-cn: 可用区ID。<br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建ECS资源的规格</font></b>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VSwitchCidrBlock:
Type: String
Label:
en: VSwitch CIDR Block
zh-cn: 交换机网段
Description:
en: Must be a sub-network segment of the proprietary network and is not occupied
by other v-switches.
zh-cn: 必须是所属专有网络的子网段,并且没有被其他交换机占用。
Default: 192.168.0.0/24
EipInternetChargeType:
Type: String
Label:
en: EIP Billing
zh-cn: 弹性公网IP计费方式
Description:
en: '<font color=''blue''><b>Optional values: </b></font><br>[PayByBandwidth:<font
color=''green''>Charge on fixed bandwidth</font>]<br>[paybytraffic:<font color=''green''>Charge
by flow</font>]<br><font color=''blue''></a>'
zh-cn: '<font color=''blue''><b>可选值: </b></font><br>[PayByBandwidth:<font color=''green''>按固定带宽计费</font>]<br>[paybytraffic:<font
color=''green''>按流量计费</font>]<br><font color=''blue''></a>'
Default: PayByTraffic
AllowedValues:
- PayByTraffic
- PayByBandwidth
EipBandwidth:
Type: Number
Label:
en: EIP Bandwidth
zh-cn: 弹性公网IP带宽值
Description:
en: 'Elastic public network IP bandwidth value,value: 1~200, Unit: Mbps.'
zh-cn: 弹性公网IP带宽值, 取值:1~200, 单位:Mbps。
Default: 5
MinValue: 1
MaxValue: 200
MasterName:
Type: String
Label:
en: Primary Node Hostname
zh-cn: 主节点主机名
Description:
en: Linux system, 2-64 characters in length, cannot use (.) or (-) symbols consecutically
and cannot begin or end with a dot (.) or a hyphen (-). Upper and lower case
letters, Numbers, or hyphens (-) are allowed.
zh-cn: Linux系统,长度2-64个字符,不能连续使用(.)或(-)符号并且不能以点号(.)或连字符(-)开头或结尾,允许使用大小写字母、数字或连字符(-)。
Default: master
InstanceType:
Type: String
Label:
en: Specification
zh-cn: 规格
Description:
en: 'Fill in the specifications that can be used under the VSwitch availability
zone;</b></font><br>general specifications:<font color=''red''><b>ecs.c5.large</b></font><br>note:
a few zones do not support general specifications<br>see detail: <a href=''https://www.alibabacloud.com/help/en/doc-detail/25378.html''
target=''_blank''><b><font color=''blue''>Instance Specification Family</font></a></b>'
zh-cn: 填写VSwitch可用区下可使用的规格;<br>通用规格:<font color='red'><b>ecs.c5.large</b></font><br>注:可用区可能不支持通用规格<br>规格详见:<a
href='https://help.aliyun.com/document_detail/25378.html' target='_blank'><b><font
color='blue'>实例规格族</font></a></b>
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ZoneId
ImageId:
Type: String
Label:
en: Image
zh-cn: 镜像
Description:
en: Image ID,see detail:<b><a href='https://www.alibabacloud.com/help/en/doc-detail/112977.html'
target='_blank'><font color='blue'>Find the mirror</font></a></b>
zh-cn: 镜像ID, 详见:<b><a href='https://help.aliyun.com/document_detail/112977.html'
target='_blank'><font color='blue'>查找镜像</font></a></b>
Default: centos_7_06_64_20G_alibase_20190711.vhd
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>]'
Default: cloud_ssd
AllowedValues:
- cloud_efficiency
- cloud_ssd
- cloud
- cloud_essd
- ephemeral_ssd
InstancePassword:
Type: String
Label:
en: Instance Password
zh-cn: 实例密码
Description:
en: Server login password, Length 8-30, must contain three(Capital letters,
lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol
in).
zh-cn: 服务器登录密码,长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)。
ConstraintDescription:
en: Length 8-30, must contain three(Capital letters, lowercase letters, numbers,
()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).
zh-cn: 长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)。
AllowedPattern: '[0-9A-Za-z\_\-\&:;''<>,=%`~!@#\(\)\$\^\*\+\|\{\}\[\]\.\?\/]+$'
MinLength: 8
MaxLength: 30
NoEcho: true
Slave1Name:
Type: String
Label:
en: Slave Node 1 Hostname
zh-cn: 从节点1主机名
Description:
en: Linux system, 2-64 characters in length, cannot use (.) or (-) symbols consecutically
and cannot begin or end with a dot (.) or a hyphen (-). Upper and lower case
letters, Numbers, or hyphens (-) are allowed.
zh-cn: Linux系统,长度2-64个字符,不能连续使用(.)或(-)符号并且不能以点号(.)或连字符(-)开头或结尾,允许使用大小写字母、数字或连字符(-)。
Default: slave1
Slave2Name:
Type: String
Label:
en: Slave Node 2 Hostname
zh-cn: 从节点2主机名
Description:
en: Linux system, 2-64 characters in length, cannot use (.) or (-) symbols consecutically
and cannot begin or end with a dot (.) or a hyphen (-). Upper and lower case
letters, Numbers, or hyphens (-) are allowed.
zh-cn: Linux系统,长度2-64个字符,不能连续使用(.)或(-)符号并且不能以点号(.)或连字符(-)开头或结尾,允许使用大小写字母、数字或连字符(-)。
Default: slave2
BucketName:
Type: String
Label:
en: Bucket Name
zh-cn: 存储空间名称
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>
ConstraintDescription:
en: Must begin and be end with a lowercase letter or number. The length is within
[3, 63]
zh-cn: 长度为3~63个字符,必须以小写字母或数字开头和结尾,可以包含小写字母、数字和连字符(-).
Default: my-hadoop-map-reduce
MinLength: 3
MaxLength: 63
AccessControl:
Type: String
Label:
en: Access Permissions
zh-cn: 访问权限
Description:
en: <font color='blue'><b>Optional values:</b></font><br>[private:<font color='green'>privately-owned</font>]<br>[public-read:<font
color='green'>The public reading</font>]<br>[public-read-write:<font color='green'>Public
reading and writing</font>]<br><font color='blue'></a>
zh-cn: <font color='blue'><b>可选值:</b></font><br>[private:<font color='green'>私有</font>]<br>[public-read:<font
color='green'>公共读</font>]<br>[public-read-write:<font color='green'>公共读写</font>]<br><font
color='blue'></a>
Default: private
AllowedValues:
- private
- public-read
- public-read-write
OssDeletionForce:
Type: Boolean
Label:
en: Support for Force Deletion
zh-cn: 支持强制删除
Description:
en: Do you want to force the deletion of files in OSS?
zh-cn: 是否强制删除OSS中的文件
Default: false
SpotStrategy:
Type: String
Label:
en: Instance Preemption Policy
zh-cn: 实例抢占策略
Description:
en: '<font color=''blue''><b>Optional values: </b></font><br>[NoSpot:<font color=''green''>Regular
pay-as-you-go instances</font>]<br>[SpotWithPriceLimit:<font color=''green''>A
preemptive instance of setting a cap price</font>]<br>[SpotAsPriceGo:<font
color=''green''>The system automatically bids, following the actual price
in the current market</font>]<br><font color=''blue''></a>'
zh-cn: '<font color=''blue''><b>可选值: </b></font><br>[NoSpot:<font color=''green''>正常按量付费实例</font>]<br>[SpotWithPriceLimit:<font
color=''green''>设置上限价格的抢占式实例</font>]<br>[SpotAsPriceGo:<font color=''green''>系统自动出价,跟随当前市场实际价格</font>]<br><font
color=''blue''></a>'
Default: SpotAsPriceGo
AllowedValues:
- NoSpot
- SpotWithPriceLimit
- SpotAsPriceGo
SpotPriceLimit:
Type: Number
Label:
en: Maximum Price
zh-cn: 实例小时最高价格
Description:
en: Supports up to 3 decimal places.This parameter takes effect when < instance
preemption policy > is set to SpotWithPriceLimit.
zh-cn: 支持最多3位小数。当<实例抢占策略>取值为SpotWithPriceLimit时,此参数生效。
Default: 0
EssInstanceType:
Type: String
Label:
en: Specification
zh-cn: 规格
Description:
en: 'Fill in the specifications that can be used under the VSwitch availability
zone;</b></font><br>general specifications:<font color=''red''><b>ecs.c5.large</b></font><br>note:
a few zones do not support general specifications<br>see detail: <a href=''https://www.alibabacloud.com/help/en/doc-detail/25378.html''
target=''_blank''><b><font color=''blue''>Instance Specification Family</font></a></b>'
zh-cn: 填写VSwitch可用区下可使用的规格;<br>通用规格:<font color='red'><b>ecs.c5.large</b></font><br>注:可用区可能不支持通用规格<br>规格详见:<a
href='https://help.aliyun.com/document_detail/25378.html' target='_blank'><b><font
color='blue'>实例规格族</font></a></b>
MaxSize:
Type: Number
Label:
en: Maximum Number of Servers
zh-cn: 服务器数量最大值
Description:
en: 'Value range: [0, 100].'
zh-cn: 取值范围:[0, 100]
Default: 5
MinValue: 2
MaxValue: 100
MinSize:
Type: Number
Label:
en: Minimum Number of Servers
zh-cn: 服务器数量最小值
Description:
en: Value range:[0, 100]。
zh-cn: 取值范围:[0, 100]。
Default: 2
MinValue: 2
MaxValue: 100
AdjustmentType:
Type: String
Label:
en: Scale Rule Adjustment Mode
zh-cn: 伸缩规则调整方式
Description:
en: '<font color=''blue''><b>Optional values: </b></font><br>[QuantityChangeInCapacity:<font
color=''green''>Increases or decreases a specified number of ECS instances</font>]<br>[PercentChangeInCapacity:<font
color=''green''>Increases or decreases ECS instances by a specified percentage</font>]<br>[TotalCapacity:<font
color=''green''>Adjusts the number of ECS instances of the current scaling
group to the specified number</font>]<br><font color=''blue''></a>'
zh-cn: '<font color=''blue''><b>可选值: </b></font><br>[QuantityChangeInCapacity:<font
color=''green''>增加或减少指定数量的ECS实例</font>]<br>[PercentChangeInCapacity:<font
color=''green''>增加或减少指定比例的ECS实例</font>]<br>[TotalCapacity:<font color=''green''>将当前伸缩组的ECS实例数量调整到指定数量</font>]<br><font
color=''blue''></a>'
Default: TotalCapacity
AllowedValues:
- QuantityChangeInCapacity
- PercentChangeInCapacity
- TotalCapacity
AdjustmentValue:
Type: Number
Label:
en: Scaling Rules Adjust Values
zh-cn: 伸缩规则调整值
Description:
en: The adjustment value of the expansion rule;Under no circumstances should
the number of ECS instances adjusted in a single run exceed 500.
zh-cn: 伸缩规则的调整值;任何情况下,单次调整的ECS实例台数都不能超过500。
Default: 2
HadoopHome:
Type: String
Label:
en: Hadoop Path
zh-cn: Hadoop 路径
Description:
en: Hadoop directory
zh-cn: Hadoop目录
Default: /home/hadoop/hadoop-3.2.1
HadoopUrl:
Type: String
Label:
en: Official Download Link
zh-cn: 官网下载链接
Description:
en: 'Recommended for use overseas: http://apache.claz.org/hadoop/common/hadoop-3.2.1/hadoop-3.2.1.tar.gz<br>Recommended
for domestic use: http://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/hadoop-3.2.1/hadoop-3.2.1.tar.gz'
zh-cn: 海外推荐使用:http://apache.claz.org/hadoop/common/hadoop-3.2.1/hadoop-3.2.1.tar.gz<br>国内推荐使用:http://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/hadoop-3.2.1/hadoop-3.2.1.tar.gz
DefaultCooldown:
Type: Number
Label:
en: Flex group default cooldown
zh-cn: 伸缩组默认的冷却时间
Description:
en: 'Flex group default cooldown.Value range: [0, 86400], unit: second.The default
value is 300 seconds.'
zh-cn: 伸缩组默认的冷却时间。取值范围:[0, 86400],单位:秒。默认值为 300 秒。
Default: 300
InstanceName:
Type: String
Label:
en: Instance name
zh-cn: 实例名称
Description:
en: ECS instance name, Length is 2~128 English or Chinese characters.Must start
with size letters or Chinese, not http:// or https://.It can contain a number,
a semicolon colon (:), an underscore (_), or a hyphen (-).
zh-cn: ECS 实例名称,长度为2~128个英文或中文字符。必须以大小字母或中文开头,不能以http://或https://开头。可以包含数字、半角冒号(:)、下划线(_)或者连字符(-)。
Default: ecsinstance
Resources:
Eip:
Type: ALIYUN::VPC::EIP
Properties:
Bandwidth:
Ref: EipBandwidth
InternetChargeType:
Ref: EipInternetChargeType
Metadata:
ALIYUN::ROS::Designer:
id: b8ca6594-104d-4884-90ae-2f6d195aa9a7
OSS:
Type: ALIYUN::OSS::Bucket
Properties:
AccessControl:
Ref: AccessControl
BucketName:
Ref: BucketName
DeletionForce:
Ref: OssDeletionForce
Tags:
Key: best_practice
Value: '026'
Metadata:
ALIYUN::ROS::Designer:
id: 9d291f46-a9cb-486f-8da4-8004c599bbc5
RamUser:
Type: ALIYUN::RAM::User
Properties:
LoginProfile:
Password:
Ref: UserPassword
PasswordResetRequired: false
Policies:
- Description: 此权限策略用于低成本大数据分析
PolicyDocument:
Statement:
- Action:
- '*'
Effect: Allow
Resource:
- acs:ecs:*:*:*
- acs:oss:*:*:*
- acs:vpc:*:*:*
Version: '1'
PolicyName:
Fn::Join:
- '-'
- - UserPolicyName
- Ref: ALIYUN::StackName
UserName:
Ref: UserName
Metadata:
ALIYUN::ROS::Designer:
id: 402e64d6-5532-4b40-b725-925e84478bc8
RamAK:
Type: ALIYUN::RAM::AccessKey
Properties:
UserName:
Fn::GetAtt:
- RamUser
- UserName
Metadata:
ALIYUN::ROS::Designer:
id: 8def6bca-8e2d-4560-bc9d-4d1dd93d4b9e
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: 29f2085b-515e-4c86-807d-dd25e35206d9
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: all
NicType: internet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: all
NicType: intranet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
Tags:
- Key: best_practice
Value: '026'
Metadata:
ALIYUN::ROS::Designer:
id: 13fbc80c-b12e-4a3a-ae1c-99815aee4a27
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: Vpc
CidrBlock:
Ref: VSwitchCidrBlock
Metadata:
ALIYUN::ROS::Designer:
id: 124030a3-5607-403e-84a6-84affcf2c043
Slave1:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Ref: SecurityGroup
ImageId:
Ref: ImageId
AllocatePublicIP: false
HostName:
Ref: Slave1Name
InstanceName:
Ref: Slave1Name
InstanceType:
Ref: InstanceType
IoOptimized: optimized
Password:
Ref: InstancePassword
SpotPriceLimit:
Fn::If:
- IfSpotPriceLimit
- Ref: ALIYUN::NoValue
- Fn::Str:
Ref: SpotPriceLimit
SpotStrategy:
Ref: SpotStrategy
SystemDiskCategory:
Ref: SystemDiskCategory
Tags:
- Key: best_practice
Value: '026'
UserData:
Fn::Replace:
- ros-notify:
Fn::GetAtt:
- Slave1ConditionHandle
- CurlCli
- Fn::Join:
- ''
- - "#!/bin/bash \n"
- Slave1Name=
- Ref: Slave1Name
- " \n"
- "hostnamectl --static set-hostname \"$Slave1Name\" \n"
- "export HOME=/root \n"
- "export HOSTNAME=`hostname` \n"
- "cd /root \n"
- "rm -rf .ssh \n"
- "ssh-keygen -t rsa -P '' -f '/root/.ssh/id_rsa' \n"
- "cd /root/.ssh \n"
- "rm -f * \n"
- "echo '-----BEGIN RSA PRIVATE KEY-----' > id_rsa \n"
- "echo 'MIIEowIBAAKCAQEAzfQ/QHwWB1njU9+Wu3RYi9g+g5rydSpAE0klefTJuZjtcaic'\
\ >> id_rsa \n"
- "echo 'SCeBN5avih8UToZ148+Ef2YzOtoosqluZpoYLCPSpAqr8pmviBJIU3vfu9mnDG9L'\
\ >> id_rsa \n"
- "echo 'oevT6K8w3wCBRCmqu+vc0Tpju/EeCuYK3+8w7e2I6F3+zIYzhhX3qmkocje7ACnV'\
\ >> id_rsa \n"
- "echo 'yh2DB/2m3sogTMc0RT+5y3kJAnC6TOIlGsYjOOkPbEF3Ifn1o4ZjOFOmQlcRJer4'\
\ >> id_rsa \n"
- "echo '1E6rTdXAxS2uDNMFBCf9Xyx7O9J+ELTCAXc4h7AE6WLdQb5Apzv4t1KswCAtRenP'\
\ >> id_rsa \n"
- "echo '1xGcUYY8I/JUT2VvBWtQJennrk9jrPZUFDcmcwIDAQABAoIBAAwzDZQaRYvF7UtI'\
\ >> id_rsa \n"
- "echo 'kTslVyFhe8J76SS7jfQWfxvMPi66OkZjQG6duG+8g0VhNei42j7WSfjp6trvlT2P'\
\ >> id_rsa \n"
- "echo '/7QgKJJkxNNmtmy2Ycljm9kmG0ibSePYq9g5ieHcjr6G3yFUfoKHJBtYpBO74pWu'\
\ >> id_rsa \n"
- "echo 'rrI5DuLpERUCjFc9E8w7fOIhPH4XZ6wk/EmPxHTgxZk+aMvqptyPSbUyiUOvCiZf'\
\ >> id_rsa \n"
- "echo 'MD0ircs9vgtslMVDlz9m6CoiNz6B3Yf6eLRoGGMiGnsQzZHIfnHCMX8i65Jc+TvQ'\
\ >> id_rsa \n"
- "echo 'fLopIHzwBwI55xpcOIBRgYiEAQJhLsSNSFugoxMcwe9RalTGGS21HOQu4b3ZylKM'\
\ >>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 'fIROYL25VeEMgYcQyInc3Fm/sgJdbXQnUy+3QbbCcBCmcLj27LPQyxuu7p9hbPPT'\
\ >> id_rsa \n"
- "echo 'Mxx37OmYvOkSVTQz0T9HfDGvOJgt4t4cXD4T/7ewk62p6jdpSQrt' >> id_rsa\
\ \n"
- "echo '-----END RSA PRIVATE KEY-----' >> id_rsa \n"
- "echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN9D9AfBYHWeNT35a7dFiL2D6DmvJ1KkATSSV59Mm5mO1xqJxIJ4E3lq+KHxROhnXjz4R/ZjM62iiyqW5mmhgsI9KkCqvyma+IEkhTe9+72acMb0uh69PorzDfAIFEKaq769zROmO78R4K5grf7zDt7YjoXf7MhjOGFfeqaShyN7sAKdXKHYMH/abeyiBMxzRFP7nLeQkCcLpM4iUaxiM46Q9sQXch+fWjhmM4U6ZCVxEl6vjUTqtN1cDFLa4M0wUEJ/1fLHs70n4QtMIBdziHsATpYt1BvkCnO/i3UqzAIC1F6c/XEZxRhjwj8lRPZW8Fa1Al6eeuT2Os9lQUNyZz\
\ root@iZ2zee53wf4ndvajz30cdvZ' > id_rsa.pub \n"
- "cp id_rsa.pub authorized_keys \n"
- "chmod 600 authorized_keys \n"
- "chmod 600 id_rsa \n"
- "sed -i 's/# StrictHostKeyChecking ask/StrictHostKeyChecking no/'\
\ /etc/ssh/ssh_config \n"
- "sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/ssh_config\
\ \n"
- "service sshd restart \n"
- "ros-notify -d '{\"data\" : \"Install Spark.\"}' \n"
Metadata:
ALIYUN::ROS::Designer:
id: 6ec2cf1d-c20e-4ee5-a55b-5c1705b3b611
Slave1ConditionHandle:
Type: ALIYUN::ROS::WaitConditionHandle
Properties: {}
Metadata:
ALIYUN::ROS::Designer:
id: 50ce94eb-c0f1-4394-ad4d-0178366c1efc
Slave1WaitCondition:
Type: ALIYUN::ROS::WaitCondition
Properties:
Count: 1
Handle:
Ref: Slave1ConditionHandle
Timeout: 1800
DependsOn: Slave1
Metadata:
ALIYUN::ROS::Designer:
id: 6eebf98c-0319-4642-87c5-23b0071d5915
Slave2:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Ref: SecurityGroup
ImageId:
Ref: ImageId
AllocatePublicIP: false
HostName:
Ref: Slave2Name
InstanceName:
Ref: Slave2Name
InstanceType:
Ref: InstanceType
IoOptimized: optimized
Password:
Ref: InstancePassword
SpotPriceLimit:
Fn::If:
- IfSpotPriceLimit
- Ref: ALIYUN::NoValue
- Fn::Str:
Ref: SpotPriceLimit
SpotStrategy:
Ref: SpotStrategy
SystemDiskCategory:
Ref: SystemDiskCategory
Tags:
- Key: best_practice
Value: '026'
UserData:
Fn::Replace:
- ros-notify:
Fn::GetAtt:
- Slave2ConditionHandle
- CurlCli
- Fn::Join:
- ''
- - "#!/bin/bash \n"
- Slave2Name=
- Ref: Slave2Name
- " \n"
- "hostnamectl --static set-hostname \"$Slave2Name\" \n"
- "export HOME=/root \n"
- "export HOSTNAME=`hostname` \n"
- "cd /root \n"
- "rm -rf .ssh \n"
- "ssh-keygen -t rsa -P '' -f '/root/.ssh/id_rsa' \n"
- "cd /root/.ssh \n"
- "rm -f * \n"
- "echo '-----BEGIN RSA PRIVATE KEY-----' > id_rsa \n"
- "echo 'MIIEowIBAAKCAQEAzfQ/QHwWB1njU9+Wu3RYi9g+g5rydSpAE0klefTJuZjtcaic'\
\ >> id_rsa \n"
- "echo 'SCeBN5avih8UToZ148+Ef2YzOtoosqluZpoYLCPSpAqr8pmviBJIU3vfu9mnDG9L'\
\ >> id_rsa \n"
- "echo 'oevT6K8w3wCBRCmqu+vc0Tpju/EeCuYK3+8w7e2I6F3+zIYzhhX3qmkocje7ACnV'\
\ >> id_rsa \n"
- "echo 'yh2DB/2m3sogTMc0RT+5y3kJAnC6TOIlGsYjOOkPbEF3Ifn1o4ZjOFOmQlcRJer4'\
\ >>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VBZILkDf+WCwQ98P5UMoumI0goIcNZ+AXhcqrikCgYBkSwLvKfYfqH9Mvfv5Odsr'\
\ >> id_rsa \n"
- "echo '9NKUv1c20FB1BYYh/mxp6eIbTW/CbwXZup6IqCvoHxpBAlna77b3T6iibSDsTgtE'\
\ >> id_rsa \n"
- "echo 'kirw6Q8/mBukBrpWZGa4QeJ4nPBQuncuUmx4H/7Y6CaZkZW5DiMF8OIbEmYT0y7+'\
\ >> id_rsa \n"
- "echo 'zh222r9CLtFYH23aL/uSLwKBgQCS1xyG2eE41aw5RBznDWtJW15iA5If8sJD5ocu'\
\ >> id_rsa \n"
- "echo 'eWp2aImUQS8ghxdmEozI6U5WA7CmdWUyObFXTPc/Z6FLXwqJ5IZ+CRt0neuIFNSA'\
\ >> id_rsa \n"
- "echo 'EQy9iFQ1FBUW06BRQpBns7yOg9jr6BOTxchjIV0I9caDp1nKRIrWU9NQ9iCFnYVA'\
\ >> id_rsa \n"
- "echo '7IsvQQKBgFxgF7UOhwaiMb/ATSuhm2v9kVvRPEO9umdo7YJ9I4L09lYbAtpcnusQ'\
\ >> id_rsa \n"
- "echo 'fIROYL25VeEMgYcQyInc3Fm/sgJdbXQnUy+3QbbCcBCmcLj27LPQyxuu7p9hbPPT'\
\ >> id_rsa \n"
- "echo 'Mxx37OmYvOkSVTQz0T9HfDGvOJgt4t4cXD4T/7ewk62p6jdpSQrt' >> id_rsa\
\ \n"
- "echo '-----END RSA PRIVATE KEY-----' >> id_rsa \n"
- "echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN9D9AfBYHWeNT35a7dFiL2D6DmvJ1KkATSSV59Mm5mO1xqJxIJ4E3lq+KHxROhnXjz4R/ZjM62iiyqW5mmhgsI9KkCqvyma+IEkhTe9+72acMb0uh69PorzDfAIFEKaq769zROmO78R4K5grf7zDt7YjoXf7MhjOGFfeqaShyN7sAKdXKHYMH/abeyiBMxzRFP7nLeQkCcLpM4iUaxiM46Q9sQXch+fWjhmM4U6ZCVxEl6vjUTqtN1cDFLa4M0wUEJ/1fLHs70n4QtMIBdziHsATpYt1BvkCnO/i3UqzAIC1F6c/XEZxRhjwj8lRPZW8Fa1Al6eeuT2Os9lQUNyZz\
\ root@iZ2zee53wf4ndvajz30cdvZ' > id_rsa.pub \n"
- "cp id_rsa.pub authorized_keys \n"
- "chmod 600 authorized_keys \n"
- "chmod 600 id_rsa \n"
- "sed -i 's/# StrictHostKeyChecking ask/StrictHostKeyChecking no/'\
\ /etc/ssh/ssh_config \n"
- "sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/ssh_config\
\ \n"
- "service sshd restart \n"
- "ros-notify -d '{\"data\" : \"Install Spark.\"}' \n"
Metadata:
ALIYUN::ROS::Designer:
id: 5434f588-8366-4162-87d4-9335072cbbee
Slave2ConditionHandle:
Type: ALIYUN::ROS::WaitConditionHandle
Properties: {}
Metadata:
ALIYUN::ROS::Designer:
id: 557c5e7b-d380-43aa-bd64-5cda44c06f2f
Slave2WaitCondition:
Type: ALIYUN::ROS::WaitCondition
Properties:
Count: 1
Handle:
Ref: Slave2ConditionHandle
Timeout: 1800
DependsOn: Slave2
Metadata:
ALIYUN::ROS::Designer:
id: 5caac73a-aa03-47da-b8ae-b2c47a299f76
Master:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Ref: SecurityGroup
ImageId:
Ref: ImageId
AllocatePublicIP: false
HostName:
Ref: MasterName
InstanceName:
Ref: MasterName
InstanceType:
Ref: InstanceType
IoOptimized: optimized
Password:
Ref: InstancePassword
SystemDiskCategory:
Ref: SystemDiskCategory
Tags:
- Key: best_practice
Value: '026'
UserData:
Fn::Replace:
- ros-notify:
Fn::GetAtt:
- MasterConditionHandle
- CurlCli
- Fn::Join:
- ''
- - "#!/bin/bash \n"
- "# set -e \n"
- "#!/bin/bash \n"
- "# set -e \n"
- HadoopUrl=
- Ref: HadoopUrl
- " \n"
- "MasterIp=`ifconfig eth0 | awk '/inet /{print $2}'` \n"
- MasterName=
- Ref: MasterName
- '
'
- Slave1Ip=
- Fn::GetAtt:
- Slave1
- PrivateIp
- '
'
- Slave2Ip=
- Fn::GetAtt:
- Slave2
- PrivateIp
- '
'
- Slave1Name=
- Ref: Slave1Name
- '
'
- Slave2Name=
- Ref: Slave2Name
- '
'
- BucketName=
- Ref: BucketName
- '
'
- BucketDomain=
- Fn::GetAtt:
- OSS
- InternalDomainName
- "&&BucketEndpoint=${BucketDomain#*.} \n"
- AccessKey=
- Fn::GetAtt:
- RamAK
- AccessKeyId
- '
'
- AccessKeySecret=
- Fn::GetAtt:
- RamAK
- AccessKeySecret
- '
'
- HadoopHome='
- Ref: HadoopHome
- '''
'
- "hostnamectl --static set-hostname \"$MasterName\" \n"
- "export HOME=/root \n"
- "export HOSTNAME=`hostname` \n"
- "MasterIp=`ifconfig eth0 | awk '/inet /{print $2}'` \n"
- "cd /root \n"
- "rm -rf .ssh \n"
- "ssh-keygen -t rsa -P '' -f '/root/.ssh/id_rsa' \n"
- "cd /root/.ssh \n"
- "mv id_rsa bak.id_rsa \n"
- "mv id_rsa.pub bak.id_rsa.pub \n"
- "echo '-----BEGIN RSA PRIVATE KEY-----' > id_rsa \n"
- "echo 'MIIEowIBAAKCAQEAzfQ/QHwWB1njU9+Wu3RYi9g+g5rydSpAE0klefTJuZjtcaic'\
\ >> id_rsa \n"
- "echo 'SCeBN5avih8UToZ148+Ef2YzOtoosqluZpoYLCPSpAqr8pmviBJIU3vfu9mnDG9L'\
\ >> id_rsa \n"
- "echo 'oevT6K8w3wCBRCmqu+vc0Tpju/EeCuYK3+8w7e2I6F3+zIYzhhX3qmkocje7ACnV'\
\ >> id_rsa \n"
- "echo 'yh2DB/2m3sogTMc0RT+5y3kJAnC6TOIlGsYjOOkPbEF3Ifn1o4ZjOFOmQlcRJer4'\
\ >> id_rsa \n"
- "echo '1E6rTdXAxS2uDNMFBCf9Xyx7O9J+ELTCAXc4h7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mvfv5Odsr'\
\ >> id_rsa \n"
- "echo '9NKUv1c20FB1BYYh/mxp6eIbTW/CbwXZup6IqCvoHxpBAlna77b3T6iibSDsTgtE'\
\ >> id_rsa \n"
- "echo 'kirw6Q8/mBukBrpWZGa4QeJ4nPBQuncuUmx4H/7Y6CaZkZW5DiMF8OIbEmYT0y7+'\
\ >> id_rsa \n"
- "echo 'zh222r9CLtFYH23aL/uSLwKBgQCS1xyG2eE41aw5RBznDWtJW15iA5If8sJD5ocu'\
\ >> id_rsa \n"
- "echo 'eWp2aImUQS8ghxdmEozI6U5WA7CmdWUyObFXTPc/Z6FLXwqJ5IZ+CRt0neuIFNSA'\
\ >> id_rsa \n"
- "echo 'EQy9iFQ1FBUW06BRQpBns7yOg9jr6BOTxchjIV0I9caDp1nKRIrWU9NQ9iCFnYVA'\
\ >> id_rsa \n"
- "echo '7IsvQQKBgFxgF7UOhwaiMb/ATSuhm2v9kVvRPEO9umdo7YJ9I4L09lYbAtpcnusQ'\
\ >> id_rsa \n"
- "echo 'fIROYL25VeEMgYcQyInc3Fm/sgJdbXQnUy+3QbbCcBCmcLj27LPQyxuu7p9hbPPT'\
\ >> id_rsa \n"
- "echo 'Mxx37OmYvOkSVTQz0T9HfDGvOJgt4t4cXD4T/7ewk62p6jdpSQrt' >> id_rsa\
\ \n"
- "echo '-----END RSA PRIVATE KEY-----' >> id_rsa \n"
- "echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN9D9AfBYHWeNT35a7dFiL2D6DmvJ1KkATSSV59Mm5mO1xqJxIJ4E3lq+KHxROhnXjz4R/ZjM62iiyqW5mmhgsI9KkCqvyma+IEkhTe9+72acMb0uh69PorzDfAIFEKaq769zROmO78R4K5grf7zDt7YjoXf7MhjOGFfeqaShyN7sAKdXKHYMH/abeyiBMxzRFP7nLeQkCcLpM4iUaxiM46Q9sQXch+fWjhmM4U6ZCVxEl6vjUTqtN1cDFLa4M0wUEJ/1fLHs70n4QtMIBdziHsATpYt1BvkCnO/i3UqzAIC1F6c/XEZxRhjwj8lRPZW8Fa1Al6eeuT2Os9lQUNyZz\
\ root@iZ2zee53wf4ndvajz30cdvZ' > id_rsa.pub \n"
- "cp id_rsa.pub authorized_keys \n"
- "chmod 600 authorized_keys \n"
- "chmod 600 id_rsa \n"
- "sed -i 's/# StrictHostKeyChecking ask/StrictHostKeyChecking no/'\
\ /etc/ssh/ssh_config \n"
- "sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/ssh_config\
\ \n"
- "service sshd restart \n"
- "scp -r /root/.ssh/bak.* root@$Slave1Ip:/root/.ssh/ \n"
- "scp -r /root/.ssh/bak.* root@$Slave2Ip:/root/.ssh/ \n"
- "ssh root@$Slave1Ip \"cd /root/.ssh; rm -f id_rsa; mv bak.id_rsa id_rsa;\
\ rm -f id_rsa.pub; mv bak.id_rsa.pub id_rsa.pub; rm -f authorized_keys;\
\ cp id_rsa.pub authorized_keys; chmod 600 authorized_keys; chmod 600\
\ id_rsa; exit\" \n"
- "ssh root@$Slave2Ip \"cd /root/.ssh; rm id_rsa; mv bak.id_rsa id_rsa;\
\ rm id_rsa.pub; mv bak.id_rsa.pub id_rsa.pub; rm authorized_keys; cp\
\ id_rsa.pub authorized_keys; chmod 600 authorized_keys; chmod 600 id_rsa;\
\ exit\" \n"
- "cd /root/.ssh \n rm id_rsa \n mv bak.id_rsa id_rsa \n rm id_rsa.pub\
\ \n mv bak.id_rsa.pub id_rsa.pub \n rm authorized_keys \n cp id_rsa.pub\
\ authorized_keys \n chmod 600 authorized_keys \n chmod 600 id_rsa \n\
\ cd \n"
- " \n"
- "sed -i \"/^$MasterIp/d\" /etc/hosts \n"
- "echo $MasterIp $MasterName >> /etc/hosts \n"
- "echo $Slave1Ip $Slave1Name >> /etc/hosts \n"
- "echo $Slave2Ip $Slave2Name >> /etc/hosts \n"
- "ssh root@$Slave1Ip \"sed -i '/^'$Slave1Ip'/d' /etc/hosts; exit\" \n"
- "ssh root@$Slave1Ip \"echo $MasterIp $MasterName >> /etc/hosts; exit\"\
\ \n"
- "ssh root@$Slave1Ip \"echo $Slave1Ip $Slave1Name >> /etc/hosts; exit\"\
\ \n"
- "ssh root@$Slave1Ip \"echo $Slave2Ip $Slave2Name >> /etc/hosts; exit\"\
\ \n"
- "ssh root@$Slave2Ip \"sed -i '/^'$Slave2Ip'/d' /etc/hosts; exit\" \n"
- "ssh root@$Slave2Ip \"echo $MasterIp $MasterName >> /etc/hosts; exit\"\
\ \n"
- "ssh root@$Slave2Ip \"echo $Slave1Ip $Slave1Name >> /etc/hosts; exit\"\
\ \n"
- "ssh root@$Slave2Ip \"echo $Slave2Ip $Slave2Name >> /etc/hosts; exit\"\
\ \n"
- " \n"
- "cd /root \n"
- "yum -y install aria2 \n"
- "yum -y install java-1.8.0 \n"
- "ssh root@$Slave1Ip \"yum -y install java-1.8.0; exit\" \n"
- "ssh root@$Slave2Ip \"yum -y install java-1.8.0; exit\" \n"
- " \n"
- "JavaHome=`find /usr/lib/jvm -name 'java-1.8.0-openjdk-1.8.0*'` \n"
- "echo export JAVA_HOME=$JavaHome/jre >> /etc/profile \n"
- "echo export JRE_HOME=$JavaHome/jre >> /etc/profile \n"
- "#echo export CLASSPATH=.:$JavaHome/jre/lib:$JavaHome/jre/lib >> /etc/profile\
\ \n"
- "#echo export PATH=$JavaHome/jre/bin:$PATH >> /etc/profile \n"
- "source /etc/profile \n"
- "ssh root@$Slave1Ip \"echo export JAVA_HOME=$JavaHome/jre >> /etc/profile;echo\
\ export JRE_HOME=$JavaHome/jre >> /etc/profile;echo export CLASSPATH=.:$JavaHome/jre/lib:$JavaHome/jre/lib;echo\
\ export PATH=$JavaHome/jre/bin:$PATH >> /etc/profile;source /etc/profile;exit\"\
\ \n"