-
Notifications
You must be signed in to change notification settings - Fork 35
/
cluster.yml
142 lines (142 loc) · 3.31 KB
/
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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建EMR集群,含VPC、子网、安全组配置,支持主节点与核心节点自定义,预设HADOOP类型,SSD云盘,PostPaid计费。
en: Create an EMR (Elastic Map Reduce) cluster inclusive of VPC (Virtual Private
Cloud), subnet, and security group configurations. Supports customization of master
and core nodes, with pre-configured HADOOP type, SSD cloud disks, and PostPaid
billing.
Parameters:
ZoneId:
Type: String
VpcName:
Type: String
Default: mytest
VSwitchName:
Type: String
Default: mytest
SecurityGroupName:
Type: String
Default: mytest
ClusterMasterSysDiskCapacity:
Type: Number
Default: 120
ClusterInstanceType:
Type: String
Default: ecs.g5.xlarge
ClusterCoreSysDiskCapacity:
Type: Number
Default: 120
ClusterEmrVer:
Type: String
Default: EMR-3.22.4
ClusterCoreDiskCapacity:
Type: Number
Default: 80
ClusterCoreNodeCount:
Type: Number
Default: 2
ClusterPassword:
Type: String
Default: Admin123!
ClusterMasterDiskCapacity:
Type: Number
Default: 80
ClusterDiskType:
Type: String
Default: CLOUD_SSD
Resources:
VPC:
Type: ALIYUN::ECS::VPC
Properties:
VpcName:
Ref: VpcName
CidrBlock: 192.168.0.0/16
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: VPC
VSwitchName:
Ref: VSwitchName
CidrBlock: 192.168.10.0/24
DependsOn: VPC
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: VPC
SecurityGroupName:
Ref: SecurityGroupName
DependsOn: VPC
EmrCluster:
Type: ALIYUN::EMR::Cluster
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: VPC
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Ref: SecurityGroup
UseLocalMetaDb: false
IoOptimized: true
HostGroup:
- DiskType:
Ref: ClusterDiskType
HostGroupType: MASTER
DiskCount: 1
DiskCapacity:
Ref: ClusterMasterDiskCapacity
NodeCount: 1
SysDiskType:
Ref: ClusterDiskType
ChargeType: PostPaid
VSwitchId:
Ref: VSwitch
AutoRenew: false
Period: 1
SysDiskCapacity:
Ref: ClusterMasterSysDiskCapacity
InstanceType:
Ref: ClusterInstanceType
- DiskType:
Ref: ClusterDiskType
HostGroupType: CORE
DiskCount: 4
DiskCapacity:
Ref: ClusterCoreDiskCapacity
NodeCount:
Ref: ClusterCoreNodeCount
SysDiskType:
Ref: ClusterDiskType
ChargeType: PostPaid
VSwitchId:
Ref: VSwitch
AutoRenew: false
Period: 1
SysDiskCapacity:
Ref: ClusterCoreSysDiskCapacity
InstanceType:
Ref: ClusterInstanceType
EmrVer:
Ref: ClusterEmrVer
ClusterType: HADOOP
Name:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
MasterPwd:
Ref: ClusterPassword
ChargeType: PostPaid
NetType: vpc
Outputs:
ClusterId:
Description: The ID of the cluster.
Value:
Fn::GetAtt:
- EmrCluster
- ClusterId