Skip to content

Commit 3c6f243

Browse files
Merge pull request #35 from oracle-quickstart/2.10.5
2.10.5
2 parents b9531c4 + dca58a1 commit 3c6f243

File tree

148 files changed

+2057
-651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+2057
-651
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ or:
3232
## Supported OS:
3333
The stack allowa various combination of OS. Here is a list of what has been tested. We can't guarantee any of the other combination.
3434

35-
| Bastion | Compute |
35+
| Controller | Compute |
3636
|---------------|--------------|
3737
| OL7 | OL7 |
3838
| OL7 | OL8 |
@@ -41,7 +41,7 @@ The stack allowa various combination of OS. Here is a list of what has been test
4141
| OL8 | OL7 |
4242
| Ubuntu 20.04 | Ubuntu 20.04 |
4343

44-
When switching to Ubuntu, make sure the username is changed from opc to Ubuntu in the ORM for both the bastion and compute nodes.
44+
When switching to Ubuntu, make sure the username is changed from opc to Ubuntu in the ORM for both the controller and compute nodes.
4545
## How is resizing different from autoscaling ?
4646
Autoscaling is the idea of launching new clusters for jobs in the queue.
4747
Resizing a cluster is changing the size of a cluster. In some case growing your cluster may be a better idea, be aware that this may lead to capacity errors. Because Oracle CLoud RDMA is non virtualized, you get much better performance but it also means that we had to build HPC islands and split our capacity across different network blocks.
@@ -62,7 +62,7 @@ Resizing of HPC cluster with Cluster Network consist of 2 major sub-steps:
6262

6363
## resize.sh usage
6464

65-
The resize.sh is deployed on the bastion node as part of the HPC cluster Stack deployment. Unreachable nodes have been causing issues. If nodes in the inventory are unreachable, we will not do cluster modification to the cluster unless --remove_unreachable is also specified. That will terminate the unreachable nodes before running the action that was requested (Example Adding a node)
65+
The resize.sh is deployed on the controller node as part of the HPC cluster Stack deployment. Unreachable nodes have been causing issues. If nodes in the inventory are unreachable, we will not do cluster modification to the cluster unless --remove_unreachable is also specified. That will terminate the unreachable nodes before running the action that was requested (Example Adding a node)
6666

6767
```
6868
/opt/oci-hpc/bin/resize.sh -h
@@ -92,7 +92,7 @@ optional arguments:
9292
OCID of the localhost
9393
--cluster_name CLUSTER_NAME
9494
Name of the cluster to resize. Defaults to the name
95-
included in the bastion
95+
included in the controller
9696
--nodes NODES [NODES ...]
9797
List of nodes to delete
9898
--no_reconfigure If present. Does not rerun the playbooks
@@ -284,14 +284,14 @@ When the cluster is already being destroyed, it will have a file `/opt/oci-hpc/a
284284
## Autoscaling Monitoring
285285
If you selected the autoscaling monitoring, you can see what nodes are spinning up and down as well as running and queued jobs. Everything will run automatically except the import of the Dashboard in Grafana due to a problem in the Grafana API.
286286

287-
To do it manually, in your browser of choice, navigate to bastionIP:3000. Username and password are admin/admin, you can change those during your first login. Go to Configuration -> Data Sources. Select autoscaling. Enter Password as Monitor1234! and click on 'Save & test'. Now click on the + sign on the left menu bar and select import. Click on Upload JSON file and upload the file the is located at `/opt/oci-hpc/playbooks/roles/autoscaling_mon/files/dashboard.json`. Select autoscaling (MySQL) as your datasource.
287+
To do it manually, in your browser of choice, navigate to controllerIP:3000. Username and password are admin/admin, you can change those during your first login. Go to Configuration -> Data Sources. Select autoscaling. Enter Password as Monitor1234! and click on 'Save & test'. Now click on the + sign on the left menu bar and select import. Click on Upload JSON file and upload the file the is located at `/opt/oci-hpc/playbooks/roles/autoscaling_mon/files/dashboard.json`. Select autoscaling (MySQL) as your datasource.
288288

