Does anyone have experience of running Consul Agent on AWS? I have a cluster of consul servers running, but want to use the AWS EB to deploy a docker app, and a docker consul agent (progrium/consul) to each Host instance, so that the app can use consul on the localhost, rather than all my apps talking directly back to the consul server group.
This page gives a good example of a textbook Consul network (without reference to AWS or docker etc) - https://jlordiales.me/2015/01/23/docker-consul/
Here is my Dockerrun.aws.json
{
"AWSEBDockerrunVersion": "2",
"authentication": {
"bucket": "example-com",
"key": "registry.example.com/example.json"
},
"containerDefinitions": [
{
... php app container defined here ...
"portMappings": [
{
"containerPort": 80,
"hostPort": 80
}
]
},
{
"cpu": 1000,
"entryPoint": [],
"environment": [
{
"name": "CONSUL_JOIN",
"value": "consul.example.com"
},
{
"name": "CONSUL_URL",
"value": "localhost:8500"
}
],
"essential": true,
"image": "progrium/consul",
"links": [],
"memory": 900,
"name": "consulagent",
"portMappings": [
{
"containerPort": 8400,
"hostPort": 8400
},
{
"containerPort": 8500,
"hostPort": 8500
}
]
}
]
}
Just wondering how to pass the usual arguments to my docker container to make it run as an agent and join my servers e.g. $ docker run -d -p 8400:8400 -p 8500:8500 -p 8600:53/udp \
--name node4 -h node4 progrium/consul -join $JOIN_IP