Closed showwin closed 10 months ago
@davidsiaw can you help us review this PR, please?
I had a quick look and wondered why we didn't do this but came across this. I am not sure if this is something we want to depend on?
When we move to Fargate, we cannot use daemon service for ddagent. So, we will change the architecture to use side-car model.
link: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html
I guess we can start using the side-car model from now on, but I don't know the background of the current decision well. As far as I can guess, the daemon service is a bit cost-efficient compared to side-car.
@davidsiaw It's by Terraform and this is the PR, https://github.com/degica/terraform-modules/pull/40.
Just a note in the future:
I needed to execute bcn district apply <district>
command to upload the ECS config file to S3. (but you won't see any changes on the change set in CloudFormation)
Context
We are setting up ddagent as daemon service on ECS. The hats containers need to know the EC2 host private IP address to communicate with the service-daemon ddagent, ref. The container can get the IP address by
cat $ECS_CONTAINER_METADATA_FILE | jq -r .HostPrivateIPv4Address
as explained in the above document, but this environment variable is blank by default. We need to turn on the container metadata by definingECS_ENABLE_CONTAINER_METADATA=true
in ECS config, ref.Steps after merging this PR
For staging:
bcn district apply staging
~ This is not required since the ECS config file id pulled from S3.For production:
bcn district apply komoju
~@davidsiaw I'd like you to review the post-merge steps as well π