You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using nginx-proxy for a while now, and came across this when wanting to move off vanilla ec2 and over to ecs.
I've got it to a point where if I go directly to one of the 2 instances I am creating when I create a cluster (not both), I get the 'nginx is working' page. I have been writing down my understanding as following along, so will paste here:
First make a cluster
The name comes from the ecs config when you run ecs-cli configure...
ecs-cli up --keypair cluster-pair --capability-iam --size 2 --instance-type t2.small --force
This tells the service that it should be accessible on port 80, the container is the ecs-nginx-proxy container, and the details are in service.json.
However when I configure the load balancer, and point it at my two instances that were created due to the above, going to its DNS address I get nothing back. Its only if I go directly to one of the instances.
Am I right in thinking that both sample_task and task are running on both instances and the load balancer is supposed to point to both instances?
Thanks
The text was updated successfully, but these errors were encountered:
The service will register itself with the load balancer (adds listeners). Normally you don't need to change it's settings if I remember correctly. The load balancer needs the correct security privileges, i.e. access to the ECS instances.
In my case I run the service with "desiredCount": 1, so there is only one container with the ecs-nginx-proxy but you could increase that number and all the containers will register themselves with the load balancer.
I've been using nginx-proxy for a while now, and came across this when wanting to move off vanilla ec2 and over to ecs.
I've got it to a point where if I go directly to one of the 2 instances I am creating when I create a cluster (not both), I get the 'nginx is working' page. I have been writing down my understanding as following along, so will paste here:
First make a cluster
The name comes from the ecs config when you run
ecs-cli configure...
Then we register the task that handles the proxy
Next we create a service, and connect up to the load balancer
(You need to have already created a load balancer)
This tells the service that it should be accessible on port 80, the container is the ecs-nginx-proxy container, and the details are in service.json.
However when I configure the load balancer, and point it at my two instances that were created due to the above, going to its DNS address I get nothing back. Its only if I go directly to one of the instances.
Am I right in thinking that both sample_task and task are running on both instances and the load balancer is supposed to point to both instances?
Thanks
The text was updated successfully, but these errors were encountered: