-
Notifications
You must be signed in to change notification settings - Fork 321
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
[ECS]: AWS Copilot CLI (Formerly known as ECS CLI v2) #513
Comments
This is bril ✨ |
would be nice to have integration with SSM Session Manager, where you can easy connect to a running continuers default shell interactively via the cli. |
This sounds excellent. Having just started to look at potentially moving some older infrastructure over to ECS I've struggled to find a recommended way to configure and deploy, and judging by the number of other ECS CLI tools I've stumbled across out there I guess others have also struggled with that, too. Personally I would love to see a model of deployment that includes pre & post tasks as part of configuration. A deployment of an app isn't just updating a task definition and service, it also includes running one-off tasks, like database migrations, notification hooks and resource tagging. If this could be defined in configuration, along with suitable "rollback" mechanisms, it could be incredibly powerful in a single tool. I'm not sure if people do this in their CD pipelines instead, but this feels like it's trying to create a PaaS-like experience with the flexibility of AWS, so super excited to see where this goes! |
So one question... if this is allowing composition of apps using TF/Pulumi/CDK, there's a good chance apps within a single project could have leveraging more than just ECS (one app is Lambda-driven, etc.). Does it still make sense to call it an ECS CLI at that point? Or are you still trying to limit the scope to ECS-based applications at this time? |
@mikesir87 We definitely see the value of building a project that has both Lambda and container apps. The primary focus of v2 will be improving the ECS developer experience, guided experiences that starts with a container and builds the rest of the infrastructure around it, but that doesn’t preclude us from supporting Lambda apps in the future. |
Howdy ya'll! We've reached our first milestone for the v2 CLI! Check out our blog post for more details! Wanna learn more? Check out our wiki. |
I'm disappointed to see the Gen2 CLI won't directly support docker-compose files. I understand that AWS wants vendor lock-in, yet I feel that it is premature to leave behind this defacto standard. Keep support for docker-compose -- or eliminate it completelyI do not see value in having a Needs YAML task definitionsJSON is a great syntax for computers to talk to each other, but a horrible syntax for humans to use for configuration. Well known. ECS Gen 2 forcing use of a AWS task definition in JSON is measurably more difficult than to do the same thing in YAML. This means that the ECS Gen2 cli will be harder to use and more difficult to maintain projects using it. ECS-CLI Gen2 needs to support YAML-based task definitions. Merging makes live easierIn my projects, the merging capabilities of docker-compose greatly ease my development, testing, and deployment. Any task definition syntax you support in ECS cli Gen2 should be able to be merged with other task definitions using clear rules. What rules? See docker-compose. |
Did you try to use ecs-cli v1 in production? It was frankly a disaster. The docker-compose abstractions don't map onto ECS well at all. ECS team did exactly the right thing by using the ECS primitives, and creating an opinionated workflow with V2. Haven't used it yet, but I'm excited by the change |
I personally tried to use ecs-cli v1 with compose and I'll agree it was quite rough. As you mentioned, the abstractions were tough, but I do agree that it's sad to see Compose dropped, instead of further adopted. With the support of the extension fields ( |
@mtibben , no disaster here. A few bugs in the v1 cli that I fixed myself. I did have to make a workaround due to ecs-cli v1 providing scaling in a limited manner. If a team is looking for comprehensive coordination, k8s is the solution to explore. Its trajectory will surpass ECS across the global marketplace. So this is a competitive scenario. Yes, AWS provides k8s services. But it also has the proprietary ECS of which this toolset is focused. ECS is a great service which AWS was leader and wants to maintain that. k8s was forced on AWS so to be a market player and offer a service customers wanted. There is a tension here; an internal rivalry. ECS may be good for solutions where k8s is not a fit. And therefore a toolset that works with ECS is useful. The I'm concerned with a greater amount of challenges to occur due to I acknowledge that integration is always a difficult part of a project. Restricting the number of dependencies/services to integrate with the cli v2 should be carefully evaluated based on the AWS resources available to adequately spec, dev, and test those integrations. I recently fixed and PR'd two simple bugs in the
Some might say the docker-compose syntax/grammar is a pain to maintain in the As @mikesir87 wrote, there are established ways in the docker-compose grammar to support far more settings that were previously in ecs-params. Later versions of 2.x grammar enabled this. Of course, this is feature detail; I'm not restricting progress to be limited to just ecs-params settings. Should |
Hi everyone! Docker Compose is a great tool to run your applications locally, and we think we can do a lot more for your local ECS experience with Compose. However, as mentioned above it becomes difficult to model ECS concepts and other AWS primitives within the confines of a Compose file. That’s why over time, in the ecs-cli v1, the
The CLI v1 doesn’t take a stance on how to model containerized applications. You need to define and bring in additional AWS resources on your own. The
We don’t want to force you into integrating with any service you don’t want! The patterns provided and the If you have use-cases that don't fit into one of our patterns, we’d like for you to be able to define your own pattern so that you can customize your integrations. You can also use the individual commands such as The v1 CLI will remain available, so if it already works for your use-case you don’t need to migrate to v2. We’ve shifted our resources over the past few months to developing v2 and it’s now in preview! We’d love for you to give it a spin and leave us feedback on the vision. |
hi everyone, we've renamed the ECS CLI v2 to AWS Copilot and have added a bunch of new functionality. Check out our latest blog post here - https://aws.amazon.com/blogs/containers/introducing-aws-copilot/ |
@srrengar Thanks! Now that copilot is available - are there other things that you think should be available before this issue is closed or does it make sense to move to dedicated issues for new features? |
I totally agree with what @diablodale said above: I was about to switch to copilot when it got announced a few weeks after I started working on my own project, thought about stopping it all together after the docker ecs-plugin announcement, but, dropped the idea of using either for lack of docker-compose support (and ecs-plugin expects ARNs, so no thanks :( ) If folks (@diablodale | @mikesir87) are interested in a tool that focuses on docker-compose v3 syntax support and ECS deployment, and makes the integration to other AWS services easier and follows for these the CloudFormation syntax, have a look at ECS ComposeX. Note: I was just looking to see if there were any news on docker-compose support. I am only ever trying to get feedback on ComposeX |
Hello everyone! We're excited to announce that the AWS Copilot CLI is now generally available v1.0.0 🥳! To learn more about the CLI: https://aws.github.io/copilot-cli/ |
Proposal for ECS CLI v2
Amazon ECS released version 1 of the Amazon ECS CLI in 2015. The Amazon ECS CLI v1 simplifies the management of your Amazon ECS clusters, tasks, services, and ECR repositories by enabling you to create profiles and cluster configurations with default settings. While many customers have found the Amazon ECS CLI useful, we have received feedback that this level of abstraction does not go far enough for developers who must still interact directly with Amazon ECS primitives.
The Amazon ECS development team is in the planning stages for a new major version (v2) of the Amazon ECS CLI. We are planning to shift the focus of the Amazon ECS CLI from using Docker Compose to model tasks and services to helping you model your Amazon ECS applications in a more holistic manner. We view this as a shift towards application-first development with an emphasis on usability and developer productivity.
The following is our initial proposal, which we would like feedback on.
What is ECS CLI v2?
ECS CLI v2 is an opinionated view of application-first development. This new iteration will introduce the concepts of applications and projects. An application is an Amazon ECS service or task. An application can also encapsulate other AWS resources, such as an Amazon SQS queue or a Amazon DynamoDB table, to achieve a business capability. Applications are independently deployable. A project is a namespace for a collection of related applications. If you build your applications through the Amazon ECS CLI, you’ll get some AWS best practices by default and have a smooth workflow for taking your applications from development to production. The new version of the Amazon ECS CLI will integrate with Infrastructure as Code toolkits like the AWS Cloud Development Kit (CDK) and HashiCorp Terraform so that you can grow in complexity and scale beyond what the Amazon ECS CLI aims to provide by default.
Modeling, provisioning, and deploying applications are only part of the application lifecycle for the developer. The Amazon ECS CLI aims to support workflows around troubleshooting and debugging to help when things go wrong.
Domains
These are the proposed categories to help you navigate our top-level commands.
Commands:
ecs init
,ecs project init
.Commands:
ecs apps add
,ecs apps db
,ecs apps deploy
,ecs pipelines
.Commands:
ecs logs
,ecs health
,ecs trace
.Commands:
ecs images
,ecs tasks
,ecs services
.Commands:
ecs local
,ecs debug
.Commands:
ecs pricing
.Commands
These top-level commands are proposal and may not be in the final release. We want to experiment and simplify our commands while we are in preview with your feedback. They are listed here to give everyone a list of use cases and the vision we’d like to support.
Releases
We plan to start with use cases that are not available in other available command line interfaces. Therefore, we believe focusing on the Getting started and Develop command categories first would be the most beneficial to users who want to use the Amazon ECS CLI.
Our plan is to release these features in preview in the new aws/amazon-ecs-cli-v2 GitHub repository and gather feedback. You can also track our tasks under the project on GitHub. While still in preview you can expect breaking changes to the commands.
What’s happening to v1?
The v1 CLI will continue existing as is. So if it already satisfies your existing use-cases you don’t have to upgrade. You can have both the v1 CLI and v2 CLI in your automated scripts if you’d like. We’ll continue to support all v1 commands until the commands with similar functionality (marked with ➡️ or 🔀) are ported over to v2. This includes bug-fixes, security patches and incremental updates as new ECS features are launched. However, once ported we will stop supporting the 🚫 dropped commands.
push
➡images push
). We will continue to do bug-fixes, security patches, and incremental ECS feature updates until we have the equivalent functionality in v2.v1 to v2 migration path
configure
ecs init
will bootstrap your application's infrastructure as code.up
ecs env init
will deploy your project's infrastructure including your cluster. This action will create a cluster but also all other resources that's in your application. If you want to just create a cluster you can useecs clusters create
that behaves similarly to the AWS CLI.down
ecs project delete
will delete all the resources associated with your project including your cluster. If you want to only delete the cluster then you can useecs clusters delete
.scale
ecs cluster scale
will provide this functionality.ps
ecs cluster ps
,ecs app ps
,ecs project ps
will all allow you to list running containers, including in your cluster.push
ecs image push
will provide the same functionality.pull
ecs image pull
will provide the same functionality.images
ecs image
will be ported as is.compose create
compose up
compose run
ecs task run
.compose start
ecs task run
will achieve this functionality, however we won't be starting tasks from a Compose file. You can also useecs app deploy
compose stop
ecs task stop
will achieve this functionality, however we won't be stopping tasks from a Compose file.compose ps
ecs cluster ps
,ecs app ps
,ecs project ps
will list running containers. However, these commands don't take a Compose file as input.compose scale
ecs task scale
will scale tasks based on your task group. However, this command doesn't take a Compose file as input.compose service
ecs task <subcommand>
, you can useecs service <subcommand>
.check-attributes
logs
ecs logs
will be ported as is.registry-creds
local
ecs local
will be ported over as is.We’re planning on adding a
ecs-cli migrate cluster
command to v1 to move the ECS cluster and VPC created withecs-cli up
under a project. Under the hood, this command will add a tag to these resources so we can group them under the same namespace. This way a new application created with the v2 CLI can leverage the same cluster and VPC. It will also enable you to use the--project
flag for any command that supports it. For example, you should be able to useecs clusters scale --project myProject
to change the number of container instances.If you are a heavy user of
ecs-cli compose <service> create
, we are planning on adding a--file
flag. This way you can transform your Compose file andecs-params.yml
to create a task-definition and optionally a service-definition JSON file. You can then use the operational commands such asecs tasks
orsecs task-defs
similar to the AWS CLI to push these resources.If you use
ecs-cli compose
part of your CD scripts and want to migrate to v2, our recommendation is for you to add the generated task definition or service file to your repository, modify those instead, and then use the operation commands to deploy your changes.Feedback
We would like to hear your thoughts on this draft direction for v2 of the CLI. Please let us know in the comments below. Specifically, we’d like to know:
This feedback is subject to the AWS Customer Agreement, particularly Section 8.5 (Suggestions).
The text was updated successfully, but these errors were encountered: