Skip to content

Commit

Permalink
Move the contents of the scripts/iscsi.sh file as an HEREDOC to remov…
Browse files Browse the repository at this point in the history
…e the depenecy of a separate file.
  • Loading branch information
kcantrel committed Jan 28, 2025
1 parent b36df34 commit 8054e8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
15 changes: 14 additions & 1 deletion EKS/FSxN-as-PVC-for-EKS/terraform/eks-cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ data "cloudinit_config" "cloudinit" {

part {
content_type = "text/x-shellscript"
content = file("scripts/iscsi.sh")
content = <<EOT
#!/bin/bash
sudo yum install -y lsscsi iscsi-initiator-utils sg3_utils device-mapper-multipath
rpm -q iscsi-initiator-utils
sudo sed -i 's/^\(node.session.scan\).*/\1 = manual/' /etc/iscsi/iscsid.conf
cat /etc/iscsi/initiatorname.iscsi
sudo mpathconf --enable --with_multipathd y --find_multipaths n
#
# Blacklist any EBS volume since they don't support them!
sed -i -e '/^blacklist {/,/^}/{/^}/i\ device {\n vendor "NVME"\n product "Amazon Elastic Block Store"\n }\n' -e '}' /etc/multipath.conf
sudo systemctl restart multipathd
sudo systemctl enable --now iscsid multipathd
sudo systemctl enable --now iscsi
EOT
}
}
12 changes: 0 additions & 12 deletions EKS/FSxN-as-PVC-for-EKS/terraform/scripts/iscsi.sh

This file was deleted.

0 comments on commit 8054e8e

Please sign in to comment.