Skip to content

Instantly share code, notes, and snippets.

View sierra-tango-echo's full-sized avatar
💛
🛥️🚴‍♂️👬

Steve Norledge sierra-tango-echo

💛
🛥️🚴‍♂️👬
View GitHub Profile
#!/bin/bash
cat << EOF > /etc/resolv.conf
search cbarkla1.alces.network pri.barkla.alces.network mgt.barkla.alces.network ib.barkla.alces.network barkla.alces.network
nameserver 10.10.0.25
EOF
cat <<EOF >> /etc/hosts
10.110.1.100 head1.cbarkla1.alces.network head1
---
Description: 'Flight Domain Template'
Mappings:
RegionMap:
eu-west-1:
"AMI": "ami-d266dfab"
eu-west-2:
"AMI": "ami-c5f11ea2"
Resources:
FlightClusterNetwork:
#!/bin/bash
rm -rf /etc/yum.repos.d/*
cat << EOF > /etc/yum.repos.d/flight.repo
[centos-7-base]
name=centos-7-base
baseurl=http://10.10.0.1/repo/centos7.7/centos-7-base/
description=No description specified
enabled=1
skip_if_unavailable=1
#!/bin/bash -ex
##### MAIN SETUP - RUN THIS ON YOUR CONTROLLER - IT'LL POSSIBLY WORK #####
yum -y install bind bind-utils
systemctl stop dnsmasq
systemctl disable dnsmasq
systemctl start named
#!/bin/bash -x
IP=10.12.`ip route get 1 | awk '{print $NF;exit}' | cut -d '.' -f3,4`
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-ib0
TYPE=Infiniband
BOOTPROTO=none
DEFROUTE=yes
PEERDNS=no
PEERROUTES=no
#!/bin/bash -x
#IP=10.11.`ip route get 1 | awk '{print $NF;exit}' | cut -d '.' -f3,4` doesn't work in el8
IP=10.11.`ip route get 1 | awk '{print $7;exit}' | cut -d '.' -f3,4`
NETMASK="255.255.0.0"
GATEWAY="0.0.0.0"
BMCPASSWORD="0p3nflight"
BMCCHANNEL="1"
BMCUSER="admin"
#!/bin/bash -ex
touch /etc/cloud/cloud-init.disabled
systemctl disable cloud-init
systemctl disable cloud-config
systemctl disable cloud-final
systemctl disable cloud-init-local
#!/bin/bash -ex
NVIDIA_URL=http://10.10.0.1/deployment/installers/nvidia.run
if ( lspci | grep -qi nvidia ); then
sed -i "s/GRUB_CMDLINE_LINUX=\"\(.*\)\"/GRUB_CMDLINE_LINUX=\"\1 rdblacklist=nouveau blacklist=nouveau\"/" /etc/default/grub
grub2-mkconfig > /etc/grub2.cfg
mkinitrd --force /boot/initramfs-`uname -r`.img `uname -r`
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
#!/bin/bash -ex
YUM_COMMON="-e 0 -y -x compat-openmpi -x compate-openmpi-psm install @infiniband infiniband-diags"
#MLNX_INSTALLER=
# Mellanox Infiniband
if (lsmod |grep -q mlx4_core) ; then
if ! [ -z "${MLNX_INSTALLER}" ]; then
curl "${MLNX_INSTALLER}" > /tmp/MLNX_OFED_INSTALLER.tgz
#!/bin/bash
systemctl disable NetworkManager