This PR adds support for ECS metadata API
(https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v4.html)
in order to discover hostname.
It also adds jq in the runtime image
Unlike EC2 or GCP VM, ECS tasks do not have a DNS record, we can only
use their IP as RELEASE_HOSTNAME. So I use their IPv4, IPv6 only
networks are therefore not supported.
Feel free to correct me if I'm wrong but it seems the telemetry id is
not longer used in Firezone 1.x
Removing this uuid generation would allow me to put the folder
`/var/firezone` as readonly instead of mounting a
[volume](367a46a5c8/firezone/values.yaml (L157))
to allow firezone to write inside. The folder `/var/firezone` seems to
be used only for this purpose
Maybe I should also remove
[this](49a965a686/elixir/Dockerfile (L293))
?
PS: I cannot find the contrib branch, but don't hesite to create it and
change the target branch of this PR
Co-authored-by: Antoine <antoinelabarussias@gmail.com>
TODO:
- [x] Cluster formation for all API and web nodes
- [x] Injest Docker logs to Stackdriver
- [x] Fix assets building for prod
To finish later:
- [ ] Structured logging:
https://issuetracker.google.com/issues/285950891
- [ ] Better networking policy (eg. use public postmark ranges and deny
all unwanted egress)
- [ ] OpenTelemetry collector for Google Stackdriver
- [ ] LoggerJSON.Plug integration
---------
Signed-off-by: Andrew Dryga <andrew@dryga.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>