alexgaribay / libcluster_gae

MIT License
23 stars 1 forks source link

Updates to make libcluster_gae work on App Engine projects with Zonal… #3

Open zgohr opened 6 months ago

zgohr commented 6 months ago

… DNS since Global DNS has been deprecated.

This resolves #1.

  1. With Mix Releases, move from vm.args into env.sh.eex
  2. The biggest issue we need to work around is there is no environment variable telling us which zone our instance resides in, and we need this to name our node when it starts. The workaround is to make an App Engine Admin API call and capture that zone in order to set the node name. See env.sh.eex.
  3. Changes to the actual strategy are minimal - the call to list all running instances needed to be enhanced to grab the vmZoneName since it is required to generate the FQDN of our instances. I know #1 mentions the API didn't return this value, but I found that it does - maybe it was fixed in the past 4 or 5 years 😄 .

Anyway, this was a fun one to debug. Let me know if you have any questions.