289289
You will now see the dashboard.
290290

291291

292292
# LDAP
293-
If selected bastion host will act as an LDAP server for the cluster. It's strongly recommended to leave default, shared home directory.
294-
User management can be performed from the bastion using ``` cluster ``` command.
293+
If selected controller host will act as an LDAP server for the cluster. It's strongly recommended to leave default, shared home directory.
294+
User management can be performed from the controller using ``` cluster ``` command.
295295
Example of cluster command to add a new user:
296296
```cluster user add name```
297297
By default, a `privilege` group is created that has access to the NFS and can have sudo access on all nodes (Defined at the stack creation. This group has ID 9876) The group name can be modified.
@@ -301,21 +301,21 @@ To avoid generating a user-specific key for passwordless ssh between nodes, use
301301

302302
# Shared home folder
303303

304-
By default, the home folder is NFS shared directory between all nodes from the bastion. You have the possibility to use a FSS to share it as well to keep working if the bastion goes down. You can either create the FSS from the GUI. Be aware that it will get destroyed when you destroy the stack. Or you can pass an existing FSS IP and path. If you share an existing FSS, do not use /home as mountpoint. The stack will take care of creating a $nfsshare/home directory and mounting it at /home after copying all the appropriate files.
304+
By default, the home folder is NFS shared directory between all nodes from the controller. You have the possibility to use a FSS to share it as well to keep working if the controller goes down. You can either create the FSS from the GUI. Be aware that it will get destroyed when you destroy the stack. Or you can pass an existing FSS IP and path. If you share an existing FSS, do not use /home as mountpoint. The stack will take care of creating a $nfsshare/home directory and mounting it at /home after copying all the appropriate files.
305305

306306
# Deploy within a private subnet
307307

308-
If "true", this will create a private endpoint in order for Oracle Resource Manager to configure the bastion VM and the future nodes in private subnet(s).
309-
* If "Use Existing Subnet" is false, Terraform will create 2 private subnets, one for the bastion and one for the compute nodes.
310-
* If "Use Existing Subnet" is also true, the user must indicate a private subnet for the bastion VM. For the compute nodes, they can reside in another private subnet or the same private subent as the bastion VM.
308+
If "true", this will create a private endpoint in order for Oracle Resource Manager to configure the controller VM and the future nodes in private subnet(s).
309+
* If "Use Existing Subnet" is false, Terraform will create 2 private subnets, one for the controller and one for the compute nodes.
310+
* If "Use Existing Subnet" is also true, the user must indicate a private subnet for the controller VM. For the compute nodes, they can reside in another private subnet or the same private subent as the controller VM.
311311

