fargate-service | new book Rapid Docker on AWS Written for DevOps | Continuous Deployment library

 by   cfn-modules JavaScript Version: Current License: Apache-2.0

kandi X-RAY | fargate-service Summary

kandi X-RAY | fargate-service Summary

fargate-service is a JavaScript library typically used in Devops, Continuous Deployment, Docker applications. fargate-service has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i @cfn-modules/fargate-service' or download it from GitHub, npm.

:books: Check out our new book Rapid Docker on AWS Written for DevOps engineers and web developers who want to run dockerized web applications on AWS. Prior knowledge of Docker and AWS is not required. Continuous Deployment of your Web Application and Infrastructure as Code.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              fargate-service has a low active ecosystem.
              It has 6 star(s) with 7 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 6 open issues and 3 have been closed. On average issues are closed in 13 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of fargate-service is current.

            kandi-Quality Quality

              fargate-service has no bugs reported.

            kandi-Security Security

              fargate-service has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              fargate-service is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              fargate-service releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fargate-service
            Get all kandi verified functions for this library.

            fargate-service Key Features

            No Key Features are available at this moment for fargate-service.

            fargate-service Examples and Code Snippets

            No Code Snippets are available at this moment for fargate-service.

            Community Discussions

            QUESTION

            AWS Fargate: Create service with target group for load balancer
            Asked 2021-Jun-03 at 02:39

            Looking at the documentation for creating a service in Fargate (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_AWSCLI_Fargate.html#ECS_AWSCLI_Fargate_create_service), it does not advise you to create a target group for the service. A target group is necessary for attaching a load balancer so I have no idea why they don't include it in the documentation. Considering you can't add a load balancer to the service after creation, this is inevitably causing me a headache. So how do I go about making sure my Fargate service creates the target group(s) necessary so I can add an ELB to it?

            If I go about creating a Target Group, https://aws.amazon.com/premiumsupport/knowledge-center/create-alb-auto-register/, there are no targets from my VPC to attach to, so this is basically useless as I'm doing something wrong on creation.

            aws ecs create-service --cluster fargate-cluster --service-name fargate-service --task-definition sample-fargate:1 --desired-count 1 --launch-type "FARGATE" --network-configuration "awsvpcConfiguration={subnets=[subnet-abcd1234],securityGroups=[sg-abcd1234]}"

            Can anyone guide me here?

            ...

            ANSWER

            Answered 2021-Jun-03 at 02:39

            I ended up deleting the created service which didn't have a load balancer, creating the target group for the same VPC as my load balancer (IP type), and then grabbing the Arn of the target group for when I create the service:

            aws ecs create-service --cluster evenflo-cms-dev --service-name django --task-definition evenflo-cms:4 --desired-count 1 --launch-type "FARGATE" --network-configuration "awsvpcConfiguration={subnets=[subnet-0950e9d7ffc3fc8e3, subnet-036375b8ae487f2c9],securityGroups=[sg-077d0e3ba1cfb4145],assignPublicIp=ENABLED}" --load-balancers='[{"targetGroupArn": "arn:aws:elasticloadbalancing:us-east-1:898591449577:targetgroup/evenflo-cms-api/f5501d5733c6d91c", "containerName": "django", "containerPort": 7000 }]'

            Is there a cleaner way to approach this with Terraform? Probably. But I just wanted a straight way to accomplish this with the AWS CLI and to be able to understand the order in which things should be done. Hopefully this helps someone.

            Source https://stackoverflow.com/questions/67794295

            QUESTION

            AWS-CDK: How to deploy a new image to an existing Fargate-Cluster?
            Asked 2020-Nov-25 at 00:07

            I've got an existing FargateCluster with a running service and a running task definition created by the great aws-cdk.

            I wonder what is the best way to deploy a new docker image to this existing Fargate-Service within a seperate AWS CDK routine/script/class? The docker image gets a new version (not latest) and I like to keep all the parameters configured in the existing task-definition and just deploy the new docker image. What I like to do in detail is geting the existing task-definition and just change the name of the image and let Fargate deploy it.

            Is there any working example for this?

            Any help will be appreciated.....

            Regards

            Christian

            ...

            ANSWER

            Answered 2020-Nov-25 at 00:07

            I would suggest exploring using Codepipeline to deploy your app in this case. There's a very specific codepipeline action to Deploy ECS Fargate images.

            If you want to start writing your own pipeline, check the standard Codepipeline package or try the cdk specific Pipelines package.

            Other option would be to rerun your existent deployment and let CloudFormation deal with the changes.

            Source https://stackoverflow.com/questions/64988849

            QUESTION

            AWS Fargate cannot access dockerized spring boot application over Load balancer/ public IP
            Asked 2020-Aug-12 at 05:17

            I have deployed the docker image of my spring boot application over aws ECR, following creation of AWS fargate cluster. PFA screenshots of the configurations stating task, security, service and cluster definition.I can ping my public ip successfully. But I can't access my application over neither load balancer nor public ip. The urls I tried to access application were

            public_ip:8081/my_rest_end_point

            and

            load_balancer_public_dns:8081/my_reset_end_point

            I have tested running my docker image on local host using port 8081 and the same 8081 port I have configured for port mapping in my Fargate container configuration (reference: service definition). How can I access my application? I have followed almost all the articles over Medium and AWS.

            Tutorials followed: https://medium.com/underscoretec/deploy-your-own-custom-docker-image-on-amazon-ecs-b1584e62484

            https://medium.com/faun/aws-fargate-services-deployment-with-continuous-delivery-pipeline-b67d33407c88

            ...

            ANSWER

            Answered 2020-Aug-12 at 05:17

            Based on the comments and chat discussion.

            The tutorial followed creates a custom VPC with CIDR range of 10.0.0.0/16 with two subnets. There is no internet gateway (IGW); and subsequently, the Fargate tasks launched in the VPC have no internet access nor they can't be accessed from the internet.

            There are two solutions to this problem:

            • use the default VPC which correctly provides internet access
            • create a custom VPC (or modify existing) that is setup with IGW and the corresponding route tables. An example of a custom VPC with internet access is in AWS docs.

            Source https://stackoverflow.com/questions/63352705

            QUESTION

            Terraform dynamic block
            Asked 2020-May-04 at 13:18

            I'm having trouble creating a dynamic block in Terraform. I'm trying to create an ECS service using a module. In the module I want to specify that network_configuration block should be created only if a variable is present. Here's my module code:

            ...

            ANSWER

            Answered 2020-May-04 at 13:18

            So your locals should be as follows:

            Source https://stackoverflow.com/questions/61591351

            QUESTION

            Running two containers on Fargate using CDK
            Asked 2020-Feb-01 at 08:36

            I'd like to use Fargate to run two containers - one for the main project's backend, and another for the database (MongoDB). The basic example included in the GitHub repo shows how to run a single container on Fargate using CDK, however I still have 2 issues:

            1. The example doesn't show how to run two containers.
            2. I'd like to scale the database containers but have them share the data storage (so that the data gets stored in a central place and stays synchronized between the different containers).

            I've figured out how to (sort of) fixed the first issue, similarly to how ecs.LoadBalancedFargateService is implemented, however the second issue still remains.

            For reference, this is what I have so far in stack.ts (the rest is the basic boilerplate cdk init app --language typescript generates for you):

            ...

            ANSWER

            Answered 2019-Feb-07 at 22:21

            Generally, running a database in a Fargate container is not recommended since there is not currently a good solution for persisting data. You could integrate a hook that copies data into something like S3 prior to a task stopping, but generally those kinds of solutions are very fragile and not recommended.

            You may want to check out DocumentDB as an alternative to running your own MongoDB instances, though support for DocumentDB constructs in the CDK are not yet fully fleshed out.

            Another alternative is to run regular ECS tasks and attach an EBS volume on your EC2 Instance. Then you can use docker volumes to mount the EBS volume to your container. With this approach, you'll need to tag the instance metadata and use an ECS placement constraint to ensure that your task gets placed on the instance that has the EBS volume attached.

            If either of these approaches works for you, feel free to open a feature request on the CDK repository. Hope this helps!

            Source https://stackoverflow.com/questions/54524427

            QUESTION

            CloudFormation: Access PrivateDnsNamespace as HostedZone
            Asked 2019-Oct-12 at 15:41

            The documentation for ServiceDiscovery::PrivateDnsNamespace states that:

            When you create a private DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private hosted zone that has the same name as the namespace.

            In CloudFormation, is there any way to access the created HostedZone (as a Route53::HostedZone) so I can add additional Route53:RecordSets to it?

            • Is the ID the same?
            • Can I include a Route53::HostedZone with the same name to get the right ID?
            • Is there some other trick?

            For example, I'd like to expose my RDS and ElastiCache (Redis) instance at private DNS entries. I realize this could be the XY problem, but I'm accessing these systems at standard locations in my legacy code and am trying minimize the customization (and thus potential bugs) in my first ECS attempt.

            WARNING: While AWS Service Discovery strategies can be used to expose services like DB and RDS, there are several qualifications:

            • AWS Service Discovery requires the syntax . so you can't simply expose the services at db and redis. Your best odds for a 'standard' domain is something like redis.local and db.local. While local is a reserved TLD, there's some hostility to its use.
            • RDS SSL certificates are tied to the RDS domain name and custom SSL certificates are not supported so you can't expose it at db..com. If you don't use the RDS CNAME, you won't be able to connect to these instances over trusted SSL connection.
            ...

            ANSWER

            Answered 2019-Oct-03 at 09:03

            There's no way to access the created HostedZone in CloudFormation.

            Still, if you want to add additional records to this private zone you can use the AWS::ServiceDiscovery::Service and AWS::ServiceDiscovery::Instance resources.

            Basically, you need to create one service for your RDS instance and one service for your Redis instance. Then you create instances in your services.

            Example for RDS:

            Source https://stackoverflow.com/questions/58210884

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install fargate-service

            Install Node.js and npm first!.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/cfn-modules/fargate-service.git

          • CLI

            gh repo clone cfn-modules/fargate-service

          • sshUrl

            git@github.com:cfn-modules/fargate-service.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link