Skip to content

Commit 27a5fcd

Browse files
authored
Merge pull request #4548 from sharabiani/slinky-030
Slinky upgraded to v0.3.1
2 parents c767389 + de1d55c commit 27a5fcd

4 files changed

Lines changed: 93 additions & 24 deletions

File tree

community/examples/hpc-slinky/hpc-slinky.yaml

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,14 @@ vars:
2424
authorized_cidr: # <your-ip-address>/32
2525
gcp_public_cidrs_access_enabled: false
2626
exporter_pod_monitoring_path: $(ghpc_stage("./exporter-pod-monitoring.yaml"))
27+
base_pool_machine_type: e2-standard-8
28+
base_pool_size: 2
2729
debug_nodeset_replicas: 2
28-
h3_nodeset_replicas: 2
30+
compute_pool_machine_type: h3-standard-88
31+
compute_pool_size: 2
32+
compute_nodeset_replicas: 2
33+
login_rootSshAuthorizedKeys: [] # The `/root/.ssh/authorized_keys` file to write in Login nodes, represented as a list.
34+
# - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx user@example.com
2935

3036
deployment_groups:
3137
- group: primary
@@ -83,18 +89,20 @@ deployment_groups:
8389
source: modules/compute/gke-node-pool
8490
use: [gke_cluster, node_pool_service_account]
8591
settings:
86-
initial_node_count: 1
92+
initial_node_count: $(vars.base_pool_size)
93+
autoscaling_total_min_nodes: $(vars.base_pool_size)
8794
disk_type: pd-balanced
88-
machine_type: e2-standard-4
95+
machine_type: $(vars.base_pool_machine_type)
8996
zones: $(vars.zones)
9097

91-
- id: h3_pool
98+
- id: compute_pool
9299
source: modules/compute/gke-node-pool
93100
use: [gke_cluster, node_pool_service_account]
94101
settings:
95-
initial_node_count: 2
102+
initial_node_count: $(vars.compute_pool_size)
103+
autoscaling_total_min_nodes: $(vars.compute_pool_size)
96104
disk_type: pd-balanced
97-
machine_type: h3-standard-88
105+
machine_type: $(vars.compute_pool_machine_type)
98106
zones: $(vars.zones)
99107

100108
- id: slinky
@@ -128,12 +136,12 @@ deployment_groups:
128136
- key: "node.kubernetes.io/instance-type"
129137
operator: In
130138
values:
131-
- e2-standard-4
139+
- $(vars.base_pool_machine_type)
132140
partition:
133141
enabled: true
134-
- name: h3
142+
- name: compute
135143
enabled: true
136-
replicas: $(vars.h3_nodeset_replicas)
144+
replicas: $(vars.compute_nodeset_replicas)
137145
image:
138146
# Use the default nodeset image
139147
repository: ""
@@ -153,9 +161,33 @@ deployment_groups:
153161
- key: "node.kubernetes.io/instance-type"
154162
operator: In
155163
values:
156-
- h3-standard-88
164+
- $(vars.compute_pool_machine_type)
157165
partition:
158166
enabled: true
167+
login:
168+
enabled: true
169+
replicas: 1
170+
rootSshAuthorizedKeys: $(vars.login_rootSshAuthorizedKeys)
171+
image:
172+
# Use the default login image
173+
repository: ""
174+
tag: ""
175+
resources:
176+
requests:
177+
cpu: 500m
178+
memory: 4Gi
179+
limits:
180+
cpu: 500m
181+
memory: 4Gi
182+
affinity:
183+
nodeAffinity:
184+
requiredDuringSchedulingIgnoredDuringExecution:
185+
nodeSelectorTerms:
186+
- matchExpressions:
187+
- key: "node.kubernetes.io/instance-type"
188+
operator: In
189+
values:
190+
- $(vars.base_pool_machine_type)
159191
outputs: [instructions]
160192