312-
The bastion VM will reside in a private subnet. Therefore, the creation of a "bastion service" (https://docs.oracle.com/en-us/iaas/Content/Bastion/Concepts/bastionoverview.htm), a VPN or FastConnect connection is required. If a public subnet exists in the VCN, adapting the security lists and creating a jump host can also work. Finally, a Peering can also be established betwen the private subnet and another VCN reachable by the user.
312+
The controller VM will reside in a private subnet. Therefore, the creation of a "controller service" (https://docs.oracle.com/en-us/iaas/Content/controller/Concepts/controlleroverview.htm), a VPN or FastConnect connection is required. If a public subnet exists in the VCN, adapting the security lists and creating a jump host can also work. Finally, a Peering can also be established betwen the private subnet and another VCN reachable by the user.
313313

314314

315315

316316
## max_nodes_partition.py usage
317317

318-
Use the alias "max_nodes" to run the python script max_nodes_partition.py. You can run this script only from bastion.
318+
Use the alias "max_nodes" to run the python script max_nodes_partition.py. You can run this script only from controller.
319319

320320
$ max_nodes --> Information about all the partitions and their respective clusters, and maximum number of nodes distributed evenly per partition
321321

@@ -324,13 +324,13 @@ $ max_nodes --include_cluster_names xxx yyy zzz --> where xxx, yyy, zzz are clus
324324

325325
## validation.py usage
326326

327-
Use the alias "validate" to run the python script validation.py. You can run this script only from bastion.
327+
Use the alias "validate" to run the python script validation.py. You can run this script only from controller.
328328

329329
The script performs these checks.
330330
-> Check the number of nodes is consistent across resize, /etc/hosts, slurm, topology.conf, OCI console, inventory files.
331331
-> PCIe bandwidth check
332332
-> GPU Throttle check
333-
-> Check whether md5 sum of /etc/hosts file on nodes matches that on bastion
333+
-> Check whether md5 sum of /etc/hosts file on nodes matches that on controller
334334

335335
Provide at least one argument: [-n NUM_NODES] [-p PCIE] [-g GPU_THROTTLE] [-e ETC_HOSTS]
336336

@@ -343,7 +343,7 @@ Below are some examples for running this script.
343343

344344
validate -n y --> This will validate that the number of nodes is consistent across resize, /etc/hosts, slurm, topology.conf, OCI console, inventory files. The clusters considered will be the default cluster if any and cluster(s) found in /opt/oci-hpc/autoscaling/clusters directory. The number of nodes considered will be from the resize script using the clusters we got before.
345345

346-
validate -n y -cn <cluster name file> --> This will validate that the number of nodes is consistent across resize, /etc/hosts, slurm, topology.conf, OCI console, inventory files. It will also check whether md5 sum of /etc/hosts file on all nodes matches that on bastion. The clusters considered will be from the file specified by -cn option. The number of nodes considered will be from the resize script using the clusters from the file.
346+
validate -n y -cn <cluster name file> --> This will validate that the number of nodes is consistent across resize, /etc/hosts, slurm, topology.conf, OCI console, inventory files. It will also check whether md5 sum of /etc/hosts file on all nodes matches that on controller. The clusters considered will be from the file specified by -cn option. The number of nodes considered will be from the resize script using the clusters from the file.
347347

348348
validate -p y -cn <cluster name file> --> This will run the pcie bandwidth check. The clusters considered will be from the file specified by -cn option. The number of nodes considered will be from the resize script using the clusters from the file.
349349

@@ -364,12 +364,12 @@ validate -n y -p y -g y -e y -cn <cluster name file>
364364
## /opt/oci-hpc/scripts/collect_logs.py
365365
This is a script to collect nvidia bug report, sosreport, console history logs.
366366

367-
The script needs to be run from the bastion. In the case where the host is not ssh-able, it will get only console history logs for the same.
367+
The script needs to be run from the controller. In the case where the host is not ssh-able, it will get only console history logs for the same.
368368

369369
It requires the below argument.
370370
--hostname <HOSTNAME>
371371

372-
And --compartment-id <COMPARTMENT_ID> is optional (i.e. assumption is the host is in the same compartment as the bastion).
372+
And --compartment-id <COMPARTMENT_ID> is optional (i.e. assumption is the host is in the same compartment as the controller).
373373

374374
Where HOSTNAME is the node name for which you need the above logs and COMPARTMENT_ID is the OCID of the compartment where the node is.
375375

autoscaling/tf_init/cluster-network-configuration.tf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ resource "oci_core_instance_configuration" "cluster-network-instance_configurati
1414
display_name = local.cluster_name
1515
metadata = {
1616
# TODO: add user key to the authorized_keys
17-
ssh_authorized_keys = file("/home/${var.bastion_username}/.ssh/id_rsa.pub")
17+
ssh_authorized_keys = file("/home/${var.controller_username}/.ssh/id_rsa.pub")
1818
user_data = base64encode(data.template_file.config.rendered)
1919
}
2020
agent_config {
@@ -44,6 +44,18 @@ resource "oci_core_instance_configuration" "cluster-network-instance_configurati
4444

4545
}
4646
}
47+
dynamic "platform_config" {
48+
for_each = var.BIOS ? range(1) : []
49+
content {
50+
type = local.platform_type
51+
are_virtual_instructions_enabled = var.virt_instr
52+
is_access_control_service_enabled = var.access_ctrl
53+
is_input_output_memory_management_unit_enabled = var.IOMMU
54+
is_symmetric_multi_threading_enabled = var.SMT
55+
numa_nodes_per_socket = var.numa_nodes_per_socket == "Default" ? (local.platform_type == "GENERIC_BM" ? "NPS1": "NPS4" ): var.numa_nodes_per_socket
56+
percentage_of_cores_enabled = var.percentage_of_cores_enabled == "Default" ? 100 : tonumber(var.percentage_of_cores_enabled)
57+
}
58+
}
4759
shape = var.cluster_network_shape
4860
source_details {
4961
source_type = "image"
@@ -52,7 +64,7 @@ resource "oci_core_instance_configuration" "cluster-network-instance_configurati
5264
}
5365
}
5466
}
55-
67+
5668
source = "NONE"
5769
}
5870

