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 -ex
NVIDIA_URL=https://uk.download.nvidia.com/tesla/460.106.00/NVIDIA-Linux-x86_64-460.106.00.run
if ( lspci | grep -qi nvidia ); then
yum -y groupinstall "Development Tools"
yum -y install kernel-devel-`uname -r`
curl ${NVIDIA_URL} > /tmp/nvidia.run
#!/bin/bash -ex
FLIGHT_APPLIANCE_MENU_BRANCH=dev/vpn
FLIGHT_GUI_BRANCH=master
########Base Packages###########
yum -y install patch autoconf automake bison bzip2 gcc-c++ libffi-devel libtool \
patch readline-devel ruby sqlite-devel zlib-devel glibc-headers glibc-devel openssl-devel make unzip wget git
yum -y install epel-release
yum -y install openvpn easy-rsa bind-utils
#!/bin/bash
rpm -ivh http://10.10.0.1/deployment/files/ilorest-3.3.0-78.x86_64.rpm
curl http://10.10.0.1/deployment/files/hpbios.json > /tmp/hpbios.json
curl http://10.10.0.1/deployment/files/apollo_BIOS_settings.txt > /tmp/apollo_BIOS_settings.txt
curl http://10.10.0.1/deployment/files/ilorest_setbios_to_knowngood.sh > /tmp/ilorest_setbios_to_knowngood.sh
ilorest login
ilorest serverclone load --auto -f /tmp/hpbios.json
xfs_resize /
echo 'ZONE="Europe/London"' > /etc/sysconfig/clock
ln -snf /usr/share/zoneinfo/Europe/London /etc/localtime
yum -y install ntpdate
yum -y install vim
cat << "EOF" > /etc/profile.d/flightcenter.sh
#Custom PS1 with client name
yum -y install nfs-utils
sed -ie "s/^#\RPCNFSDCOUNT.*$/\RPCNFSDCOUNT=32/g" /etc/sysconfig/nfs
mkdir -p /export/users
mkdir -p /export/service
mkdir -p /export/gridware
mkdir -p /export/apps
mkdir -p /export/site
cat << EOF > /etc/exports
yum -y install ipa-client
REALM="PRI.RSCFD1.ALCES.NETWORK"
ipa-client-install --no-ntp --mkhomedir --no-ssh --no-sshd --force-join --realm="$REALM" --server="infra01.pri.rscfd1.alces.network" -w "Heaf4Dro" --domain="cloud.pri.rscfd1.alces.network" --unattended --hostname="`hostname -f`"
#!/bin/bash
search cloud.pri.rscfd1.alces.network pri.rscfd1.alces.network mgt.rscfd1.alces.network ib.rscfd1.alces.network bmc.mgt.rscfd1.alces.network rscfd1.alces.network whiteways.tech
nameserver 10.10.0.51
echo 'ZONE="Europe/London"' > /etc/sysconfig/clock
ln -snf /usr/share/zoneinfo/Europe/London /etc/localtime
yum -y install ntpdate
yum -y install vim
CLUSTER=$1
IP=`curl --silent http://ipecho.net/plain`
CA=`cat /etc/openvpn/easyrsa/pki/ca.crt`
CRT=`cat /etc/openvpn/easyrsa/pki/issued/$CLUSTER.crt`
KEY=`cat /etc/openvpn/easyrsa/pki/private/$CLUSTER.key`
TA=`cat /etc/openvpn/easyrsa/ta.key`
cat << EOF > /root/install_$CLUSTER.run
cat << EOD > /etc/openvpn/flightconnector.conf
client
@sierra-tango-echo
sierra-tango-echo / gwopenvpn.bash
Last active May 9, 2020 11:23
gwopenvpn.bash
yum -y install epel-release
yum -y install openvpn easy-rsa bind-utils
cp -pav /usr/share/easy-rsa/3.0.7 /etc/openvpn/easyrsa
cd /etc/openvpn/easyrsa
cat<< 'EOF' > /etc/openvpn/easyrsa/vars
if [ -z "$EASYRSA_CALLER" ]; then
echo "You appear to be sourcing an Easy-RSA 'vars' file." >&2
echo "This is no longer necessary and is disallowed. See the section called" >&2
if [ -z "${CLUSTERNAME}" ]; then
echo "No clustername set" >&2
exit 1
fi
hostnamectl set-hostname cgw1.cloud.pri.${CLUSTERNAME}.alces.network
cat << EOF >> /etc/hosts
10.110.1.254 cgw1.cloud.pri.${CLUSTERNAME}.alces.network ${CLUSTERNAME}
EOF