Skip to content

Commit f02962c

Browse files
custom rdma subnet, updated defaults
1 parent 13febd5 commit f02962c

File tree

4 files changed

+53
-33
lines changed

4 files changed

+53
-33
lines changed

bastion.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ resource "null_resource" "cluster" {
172172
compute = var.node_count > 0 ? zipmap(local.cluster_instances_names, local.cluster_instances_ips) : zipmap([],[])
173173
public_subnet = data.oci_core_subnet.public_subnet.cidr_block,
174174
private_subnet = data.oci_core_subnet.private_subnet.cidr_block,
175+
rdma_network = cidrhost(var.rdma_subnet, 0),
176+
rdma_netmask = cidrnetmask(var.rdma_subnet),
175177
nfs = var.node_count > 0 ? local.cluster_instances_names[0] : "",
176178
home_nfs = var.home_nfs,
177179
scratch_nfs = var.use_scratch_nfs && var.node_count > 0,

inventory.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ bastion
1313
compute
1414
[all:vars]
1515
ansible_connection=ssh
16-
rdma_network=192.168.168.0
17-
rdma_netmask=255.255.252.0
16+
rdma_network=${rdma_network}
17+
rdma_netmask=${rdma_netmask}
1818
public_subnet=${public_subnet}
1919
private_subnet=${private_subnet}
2020
nvme_path=/mnt/localdisk/
@@ -47,4 +47,4 @@ autoscaling_monitoring=${autoscaling_monitoring}
4747
autoscaling_mysql_service=${autoscaling_mysql_service}
4848
monitoring_mysql_ip=${monitoring_mysql_ip}
4949
admin_password = ${admin_password}
50-
admin_username = ${admin_username}
50+
admin_username = ${admin_username}

schema.yaml

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ variableGroups:
116116
- ${private_subnet_id}
117117
- ${vcn_subnet}
118118
- ${public_subnet}
119-
- ${additional_subnet}
120119
- ${private_subnet}
120+
- ${rdma_subnet}
121+
- ${additional_subnet}
121122
- title: "Software"
122123
variables:
123124
- ${slurm}
@@ -146,6 +147,7 @@ variables:
146147
title: "target compartment"
147148
type: oci:identity:compartment:id
148149
default: ${compartment_ocid}
150+
required: true
149151
ad:
150152
type: oci:identity:availabilitydomain:name
151153
visible: complexExpression
@@ -162,13 +164,11 @@ variables:
162164
type: boolean
163165
title: "use custom cluster name"
164166
description: "Use custom name for the cluster"
165-
required: true
166167
default: false
167168
ldap:
168169
type: boolean
169170
title: "Configure LDAP authentication from bastion"
170171
description: "When selected nodes will be configured to use LDAP authentication. User and group management can be performed using cluster commands."
171-
required: true
172172
default: true
173173
cluster_name:
174174
title: "Name of the cluster"
@@ -191,6 +191,7 @@ variables:
191191
dependsOn:
192192
compartmentId: ${targetCompartment}
193193
required: true
194+
default: VM.Standard2.4
194195
bastion_ocpus:
195196
type: integer
196197
description: Number of OCPU's for flex shape
@@ -212,7 +213,7 @@ variables:
212213
- eq:
213214
- ${bastion_shape}
214215
- "VM.Standard.A1.Flex"
215-
required: false
216+
required: true
216217
bastion_custom_memory:
217218
title: Use custom memory size
218219
type: boolean
@@ -257,16 +258,13 @@ variables:
257258
- "VM.Standard.A1.Flex"
258259
- and:
259260
- ${bastion_custom_memory}
260-
required: false
261-
261+
required: true
262262

263-
264263
use_standard_image:
265264
type: boolean
266265
title: "use standard bastion image"
267266
description: >
268267
"Use standard bastion image, otherwise provide custom image OCID"
269-
required: true
270268
default: true
271269
visible:
272270
and:
@@ -287,6 +285,7 @@ variables:
287285
description: "Custom image ID for Bastion"
288286
type: string
289287
default: "opc"
288+
required: true
290289
visible:
291290
not:
292291
- ${use_standard_image}
@@ -301,6 +300,7 @@ variables:
301300
- ${unsupported_bastion}
302301
- not:
303302
- ${use_standard_image}
303+
default: "image.ocid"
304304

305305
bastion_image_compartment:
306306
title: "bastion image compartment"
@@ -339,7 +339,6 @@ variables:
339339
and:
340340
- ${use_advanced}
341341
default: false
342-
required: true
343342
bastion_block_volume_size:
344343
required: true
345344
type: integer
@@ -387,6 +386,7 @@ variables:
387386
and:
388387
- ${use_advanced}
389388
- ${use_cluster_nfs}
389+
reguired: true
390390
cluster_network:
391391
title: Use cluster network
392392
type: boolean
@@ -410,6 +410,7 @@ variables:
410410
instance_pool_shape:
411411
title: "Shape of the Compute Nodes"
412412
required: true
413+
default: "VM.Standard2.4"
413414
type: oci:core:instanceshape:name
414415
dependsOn:
415416
compartmentId: ${targetCompartment}
@@ -440,7 +441,7 @@ variables:
440441
- eq:
441442
- ${instance_pool_shape}
442443
- "VM.Standard.A1.Flex"
443-
required: false
444+
required: true
444445

445446
instance_pool_custom_memory:
446447
title: Use custom memory size
@@ -486,7 +487,7 @@ variables:
486487
- "VM.Standard.A1.Flex"
487488
- and:
488489
- ${instance_pool_custom_memory}
489-
required: false
490+
required: true
490491

491492
node_count:
492493
required: true
@@ -497,9 +498,8 @@ variables:
497498
description: "Number of Compute Instances (Permanent Cluster when autoscaling)"
498499

499500
hyperthreading:
500-
required: true
501501
type: boolean
502-
title: "Keep Hyperthreading enabled"
502+
title: "Hyperthreading enabled"
503503
default: true
504504
description: "When unchecked SMT will be disabled"
505505

@@ -515,7 +515,6 @@ variables:
515515
type: boolean
516516
title: "use marketplace image"
517517
description: "Use marketplace image, otherwise provide custom image OCID"
518-
required: true
519518
default: true
520519

521520
marketplace_listing:
@@ -628,13 +627,15 @@ variables:
628627
- ${cluster_network}
629628
- ${use_advanced}
630629
- ${use_scratch_nfs}
630+
required: true
631631
scratch_nfs_type_pool:
632632
type: enum
633633
title: "Scratch storage configuration"
634634
enum:
635635
- "none"
636636
- "block"
637637
default: "none"
638+
required: true
638639
visible:
639640
and:
640641
- not:
@@ -702,6 +703,7 @@ variables:
702703
title: "NFS scratch space mount point"
703704
description: "Path to NFS share"
704705
default: "/nfs/scratch"
706+
required: true
705707
type: string
706708
visible:
707709
and:
@@ -712,7 +714,6 @@ variables:
712714
title: "Use Existing VCN"
713715
description: "Use existing VCN or create new one"
714716
default: false
715-
required: true
716717
vcn_compartment:
717718
title: "VCN compartment"
718719
type: oci:identity:compartment:id
@@ -735,13 +736,15 @@ variables:
735736
vcnId: ${vcn_id}
736737
hidePrivateSubnet: true
737738
visible: ${use_existing_vcn}
739+
required: true
738740
private_subnet_id:
739741
type: oci:core:subnet:id
740742
dependsOn:
741743
compartmentId: ${vcn_compartment}
742744
vcnId: ${vcn_id}
743745
hidePublicSubnet: true
744746
visible: ${use_existing_vcn}
747+
required: true
745748
vcn_subnet:
746749
type: string
747750
title: "VCN IP range"
@@ -769,6 +772,12 @@ variables:
769772
visible:
770773
not:
771774
- ${use_existing_vcn}
775+
rdma_subnet:
776+
type: string
777+
title: "RDMA subnet IP range"
778+
default: "192.168.168.0/22"
779+
description: "Must be the same size as private subnet"
780+
required: true
772781
private_subnet:
773782
type: string
774783
title: "Private subnet IP range"
@@ -784,9 +793,9 @@ variables:
784793
default: "0.0.0.0/0"
785794
description: "Allowed SSH network in CIDR notation"
786795
required: true
787-
visible:
788-
not:
789-
- ${use_existing_vcn}
796+
# visible:
797+
# not:
798+
# - ${use_existing_vcn}
790799
slurm:
791800
type: boolean
792801
title: "Install SLURM"
@@ -797,6 +806,7 @@ variables:
797806
type: String
798807
title: "Queue Name"
799808
default: "compute"
809+
required: true
800810
description: "Add the permanent cluster to a specific queue, workq is the default queue"
801811
visible:
802812
- ${slurm}
@@ -876,6 +886,7 @@ variables:
876886
description: "Compartment to add the FSS Mount Target and File System"
877887
type: oci:identity:compartment:id
878888
default: ${targetCompartment}
889+
required: true
879890
visible:
880891
and:
881892
- ${add_nfs}
@@ -892,6 +903,7 @@ variables:
892903
default: ${ad}
893904
description: "FSS Availability Domain"
894905
title: "FSS Availability Domain"
906+
required: true
895907

896908
nfs_target_path:
897909
type: string
@@ -901,10 +913,12 @@ variables:
901913
visible:
902914
and:
903915
- ${add_nfs}
916+
required: true
904917
nfs_source_IP:
905918
type: string
906919
title: "NFS server IP"
907920
default: "0.0.0.0"
921+
required: true
908922
description: "IP address of the NFS server"
909923
visible:
910924
and:
@@ -917,6 +931,7 @@ variables:
917931
default: "/app"
918932
description: "Value of the path on the NFS server"
919933
visible: ${add_nfs}
934+
required: true
920935
nfs_options:
921936
type: string
922937
title: "Options"
@@ -931,16 +946,17 @@ variables:
931946
type: string
932947
title: "MySQL Shape Name"
933948
default: "MySQL.VM.Standard.E3.1.16GB"
949+
required: true
934950
description: "MySQL Shape Name"
935951
visible:
936952
and:
937953
- ${autoscaling_mysql_service}
938954

939-
940955
admin_username:
941956
type: string
942957
title: "MySQL Monitoring username"
943958
default: "admin"
959+
required: true
944960
description: ""
945961
visible:
946962
and:
@@ -953,6 +969,7 @@ variables:
953969
visible:
954970
and:
955971
- ${autoscaling_mysql_service}
972+
required: true
956973

957974
autoscaling_monitoring:
958975
type: boolean

variables.tf

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ variable "targetCompartment" {}
44
variable "ad" {}
55
variable "ssh_key" {}
66
variable "cluster_network" { default = true }
7-
variable "use_custom_name" {}
7+
variable "use_custom_name" { default = false }
88
variable "cluster_name" { default = "" }
99
variable "bastion_ad" {}
10-
variable "bastion_shape" {}
10+
variable "bastion_shape" { default = "VM.Standard2.4" }
1111
variable "use_standard_image" { default= true }
1212
variable "custom_bastion_image" {
1313
type = string
@@ -16,9 +16,9 @@ variable "custom_bastion_image" {
1616
variable "bastion_boot_volume_size" {}
1717
variable "cluster_network_shape" { default = "BM.HPC2.36" }
1818
variable "instance_pool_shape" { default = "VM.Standard2.4" }
19-
variable "node_count" {}
20-
variable "boot_volume_size" {}
21-
variable "use_marketplace_image" {}
19+
variable "node_count" { default = 2 }
20+
variable "boot_volume_size" { default = 50 }
21+
variable "use_marketplace_image" { default = true}
2222
variable "image" { default = "ocid1.image.oc1..aaaaaaaa5yxem7wzie34hi5km4qm2t754tsfxrjuefyjivebrxjad4jcj5oa" }
2323
variable "image_ocid" { default = "ocid1.image.oc1..aaaaaaaa5yxem7wzie34hi5km4qm2t754tsfxrjuefyjivebrxjad4jcj5oa" }
2424
variable "unsupported_bastion_image" { default = "" }
@@ -28,13 +28,14 @@ variable "cluster_nfs_path" { default = "/nfs/cluster" }
2828
variable "scratch_nfs_path" { default = "/nfs/scratch" }
2929
variable "vcn_compartment" { default = ""}
3030
variable "vcn_id" { default = ""}
31-
variable "use_existing_vcn" {}
31+
variable "use_existing_vcn" { default = false}
3232
variable "public_subnet_id" { default = ""}
3333
variable "private_subnet_id" { default = ""}
34-
variable "vcn_subnet" { default = "" }
35-
variable "public_subnet" { default = "" }
36-
variable "additional_subnet" { default = "" }
37-
variable "private_subnet" { default = "" }
34+
variable "vcn_subnet" { default = "172.16.0.0/21" }
35+
variable "public_subnet" { default = "172.16.0.0/24" }
36+
variable "additional_subnet" { default = "172.16.1.0/24" }
37+
variable "rdma_subnet" { default = "192.168.168.0/22" }
38+
variable "private_subnet" { default = "172.16.4.0/22" }
3839
variable "ssh_cidr" { default = "0.0.0.0/0" }
3940
variable "slurm" { default = false }
4041
variable "ldap" { default = true }
@@ -155,4 +156,4 @@ variable "admin_username" {
155156
variable "admin_password" {
156157
type = string
157158
default = "Monitor2021!"
158-
}
159+
}

0 commit comments

Comments
 (0)