autoscaling/tf_init/compute-nodes.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ resource "oci_core_instance" "compute_cluster_instances" {
3737
}
3838

3939
metadata = {
40-
ssh_authorized_keys = file("/home/${var.bastion_username}/.ssh/id_rsa.pub")
40+
ssh_authorized_keys = file("/home/${var.controller_username}/.ssh/id_rsa.pub")
4141
user_data = base64encode(data.template_file.config.rendered)
4242
}
4343
source_details {
File renamed without changes.

autoscaling/tf_init/bastion_update.tf renamed to autoscaling/tf_init/controller_update.tf

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
locals {
3-
bastion_path = "${var.autoscaling_folder}/clusters/${var.cluster_name}"
3+
controller_path = "${var.autoscaling_folder}/clusters/${var.cluster_name}"
44
}
55

66
resource "null_resource" "create_path" {
77
provisioner "local-exec" {
8-
command = "mkdir -p ${local.bastion_path}"
8+
command = "mkdir -p ${local.controller_path}"
99
}
1010
}
1111

1212
resource "local_file" "hosts" {
1313
depends_on = [null_resource.create_path,oci_core_cluster_network.cluster_network]
1414
content = join("\n", local.cluster_instances_ips)
15-
filename = "${local.bastion_path}/hosts_${var.cluster_name}"
15+
filename = "${local.controller_path}/hosts_${var.cluster_name}"
1616
}
1717

1818
resource "local_file" "inventory" {
1919
depends_on = [oci_core_cluster_network.cluster_network, oci_core_cluster_network.cluster_network]
20-
content = templatefile("${local.bastion_path}/inventory.tpl", {
21-
bastion_name = var.bastion_name,
22-
bastion_ip = var.bastion_ip,
20+
content = templatefile("${local.controller_path}/inventory.tpl", {
21+
controller_name = var.controller_name,
22+
controller_ip = var.controller_ip,
2323
backup_name = var.backup_name,
2424
backup_ip = var.backup_ip,
2525
login_name = var.login_name,
@@ -29,6 +29,8 @@ resource "local_file" "inventory" {
2929
private_subnet = var.private_subnet,
3030
rdma_network = cidrhost(var.rdma_subnet, 0),
3131
rdma_netmask = cidrnetmask(var.rdma_subnet),
32+
zone_name = var.zone_name,
33+
dns_entries = var.dns_entries,
3234
nfs = var.use_scratch_nfs ? local.cluster_instances_names[0] : "",
3335
scratch_nfs = var.use_scratch_nfs,
3436
cluster_nfs = var.use_cluster_nfs,
@@ -53,10 +55,10 @@ resource "local_file" "inventory" {
5355
enroot = var.enroot,
5456
spack = var.spack,
5557
ldap = var.ldap,
56-
bastion_block = var.bastion_block,
58+
controller_block = var.controller_block,
5759
login_block = var.login_block,
5860
scratch_nfs_type = local.scratch_nfs_type,
59-
bastion_mount_ip = var.bastion_mount_ip,
61+
controller_mount_ip = var.controller_mount_ip,
6062
login_mount_ip = var.login_mount_ip,
6163
cluster_mount_ip = local.mount_ip,
6264
cluster_name = local.cluster_name,
@@ -71,13 +73,13 @@ resource "local_file" "inventory" {
7173
privilege_sudo = var.privilege_sudo,
7274
privilege_group_name = var.privilege_group_name,
7375
latency_check = var.latency_check
74-
bastion_username = var.bastion_username,
76+
controller_username = var.controller_username,
7577
compute_username = var.compute_username,
7678
pam = var.pam,
7779
sacct_limits = var.sacct_limits,
7880
use_compute_agent=var.use_compute_agent
7981
})
80-
filename = "${local.bastion_path}/inventory"
82+
filename = "${local.controller_path}/inventory"
8183
}
8284

8385

autoscaling/tf_init/data.tf

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ data "oci_core_subnet" "private_subnet" {
3636
}
3737

3838
data "oci_core_subnet" "public_subnet" {
39-
subnet_id = local.bastion_subnet_id
39+
subnet_id = local.controller_subnet_id
4040
}
4141

4242
data "oci_core_images" "linux" {
@@ -50,4 +50,19 @@ data "oci_core_images" "linux" {
5050
}
5151
}
5252

53+
data "oci_core_vcn" "vcn" {
54+
vcn_id = local.vcn_id
55+
}
5356

57+
data "oci_dns_views" "dns_views" {
58+
compartment_id = var.targetCompartment
59+
scope = "PRIVATE"
60+
display_name = data.oci_core_vcn.vcn.display_name
61+
}
62+
63+
data "oci_dns_zones" "dns_zones" {
64+
compartment_id = var.targetCompartment
65+
name = "${var.zone_name}"
66+
zone_type = "PRIMARY"
67+
scope = "PRIVATE"
68+
}

autoscaling/tf_init/instance-pool-configuration.tf

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ resource "oci_core_instance_configuration" "instance_pool_configuration" {
1414
display_name = local.cluster_name
1515
metadata = {
1616
# TODO: add user key to the authorized_keys
17-
ssh_authorized_keys = file("/home/${var.bastion_username}/.ssh/id_rsa.pub")
17+
ssh_authorized_keys = file("/home/${var.controller_username}/.ssh/id_rsa.pub")
1818
user_data = base64encode(data.template_file.config.rendered)
1919
}
2020
agent_config {
@@ -29,7 +29,18 @@ resource "oci_core_instance_configuration" "instance_pool_configuration" {
2929
memory_in_gbs = var.instance_pool_custom_memory ? var.instance_pool_memory : 16 * shape_config.value
3030
}
3131
}
32-
32+
dynamic "platform_config" {
33+
for_each = var.BIOS ? range(1) : []
34+
content {
35+
type = local.platform_type
36+
are_virtual_instructions_enabled = var.virt_instr
37+
is_access_control_service_enabled = var.access_ctrl
38+
is_input_output_memory_management_unit_enabled = var.IOMMU
39+
is_symmetric_multi_threading_enabled = var.SMT
40+
numa_nodes_per_socket = var.numa_nodes_per_socket == "Default" ? (local.platform_type == "GENERIC_BM" ? "NPS1": "NPS4" ): var.numa_nodes_per_socket
41+
percentage_of_cores_enabled = var.percentage_of_cores_enabled == "Default" ? 100 : tonumber(var.percentage_of_cores_enabled)
42+
}
43+
}
3344
source_details {
3445
source_type = "image"
3546
boot_volume_size_in_gbs = var.boot_volume_size

0 commit comments

Comments
 (0)