Closed chrisyoung12345 closed 7 years ago
By way of further information...This is what my environment declarations look like in ECS for the task definition:
Environment Variables Key Value SERVICE_5672_rabbitmq rabbitmq
Here is another event output which looks pretty much identical to the previous with the result being the same...no entry is created in Route53:
time="2017-06-08T15:03:29Z" level=info msg="Processing event: &docker.APIEvents{Action:\"start\", Type:\"container\", Actor:docker.APIActor{ID:\"614f197f52ddf54e38acd279c3cb677c103b0729b50d950a3dee25993ed9af6e\", Attributes:map[string]string{\"image\":\"rabbitmq:3.6.8-management\", \"name\":\"ecs-RabbitMQ-2-1-RabbitMQ-aeacb3e6c7deedbb7d00\", \"com.amazonaws.ecs.cluster\":\"awseb-feature7034-Deployment-Environment-6w37gh2u6k\", \"com.amazonaws.ecs.container-name\":\"RabbitMQ\", \"com.amazonaws.ecs.task-arn\":\"arn:aws:ecs:us-west-2:233532778289:task/caa617f7-8c88-400e-a79f-8dfac8290a0d\", \"com.amazonaws.ecs.task-definition-family\":\"RabbitMQ-2\", \"com.amazonaws.ecs.task-definition-version\":\"1\"}}, Status:\"start\", ID:\"614f197f52ddf54e38acd279c3cb677c103b0729b50d950a3dee25993ed9af6e\", From:\"rabbitmq:3.6.8-management\", Time:1496934209, TimeNano:1496934209977489644}" Docker 614f197f52ddf54e38acd279c3cb677c103b0729b50d950a3dee25993ed9af6e started
the difference between the two being a slight tweak to the environment variable declaration with this output being based on the Key / Value information listed above.
This turned out to be a misconfiguration on my part. I missed the part that the key value pair MUST be SERVICE_
I have followed the instructions found at https://aws.amazon.com/blogs/compute/service-discovery-for-amazon-ecs-using-dns/ to deploy the ecssd_agent. When the agent starts up, I see the following output in the ecssd_agent.log:
time="2017-06-08T14:37:52Z" level=info msg="Processing event: &docker.APIEvents{Action:\"start\", Type:\"container\", Actor:docker.APIActor{ID:\"959f120fbf284120b8422431e04a763bbed80a8d8703aa390268853dc05ee82a\", Attributes:map[string]string{\"name\":\"ecs-RabbitMQ-Deployment-1-rabbitmq-a8bcfc90c2d3b7fc6e00\", \"com.amazonaws.ecs.cluster\":\"awseb-feature7034-Deployment-Environment-6w37gh2u6k\", \"com.amazonaws.ecs.container-name\":\"rabbitmq\", \"com.amazonaws.ecs.task-arn\":\"arn:aws:ecs:us-west-2:233532778289:task/c4a6e5f5-30ec-4035-8012-a54e76cf07c8\", \"com.amazonaws.ecs.task-definition-family\":\"RabbitMQ-Deployment\", \"com.amazonaws.ecs.task-definition-version\":\"1\", \"image\":\"rabbitmq:3.6.8-management\"}}, Status:\"start\", ID:\"959f120fbf284120b8422431e04a763bbed80a8d8703aa390268853dc05ee82a\", From:\"rabbitmq:3.6.8-management\", Time:1496932672, TimeNano:1496932672052372543}" Docker 959f120fbf284120b8422431e04a763bbed80a8d8703aa390268853dc05ee82a started
When I go to Route53 and look at the hosted zone (servicediscovery.internal) there isn't an entry for this service. Why? What should the output look like for an event that creates a Route53 entry?