Skip to content

Commit

Permalink
Install SSM agent from AL core repo by default
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermckinnon committed Nov 29, 2023
1 parent 8b87d03 commit 726bfbf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Users have the following options for specifying their own values:
| `source_ami_owners` | ```137112412989``` | |
| `ssh_interface` | `""` | |
| `ssh_username` | ```ec2-user``` | |
| `ssm_agent_version` | ```latest``` | |
| `ssm_agent_version` | `""` | Version of the SSM agent to install from the S3 bucket provided by the SSM agent project, such as ```latest```. If empty, the latest version of the SSM agent available in the Amazon Linux core repositories will be installed. |
| `subnet_id` | `""` | |
| `temporary_security_group_source_cidrs` | `""` | |
| `volume_type` | ```gp2``` | |
Expand Down
2 changes: 1 addition & 1 deletion eks-worker-al2-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"source_ami_owners": "137112412989",
"ssh_interface": "",
"ssh_username": "ec2-user",
"ssm_agent_version": "latest",
"ssm_agent_version": "",
"subnet_id": "",
"temporary_security_group_source_cidrs": "",
"volume_type": "gp2",
Expand Down
6 changes: 3 additions & 3 deletions scripts/install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ validate_env_set PULL_CNI_FROM_GITHUB
validate_env_set PAUSE_CONTAINER_VERSION
validate_env_set CACHE_CONTAINER_IMAGES
validate_env_set WORKING_DIR
validate_env_set SSM_AGENT_VERSION

################################################################################
### Machine Architecture #######################################################
Expand Down Expand Up @@ -512,10 +511,11 @@ fi
if yum list installed | grep amazon-ssm-agent; then
echo "amazon-ssm-agent already present - skipping install"
else
echo "Installing amazon-ssm-agent"
if ! [[ ${ISOLATED_REGIONS} =~ $BINARY_BUCKET_REGION ]]; then
if ! [[ -z "${SSM_AGENT_VERSION}" ]]; then
echo "Installing amazon-ssm-agent@${SSM_AGENT_VERSION} from S3"
sudo yum install -y https://s3.${BINARY_BUCKET_REGION}.${S3_DOMAIN}/amazon-ssm-${BINARY_BUCKET_REGION}/${SSM_AGENT_VERSION}/linux_${ARCH}/amazon-ssm-agent.rpm
else
echo "Installing amazon-ssm-agent from AL core repository"
sudo yum install -y amazon-ssm-agent
fi
fi
Expand Down

0 comments on commit 726bfbf

Please sign in to comment.