Coder Social home page Coder Social logo

Comments (3)

arun-gupta avatar arun-gupta commented on June 10, 2024

Only taskdefs have been created with #106 but the deployment is still missing.

from aws-microservices-deploy-options.

arun-gupta avatar arun-gupta commented on June 10, 2024

Deployment is still missing and is being worked upon

from aws-microservices-deploy-options.

arun-gupta avatar arun-gupta commented on June 10, 2024

Creating cluster using CloudFormation and deploying the services using AWS CLI is not the recommended pattern. Here is the text for deploying to AWS CLI so far:

. Register task definitions:
.. In `webapp.json`, update the `INTERNAL_ALB_URL_GOES_HERE` to the value of `ALBPrivateCNAME`.
.. Register taskdefs:

  aws ecs register-task-definition --cli-input-json file://greeting.json
  aws ecs register-task-definition --cli-input-json file://name.json
  aws ecs register-task-definition --cli-input-json file://webapp.json

. Create services. Replace the value in the following command with the output from the CloudFormation template, and create the services
.. `greeting` service:

  aws ecs create-service \
    --cluster <cluster-name> \
    --service-name greeting-service \
    --task-definition greeting \
    --desired-count 1 \
    --launch-type "FARGATE" \
    --load-balancer "targetGroupArn=<greeting-target-group-ARN>,containerName=greeting,containerPort=8081" \
    --health-check-grace-period-seconds 60 \
    --network-configuration "awsvpcConfiguration={subnets=[<private-subnet-name1>,<private-subnet-name-2>],securityGroups=<sg-namehere>,assignPublicIp=ENABLED}"

.. `name` service:

  aws ecs create-service \
    --cluster <cluster-name> \
    --service-name name-service \
    --task-definition name \
    --desired-count 1 \
    --launch-type "FARGATE" \
    --load-balancer "targetGroupArn=<name-target-group-ARN>,loadBalancerName=<private-ALB-name>,containerName=name,containerPort=8082" \
    --health-check-grace-period-seconds 60 \
    --network-configuration "awsvpcConfiguration={subnets=[<private-subnet-name1>,<private-subnet-name-2>],securityGroups=<sg-namehere>,assignPublicIp=ENABLED}"

.. `webapp` service:

  aws ecs create-service \
    --cluster <cluster-name> \
    --service-name webapp-service \
    --task-definition webapp \
    --desired-count 1 \
    --launch-type "FARGATE" \
    --load-balancer "targetGroupArn=<webapp-target-group-ARN>,containerName=webapp,containerPort=8080" \
    --health-check-grace-period-seconds 60 \
    --network-configuration "awsvpcConfiguration={subnets=[<private-subnet-name-1>,<private-subnet-name-2>],securityGroups=<sg-namehere>,assignPublicIp=ENABLED}"

Access the service:

curl http://<public-ALB-CNAME>

Closing the issue for now.

from aws-microservices-deploy-options.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.