Skip to content

Commit 6eaa557

Browse files
authored
feat: add support for singlestore on gcp and terraform output variables. (PSCLOUD-92, PSCLOUD-161) (#312)
* feat: (pscloud-92) enable SAS with SingleStore on GCP * PSCLOUD-161 adding output block for storage type backend and netapp volume path
1 parent c83a222 commit 6eaa557

File tree

2 files changed

+121
-0
lines changed

2 files changed

+121
-0
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# !NOTE! - These are only a subset of CONFIG-VARS.md provided for sample.
2+
# Customize this file to add any variables from 'CONFIG-VARS.md' that you want
3+
# to change their default values.
4+
5+
# **************** REQUIRED VARIABLES ****************
6+
# These required variables' values MUST be provided by the User
7+
prefix = "<prefix-value>"
8+
location = "<gcp-zone-or-region>" # e.g., "us-east1-b"
9+
project = "<gcp-project-id>"
10+
service_account_keyfile = "<service-account-json-file>"
11+
#
12+
# **************** REQUIRED VARIABLES ****************
13+
14+
# **************** RECOMMENDED VARIABLES ****************
15+
default_public_access_cidrs = [] # e.g., ["123.45.6.89/32"]
16+
ssh_public_key = "~/.ssh/id_rsa.pub"
17+
# **************** RECOMMENDED VARIABLES ****************
18+
19+
# add labels to the created resources
20+
tags = {} # e.g., { "key1" = "value1", "key2" = "value2" }
21+
22+
# Postgres config - By having this entry a database server is created. If you do not
23+
# need an external database server remove the 'postgres_servers'
24+
# block below.
25+
postgres_servers = {
26+
default = {},
27+
}
28+
29+
# GKE config
30+
kubernetes_version = "1.32"
31+
default_nodepool_min_nodes = 2
32+
default_nodepool_vm_type = "n2-highmem-8"
33+
34+
# Node Pools config
35+
node_pools = {
36+
cas = {
37+
"vm_type" = "n2-highmem-16"
38+
"os_disk_size" = 200
39+
"min_nodes" = 1
40+
"max_nodes" = 5
41+
"node_taints" = ["workload.sas.com/class=cas:NoSchedule"]
42+
"node_labels" = {
43+
"workload.sas.com/class" = "cas"
44+
}
45+
"local_ssd_count" = 2
46+
"accelerator_count" = 0
47+
"accelerator_type" = ""
48+
},
49+
compute = {
50+
"vm_type" = "n2-highmem-4"
51+
"os_disk_size" = 200
52+
"min_nodes" = 1
53+
"max_nodes" = 5
54+
"node_taints" = ["workload.sas.com/class=compute:NoSchedule"]
55+
"node_labels" = {
56+
"workload.sas.com/class" = "compute"
57+
"launcher.sas.com/prepullImage" = "sas-programming-environment"
58+
}
59+
"local_ssd_count" = 1
60+
"accelerator_count" = 0
61+
"accelerator_type" = ""
62+
},
63+
stateless = {
64+
"vm_type" = "n2-highmem-4"
65+
"os_disk_size" = 200
66+
"min_nodes" = 1
67+
"max_nodes" = 5
68+
"node_taints" = ["workload.sas.com/class=stateless:NoSchedule"]
69+
"node_labels" = {
70+
"workload.sas.com/class" = "stateless"
71+
}
72+
"local_ssd_count" = 0
73+
"accelerator_count" = 0
74+
"accelerator_type" = ""
75+
},
76+
stateful = {
77+
"vm_type" = "n2-highmem-4"
78+
"os_disk_size" = 200
79+
"min_nodes" = 1
80+
"max_nodes" = 3
81+
"node_taints" = ["workload.sas.com/class=stateful:NoSchedule"]
82+
"node_labels" = {
83+
"workload.sas.com/class" = "stateful"
84+
}
85+
"local_ssd_count" = 0
86+
"accelerator_count" = 0
87+
"accelerator_type" = ""
88+
},
89+
singlestore = {
90+
"vm_type" = "n2-highmem-16"
91+
"os_disk_size" = 200
92+
"min_nodes" = 0
93+
"max_nodes" = 7
94+
"node_taints" = ["workload.sas.com/class=singlestore:NoSchedule"]
95+
"node_labels" = {
96+
"workload.sas.com/class" = "singlestore"
97+
}
98+
"local_ssd_count" = 2
99+
"accelerator_count" = 0
100+
"accelerator_type" = ""
101+
}
102+
}
103+
# Jump Box
104+
create_jump_public_ip = true
105+
jump_vm_admin = "jumpuser"
106+
107+
# Storage for Viya Compute Services
108+
# Supported storage_type values
109+
# "standard" - Custom managed NFS Server VM and disks
110+
# "ha" - Google Filestore or Google NetApp Volumes
111+
storage_type = "ha"
112+
storage_type_backend = "filestore" # "filestore" is the default, use "netapp" to create Google NetApp Volumes

outputs.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,12 @@ output "cluster_api_mode" {
108108
output "gke_pod_subnet_cidr" {
109109
value = var.gke_pod_subnet_cidr
110110
}
111+
112+
output "storage_type_backend" {
113+
value = var.storage_type_backend
114+
description = "If storage_type=standard the default is nfs. If storage_type=ha the default is filestore"
115+
}
116+
117+
output "netapp_volume_path" {
118+
value = var.storage_type_backend == "netapp" ? var.netapp_volume_path : "export"
119+
}

0 commit comments

Comments
 (0)