-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy path006-LaunchPresto.sh
executable file
·42 lines (40 loc) · 1.81 KB
/
006-LaunchPresto.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
# Creates a small dataproc cluster for benchmarking
# Be sure to delete the cluster created in 1-LaunchDataproc.sh before running this
set -e
# Create master instance
gcloud compute \
--project "digital-arbor-400" \
instances create "tpcds-presto-m" \
--zone "us-central1-f" \
--machine-type "n2-highmem-32" \
--image-project "ubuntu-os-cloud" \
--image "ubuntu-1804-bionic-v20200218" \
--metadata "PrestoRole=Master,PrestoMaster=tpcds-presto-m" \
--metadata-from-file "startup-script=Presto.sh" \
--boot-disk-size "10" \
--local-ssd interface=NVME --local-ssd interface=NVME --local-ssd interface=NVME --local-ssd interface=NVME \
--local-ssd interface=NVME --local-ssd interface=NVME --local-ssd interface=NVME --local-ssd interface=NVME
# Create worker instance group
gcloud compute \
--project "digital-arbor-400" \
instance-templates delete "presto-worker" \
--quiet \
|| echo "...ignoring error"
gcloud compute \
--project "digital-arbor-400" \
instance-templates create "presto-worker" \
--machine-type "n2-highmem-32" \
--image-project "ubuntu-os-cloud" \
--image "ubuntu-1804-bionic-v20200218" \
--metadata "PrestoRole=Worker,PrestoMaster=tpcds-presto-m" \
--metadata-from-file "startup-script=Presto.sh" \
--boot-disk-size "10" \
--local-ssd interface=NVME --local-ssd interface=NVME --local-ssd interface=NVME --local-ssd interface=NVME \
--local-ssd interface=NVME --local-ssd interface=NVME --local-ssd interface=NVME --local-ssd interface=NVME
gcloud compute \
--project "digital-arbor-400" \
instance-groups managed create "tpcds-presto-w" \
--zone "us-central1-f" \
--base-instance-name "tpcds-presto-w" \
--template "presto-worker" \
--size "3"