I have this bootstrap script for my EKS node-group launch template and I added in some commands to try to install Apache. I tried a few variations and none would install the service. I'm able to do it manually if I ssh into my nodes, but haven't been able to accomplish it with my script
bootstrap.sh
Variation #1
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==MYBOUNDARY=="
--==MYBOUNDARY==
Content-Type: text/x-shellscript; charset="us-ascii"
#!/bin/bash
set -ex
/etc/eks/bootstrap.sh ${cluster_name} \
--container-runtime containerd
sudo su
yum update -y
yum install httpd -y
service httpd start
--==MYBOUNDARY==--
Variation #2
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==MYBOUNDARY=="
--==MYBOUNDARY==
Content-Type: text/x-shellscript; charset="us-ascii"
#!/bin/bash
sudo su
yum update -y
yum install httpd -y
service httpd start
set -ex
/etc/eks/bootstrap.sh ${cluster_name} \
--container-runtime containerd
--==MYBOUNDARY==--
Variation #3
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==MYBOUNDARY=="
--==MYBOUNDARY==
Content-Type: text/x-shellscript; charset="us-ascii"
#!/bin/bash
set -ex
/etc/eks/bootstrap.sh ${cluster_name} \
--container-runtime containerd
--==MYBOUNDARY==--
#!/bin/bash
sudo su
yum update -y
yum install httpd -y
service httpd start
I also tried with and without the sudo su
and none of those worked either. Just seems like the commands aren't running at all