Comments (9)
Hi @davidlondono -
Thanks for reporting the issue you're facing.
There is an addPortMappings
section in the cdk code which should accomplish this. See https://github.com/search?q=repo%3Aaws-samples%2Famazon-ecs-fargate-cdk-v2-cicd%205000&type=code
Possibly something has changed in the CDK libs or how things are getting deployed.
Do you have any more information, logs, or details you can share?
Feel free to ping me on slack @mimjasov
from amazon-ecs-fargate-cdk-v2-cicd.
Hi @jasonmimick-aws,
but there is no http service (with a /health
endpoint) for the amazonlinux:2022
image running on port 5000, so the initial deployment will get stuck when ECS is provisioned, isn't it?
Thanks
from amazon-ecs-fargate-cdk-v2-cicd.
@jasonmimick-aws My stack is also stuck in progress endlessly. Is there a different image and port number we can use for initial deployment?
from amazon-ecs-fargate-cdk-v2-cicd.
Hey @saurabhmarwaha,
you can use public.ecr.aws/nginx/nginx-unprivileged
as a 'dummy' container. I'm using it with port 8080. If you want/need port 80, you can use http://public.ecr.aws/nginx/nginx
. They are also available as ARM containers.
from amazon-ecs-fargate-cdk-v2-cicd.
@rverton Container / Task is still taking unusually longer with below changes due to which stack continues to be In progress status. Is that how you are using a dummy container.
const baseImage = 'public.ecr.aws/nginx/nginx-unprivileged'
container.addPortMappings({
containerPort: **8080**,
protocol: ecs.Protocol.TCP
});
from amazon-ecs-fargate-cdk-v2-cicd.
@rverton Container / Task is still taking unusually longer with below changes due to which stack continues to be In progress status. Is that how you are using a dummy container.
const baseImage = 'public.ecr.aws/nginx/nginx-unprivileged'
container.addPortMappings({ containerPort: **8080**, protocol: ecs.Protocol.TCP });
You also need to adjust the health check because the nginx container will not have a /health
endpoint:
const fgService = new ecs_patterns.ApplicationLoadBalancedFargateService(this, `${id}-ecs-service`, {
cluster,
// ...
});
fgService.targetGroup.configureHealthCheck({
path: "/",
});
from amazon-ecs-fargate-cdk-v2-cicd.
Still no progress. Stack is stuck in progress and task stopped eventually
const baseImage = 'public.ecr.aws/nginx/nginx-unprivileged'
const container = taskDef.addContainer('nodejs-docker-example', {
image: ecs.ContainerImage.fromRegistry(baseImage),
memoryLimitMiB: 256,
cpu: 256,
logging
});
container.addPortMappings({
containerPort: 8080,
protocol: ecs.Protocol.TCP
});
const fargateService = new ecs_patterns.ApplicationLoadBalancedFargateService(this, "ecs-service", {
cluster: cluster,
taskDefinition: taskDef,
publicLoadBalancer: true,
desiredCount: 1,
listenerPort: 80,
});
fargateService.targetGroup.configureHealthCheck({
path: "/",
});
Task stopped at: 2024-01-30T08:41:02.149Z
CannotPullContainerError: pull image manifest has been retried 5 time(s): failed to resolve ref public.ecr.aws/nginx/nginx-unprivileged:latest: failed to do request: Head "https://public.ecr.aws/v2/nginx/nginx-unprivileged/manifests/latest": dial tcp 75.2.101.78:443: i/o timeout
from amazon-ecs-fargate-cdk-v2-cicd.
As I understand this error, ECS is not able to pull the container. Does your ECS service have a route to the public ECR repository?
from amazon-ecs-fargate-cdk-v2-cicd.
@rverton I believe you mean if subnet where cluster is created have access to Internet (IGW). I will check the routing and will verify.
Could be related to Auto-assign public IP.
Will come back to in a few hours..Here it's 4:00 am..Getting some sleep...:)
from amazon-ecs-fargate-cdk-v2-cicd.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-ecs-fargate-cdk-v2-cicd.