Browse Source

Merge branch 'devel' of github.com:dellhpc/omnia into devel

John Lockman 5 years ago
parent
commit
1eab0a8240
3 changed files with 48 additions and 2 deletions
  1. 6 2
      docs/PREINSTALL.md
  2. 7 0
      tools/README.md
  3. 35 0
      tools/change_personality

+ 6 - 2
docs/PREINSTALL.md

@@ -18,6 +18,10 @@ Omnia can configure systems which use Ethernet- or Infiniband-based fabric to co
 ![Example system configuration with Infiniband fabric](images/example-system-infiniband.png)
 
 ## Network Setup
-Omnia assumes that servers are already connected to the network and have access to the internet. Possible network configurations include:
+Omnia assumes that servers are already connected to the network and have access to the internet.
+### Network Topology
+Possible network configurations include:
 * A flat topology where all nodes are connected to a switch which includes an uplink to the internet. This requires multiple externally-facing IP addresses
-* A hierarchical topology where compute nodes are connected to a common switch, but the master node contains a second network connection which is connected to the internet. All outbound/inbound traffic would be routed through the master node. This requires setting up firewall rules for IP masquerade, see (https://www.server-world.info/en/note?os=CentOS_7&p=firewalld&f=2) for an example. 
+* A hierarchical topology where compute nodes are connected to a common switch, but the master node contains a second network connection which is connected to the internet. All outbound/inbound traffic would be routed through the master node. This requires setting up firewall rules for IP masquerade, see [here](https://www.server-world.info/en/note?os=CentOS_7&p=firewalld&f=2) for an example.
+### IP and Hostname Assignment
+The recommended setup is to assign IP addresses to individual servers. This can be done manually by logging onto each node, or via DHCP.

+ 7 - 0
tools/README.md

@@ -0,0 +1,7 @@
+# Tools for Omnia
+
+## change_personality
+```
+change_personality k|s <node_list>
+```
+Change the personality of a node (or list of nodes) to Kubernetes (`k`) or Slurm (`s`). System does not wait for currently running jobs to complete before making nodes available to the new personality.

+ 35 - 0
tools/change_personality

@@ -0,0 +1,35 @@
+#!/bin/bash
+
+#Usage: change_personality <k|s> <node_name>
+#       k = Kubernetes
+#       s = Slurm
+
+new_personality=$1
+dnsdomain=`dnsdomainname`
+shift
+
+if [ $new_personality == "k" ] 
+then
+# Change Personality to Kubernetes
+  echo "[INFO] Changing personality to Kubernetes"
+  for node in $*
+  do
+    echo -n "$node"
+    scontrol update nodename=$node state=DRAIN reason="used for k8s"
+    kubectl uncordon $node.$dnsdomain > /dev/null  
+    echo " [OK]"
+  done
+elif [ $new_personality == "s" ]
+then
+# Change Personality to Slurm
+  echo "[INFO] Changing personality to Slurm"
+  for node in $*
+  do
+    echo -n "$node"
+    kubectl cordon $node.$dnsdomain > /dev/null
+    scontrol update nodename=$node state=IDLE reason="used for Slurm"
+    echo " [OK]"
+  done
+else
+  echo "[ERROR] $new_personality is not a valid personality. Use 'k' or 's'"
+fi