mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
fix(kb/aws/ecs): describe tasks for command execution
This commit is contained in:
@@ -522,10 +522,19 @@ Procedure:
|
||||
|
||||
```sh
|
||||
aws ecs describe-tasks --cluster 'staging' --tasks 'ef6260ed8aab49cf926667ab0c52c313' --output 'yaml' \
|
||||
--query 'tasks[0] | {
|
||||
--query 'tasks[0] | {
|
||||
"managedAgents": containers[].managedAgents[?@.name==`ExecuteCommandAgent`][],
|
||||
"enableExecuteCommand": enableExecuteCommand
|
||||
}'
|
||||
|
||||
aws ecs list-tasks --cluster 'staging' --service-name 'mimir' --query 'taskArns' --output 'text' \
|
||||
| xargs \
|
||||
aws ecs describe-tasks --cluster 'Staging' \
|
||||
--output 'yaml' --query 'tasks[0] | {
|
||||
"managedAgents": containers[].managedAgents[?@.name==`ExecuteCommandAgent`][],
|
||||
"enableExecuteCommand": enableExecuteCommand
|
||||
}' \
|
||||
--tasks
|
||||
```
|
||||
|
||||
```yaml
|
||||
|
||||
@@ -155,10 +155,17 @@ aws ecs update-service --cluster 'stg' --service 'grafana' --enable-execute-comm
|
||||
|
||||
# Check tasks' attributes
|
||||
aws ecs describe-tasks --cluster 'staging' --tasks 'ef6260ed8aab49cf926667ab0c52c313' --output 'yaml' \
|
||||
--query 'tasks[0] | {
|
||||
"managedAgents": containers[].managedAgents[?@.name==`ExecuteCommandAgent`][],
|
||||
"enableExecuteCommand": enableExecuteCommand
|
||||
--query 'tasks[0] | {
|
||||
"managedAgents": containers[].managedAgents[?@.name==`ExecuteCommandAgent`][],
|
||||
"enableExecuteCommand": enableExecuteCommand
|
||||
}'
|
||||
aws ecs list-tasks --cluster 'staging' --service-name 'mimir' --query 'taskArns' --output 'text' \
|
||||
| xargs aws ecs describe-tasks --cluster 'staging' \
|
||||
--output 'yaml' --query 'tasks[0] | {
|
||||
"managedAgents": containers[].managedAgents[?@.name==`ExecuteCommandAgent`][],
|
||||
"enableExecuteCommand": enableExecuteCommand
|
||||
}' \
|
||||
--tasks
|
||||
|
||||
# Execute commands in tasks
|
||||
aws ecs execute-command --cluster 'staging' --task 'e242654518cf42a7be13a8551e0b3c27' --container 'echo-server' \
|
||||
|
||||
Reference in New Issue
Block a user