forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sls-multi-cloud-log-processing-analysis.yml
1035 lines (1035 loc) · 32.3 KB
/
sls-multi-cloud-log-processing-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:
en: This template is used to write data from third-party platforms or self-managed
data centers to Log Service for data analysis. This simplifies O&M, facilitates
operations, and improves the capability to process large amounts of logs.
zh-cn: 从第三方云平台或线下IDC服务器上采集日志写入到阿里云日志服务,通过日志服务进行数据分析,帮助提升运维、运营效率,建立 DT 时代海量日志处理能力。
Parameters:
ProjectName:
Type: String
Label:
en: Project Name
zh-cn: Project名称
Description:
en: Logging service Project name, global unique name.
zh-cn: 日志服务Project名称,Project名称全局唯一。
ConstraintDescription:
en: Composed of 3-63 characters, only lowercase letters, Numbers, and short
lines (-) are allowed, and they cannot begin or end with short lines.
zh-cn: 3-63个字符,只允许小写字母、数字、短横线(-),且不能以短横线开头或结尾。
Default: my-demo-log-project-test
MinLength: 3
MaxLength: 63
LogstoreName:
Type: String
Label:
en: Log Store Name
zh-cn: 日志库的名称
Description:
en: The name of the log library, 3-63 characters, beginning and ending with
lowercase letters and numbers, and may contain lowercase letters, numbers,
hyphens (-), and underscores
zh-cn: 日志库的名称,3-63个字符,须以小写字母和数字开头和结尾,可包含小写字母、数字、连字符(-)和下划线(_)
ConstraintDescription:
en: The name of the log library, 3-63 characters, beginning and ending with
lowercase letters and numbers, and may contain lowercase letters, numbers,
hyphens (-), and underscores
zh-cn: 日志库的名称,3-63个字符,须以小写字母和数字开头和结尾,可包含小写字母、数字、连字符(-)和下划线(_)
Default: demo-access-log-store
MinLength: 3
MaxLength: 63
MachineGroupName:
Type: String
Label:
en: Machine Group Name
zh-cn: 机器分组名称
Description:
en: 'Length 2-32, allows upper case letters, numbers, mid-horizontal lines,
and underscores, but does not begin or end with a symbol. '
zh-cn: 长度2-32,允许大小写字母、数字、中横线及下划线,但不能以符号开头或结尾。
ConstraintDescription:
en: 'Length 2-32, allows upper case letters, numbers, mid-horizontal lines,
and underscores, but does not begin or end with a symbol. '
zh-cn: 长度2-32,允许大小写字母、数字、中横线及下划线,但不能以符号开头或结尾。
Default: demo-log-group
MinLength: 2
MaxLength: 32
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
VSwitchZoneId:
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
EMR and ECS resources</font></b>
zh-cn: 可用区ID,<br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建EMR及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 VSwitches.
zh-cn: 必须是所属专有网络的子网段,并且没有被其他交换机占用。
Default: 192.168.0.0/24
EcsImageId:
Type: String
Label:
en: Image
zh-cn: 镜像
Description:
en: 'Server instance Image ID, please use CentOS Image, 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: 服务器镜像,请使用CentOS镜像,详见:<b><a href='https://help.aliyun.com/document_detail/112977.html'
target='_blank'><font color='blue'>查找镜像</font></a></b>
AssociationProperty: ALIYUN::ECS::Instance:ImageId
Default: centos_7_06_64_20G_alibase_20190711.vhd
EcsInstanceType:
Type: String
Label:
en: Specifications
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
EcsSystemDiskCategory:
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
EcsSystemDiskSize:
Type: Number
Label:
en: System Disk Space
zh-cn: 系统盘空间
Description:
en: 'System disk space, range of values: 40-500, units: GB.'
zh-cn: 系统盘空间, 取值范围:[40, 500], 单位:GB。
ConstraintDescription:
en: 'System disk space, range of values: 40-500, units: GB.'
zh-cn: 系统盘空间, 取值范围:[40, 500], 单位:GB。
Default: 40
MinValue: 40
MaxValue: 500
EcsPassword:
Type: String
Label:
en: Login 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
KafkaEmrVer:
Type: String
Label:
en: Product Version
zh-cn: 产品版本
Description:
en: EMR product version
zh-cn: EMR产品版本
Default: EMR-3.20.0
AllowedValues:
- EMR-3.24.3
- EMR-3.24.0
- EMR-3.23.0
- EMR-3.22.1
- EMR-3.21.3
- EMR-3.20.0
- EMR-3.15.0
- EMR-2.11.0
KafkaInstanceType:
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.g5.xlarge</b></font><br>note:
a few zones do not support general specifications, please confirm the specification
at E-MapReduce console.'
zh-cn: 填写VSwitch可用区下可使用的规格;<br>通用规格:<font color='red'><b>ecs.g5.xlarge</b></font><br>注:可用区可能不支持通用规格,需要在EMR控制台确认。
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
KafkaDiskType:
Type: String
Label:
en: 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>]'
zh-cn: '<font color=''blue''><b>可选值:</b></font><br>[CLOUD_EFFICIENCY: <font
color=''green''>高效云盘</font>]<br>[CLOUD_SSD: <font color=''green''>SSD云盘</font>]'
Default: CLOUD_SSD
AllowedValues:
- CLOUD_EFFICIENCY
- CLOUD_SSD
KafkaSysDiskCapacity:
Type: Number
Label:
en: System Disk Size
zh-cn: 系统盘大小
Description:
en: 'System disk size, range of values: 40-500, units: GB.'
zh-cn: 系统盘大小, 取值范围:[40, 500], 单位:GB。
ConstraintDescription:
en: 'System disk size, range of values: 40-500, units: GB.'
zh-cn: 系统盘大小, 取值范围:[40, 500], 单位:GB。
Default: 120
MinValue: 40
MaxValue: 500
KafkaDiskCapacity:
Type: Number
Label:
en: Data Disk Size
zh-cn: 数据盘大小
Description:
en: 'Data disk size, range of values: 40-32768, units: GB.'
zh-cn: 数据盘大小, 取值范围:[40, 32768], 单位:GB。
ConstraintDescription:
en: 'Data disk size, range of values: 40-32768, units: GB.'
zh-cn: 数据盘大小, 取值范围:[40, 32768], 单位:GB。
Default: 80
MinValue: 40
MaxValue: 32768
KafkaIsOpenPublicIp:
Type: Boolean
Label:
en: Mounted public net
zh-cn: 挂载公网
Description:
en: Whether to mount the public net.
zh-cn: 是否挂载公网。
Default: true
AllowedValues:
- true
- false
KafkaSshEnable:
Type: Boolean
Label:
en: Remote Logon
zh-cn: 是否开启SSH
Description:
en: Whether to enable SSH.
zh-cn: 是否开启SSH。
Default: false
AllowedValues:
- true
- false
KafkaPassword:
Type: String
Label:
en: Login Password
zh-cn: 登录密码
Description:
en: 'Login password, 8-30 characters, and must contains uppercase, lowercase,
number, and special characters !@#$%^&* <br>note: <b><font color=''blue''>The
password must consists of 4 types of refered symbol, or the stack will fail
to be created</font></b>'
zh-cn: 登录密码,8-30 个字符,且必须同时包含大写字母、小写字母、数字和特殊字符!@#$%^&* <br>注意:<b><font color='blue'>必须占四种,否则资源栈会创建失败</font></b>
ConstraintDescription:
en: 8-30 characters, and must contains uppercase, lowercase, number, and special
characters !@#$%^&*
zh-cn: 8-30 个字符,且必须同时包含大写字母、小写字母、数字和特殊字符!@#$%^&*
MinLength: 8
MaxLength: 30
NoEcho: true
HadoopEmrVer:
Type: String
Label:
en: Product Version
zh-cn: 产品版本
Description:
en: EMR product version
zh-cn: EMR产品版本
Default: EMR-3.20.0
AllowedValues:
- EMR-3.24.3
- EMR-3.24.0
- EMR-3.23.0
- EMR-3.22.1
- EMR-3.21.3
- EMR-3.20.0
- EMR-3.19.1
- EMR-3.19.0
HadoopHighAvailabilityEnable:
Type: Boolean
Label:
en: High-availability
zh-cn: 是否高可用
Description:
en: Whether to open High-availability cluster
zh-cn: 是否开启高可用集群
Default: false
AllowedValues:
- true
- false
HadoopInstanceType:
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.g5.xlarge</b></font><br>note:
a few zones do not support general specifications, please confirm the specification
at E-MapReduce console.'
zh-cn: 填写VSwitch可用区下可使用的规格;<br>通用规格:<font color='red'><b>ecs.g5.xlarge</b></font><br>注:可用区可能不支持通用规格,需要在EMR控制台确认。
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
HadoopCoreNodeCount:
Type: Number
Label:
en: Number of Core instances
zh-cn: Core实例数量
Description:
en: 'Number of Core instances, range of values: [1,1000].'
zh-cn: Core实例数量,范围[1,1000]。
ConstraintDescription:
en: 'Number of Core instances, range of values: [1,1000].'
zh-cn: Core实例数量,范围[1,1000]。
Default: 2
MinValue: 1
MaxValue: 1000
HadoopDiskType:
Type: String
Label:
en: 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>]'
zh-cn: '<font color=''blue''><b>可选值:</b></font><br>[CLOUD_EFFICIENCY: <font
color=''green''>高效云盘</font>]<br>[CLOUD_SSD: <font color=''green''>SSD云盘</font>]'
Default: CLOUD_SSD
AllowedValues:
- CLOUD_EFFICIENCY
- CLOUD_SSD
HadoopSysDiskCapacity:
Type: Number
Label:
en: System Disk Size
zh-cn: 系统盘大小
Description:
en: 'System disk size, range of values: 40-500, units: GB.'
zh-cn: 系统盘大小, 取值范围:[40, 500], 单位:GB。
ConstraintDescription:
en: 'System disk size, range of values: 40-500, units: GB.'
zh-cn: 系统盘大小, 取值范围:[40, 500], 单位:GB。
Default: 120
MinValue: 40
MaxValue: 500
HadoopDiskCapacity:
Type: Number
Label:
en: Data Disk Size
zh-cn: 数据盘大小
Description:
en: 'Data disk size, range of values: 40-32768, units: GB.'
zh-cn: 数据盘大小, 取值范围:[40, 32768], 单位:GB。
ConstraintDescription:
en: 'Data disk size, range of values: 40-32768, units: GB.'
zh-cn: 数据盘大小, 取值范围:[40, 32768], 单位:GB。
Default: 80
MinValue: 40
MaxValue: 32768
HadoopIsOpenPublicIp:
Type: Boolean
Label:
en: Mounted Public Net
zh-cn: 挂载公网
Description:
en: Whether to mount the public net.
zh-cn: 是否挂载公网。
Default: true
AllowedValues:
- true
- false
HadoopSshEnable:
Type: Boolean
Label:
en: Remote Logon
zh-cn: 是否开启SSH
Description:
en: Whether to enable SSH.
zh-cn: 是否开启SSH。
Default: false
AllowedValues:
- true
- false
HadoopPassword:
Type: String
Label:
en: Login Password
zh-cn: 登录密码
Description:
en: 'Login password, 8-30 characters, and must contains uppercase, lowercase,
number, and special characters !@#$%^&* <br>note: <b><font color=''blue''>The
password must consists of 4 types of refered symbol, or the stack will fail
to be created</font></b>'
zh-cn: 登录密码,8-30 个字符,且必须同时包含大写字母、小写字母、数字和特殊字符!@#$%^&* <br>注意:<b><font color='blue'>必须占四种,否则资源栈会创建失败</font></b>
ConstraintDescription:
en: 8-30 characters, and must contains uppercase, lowercase, number, and special
characters !@#$%^&*
zh-cn: 8-30 个字符,且必须同时包含大写字母、小写字母、数字和特殊字符!@#$%^&*
MinLength: 8
MaxLength: 30
NoEcho: true
Resources:
EcsVpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: bc288263-8f04-42b0-9d9f-0aff6b79db02
EcsSecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: EcsVpc
SecurityGroupIngress:
- IpProtocol: tcp
NicType: internet
PortRange: 22/22
Priority: 1
SourceCidrIp: 0.0.0.0/0
SecurityGroupName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
Tags:
- Key: best_practice
Value: 083
Metadata:
ALIYUN::ROS::Designer:
id: c6b203b6-aca0-4434-90b5-759b143cce39
EcsVSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: VSwitchZoneId
VpcId:
Ref: EcsVpc
CidrBlock:
Ref: VSwitchCidrBlock
VSwitchName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: f2f9b17f-47db-40ec-b383-6d624da3a9be
EcsInstanceGroup:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
SecurityGroupId:
Ref: EcsSecurityGroup
ImageId:
Ref: EcsImageId
AllocatePublicIP: true
HostName:
Fn::Join:
- ''
- - Filebeat
- -[0,3]
InstanceChargeType: PostPaid
InstanceName:
Fn::Join:
- ''
- - Filebeat
- -[0,3]
InstanceType:
Ref: EcsInstanceType
IoOptimized: optimized
MaxAmount: 1
Password:
Ref: EcsPassword
SystemDiskCategory:
Ref: EcsSystemDiskCategory
SystemDiskSize:
Ref: EcsSystemDiskSize
Tags:
- Key: best_practice
Value: 083
UserData:
Fn::Replace:
- ros-notify:
Fn::GetAtt:
- RosWaitConditionHandle
- CurlCli
- Fn::Join:
- ''
- - "#!/bin/sh \n"
- "yum -y update \n"
- "yum -y install ruby \n"
- "gem install apache-loggen -v 0.0.5 \n"
- "cd /root \n"
- "wget https://ros-template-resources.oss-cn-beijing.aliyuncs.com/SLS_Multi_cloud/nginx-log-generator-master.tar.gz\
\ \n"
- "tar zxvf nginx-log-generator-master.tar.gz \n"
- "cd /root/nginx-log-generator-master \n"
- "./start_log_generator.sh \n"
- "#./view_access_log_records.sh \n"
- "#./stop_log_generator.sh \n"
- "#cat app.rb \n"
- "log_path='/var/log/nginx/access.log' \n"
- "echo '[elastic-7.x]' >> /etc/yum.repos.d/elastic.repo \n"
- "echo 'name=Elastic repository for 7.x packages' >> /etc/yum.repos.d/elastic.repo\
\ \n"
- "echo 'baseurl=https://artifacts.elastic.co/packages/7.x/yum' >> /etc/yum.repos.d/elastic.repo\
\ \n"
- "echo 'gpgcheck=1' >> /etc/yum.repos.d/elastic.repo \n"
- "echo 'gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch' >>\
\ /etc/yum.repos.d/elastic.repo \n"
- "echo 'enabled=1' >> /etc/yum.repos.d/elastic.repo \n"
- "echo 'autorefresh=1' >> /etc/yum.repos.d/elastic.repo \n"
- "echo 'type=rpm-md' >> /etc/yum.repos.d/elastic.repo \n"
- "cd /root \n"
- "wget https://ros-template-resources.oss-cn-beijing.aliyuncs.com/SLS_Multi_cloud/filebeat-7.6.0-x86_64.rpm\
\ \n"
- "rpm -ivh filebeat-7.6.0-x86_64.rpm \n"
- "#sudo yum -y install filebeat \n"
- "sudo chkconfig --add filebeat \n"
- "cp /etc/filebeat/filebeat.yml /etc/filebeat/backup.filebeat.yml \n"
- "sed -i 's/ enabled: false/ enabled: true/' /etc/filebeat/filebeat.yml\
\ \n"
- "sed -i 's?/var/log/?/var/log/nginx/?g' /etc/filebeat/filebeat.yml\
\ \n"
- "sed -i 's? Elasticsearch output? Kafka output?g' /etc/filebeat/filebeat.yml\
\ \n"
- "sed -i 's?output.elasticsearch:?output.kafka:?g' /etc/filebeat/filebeat.yml\
\ \n"
- "sed -i 's#\"localhost:9200\"#\"192.168.0.1:9092\", \"192.168.0.2:9092\"\
, \"192.168.0.3:9092\"#g' /etc/filebeat/filebeat.yml \n"
- "sed -i 's/#protocol: \"https\"/topic: log/g' /etc/filebeat/filebeat.yml\
\ \n"
- "sudo service filebeat start \n"
- "ros-notify -d \"{\\\"Data\\\" : \\\"Success\\\", \\\"Status\\\" : \\\
\"Success\\\"}\" \n"
Metadata:
ALIYUN::ROS::Designer:
id: deb263fb-6999-4981-8e62-eaa089c55128
EmrClusterHadoop:
Type: ALIYUN::EMR::Cluster
Properties:
ZoneId:
Ref: VSwitchZoneId
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
SecurityGroupId:
Ref: EcsSecurityGroup
ChargeType: PostPaid
ClusterType: HADOOP
EmrVer:
Ref: HadoopEmrVer
HighAvailabilityEnable:
Ref: HadoopHighAvailabilityEnable
HostGroup:
- AutoRenew: false
ChargeType: PostPaid
DiskCapacity:
Ref: HadoopDiskCapacity
DiskCount: 1
DiskType:
Ref: HadoopDiskType
HostGroupType: MASTER
InstanceType:
Ref: HadoopInstanceType
NodeCount: 1
Period: 1
SysDiskCapacity:
Ref: HadoopSysDiskCapacity
SysDiskType:
Ref: HadoopDiskType
VSwitchId:
Ref: EcsVSwitch
- AutoRenew: false
ChargeType: PostPaid
DiskCapacity:
Ref: HadoopDiskCapacity
DiskCount: 4
DiskType:
Ref: HadoopDiskType
HostGroupType: CORE
InstanceType:
Ref: HadoopInstanceType
NodeCount:
Ref: HadoopCoreNodeCount
Period: 1
SysDiskCapacity:
Ref: HadoopSysDiskCapacity
SysDiskType:
Ref: HadoopDiskType
VSwitchId:
Ref: EcsVSwitch
IoOptimized: true
IsOpenPublicIp:
Ref: HadoopIsOpenPublicIp
MasterPwd:
Ref: HadoopPassword
Name:
Fn::Join:
- '-'
- - Hadoop
- StackId
- Ref: ALIYUN::StackId
NetType: vpc
SshEnable:
Ref: HadoopSshEnable
UseLocalMetaDb: true
UserInfo:
- Password:
Ref: HadoopPassword
Metadata:
ALIYUN::ROS::Designer:
id: 9ccb2d88-1b62-489d-938e-c0ae414bd7b8
EmrClusterKafka:
Type: ALIYUN::EMR::Cluster
Properties:
ZoneId:
Ref: VSwitchZoneId
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
SecurityGroupId:
Ref: EcsSecurityGroup
ChargeType: PostPaid
ClusterType: KAFKA
EmrVer:
Ref: KafkaEmrVer
HighAvailabilityEnable: false
HostGroup:
- AutoRenew: false
ChargeType: PostPaid
DiskCapacity:
Ref: KafkaDiskCapacity
DiskCount: 4
DiskType:
Ref: KafkaDiskType
HostGroupType: MASTER
InstanceType:
Ref: KafkaInstanceType
NodeCount: 1
Period: 1
SysDiskCapacity:
Ref: KafkaSysDiskCapacity
SysDiskType:
Ref: KafkaDiskType
VSwitchId:
Ref: EcsVSwitch
- AutoRenew: false
ChargeType: PostPaid
DiskCapacity:
Ref: KafkaDiskCapacity
DiskCount: 4
DiskType:
Ref: KafkaDiskType
HostGroupType: CORE
InstanceType:
Ref: KafkaInstanceType
NodeCount: 2
Period: 1
SysDiskCapacity:
Ref: KafkaSysDiskCapacity
SysDiskType:
Ref: KafkaDiskType
VSwitchId:
Ref: EcsVSwitch
IoOptimized: true
IsOpenPublicIp:
Ref: KafkaIsOpenPublicIp
MasterPwd:
Ref: KafkaPassword
Name:
Fn::Join:
- '-'
- - Kafka
- StackId
- Ref: ALIYUN::StackId
NetType: vpc
SshEnable:
Ref: KafkaSshEnable
UseLocalMetaDb: true
UserInfo:
- Password:
Ref: KafkaPassword
Metadata:
ALIYUN::ROS::Designer:
id: a7d45830-779a-4f39-819a-76002e786976
RosWaitConditionHandle:
Type: ALIYUN::ROS::WaitConditionHandle
Properties: {}
Metadata:
ALIYUN::ROS::Designer:
id: 0c0bdeb7-72f4-4e95-9f48-a46bd0e857cf
RosWaitCondition:
Type: ALIYUN::ROS::WaitCondition
Properties:
Count: 1
Handle:
Ref: RosWaitConditionHandle
Timeout: 3600
Metadata:
ALIYUN::ROS::Designer:
id: ad473fe3-a869-429d-892a-03079b0c707c
SlsProjectOtherCloud:
Type: ALIYUN::SLS::Project
Properties:
Name:
Ref: ProjectName
Metadata:
ALIYUN::ROS::Designer:
id: 4881b9a5-c4cf-458d-97fe-a3be8055c5b7
SlbLogstoreOtherCloud:
Type: ALIYUN::SLS::Logstore
Properties:
AppendMeta: true
AutoSplit: true
EnableTracking: true
LogstoreName:
Ref: LogstoreName
MaxSplitShard: 64
PreserveStorage: true
ProjectName:
Ref: SlsProjectOtherCloud
ShardCount: 2
TTL: 30
DependsOn:
- SlsProjectOtherCloud
Metadata:
ALIYUN::ROS::Designer:
id: 7ce6fa6a-7c1d-482d-959c-1c34b1c39b6c
SlsIndexOtherCloud:
Type: ALIYUN::SLS::Index
Properties:
FullTextIndex:
Enable: true
LogstoreName:
Fn::GetAtt:
- SlbLogstoreOtherCloud
- LogstoreName
ProjectName:
Ref: SlsProjectOtherCloud
DependsOn:
- SlbLogstoreOtherCloud
Metadata:
ALIYUN::ROS::Designer:
id: 44e414e4-b51a-41e0-97a6-9e97fca55dba
SlsMachineGroup:
Type: ALIYUN::SLS::MachineGroup
Properties:
GroupName:
Ref: MachineGroupName
GroupType: ''
MachineIdentifyType: ip
MachineList:
- X.X.X.X
ProjectName:
Ref: SlsProjectOtherCloud
DependsOn:
- SlbLogstoreOtherCloud
- SlsIndexOtherCloud
- SlsProjectOtherCloud
Metadata:
ALIYUN::ROS::Designer:
id: dea1c384-1831-4ddc-a933-eacb8176a9a8
Outputs:
EcsInstanceId:
Value:
Fn::GetAtt:
- EcsInstanceGroup
- InstanceIds
EcsInstancePublicIps:
Value:
Fn::GetAtt:
- EcsInstanceGroup
- PublicIps
HadoopClusterId:
Value:
Fn::GetAtt:
- EmrClusterHadoop
- ClusterId
HadoopClusterMasterNodeInnerIps:
Value:
Fn::GetAtt:
- EmrClusterHadoop
- MasterNodeInnerIps
KafkaClusterId:
Value:
Fn::GetAtt:
- EmrClusterKafka
- ClusterId
KafkaClusterMasterNodeInnerIps:
Value:
Fn::GetAtt:
- EmrClusterKafka
- MasterNodeInnerIps
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- ProjectName
- LogstoreName
- MachineGroupName
Label:
default: SLS
- Parameters:
- VpcCidrBlock
- VSwitchZoneId
- VSwitchCidrBlock
Label:
default: VPC
- Parameters:
- EcsImageId
- EcsInstanceType
- EcsSystemDiskCategory
- EcsSystemDiskSize
- EcsPassword
Label:
default: ECS
- Parameters:
- KafkaEmrVer
- KafkaInstanceType
- KafkaDiskType
- KafkaSysDiskCapacity
- KafkaDiskCapacity
- KafkaIsOpenPublicIp
- KafkaSshEnable
- KafkaPassword
Label:
default: EMR-Kafka
- Parameters:
- HadoopEmrVer
- HadoopHighAvailabilityEnable
- HadoopInstanceType
- HadoopCoreNodeCount
- HadoopDiskType
- HadoopSysDiskCapacity
- HadoopDiskCapacity
- HadoopIsOpenPublicIp
- HadoopSshEnable
- HadoopPassword
Label:
default: EMR-Hadoop
TemplateTags:
- acs:solution:数据分析:SLS多云日志采集、处理及分析
ALIYUN::ROS::Designer:
0c0bdeb7-72f4-4e95-9f48-a46bd0e857cf:
position:
x: 667
y: 60
size:
height: 60
width: 60
z: 0
14d019a5-bb75-4635-841e-9680980af12f:
source:
id: a7d45830-779a-4f39-819a-76002e786976
target:
id: c6b203b6-aca0-4434-90b5-759b143cce39
z: 1
44e414e4-b51a-41e0-97a6-9e97fca55dba:
position:
x: 667
y: 161
size:
height: 60
width: 60
z: 0
4881b9a5-c4cf-458d-97fe-a3be8055c5b7:
position:
x: 861
y: 269
size:
height: 60
width: 60
z: 0
7ac699dc-acc1-4085-8226-b4b128354df2:
source:
id: ad473fe3-a869-429d-892a-03079b0c707c
target:
id: 0c0bdeb7-72f4-4e95-9f48-a46bd0e857cf
z: 1
7ce6fa6a-7c1d-482d-959c-1c34b1c39b6c:
position:
x: 667
y: 362
size:
height: 60
width: 60
z: 0
8a8f8a77-be4c-4a04-83b9-7e7e49d52451:
source:
id: deb263fb-6999-4981-8e62-eaa089c55128
target:
id: c6b203b6-aca0-4434-90b5-759b143cce39
z: 1
9ccb2d88-1b62-489d-938e-c0ae414bd7b8:
position:
x: 354
y: 201
size:
height: 60
width: 60
z: 2
9d293858-2a4f-43ee-9c30-684e01d4c4b3:
source:
id: dea1c384-1831-4ddc-a933-eacb8176a9a8
target:
id: 4881b9a5-c4cf-458d-97fe-a3be8055c5b7
z: 1
a7d45830-779a-4f39-819a-76002e786976:
position:
x: 441
y: 131
size:
height: 60
width: 60
z: 2
ad473fe3-a869-429d-892a-03079b0c707c:
position:
x: 860
y: 60
size:
height: 60
width: 60
z: 0
bc288263-8f04-42b0-9d9f-0aff6b79db02:
embeds:
- f2f9b17f-47db-40ec-b383-6d624da3a9be
- c6b203b6-aca0-4434-90b5-759b143cce39
position:
x: 192
y: 50
size:
height: 443
width: 407.0537109375
z: 0
c6b203b6-aca0-4434-90b5-759b143cce39:
position:
x: 354
y: 395
size:
height: 60
width: 60
z: 1
c6fe931b-7068-4f30-b508-f6a123a337d5:
source:
id: 9ccb2d88-1b62-489d-938e-c0ae414bd7b8
target:
id: c6b203b6-aca0-4434-90b5-759b143cce39
z: 1
dea1c384-1831-4ddc-a933-eacb8176a9a8:
position:
x: 861
y: 158
size:
height: 60
width: 60
z: 0
deb263fb-6999-4981-8e62-eaa089c55128:
position:
x: 264