Closed LeComptoirDesPharmacies closed 4 years ago
I don't think Consul listening on port 8500 would be enough to determine if the cluster is healthy and has established a quorum. There are other endpoints in the HTTP API you could try, but I'm not sure any of those are designed for an ELB-style use case. See also https://github.com/hashicorp/consul/issues/1468, which is requesting something similar.
Two possible ideas:
Hi @brikis98,
Thank you for this complete answer, your proposals seems really interesting to look into !
Currently, we created a lambda which is triggered by S3 notification event (through SNS), read content of the S3 (Consul Json Config) and update the Consul configuration with (API REST). As SNS lambda invocation is asynchronous, there is a 3 time retry which is sufficent (yet) for Consul Cluster to start.
If I have extra time in the future, I will look into Consulate first, thank you ! Yours faithfully, LCDP
Hi,
We would like to use an AWS lambda to initialize/update the Configuration Entries of the Consul cluster (router, splitter, ...) created with your module. Thus, it should be run once your module ended and when the consul cluster is healthy. Did you get any tips in order to invoke the lambda at the perfect moment ?
On our side, we saw that "aws_autoscaling_group" resource allow to specify the "wait_for_elb_capacity" attribute in order to wait healthiness of ASG targets before considering the ASG resource as created.
However there is two problems :
Thanks in advance for your advices/answers. Yours faithfully, LCDP