aws / amazon-ecs-init

Amazon Elastic Container Service RPM
http://aws.amazon.com/ecs
Apache License 2.0
199 stars 118 forks source link

add exec prerequisites to ecs-anywhere installation script #451

Closed lydiafilipe closed 2 years ago

lydiafilipe commented 2 years ago

Summary

This pr makes changes to the ECS Anywhere installation script in order for exec to be supported on ECS Anywhere. Two changes are required - copying TLS certs and downloading ssm binaries. Both of these will be moved to a directory that will be bind-mounted into the customer's container at start, which is consistent with the current behavior for ECS exec on EC2.

For further context on exec, see:

Implementation details

The changes to installation script are:

  1. Move certs. Looking for certs in the same places as Golang and moving them to the directory that will be bind-mounted
  2. Add optional flag for the certs file. If host certs are not in any of searched locations, the customer can provide the path to the certs file
  3. Download SSM binaries. Downloading from new public URL from the SSM team and moving to the directory that will be bind-mounted

Testing

Description for the changelog

Add exec prerequisites to ecs-anywhere installation script

Licensing

This contribution is under the terms of the Apache 2.0 License: yes

lydiafilipe commented 2 years ago

(accidentally removed mkdir $CERTS_PATH in last revision, added that back, which is the only difference)