-
Notifications
You must be signed in to change notification settings - Fork 421
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
Task Run Command Design #702
Comments
Other Example Usecases
|
Being able to override the default command would be great. For example, I have an image / task definition for a Django container that I use for my API. By default it will serve HTTP requests. But if I can pass an override, I can run admin tasks using manage.py, on the same codebase etc. just as if I was running it locally or on a server. |
All right - added a "commands" flag to address this. Good call. Thanks a bunch. |
This would be amazing. First thought: It would be amazing to have a "synchronous" mode. I'm thinking something like
Second thought: It would be 🤯 if this was combined with ECS Cloud Debug's support for shelling into a running task. Then I could run a handful of commands, type |
Some thoughts on validating flags such as
Any thought or comment? |
Your recommendation sounds good to me 👍 let's go for it |
Current behavior of the --app and --env flags: If If |
This PR adds validate to task run command Related #702 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
One thing that would be neat after we deliver the proposed version is adding a new flag like I'm thinking:
(Related #1044) |
This PR has two major changes: 1. add ask to task run; 2. add a required flag for task-family name, update validate and ask correspondingly <!-- Issue number, if available. E.g. "Fixes #31", "Addresses #42, 77" --> Related #702 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
…1109) This PR includes the following changes to aws package: 1. adds a ec2 package to get subnet and security groups 2. add runtask and defaultCluster method to ecs package Related #702 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
I'm not sure it's related to this issue or not, but as an example use-case of standalone ECS task, sometime I use Step Functions' state machine to wrap a task to ensure the task to be retried when it fails. |
This PR adds a task package that runs one-off tasks in different configurations, including running in the default cluster and subnets, running in a Copilot environment, and running in specified subnets and security groups. Related #702 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR implements a task runner that runs tasks in user provided subnets and security groups. Related #702 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR contains the following changes to aws/ec2 package: 1. adds a new method that gets public subnets with optional filters; this is to support `task run` in copilot environment 2. rename methods to conform to [Go Best Practice](https://golang.org/doc/effective_go.html#Getters) 3. refactor redundant code Related #1109, #702 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR implements a task runner that runs tasks in a copilot environment. Related #702 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR builds and pushes image and updates image to task definition for `task run`. This is a part of the series of PRs that implement `Execute` for `task run`. Related #702 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR starts the task(s) for `task run`. This is a part of the series of PRs that implement Execute for task run. Related #702 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR contains the following changes: 1. implement `--follow` flag for `task run` 2. implement `EarliestStartTime` method in `task` package in support of `--follow` 3. wrap `aws-sdk-go/ecs` constant `DesiredStatusStopped` in `ecs` package in support of `--follow` Should be merged only after #1212 Related #702 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This feature will be released in v0.3.0, we'll have a separate design to incorporate step functions to a task :). |
Some parts of customers workflows don't fall neatly into services, cron jobs, or triggers. Occasionally, customers need to run one-off tasks (think creating a database in a newly minted RDS instance, running a query against their instance, or just for debugging). This design talks about how we can enable this for customers.
What category is this command?
I believe the
tasks
domain should be under a new category calledOperate
. These commands are focused around one-off executions that are a normal part of operations, but may not be part of a customers day to day workflow.How will it work?
By default, this will build the local image. Then, if the customer is working within a workspace associated with a project, we can prompt them to choose an environment.
If they select an existing environment, we can set up an ECR repo for on-off tasks real quick (or
bake the one-off repo into our environment template), push the image, and launch the task on Fargate with a sensible default configuration.
If the customer doesn't have any projects set up (or they are not in a workspace) - we can just deploy the task to the Default ECS cluster and the Default VPC. Since this is a lower level command, we can expose flags like
subnet
orsecurity group
.For this command, you don't have to have set up any ecscli projects.
Optional Flags
Some examples might be
Isn't this like the Fargate CLI?
Yeap! Almost exactly like that. But we can also include integrations into our view of environments so folks can run their tasks in a particular environment (ECS cluster / VPC). This is super useful if you have resources within a particular VPC that can only be accessed from within the VPC.
What next?
We'll have to follow up with visibility features for tasks. Logs, list, PS, etc.
Questions
The text was updated successfully, but these errors were encountered: