Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install awscli v2 bundle when possible #1066

Merged
merged 4 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/generate-version-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ sudo rpm --query --all --queryformat '\{"%{NAME}": "%{VERSION}-%{RELEASE}"\}\n'

# binaries
echo $(jq ".binaries.kubelet = \"$(kubelet --version | awk '{print $2}')\"" $OUTPUT_FILE) > $OUTPUT_FILE
echo $(jq ".binaries.awscli = \"$(aws --version | awk '{print $1}' | cut -d '/' -f 1)\"" $OUTPUT_FILE) > $OUTPUT_FILE
22 changes: 21 additions & 1 deletion scripts/install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ sudo yum update -y
# Install necessary packages
sudo yum install -y \
aws-cfn-bootstrap \
awscli \
chrony \
conntrack \
curl \
Expand Down Expand Up @@ -118,6 +117,27 @@ sudo systemctl restart sshd.service
sudo mkdir -p /etc/eks
sudo mv $TEMPLATE_DIR/iptables-restore.service /etc/eks/iptables-restore.service

################################################################################
### awscli #####################################################
################################################################################

if [[ "$BINARY_BUCKET_REGION" != "us-iso-east-1" && "$BINARY_BUCKET_REGION" != "us-isob-east-1" ]]; then
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
echo "Installing awscli v2 bundle"
mmerkes marked this conversation as resolved.
Show resolved Hide resolved
AWSCLI_DIR=$(mktemp -d)
curl \
--silent \
--show-error \
--retry 10 \
--retry-delay 1 \
-L "https://awscli.amazonaws.com/awscli-exe-linux-${MACHINE}.zip" -o "${AWSCLI_DIR}/awscliv2.zip"
unzip -q "${AWSCLI_DIR}/awscliv2.zip" -d ${AWSCLI_DIR}
sudo "${AWSCLI_DIR}/aws/install"
else
echo "Installing awscli package"
sudo yum install -y awscli
fi

################################################################################
### Docker #####################################################################
################################################################################
Expand Down