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

Implement detached runs for ECS backend. #695

Merged
merged 1 commit into from
Dec 14, 2015
Merged

Implement detached runs for ECS backend. #695

merged 1 commit into from
Dec 14, 2015

Conversation

ejholmes
Copy link
Contributor

Closes #570

This implements detached runs for ECS.

This is a continuation of #573, with the issues presented in #573 (comment) addressed so that detached processes show up in emp ps:

$ emp run sleep 60 -d -a acme-inc
Ran `sleep 60` on acme-inc as run, detached.
$ emp ps -a acme-inc
v1.run.eddbb21a-1b89-4f0e-bb72-8193c54e1cb7  1X  RUNNING   3s  "sleep 60"
v1.web.907a716b-84d0-46f4-affe-616c2dc10399  1X  RUNNING   2h  "acme-inc server"

TaskDefinition: td.TaskDefinitionArn,
Cluster: aws.String(m.cluster),
Count: aws.Int64(1),
StartedBy: aws.String(app.ID),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ended up being really simple. Just use the app id here, which makes it easy to filter for tasks started by the app in ListTasks.

@phobologic
Copy link
Contributor

👍

ejholmes added a commit that referenced this pull request Dec 14, 2015
Implement detached runs for ECS backend.
@ejholmes ejholmes merged commit c8084a1 into master Dec 14, 2015
@ejholmes ejholmes deleted the detached-runs branch December 14, 2015 22:13
@crohr
Copy link
Contributor

crohr commented Dec 14, 2015

Awesome! What happens to the logs? Can we somehow get the exit code of the command?

@ejholmes
Copy link
Contributor Author

@crohr the logs will end up in the same location as the logs for normal processes of apps, which is generally just on disc (we use logspout to shuttle these off to sumo logic).

Regarding the exit code, you can take the UUID from emp ps and use the aws ecs describe-tasks command to get the exit code. It'd be nice to eventually have Empire expose that information though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants