-
Notifications
You must be signed in to change notification settings - Fork 1
/
create-cluster.sh
executable file
·53 lines (51 loc) · 1.31 KB
/
create-cluster.sh
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
#!/usr/bin/env bash
set -e
set -x
KEYNAME=${1? "Must provide KeyName parameter"}
CLUSTERID=$(aws emr create-cluster --name "Spark sessionization" --release-label emr-5.8.0 \
--tags "Name=Spark Sessionization" \
--applications Name=Spark Name=Hadoop Name=Ganglia \
--instance-groups '
[
{
"Name": "Driver",
"InstanceCount": 1,
"InstanceGroupType": "MASTER",
"InstanceType": "m4.4xlarge",
"EbsConfiguration": {
"EbsBlockDeviceConfigs": [
{
"VolumeSpecification": {
"SizeInGB": 128,
"VolumeType": "gp2"
},
"VolumesPerInstance": 1
}
]
},
"BidPrice": "0.25"
},
{
"Name": "Worker nodes",
"InstanceGroupType": "CORE",
"InstanceCount": 4,
"InstanceType": "m4.4xlarge",
"EbsConfiguration": {
"EbsBlockDeviceConfigs": [
{
"VolumeSpecification": {
"SizeInGB": 128,
"VolumeType": "gp2"
},
"VolumesPerInstance": 1
}
]
},
"BidPrice": "0.25"
}
]' \
--log-uri 's3://logs.multe.co.uk/elasticmapreduce/' \
--enable-debugging \
--use-default-roles \
--configurations file://./spark-configs.json \
--ec2-attributes KeyName=$KEYNAME,SubnetId=subnet-c434a8a3,AdditionalMasterSecurityGroups=sg-49a3e531| grep -o 'j-\w*')