Skip to content

Commit

Permalink
fix: ordering of userdata (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
zack-is-cool authored Apr 17, 2024
1 parent 420b7f9 commit 6bb8dfd
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions templates/user_data.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ sudo yum install -y \

sudo yum update -y

# Install newer version of aws cli
sudo yum remove awscli -y
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
sudo chmod -R 755 /usr/local/aws-cli/

export PATH="$PATH:/usr/local/bin"
echo 'export PATH=$PATH:/usr/local/bin' >> /root/.bashrc

##
## Enable SSM & SSH
##
Expand Down Expand Up @@ -51,13 +61,6 @@ else
chown ${ssh_user}:${ssh_user} /home/${ssh_user}/.ssh/config
fi

# Install newer version of aws cli
sudo yum remove awscli -y
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
sudo chmod -R 755 /usr/local/aws-cli/

# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
Expand Down

0 comments on commit 6bb8dfd

Please sign in to comment.