dwmkerr / terraform-aws-openshift

Create infrastructure with Terraform and AWS, install OpenShift. Party!
http://www.dwmkerr.com/get-up-and-running-with-openshift-on-aws
MIT License
170 stars 174 forks source link

Add Support for NVMe EC2 Instances (m5, c5) #51

Open stanvarlamov opened 6 years ago

stanvarlamov commented 6 years ago

As OpenShift 3.9 is now fully compatible with ec2 m5 instances - those can be used in the configuration, after this proposed setup-master.sh and setup-node-sh update:

Replace

cat <<EOF > /etc/sysconfig/docker-storage-setup
DEVS=/dev/xvdf
VG=docker-vg
EOF

with

DEVICE_NAME=xvdf
lsblk | grep -q "xvdf"
if [ $? -ne 0 ]; then
   DEVICE_NAME=nvme1n1
fi   
cat <<EOF > /etc/sysconfig/docker-storage-setup
DEVS=/dev/$DEVICE_NAME
VG=docker-vg
EOF
dwmkerr commented 6 years ago

Looks great @stanvarlamov, I'll hopefully get onto this shortly