by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Doug Toppin
    @dougtoppin
    The Makefile is really the useful part in showing how to use the cli
    I am a fan of Fargate and finding examples of how to use it with minimal effort is always good
    Doug Toppin
    @dougtoppin
    I also need to replace the modified manifest with a Makefile invoked sed command to make the changes to the generated file. I almost have that complete.
    Efe Karakus
    @efekarakus
    this is great! yeah I think it'll definitely be helpful as they'll be able to see the exact commands and flags you use to create an application
    Doug Toppin
    @dougtoppin
    btw, this also caused me to work on another tool. It will someday hopefully be a Lambda that uses boto to retrieve the templates from existing CloudFormation stacks and use the CF estimate cost api to say what they are costing.
    Efe Karakus
    @efekarakus
    We want to also build a pricing command to the CLI. I don't have any specifics yet but it'd be amazing to see how much your project is costing you and the projected monthly cost
    Doug Toppin
    @dougtoppin
    Yes, it is easy to let costs build up by accident. When you use your own account and have to pay for it cost gets your attention more quickly and you become much more conscious of policing usage. At a re:Invent I was at a couple of years ago Werner said "Don't pay for idle". That really resonated with me.
    Doug Toppin
    @dougtoppin
    Question on the "backend app". If I am reading it correctly, it means an application that runs and blocks on a port for input, meaning it runs 24x7 once deployed. I was wondering if there are plans to support creation of an ecs/fargate task definition that would support integration with Step Functions as a compute action. By that I mean a fargate task definition that exists but does not get run as a task until invoked by a Step Function for example and is expected to do something and then exit. I do not believe that the ecs cli v2 supports that now right?
    Efe Karakus
    @efekarakus

    ooh that sounds very interesting! no it doesn't support that at the moment, and your understanding of the "backend app" is correct.

    However, we have a design ready for a task run command which sounds similar: aws/amazon-ecs-cli-v2#702. Is this what you envisioned? or did you have some other usecases in mind with the step function?

    Doug Toppin
    @dougtoppin
    I checked for any current plan and missed the gh issue. Sorry about that. Yes, it is very analogous to the fargate cli. The reason that I am asking is I was not sure if the ecs and fargate clis were meant to have independent capabilities or overlapping. I was going to suggest to the Step Function people that they do a tutorial of having an SF run a Fargate task to demonstrate the service integration. In general this would be an example of running a compute resource on demand but not full time. I have had this use case where a python compute application used several very large packages which prevented it running in Lambda. Running it as a container in Fargate worked perfectly.
    Doug Toppin
    @dougtoppin
    btw, one of my thoughts was that tutorials usually show all resources created by the same method, meaning CF for example. The real world is that sometimes you create an SF one way and run a Fargate task that was created by an entirely different method, meaning no inherent relationship between the two. Using a SF and the ecs cli v2 in an example would show that.
    Doug Toppin
    @dougtoppin
    I saw the Fargate 1.4 announcement but in reading the doc was not sure how to get my existing ecs cli v2 cluster and running task updated from 1.3 to 1.4. There is not a cluster version in the manifest right? An update to the my task code and deploy did not show a version change for the platform? I may be doing something incorrectly in my process. After an env init and deploy, if the app source is changed is the next and final step an "app deploy" to get the code change deployed? The reason that I am asking is that the new image was built and pushed but it does not look like the already running task was restarted to pick up the code change.
    Doug Toppin
    @dougtoppin
    Using the console, I set the service desired capacity to 0 and then back to 1 to get the task to bounce. Once I did that the new code change did appear. I am guessing that I need to do something different in my Makefile for deploying a code update to an existing deployed service.
    David Killmon
    @kohidave
    We use the latest flag - which hasn’t been updated to 1.4 yet!
    Oh and we also have an annoying issue where if you run deploy but don’t commit your code - nothing happens until you bounce the service
    I think that’s what you we’re seeing
    (We yah the image with the git sha - so of you haven’t committed we overwrote the old image but don’t update the service because CloudFormation thinks the image hasn’t changed ...)
    Efe Karakus
    @efekarakus

    Hi @dougtoppin !

    There is not a cluster version in the manifest right? An update to the my task code and deploy did not show a version change for the platform?

    That's right, we just use the LATEST version of the Fargate platform while creating the ECS Service. You might find this article interesting that explains how tasks get their platform version: https://aws.amazon.com/blogs/containers/aws-fargate-platform-versions-primer/

    Doug Toppin
    @dougtoppin
    Duh, git add makes sense. I forgot about the git involvement. Also, my next list item is to add the x-ray agent to the task and include some x-ray support in the app. I have been using x-ray for over a year and am totally satisfied with it and even more the cost. In the past with fargate, I have had the agent either an additional container in the task or running in the main container running in the background. Both approaches worked fine for me.
    David Killmon
    @kohidave
    ah - so sorry about this but we don't have any support for sidecars yet :bow: - meaning we probably can't get xray working easily =/
    Doug Toppin
    @dougtoppin
    Here's a followup question. I have an x-ray agent running in the background in my app container. However, the task needs a role that allows publishing data to xray. With the cli can policies/roles be modified for the deployed app? Using the console I attached this policy to the generated role and the app is now publishing to xray. AWSXRayDaemonWriteAccess
    David Killmon
    @kohidave
    It is possible right now, though it's a bit cumbersome: https://github.com/aws/amazon-ecs-cli-v2/wiki/Additional-AWS-Resources
    if you look at the policy section - any policy created there will be added to your ECS Task policy
    Doug Toppin
    @dougtoppin
    Ah sorry, I forgot to check the wiki. I was looking at the doc and code. Tks
    David Killmon
    @kohidave
    no problem - it's a bit complicated at the moment
    Prakhar Srivastav
    @prakhar1989
    hi all - i had a quick question: does the v2 cli support docker-compose files?
    i didn't find anything in the readme, so wanted to check
    Efe Karakus
    @efekarakus
    Hi @prakhar1989 ! v2 doesn't support compose files at the moment.
    We have an issue opened for it: aws/amazon-ecs-cli-v2#689 if you'd like to describe how you'd like to integrate with a compose file different than v1. But we haven't started work on it yet.
    David Killmon
    @kohidave

    Yea, what Efe said :D We also have work planned for a local experience, that will generate a docker-compose file as well.

    For example, if you have a front-end and back-end services, and you want to work on the front-end service, you could run ecs-preview local, it'd generate a docker-compose file that uses your local code for front-end and pulls down the image from the back-end service (and generates a network that looks like your VPC network).

    David Killmon
    @kohidave
    but are there any features you're keen on supporting? Now that we're working with the docker-compose spec, there may be more exciting work there :D
    Prakhar Srivastav
    @prakhar1989
    Thanks Efe and David - I'm excited to hear that v2 will also support docker-compose. The only thing I'd like to see different would be better error reporting.. I'm having a really hard time in deploying to ecs via EC2 (using docker-compose) but there's lack of error reporting / logging to help me out. Would appreciate a better developer experience in that regard
    John Dhom
    @jdhom
    Is it currently possible to specify the VPC, rather than create new? init an app and don't see anything in manifest.yml. Also, is the intent that ecs_params config will live in manifest.yml?
    David Killmon
    @kohidave
    Hi John! Thanks for reaching out :D You can't use your own VPC at the moment, but we're tracking it here! aws/amazon-ecs-cli-v2#740
    And we think of manifest.yml to be something of a spiritual successor to ecs-params
    so some of the features that were in the params file will live in manifest :)
    can you tell me a bit about your usecase for bringing your own VPC? I think I probably have a good idea around it - but just want to confirm.
    John Dhom
    @jdhom

    @kohidave Working at a fairly large company and networking aspects are managed by an external group. We have as many internal systems as public/external.

    We have automation around ECS clusters / services (public and private) behind ALBs as well as NLB... based on ecs-cli v1. We've been talking about adding more features and a lot of them seem to be planned for ecs-cli v2.

    The abstraction to application type is something we've talked about. Managing the build pipeline is good (we have jenkins templates atm and experimenting with github actions cicd).

    One technical aside... if I understood the web presentation... many applications (say services) could be sharing an ALB. Is that true? This is a hack we put in our automation, to re-write the rules, as the ALB API did not support modifying rules independently. Did I miss something there? So, we run N services in a cluster and have 1 public ALB and 1 private ALB... shared by all the services.

    John Dhom
    @jdhom
    Support for Task and Scheduled Task is something we have demand for... as an alternative to lambda
    David Killmon
    @kohidave
    @jdhom that totally makes sense. And just to clarify, for the VPC, you'd want us to use the existing subnets, etc, right? That sounds aligned with what we're thinking, too.
    yeap, you can have multiple applications share one ALB
    you can update/create independent rules via the API. like this to update or this to create - but i might be misunderstanding your question :)

    Support for Task and Scheduled Task is something we have demand for... as an alternative to lambda

    that's awesome! Those are some of the next set of patterns we're going to release

    also thanks for the comment! That's really helpful for us!
    Efe Karakus
    @efekarakus

    hi /all!

    We're exploring renaming our commands fromecs-preview project and ecs-preview app to ecs-preview app and ecs-preview svc respectively. Our intuition says that using "application" and "service" while getting started with the CLI will be more intuitive.

    Does anyone have any concerns or feedback? all thoughts are welcomed :D

    David Killmon
    @kohidave
    Yea, we think it might make more sense to describe an "app" as being made up of many "services", rather than a "project" being made up of many "apps" - let us know what you think!
    Doug Toppin
    @dougtoppin
    Interesting. Will think about it and pass along some thoughts.
    Doug Toppin
    @dougtoppin
    One aspect of that is could someone be developing a svc/app in another git repo and deploy it to another one? Meaning can different team members work entirely separately and then combine them at deployment?
    Efe Karakus
    @efekarakus

    I don't think there would be any change in terms of workflow for the devs using the tool.
    The goal behind it is really to get to a terminology closer to customers, and have a more natural way of describing your application.

    The "SweetDogs" application is made of "woof" and "bark" load balanced web services and a "newsletter" cron job.

    Basically, it allows us to distinguish the types of components in your application and provide them as commands svc init --name fe --app SweetDogs or job init --name newsletter --app SweetDogs.

    Efe Karakus
    @efekarakus

    Hi everyone! It's party time 🎉

    We just released v0.0.8: https://github.com/aws/amazon-ecs-cli-v2/releases/tag/v0.0.8
    It has some pretty cool features:

    • New command: app status displays the health status of your service and tasks
    • We added a new application type to while initializing: Backend App which allows you to create a service that's not accessible from the internet.
    • And lots of other goodness :)