-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_proc.tf
74 lines (70 loc) · 1.8 KB
/
data_proc.tf
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
variable "project_id" {
description = "project id"
}
variable "region" {
description = "region"
}
resource "google_storage_bucket" "spark-nv" {
project = var.project_id
name = "rapids-sparknv-2022"
location = var.region
force_destroy = true
lifecycle_rule {
condition {
age = 3
}
action {
type = "Delete"
}
}
}
resource "google_dataproc_cluster" "accelerated_cluster" {
project = var.project_id
provider = google-beta
name = "rapidsai-spark-nvgpu"
region = var.region
cluster_config {
endpoint_config {
enable_http_port_access = "true"
}
gce_cluster_config {
zone = "${var.region}-b"
metadata = {
rapids-runtime = "SPARK"
gpu-driver-provider = "NVIDIA"
}
}
staging_bucket = google_storage_bucket.spark-nv.name
master_config {
num_instances = 1
machine_type = "n1-standard-16"
}
worker_config {
accelerators {
accelerator_type = "nvidia-tesla-t4"
accelerator_count = "1"
}
num_instances = 2
machine_type = "n1-highmem-32"
disk_config {
num_local_ssds = 1
}
}
initialization_action {
script = "gs://goog-dataproc-initialization-actions-${var.region}/gpu/install_gpu_driver.sh"
timeout_sec = 3600
}
initialization_action {
script = "gs://goog-dataproc-initialization-actions-${var.region}/rapids/rapids.sh"
timeout_sec = 3600
}
initialization_action {
script = "gs://goog-dataproc-initialization-actions-${var.region}/kafka/kafka.sh"
timeout_sec = 3600
}
software_config {
image_version = "2.0-ubuntu18"
optional_components = ["JUPYTER", "ZEPPELIN", "DOCKER", "PRESTO", "FLINK", "ZOOKEEPER"]
}
}
}