Add support for ECS Exec
requested to merge gitlab-community/ci-cd/custom-executor-drivers/fargate:beyondevil/add-execute-command-setting into master
What does this MR do?
It adds support for ECS Exec by adding the EnableExecuteCommand
flag to the RunTaskInput
Go SDK type.
Why was this MR needed?
It enables troubleshooting a running Fargate container (ci-coordinator
) by allowing a user to do the equivalent of docker exec
into it.
Also, it enables you to do cool things like (partly) support the image
CI keyword and other things.
What's the best way to test this MR?
- Add
EnableExecuteCommand = true
to the "[Fargate]" section offargate.toml
:
[Fargate]
# ...other config...
EnableExecuteCommand = true
-
Run a CI job that has a
sleep 120
script step or similar. -
Run:
aws ecs execute-command \
--region "<region>" \
--cluster "<cluster-name>" \
--task "<task-arn or task-id>" \
--container "ci-coordinator" \
--command "/bin/bash" \
--interactive
This gives an interactive ssh-like bash session in the running container.
What are the relevant issue numbers?
- Closes #49 (closed)
Edited by Axel von Bertoldi