-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3 node cluster running on ECS using awsvpc networking #6802
Comments
This should work, although I have not personally tried it on AWS. What values are you passing to the |
Are there any plans to use the ECS api as opposed to relying on EC2 describe-instance? |
Hey there, Feel free to check out the community forum as well! |
This is still an issue - are there any work arounds? |
Might help to add a little more background on this:
According to the docs, the It seems that we either need to add some logic to determine whether we are running in ECS and disregard this identity document call, or perhaps add a flag to disable it (but I'm unsure of what all it is used for). As it stands now, I don't believe we can use autodiscovery in ECS using tags in this fashion. This might be of interest: hashicorp/go-discover#61 |
Any updates on that issue? @juliengrondin did you find a workaround for ECS. I want to run consul on ECS Fargate and i'm having the same problem. |
@cocakohler, there is a learn guide to help get started with Consul on ECS/EC2 for HCP. The workflow for deploying Consul clients would be the same for self-managed. Are you looking to deploy Consul servers on ECS/Fargate or is it just clients? Fargate does not support awsvpc type and daemon scheduling. One way to deploy Consul clients would be to have a Consul agent run as a container within the task definition. Would love to understand your requirements and desired workflow for ECS/Fargate |
x-posting from hashicorp/go-discover#61: We're seeing this too on the 1.10.2 container image on Fargate. Our consul servers are on EC2 and discovery works great for clients on EC2 using However, if we try to deploy a client sidecar on Fargate, it does not work. Here's a snippet of the task definition:
In the logs, we see:
According to the ECS task IAM role docs, inside ECS the container IAM role should be fetched from |
The only work around I could come up with for now is to register each Fargate container with AWS Service Discovery, then you can call them with the --retry-join. Annoying that this has been open since 2019 and seemingly no progress..... can't be the only ones wanting to run this on Fargate. |
Hey @aeshaynes It seems like this issue fell through the cracks, and we apologize for that. I'll revive this issue internally and reach out to some of our engineers that work on consul-ecs integration. We'll make an effort to get this resolved ( and documented ) soon 👍 |
This comment was marked as outdated.
This comment was marked as outdated.
I submitted PR #197 to go-discover in order to provide ECS-Tag auto-discovery support |
Cross-posting a comment from the PR above:
So we'll continue to try and resolve this issue to allow for consul ecs server experimentation |
The ECS support is merged into go-discover. Next, Consul needs to be updated with the new version of the library. (triggers auto-closed the issue on a merge, so reopened this) |
The support for ECS discovery in Cloud-Auto Join strings was included in the 1.12.9, 1.13.6, and 1.14.4 patch releases of Consul, so closing this issue. |
Is there a way for the nodes to discover eachother within ECS using awsvpc networking?
Currently I get errors:
[WARN] agent: Join LAN failed: No servers to join, retrying in 30s
[ERR] agent: failed to sync remote state: No cluster leader
[ERR] agent: Cannot discover LAN provider=aws tag_key=consul tag_value=member: discover-aws: GetInstanceIdentityDocument failed: EC2MetadataRequestError: failed to get EC2 instance identity document
It seems the nodes are unable to discover each other to join a cluster.
The text was updated successfully, but these errors were encountered: