diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-10-06 04:36:06 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-10-06 04:36:06 +0200 |
commit | 162bef18b394caa2053aeb97157333d03d279ddd (patch) | |
tree | c62fc89019259e30851e5d145296585e5bd3c135 | |
parent | d65dd50278fec1b253fcd3fe4cfcdab533f20cc8 (diff) | |
download | ipmiboot-162bef18b394caa2053aeb97157333d03d279ddd.tar.gz ipmiboot-162bef18b394caa2053aeb97157333d03d279ddd.tar.bz2 ipmiboot-162bef18b394caa2053aeb97157333d03d279ddd.tar.xz ipmiboot-162bef18b394caa2053aeb97157333d03d279ddd.zip |
Add ipecompute support
-rw-r--r-- | README | 15 | ||||
-rw-r--r-- | config.sh | 11 | ||||
l--------- | ipmi-ands.sh | 1 | ||||
l--------- | ipmi-compute.sh | 1 | ||||
l--------- | ipmi-student.sh | 1 | ||||
-rwxr-xr-x | ipmi.sh | 30 |
6 files changed, 48 insertions, 11 deletions
@@ -1,8 +1,19 @@ Actions ======= 1) We need to build a CD which will request kickstart file from the web server -2) This CD should be programmed in IPMI interface - => Currently placed in /virtual/images/centos74-ands.iso on ipepdvsrv2 +2) This CD should be programmed in IPMI interface, + => Currently placed in /virtual/images/centos74-ands.iso on ipepdvsrv2 + => Configuration: + Host (CIFS): 192.168.26.172 + Path: \images\centos74-ands.iso + User: guest + Password: anything + Domain: ipe.kit.edu + => On Ipepdvcompute2 + Host (NFS): 192.168.26.172 + Path: /virtual/images/ + Image Name (On the previous screen): centos8-ands.iso + 3) The installation is triggered by ipmi commands 4) The web server runs a php script which detects connecting server and templates appropriate kickstart file => It is installed on ufo.kit.edu in /srv/www/htdocs/ands/kickstart @@ -7,8 +7,17 @@ if [[ $0 =~ "ipmi-katrin.sh" ]]; then [ -n "$servers" ] || servers=$(seq 1 3) iip=$(for i in $servers ; do echo "192.168.26.4$i" ; done) hip=$(for i in $servers ; do echo "192.168.26.$i" ; done) +elif [[ $0 =~ "ipmi-ands.sh" ]]; then + [ -n "$servers" ] || servers=$(seq 0 0) + iip=$(for i in $servers ; do echo "192.168.26.16$i" ; done) + hip=$(for i in $servers ; do echo "192.168.26.14$i" ; done) +elif [[ $0 =~ "ipmi-compute.sh" ]]; then + [ -n "$servers" ] || servers=$(seq 1 4) + iip=$(for i in $servers ; do echo "192.168.26.15$i" ; done) + hip=$(for i in $servers ; do echo "192.168.26.13$i" ; done) + passpath="KIT/Ands/ipmi-compute" elif [[ $0 =~ "ipmi-camera.sh" ]]; then - [ -n "$servers" ] || servers=$(seq 3 4) + [ -n "$servers" ] || servers=$(seq 3 6) iip=$(for i in $servers ; do echo "192.168.26.10$i" ; done) hip=$(for i in $servers ; do echo "192.168.26.8$i" ; done) passpath="KIT/Ands/ipmi-desktop" diff --git a/ipmi-ands.sh b/ipmi-ands.sh new file mode 120000 index 0000000..6c161b4 --- /dev/null +++ b/ipmi-ands.sh @@ -0,0 +1 @@ +ipmi.sh
\ No newline at end of file diff --git a/ipmi-compute.sh b/ipmi-compute.sh new file mode 120000 index 0000000..6c161b4 --- /dev/null +++ b/ipmi-compute.sh @@ -0,0 +1 @@ +ipmi.sh
\ No newline at end of file diff --git a/ipmi-student.sh b/ipmi-student.sh new file mode 120000 index 0000000..6c161b4 --- /dev/null +++ b/ipmi-student.sh @@ -0,0 +1 @@ +ipmi.sh
\ No newline at end of file @@ -2,7 +2,7 @@ function configure { hosts=$1 shift - if [ -n "$1" -a -f "ansible/$1.yml" ]; then + if [ -n "$1" -a -f "$itm/$1.yml" ]; then play="$1.yml" shift else @@ -42,22 +42,32 @@ function ipmi { } + function set_bootdev { host=$1 + device=${2:-disk} + persistent=${3:-} + + ipmi $host chassis bootdev $device $persistent cons_redirect=enable verbose=default + sleep $sleep - ipmi $host chassis bootdev disk persistent cons_redirect=enable verbose=default - sleep 0.5 +# ipmi $host chassis bootparam set bootflag force_$device +# sleep $sleep } + + function install { host=$1 # Requires license -# smipmi $host wsiso mount 192.168.26.134 /images/centos74-ands.iso +# smipmi $host wsiso mount 192.168.26.172 /images/centos74-ands.iso + # off is soft-off on compute2, so we need reset first. + #ipmi $host power reset ipmi $host power off sleep 10 - ipmi $host chassis bootdev cdrom + set_bootdev $host cdrom sleep $sleep ipmi $host power on } @@ -65,7 +75,7 @@ function install { function boot { host=$1 - set_bootdev $host + set_bootdev $host disk persistent ipmi $host power on sleep $sleep } @@ -76,7 +86,9 @@ function reboot { ipmi $host power off sleep 10 - set_bootdev $host + set_bootdev $host disk persistent + sleep $sleep + ipmi $host power on sleep $sleep } @@ -86,8 +98,10 @@ function bios { ipmi $host power off sleep 10 - ipmi $host chassis bootdev bios + + set_bootdev $host bios sleep $sleep + ipmi $host power on } |