From 9560edbb52e59d06dd4e07d81e8fbeac6cd739c7 Mon Sep 17 00:00:00 2001
From: Nicolas Perrin <nicolas.perrin@inria.fr>
Date: Thu, 23 Jan 2025 09:51:18 +0100
Subject: [PATCH] [sophia][esterel2] add basic configuration generated by rake
 mass:create

---
 .../sophia/clusters/esterel2/esterel2.json    |  20 +++
 .../clusters/esterel2/nodes/esterel2-1.json   | 128 ++++++++++++++++++
 .../sophia/clusters/esterel2/esterel2.yaml    |  41 ++++++
 .../sophia/clusters/esterel2/nodes.yaml.erb   |  80 +++++++++++
 4 files changed, 269 insertions(+)
 create mode 100644 data/grid5000/sites/sophia/clusters/esterel2/esterel2.json
 create mode 100644 data/grid5000/sites/sophia/clusters/esterel2/nodes/esterel2-1.json
 create mode 100644 input/grid5000/sites/sophia/clusters/esterel2/esterel2.yaml
 create mode 100644 input/grid5000/sites/sophia/clusters/esterel2/nodes.yaml.erb

diff --git a/data/grid5000/sites/sophia/clusters/esterel2/esterel2.json b/data/grid5000/sites/sophia/clusters/esterel2/esterel2.json
new file mode 100644
index 00000000000..063327d1d8e
--- /dev/null
+++ b/data/grid5000/sites/sophia/clusters/esterel2/esterel2.json
@@ -0,0 +1,20 @@
+{
+  "boot_type": "uefi",
+  "created_at": "Thu, 01 Jan 1970 00:00:00 GMT",
+  "exotic": false,
+  "kavlan": false,
+  "manufactured_at": "1970-01-01",
+  "metrics": [
+
+  ],
+  "model": "Cluster Model",
+  "priority": 197001,
+  "queues": [
+    "admin",
+    "testing"
+  ],
+  "redfish": true,
+  "type": "cluster",
+  "uid": "esterel2",
+  "warranty_end": "1970-01-01"
+}
\ No newline at end of file
diff --git a/data/grid5000/sites/sophia/clusters/esterel2/nodes/esterel2-1.json b/data/grid5000/sites/sophia/clusters/esterel2/nodes/esterel2-1.json
new file mode 100644
index 00000000000..faec2349957
--- /dev/null
+++ b/data/grid5000/sites/sophia/clusters/esterel2/nodes/esterel2-1.json
@@ -0,0 +1,128 @@
+{
+  "architecture": {
+    "cpu_core_numbering": "contiguous",
+    "nb_cores": 72,
+    "nb_procs": 1,
+    "nb_threads": 72,
+    "platform_type": "x86_64"
+  },
+  "bios": {
+    "release_date": "01/01/2000",
+    "vendor": "Unknown",
+    "version": 1
+  },
+  "bmc_version": "v1",
+  "chassis": {
+    "manufactured_at": "1970-01-01",
+    "manufacturer": "Unknown",
+    "name": "Unknown",
+    "warranty_end": "1970-01-01"
+  },
+  "exotic": false,
+  "main_memory": {
+    "ram_size": 8
+  },
+  "management_tools": {
+    "bmc_vendor_tool": "ipmitool",
+    "ipmitool": {
+      "retries": 5
+    }
+  },
+  "memory_devices": [
+    {
+      "device": "dimm_proc 1 dimm 1",
+      "size": 8,
+      "technology": "dram"
+    }
+  ],
+  "network_adapters": [
+    {
+      "device": "eth0",
+      "driver": "mlx_core",
+      "enabled": true,
+      "interface": "Ethernet",
+      "ip": "172.16.131.2",
+      "ip6": "2001:660:4406:800:4::2",
+      "kavlan": false,
+      "mac": "14:18:77:61:c4:45",
+      "management": false,
+      "mountable": true,
+      "mounted": true,
+      "name": "enp1s0f0np0",
+      "network_address": "esterel2-1.sophia.grid5000.fr",
+      "rate": 10000000000,
+      "switch": null,
+      "switch_port": null
+    },
+    {
+      "device": "bmc",
+      "enabled": true,
+      "interface": "Ethernet",
+      "ip": "172.17.131.2",
+      "kavlan": false,
+      "mac": "14:18:77:61:c4:47",
+      "management": true,
+      "mountable": false,
+      "mounted": false,
+      "network_address": "esterel2-1-bmc.sophia.grid5000.fr"
+    }
+  ],
+  "nodeset": "esterel2",
+  "operating_system": {
+    "cstate_driver": "unknown",
+    "cstate_governor": "unknown",
+    "ht_enabled": true,
+    "pstate_driver": "unknwon",
+    "pstate_governor": "unknown",
+    "turboboost_enabled": true
+  },
+  "performance": {
+    "core_flops": 128,
+    "node_flops": 9216
+  },
+  "processor": {
+    "cache_l1": null,
+    "cache_l1d": 8,
+    "cache_l1i": 8,
+    "cache_l2": 8,
+    "cache_l3": 8,
+    "clock_speed": 8,
+    "ht_capable": true,
+    "instruction_set": "x86-64",
+    "microarchitecture": "Haswell",
+    "microcode": "0xd000001",
+    "model": "Unknown",
+    "other_description": "description",
+    "vendor": "vendor",
+    "version": "vendor"
+  },
+  "redfish": true,
+  "software": {
+    "forced-deployment-timestamp": 202007300948,
+    "postinstall-version": "1.2025011610",
+    "standard-environment": "debian11-x64-std"
+  },
+  "storage_devices": [
+    {
+      "by_id": "",
+      "by_path": "/dev/disk/by-path/dummy",
+      "id": "disk0",
+      "interface": "SAS",
+      "model": "unknown",
+      "size": 8,
+      "storage": "SSD",
+      "vendor": "Unknown"
+    }
+  ],
+  "supported_job_types": {
+    "besteffort": true,
+    "deploy": true,
+    "max_walltime": 0,
+    "queues": [
+      "admin",
+      "testing"
+    ]
+  },
+  "type": "node",
+  "uid": "esterel2-1"
+}
\ No newline at end of file
diff --git a/input/grid5000/sites/sophia/clusters/esterel2/esterel2.yaml b/input/grid5000/sites/sophia/clusters/esterel2/esterel2.yaml
new file mode 100644
index 00000000000..bcf6b4b6411
--- /dev/null
+++ b/input/grid5000/sites/sophia/clusters/esterel2/esterel2.yaml
@@ -0,0 +1,41 @@
+---
+model: Cluster Model # TODO: change this value.
+created_at: 1970-01-01 # TODO: change this value
+kavlan: false
+boot_type: uefi # TODO: specify if 'uefi' (ideally) or 'bios' (legacy, if no other choice)
+exotic: false # TODO: specify if 'true' or 'false'
+queues:
+  - admin
+  - testing
+nodes:
+  esterel2-1:
+    chassis:
+      manufactured_at: 1970-01-01 # TODO: Put date.
+      warranty_end: 1970-01-01 # TODO: Put date.
+    supported_job_types:
+      deploy: true
+      besteffort: true
+      max_walltime: 0
+    processor:
+      microarchitecture: Haswell # TODO: replace with microarch name.
+      clock_speed: 8 # TODO: Replace with clock speed.
+    network_adapters:
+      bmc:
+        interface: Ethernet
+        enabled: true
+        mountable: false
+        mounted: false
+      eth0:
+        enabled: true
+        mountable: true
+        mounted: true
+    storage_devices:
+      disk0: # This field will have to be renamed later.
+        id: disk0
+        interface: SAS
+        by_path: "/dev/disk/by-path/dummy" # this path will have to change later.
+    software:
+      standard-environment: debian11-x64-std # TODO: check that architecture is OK
+    management_tools:
+      bmc_vendor_tool: ipmitool # TODO: replace with bmc_vendor_tool (ipmitool, racadm)
+    nodeset: esterel2
diff --git a/input/grid5000/sites/sophia/clusters/esterel2/nodes.yaml.erb b/input/grid5000/sites/sophia/clusters/esterel2/nodes.yaml.erb
new file mode 100644
index 00000000000..af455aa1179
--- /dev/null
+++ b/input/grid5000/sites/sophia/clusters/esterel2/nodes.yaml.erb
@@ -0,0 +1,80 @@
+<%
+  # File generated by 'rake mass:create SRC=doc/sophia-clusters-mass-create-tmp.csv
+  # If changes are needed, it might be better to edit the source data and regenerate using 'rake mass:create'
+ 
+  cluster_name = "esterel2"
+  nodes_number = 1 # Size of the cluster (number of nodes)
+  # MAC addresses declaration
+  mac_eth0_list = %w(
+14:18:77:61:c4:45
+  )
+  mac_bmc_list = %w(
+14:18:77:61:c4:47
+  )
+%>
+---
+nodes:
+<% (1..nodes_number).each { |i| %>
+ <%= cluster_name %>-<%= i %>:
+    architecture:
+      nb_procs: 1 # Fake data, will be replaced by g5k-checks
+      nb_cores: 72 # Fake data, will be replaced by g5k-checks
+      nb_threads: 72 # Fake data, will be replaced by g5k-checks
+      platform_type: x86_64 # Fake data, will be replaced by g5k-checks
+      cpu_core_numbering: contiguous # Fake data, will be replaced by g5k-checks
+    bios:
+      release_date: 01/01/2000 # Fake date, will be replaced by g5k-checks
+      vendor: Unknown # Fake vendor, will be replaced by g5k-checks
+      version: 1 # Fake version, will be replaced by g5k-checks
+    bmc_version: v1 # Fake version, will be replaced by g5k-checks
+    chassis:
+      manufacturer: Unknown # Fake manufacturer, will be replaced by g5k-checks
+      name: Unknown # Fake name, will be replaced by g5k-checks
+    main_memory:
+      ram_size: 8 # Fake size, will be replaced by g5k-checks
+    memory_devices:
+      dimm:
+        size: 8 # Fake size, will be replaced by g5k-checks
+        technology: dram # Common memory technology, will be replaced by g5k-checks
+    processor:
+      model: Unknown # Fake model name, will be replaced by g5k-checks
+      other_description: description # Fake description, will be replaced by g5k-checks
+      vendor: vendor # Fake vendor, will be replaced by g5k-checks
+      version: vendor # Fake version, will be replaced by g5k-checks
+      cache_l1d: 8 # Fake cache, will be replaced by g5k-checks
+      cache_l1i: 8 # Fake cache, will be replaced by g5k-checks
+      cache_l2: 8 # Fake cache, will be replaced by g5k-checks
+      cache_l3: 8 # Fake cache, will be replaced by g5k-checks
+      instruction_set: x86-64 # Common instruction set, will be replaced by g5k-checks
+      microcode: "0xd000001" # Fake microcode, will be replaced by g5k-checks
+      ht_capable: true # Default ht capable value, will be replaced by g5k-checks 
+    main_memory:
+      ram_size: 8 # Fake ram size, will be replaced by g5k-checks
+    memory_devices:
+      dimm_proc 1 dimm 1: # Fake dimm name, will be replaced by g5k-checks
+        size: 8 # Fake dimm size, will be replaced by g5k-checks
+        technology: dram # Default dimm technology, will be replaced by g5k-checks
+    operating_system:
+      cstate_driver: unknown # Fake driver, will be replaced by g5k-checks
+      cstate_governor: unknown # Fake governor, will be replaced by g5k-checks
+      ht_enabled: true # common value for hyper threading, will be replaced by g5k-checks
+      pstate_driver: unknwon # Fake driver, will be replaced by g5k-checks
+      pstate_governor: unknown # Fake driver, will be replaced by g5k-checks
+      turboboost_enabled: true # Default value for turboboost, will be replaced by g5k-checks 
+    network_adapters:
+      bmc:
+        management: true
+        mac: <%= mac_bmc_list[i - 1] %>
+      eth0:
+        interface: Ethernet
+        management: false
+        driver: mlx_core # Fake data, will be replaced by g5k-checks
+        name: enp1s0f0np0 # Fake data, will be replaced by g5k-checks
+        rate: 10000000000 # Fake data, will be replaced by g5k-checks
+        mac: <%= mac_eth0_list[i - 1] %>
+    storage_devices:
+      disk0:
+        storage: SSD # Fake data, will be replaced by g5k-checks
+        model: unknown # Fake data, will be replaced by g5k-checks
+        size: 8 # Fake data, will be replaced by g5k-checks
+<% } %>
-- 
GitLab