161193
- id: slurm_exporter_monitoring

community/modules/scheduler/slinky/README.md

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This module creates a [Slinky](https://slinky.ai) cluster and nodesets, for a [Slurm](https://slurm.schedmd.com/documentation.html)-on-Kubernetes HPC setup.
44

5-
The setup closely follows the [documented quickstart installation](https://github.com/SlinkyProject/slurm-operator/blob/main/docs/quickstart.md), with the exception of a more lightweight monitoring/metrics setup. Consider scraping the Slurm Exporter with [Google Managed Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus) and a [PodMonitoring resource](https://cloud.google.com/stackdriver/docs/managed-prometheus/setup-managed#gmp-pod-monitoring), rather than a cluster-local Kube Prometheus Stack (although both are possible with module parameterizations).
5+
The setup closely follows the [documented quickstart installation v0.3.1](https://github.com/SlinkyProject/slurm-operator/blob/v0.3.1/docs/quickstart.md), with the exception of a more lightweight monitoring/metrics setup. Consider scraping the Slurm Exporter with [Google Managed Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus) and a [PodMonitoring resource](https://cloud.google.com/stackdriver/docs/managed-prometheus/setup-managed#gmp-pod-monitoring), rather than a cluster-local Kube Prometheus Stack (although both are possible with module parameterizations). It also provisions a login node (pod).
66

77
Through `cert_manager_values`, `prometheus_values`, `slurm_operator_values`, and `slurm_values`, you can customize the Helm releases that constitute Slinky. The Cert Manager, Slurm Operator, and Slurm Helm installations are required, whereas the Prometheus Helm chart is optional (and not included by default). Set `install_kube_prometheus_stack=true` to install Prometheus.
88

@@ -41,30 +41,66 @@ Through `cert_manager_values`, `prometheus_values`, `slurm_operator_values`, and
4141
- h3-standard-88
4242
partition:
4343
enabled: true
44+
login: # Login node
45+
enabled: true
46+
replicas: 1
47+
rootSshAuthorizedKeys: []
48+
image:
49+
# Use the default login image
50+
repository: ""
51+
tag: ""
52+
resources:
53+
requests:
54+
cpu: 500m
55+
memory: 4Gi
56+
limits:
57+
cpu: 500m
58+
memory: 4Gi
59+
affinity:
60+
nodeAffinity:
61+
requiredDuringSchedulingIgnoredDuringExecution:
62+
nodeSelectorTerms:
63+
- matchExpressions:
64+
- key: "node.kubernetes.io/instance-type"
65+
operator: In
66+
values:
67+
- e2-standard-8 # base_pool's machine-type
4468
```
4569
4670
This creates a Slinky cluster with the following attributes:
4771
4872
* Slinky Helm releases are installed atop the `gke_cluster` (from the `gke-cluster` module).
49-
* Slinky system components are scheduled on the `base_pool` (from the `gke-node-pool` module).
73+
* Slinky system components and a login node are scheduled on the `base_pool` (from the `gke-node-pool` module).
5074
* This node affinity specification is recommended, to save HPC hardware for HPC nodesets, and to ensure Helm releases are fully uninstalled before all nodepools are deleted during a `gcluster destroy`.
5175
* One Slurm nodeset is provisioned, with resource requests/limits and node affinities aligned to h3-standard-88 VMs.
5276

5377
### Usage
5478

55-
To test Slurm functionality, connect to the controller and use Slurm client commands:
79+
To test Slurm functionality, connect to the controller or the login node and use Slurm client commands:
5680

5781
```bash
5882
gcloud container clusters get-credentials YOUR_CLUSTER --region YOUR_REGION
5983
```
6084

85+
Connect to the controller:
86+
6187
```bash
6288
kubectl exec -it statefulsets/slurm-controller \
6389
--namespace=slurm \
6490
-- bash --login
6591
```
6692

67-
On the controller pod (e.g. host slurm@slurm-controller-0), run the following commands to quickly test if Slurm is functioning:
93+
Connect to the login node:
94+
95+
```bash
96+
SLURM_LOGIN_IP="$(kubectl get services -n slurm -l app.kubernetes.io/instance=slurm,app.kubernetes.io/name=login -o jsonpath="{.items[0].status.loadBalancer.ingress[0].ip}")"
97+
## Assuming your public SSH key was configured in `login.rootSshAuthorizedKeys[]`.
98+
ssh -p 2222 root@${SLURM_LOGIN_IP}
99+
## Assuming SSSD is configured.
100+
ssh -p 2222 ${USER}@${SLURM_LOGIN_IP}
101+
```
102+
103+
On the connected pod (e.g. host slurm@slurm-controller-0), run the following commands to quickly test if Slurm is functioning:
68104

69105
```bash
70106
sinfo
@@ -108,19 +144,19 @@ No modules.
108144

109145
| Name | Description | Type | Default | Required |
110146
|------|-------------|------|---------|:--------:|
111-
| <a name="input_cert_manager_chart_version"></a> [cert\_manager\_chart\_version](#input\_cert\_manager\_chart\_version) | Version of the Cert Manager chart to install. | `string` | `"v1.17.1"` | no |
147+
| <a name="input_cert_manager_chart_version"></a> [cert\_manager\_chart\_version](#input\_cert\_manager\_chart\_version) | Version of the Cert Manager chart to install. | `string` | `"v1.18.2"` | no |
112148
| <a name="input_cert_manager_values"></a> [cert\_manager\_values](#input\_cert\_manager\_values) | Value overrides for the Cert Manager release | `any` | <pre>{<br/> "crds": {<br/> "enabled": true<br/> }<br/>}</pre> | no |
113149
| <a name="input_cluster_id"></a> [cluster\_id](#input\_cluster\_id) | An identifier for the GKE cluster resource with format projects/<project\_id>/locations/<region>/clusters/<name>. | `string` | n/a | yes |
114150
| <a name="input_install_kube_prometheus_stack"></a> [install\_kube\_prometheus\_stack](#input\_install\_kube\_prometheus\_stack) | Install the Kube Prometheus Stack. | `bool` | `false` | no |
115151
| <a name="input_install_slurm_chart"></a> [install\_slurm\_chart](#input\_install\_slurm\_chart) | Install slurm-operator chart. | `bool` | `true` | no |
116152
| <a name="input_install_slurm_operator_chart"></a> [install\_slurm\_operator\_chart](#input\_install\_slurm\_operator\_chart) | Install slurm-operator chart. | `bool` | `true` | no |
117153
| <a name="input_node_pool_names"></a> [node\_pool\_names](#input\_node\_pool\_names) | Names of node pools, for use in node affinities (Slinky system components). | `list(string)` | `null` | no |
118154
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | The project ID that hosts the GKE cluster. | `string` | n/a | yes |
119-
| <a name="input_prometheus_chart_version"></a> [prometheus\_chart\_version](#input\_prometheus\_chart\_version) | Version of the Kube Prometheus Stack chart to install. | `string` | `"70.4.1"` | no |
155+
| <a name="input_prometheus_chart_version"></a> [prometheus\_chart\_version](#input\_prometheus\_chart\_version) | Version of the Kube Prometheus Stack chart to install. | `string` | `"77.0.1"` | no |
120156
| <a name="input_prometheus_values"></a> [prometheus\_values](#input\_prometheus\_values) | Value overrides for the Prometheus release | `any` | <pre>{<br/> "installCRDs": true<br/>}</pre> | no |
121-
| <a name="input_slurm_chart_version"></a> [slurm\_chart\_version](#input\_slurm\_chart\_version) | Version of the Slurm chart to install. | `string` | `"0.2.1"` | no |
157+
| <a name="input_slurm_chart_version"></a> [slurm\_chart\_version](#input\_slurm\_chart\_version) | Version of the Slurm chart to install. | `string` | `"0.3.1"` | no |
122158
| <a name="input_slurm_namespace"></a> [slurm\_namespace](#input\_slurm\_namespace) | slurm namespace for charts | `string` | `"slurm"` | no |
123-
| <a name="input_slurm_operator_chart_version"></a> [slurm\_operator\_chart\_version](#input\_slurm\_operator\_chart\_version) | Version of the Slurm Operator chart to install. | `string` | `"0.2.1"` | no |
159+
| <a name="input_slurm_operator_chart_version"></a> [slurm\_operator\_chart\_version](#input\_slurm\_operator\_chart\_version) | Version of the Slurm Operator chart to install. | `string` | `"0.3.1"` | no |
124160
| <a name="input_slurm_operator_namespace"></a> [slurm\_operator\_namespace](#input\_slurm\_operator\_namespace) | slurm namespace for charts | `string` | `"slinky"` | no |
125161
| <a name="input_slurm_operator_repository"></a> [slurm\_operator\_repository](#input\_slurm\_operator\_repository) | Value overrides for the Slinky release | `string` | `"oci://ghcr.io/slinkyproject/charts"` | no |
126162
| <a name="input_slurm_operator_values"></a> [slurm\_operator\_values](#input\_slurm\_operator\_values) | Value overrides for the Slinky release | `any` | `{}` | no |

community/modules/scheduler/slinky/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ variable "node_pool_names" {
3232
variable "cert_manager_chart_version" {
3333
description = "Version of the Cert Manager chart to install."
3434
type = string
35-
default = "v1.17.1"
35+
default = "v1.18.2"
3636
}
3737

3838
variable "cert_manager_values" {
@@ -48,7 +48,7 @@ variable "cert_manager_values" {
4848
variable "slurm_operator_chart_version" {
4949
description = "Version of the Slurm Operator chart to install."
5050
type = string
51-
default = "0.2.1"
51+
default = "0.3.1"
5252
}
5353

5454
variable "slurm_operator_values" {
@@ -60,7 +60,7 @@ variable "slurm_operator_values" {
6060
variable "slurm_chart_version" {
6161
description = "Version of the Slurm chart to install."
6262
type = string
63-
default = "0.2.1"
63+
default = "0.3.1"
6464
}
6565

6666
variable "slurm_values" {
@@ -79,7 +79,7 @@ variable "install_kube_prometheus_stack" {
7979
variable "prometheus_chart_version" {
8080
description = "Version of the Kube Prometheus Stack chart to install."
8181
type = string
82-
default = "70.4.1"
82+
default = "77.0.1"
8383
}
8484

8585
variable "prometheus_values" {

examples/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,8 +924,9 @@ The SchedMD Slinky Project deploys Slurm on Kubernetes. Slinky is particularly u
924924

925925
This blueprint creates a simple Slinky installation on top of Google Kubernetes Engine, with the following notable deviations from the Slinky quickstart setup:
926926
1. Two nodesets are implemented, following the pattern of an HPC nodeset and a debug nodeset.
927-
2. A lightweight, GCP-native metrics/monitoring system is adopted, rather than the Slinky-documented cluster-local Kube Prometheus Stack.
928-
3. Node affinities for both system components and compute nodesets are more explicitly defined, to improve stability, control, and HPC hardware utilization.
927+
2. A login node is implemented.
928+
3. A lightweight, GCP-native metrics/monitoring system is adopted, rather than the Slinky-documented cluster-local Kube Prometheus Stack.
929+
4. Node affinities for system components, the login node, and compute nodesets are more explicitly defined, to improve stability, control, and HPC hardware utilization.
929930

930931
While H3 compute-optimized VMs are used for the HPC nodeset, the machine type can easily be switched (including to GPU-accelerated instances).
931932

0 commit comments

Comments
 (0)