Skip to content

Commit 8054e8e

Browse files
committed
Move the contents of the scripts/iscsi.sh file as an HEREDOC to remove the depenecy of a separate file.
1 parent b36df34 commit 8054e8e

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

EKS/FSxN-as-PVC-for-EKS/terraform/eks-cluster.tf

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,19 @@ data "cloudinit_config" "cloudinit" {
133133

134134
part {
135135
content_type = "text/x-shellscript"
136-
content = file("scripts/iscsi.sh")
136+
content = <<EOT
137+
#!/bin/bash
138+
sudo yum install -y lsscsi iscsi-initiator-utils sg3_utils device-mapper-multipath
139+
rpm -q iscsi-initiator-utils
140+
sudo sed -i 's/^\(node.session.scan\).*/\1 = manual/' /etc/iscsi/iscsid.conf
141+
cat /etc/iscsi/initiatorname.iscsi
142+
sudo mpathconf --enable --with_multipathd y --find_multipaths n
143+
#
144+
# Blacklist any EBS volume since they don't support them!
145+
sed -i -e '/^blacklist {/,/^}/{/^}/i\ device {\n vendor "NVME"\n product "Amazon Elastic Block Store"\n }\n' -e '}' /etc/multipath.conf
146+
sudo systemctl restart multipathd
147+
sudo systemctl enable --now iscsid multipathd
148+
sudo systemctl enable --now iscsi
149+
EOT
137150
}
138151
}

EKS/FSxN-as-PVC-for-EKS/terraform/scripts/iscsi.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)