acme-companion: I'm stuck at writing dockerrun.aws.json for aws ecs
Hi. I followed along Wiki stuffs like base usage and persistent data parts. It says make three writable volumes, but i’m not sure about how to write this on dockerrun.aws.json file. All examples make use of anonymous or nameed volumes for these three volumes. I don’t know how to implement this on dockerrun.aws.json file and i think i make host volumes for all the things.
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "vhost",
"host": {
"sourcePath": "/etc/nginx/vhost.d"
}
},
{
"name": "html",
"host": {
"sourcePath": "/usr/share/nginx/html"
}
},
{
"name": "certs",
"host": {
"sourcePath": "/var/app/current/certs"
}
},
{
"name": "sock",
"host": {
"sourcePath": "/var/app/current/sock"
}
}
],
"containerDefinitions": [
{
"name": "client",
"image": "west0321/multi-client",
"hostname": "client",
"essential": false,
"memory": 64,
"environment": [
{
"name": "VIRTUAL_HOST",
"value": "pyochan.com,www.pyochan.com"
},
{
"name": "LETSENCRYPT_HOST",
"value": "pyochan.com,www.pyochan.com"
}
]
},
{
"name": "server",
"image": "west0321/multi-server",
"hostname": "api",
"essential": false,
"memory": 64,
"environment": [
{
"name": "VIRTUAL_HOST",
"value": "api.pyochan.com"
},
{
"name": "LETSENCRYPT_HOST",
"value": "api.pyochan.com"
}
]
},
{
"name": "worker",
"image": "west0321/multi-worker",
"hostname": "worker",
"essential": false,
"memory": 64
},
{
"name": "nginx-proxy",
"image": "jwilder/nginx-proxy",
"hostname": "nginx-proxy",
"essential": true,
"portMappings": [
{
"hostPort": 80,
"containerPort": 80
},
{
"hostPort": 443,
"containerPort": 443
}
],
"links": ["client", "server", "letsencrypt"],
"memory": 64,
"dockerLabels": {
"com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy": "true"
},
"mountPoints": [
{
"sourceVolume": "vhost",
"containerPath": "/etc/nginx/vhost.d"
},
{
"sourceVolume": "html",
"containerPath": "/usr/share/nginx/html"
},
{
"sourceVolume": "certs",
"containerPath": "/etc/nginx/certs"
},
{
"sourceVolume": "sock",
"containerPath": "/tmp/docker.sock"
}
]
},
{
"name": "letsencrypt",
"image": "jrcs/letsencrypt-nginx-proxy-companion",
"hostname": "letsencrypt",
"essential": false,
"memory": 64,
"mountPoints": [
{
"sourceVolume": "certs",
"containerPath": "/etc/nginx/certs"
},
{
"sourceVolume": "sock",
"containerPath": "/var/run/docker.sock"
}
],
"volumesFrom": [
{
"sourceContainer": "nginx-proxy"
}
]
}
]
}
Could you tell me whether my dockerrun.aws.json file is correct or not. Would you be able to give an example for dockerrun.aws.json file for this library? Any help would be really appreciated.
https://github.com/Feelthewind/multi-docker
I got error message like below.
/var/log/ecs/ecs-agent.log.2018-10-12-04
2018-10-12T04:02:04Z [INFO] TCS Websocket connection closed for a valid reason 2018-10-12T04:02:04Z [INFO] Connected to TCS endpoint 2018-10-12T04:06:54Z [INFO] Handling http requestmethodGETfrom127.0.0.1:54736 2018-10-12T04:07:00Z [WARN] Could not resolve some containers: [[nginx-proxy(jwilder/nginx-proxy) (NONE->RUNNING) letsencrypt(jrcs/letsencrypt-nginx-proxy-companion) (NONE->RUNNING)]] for task awseb-MultiDocker-env-myufbmg9mm:10 arn:aws:ecs:ap-northeast-1:223630899131:task/a5f14f58-6d24-43f8-bce7-f11188e2ce71, TaskStatus: (STOPPED->STOPPED) Containers: [worker (NONE->RUNNING),client (NONE->RUNNING),server (NONE->RUNNING),nginx-proxy (NONE->RUNNING),letsencrypt (NONE->RUNNING),] 2018-10-12T04:07:00Z [ERROR] Task engine [arn:aws:ecs:ap-northeast-1:223630899131:task/a5f14f58-6d24-43f8-bce7-f11188e2ce71]: unable to progress task with circular dependencies
/var/log/eb-activity.log
[2018-10-12T04:55:27.034Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage0/EbExtensionPostBuild] : Completed activity. [2018-10-12T04:55:27.035Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage0/InfraCleanEbextension] : Starting activity… [2018-10-12T04:55:27.037Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage0/InfraCleanEbextension] : Completed activity. Result: Cleaned ebextensions subdirectories from /var/app/staging. [2018-10-12T04:55:27.037Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage0] : Completed activity. Result: Application update - Command CMD-AppDeploy stage 0 completed [2018-10-12T04:55:27.037Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage1] : Starting activity… [2018-10-12T04:55:27.037Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage1/AppDeployEnactHook] : Starting activity… [2018-10-12T04:55:27.038Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage1/AppDeployEnactHook/00stop-task.sh] : Starting activity… [2018-10-12T04:55:27.048Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage1/AppDeployEnactHook/00stop-task.sh] : Completed activity. Result:
- grep -q ‘eb-ecs start/’
- initctl status eb-ecs [2018-10-12T04:55:27.048Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage1/AppDeployEnactHook/01flip-dir.sh] : Starting activity… [2018-10-12T04:55:27.438Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage1/AppDeployEnactHook/01flip-dir.sh] : Completed activity. Result:
- . /opt/elasticbeanstalk/hooks/common.sh ++ /opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir
- EB_CONFIG_APP_CURRENT=/var/app/current ++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
- EB_CONFIG_APP_STAGING=/var/app/staging
- ‘[’ -z /var/app/staging ‘]’
- ‘[’ -d /var/app/current ‘]’
- mv /var/app/current /var/app/current.old
- mv /var/app/staging /var/app/current
- nohup rm -rf /var/app/current.old [2018-10-12T04:55:27.438Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage1/AppDeployEnactHook/02update-credentials.sh] : Starting activity… [2018-10-12T04:55:27.870Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage1/AppDeployEnactHook/02update-credentials.sh] : Completed activity. [2018-10-12T04:55:27.870Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage1/AppDeployEnactHook/03start-task.sh] : Starting activity… [2018-10-12T04:56:09.900Z] INFO [32096] - [Application update travis-3f59e23ce96309a4d80a84edb477232a01f914a2-1539320107@9/AppDeployStage1/AppDeployEnactHook/03start-task.sh] : Activity execution failed, because: + . /opt/elasticbeanstalk/hooks/common.sh
- RETRY=0
- initctl start eb-ecs EB_EVENT_FILE=/tmp/eventsfile20181012-32096-tmqpx8 initctl: Job failed to start
- ‘[’ -f /etc/elasticbeanstalk/.eb-ecs-start-no-retry ‘]’
- warn ‘Failed to start ECS task, retrying…’
- echo ‘Failed to start ECS task, retrying…’ Failed to start ECS task, retrying…
- eventHelper.py --msg ‘Failed to start ECS task, retrying…’ --severity WARN
- RETRY=1
- sleep 3
- ‘[’ 1 -gt 1 ‘]’
- initctl start eb-ecs EB_EVENT_FILE=/tmp/eventsfile20181012-32096-tmqpx8 initctl: Job failed to start
- ‘[’ -f /etc/elasticbeanstalk/.eb-ecs-start-no-retry ‘]’
- warn ‘Failed to start ECS task, retrying…’
- echo ‘Failed to start ECS task, retrying…’ Failed to start ECS task, retrying…
- eventHelper.py --msg ‘Failed to start ECS task, retrying…’ --severity WARN
- RETRY=2
- sleep 3
- ‘[’ 2 -gt 1 ‘]’
- error_exit ‘Failed to start ECS task after retrying 2 times.’ 1
- error ‘Failed to start ECS task after retrying 2 times.’
- echo ‘Failed to start ECS task after retrying 2 times.’ Failed to start ECS task after retrying 2 times.
- eventHelper.py --msg ‘Failed to start ECS task after retrying 2 times.’ --severity ERROR
- exit 1 (ElasticBeanstalk::ExternalInvocationError) caused by: + . /opt/elasticbeanstalk/hooks/common.sh
- RETRY=0
- initctl start eb-ecs EB_EVENT_FILE=/tmp/eventsfile20181012-32096-tmqpx8 initctl: Job failed to start
- ‘[’ -f /etc/elasticbeanstalk/.eb-ecs-start-no-retry ‘]’
- warn ‘Failed to start ECS task, retrying…’
- echo ‘Failed to start ECS task, retrying…’ Failed to start ECS task, retrying…
- eventHelper.py --msg ‘Failed to start ECS task, retrying…’ --severity WARN
- RETRY=1
- sleep 3
- ‘[’ 1 -gt 1 ‘]’
- initctl start eb-ecs EB_EVENT_FILE=/tmp/eventsfile20181012-32096-tmqpx8 initctl: Job failed to start
- ‘[’ -f /etc/elasticbeanstalk/.eb-ecs-start-no-retry ‘]’
- warn ‘Failed to start ECS task, retrying…’
- echo ‘Failed to start ECS task, retrying…’ Failed to start ECS task, retrying…
- eventHelper.py --msg ‘Failed to start ECS task, retrying…’ --severity WARN
- RETRY=2
- sleep 3
- ‘[’ 2 -gt 1 ‘]’
- error_exit ‘Failed to start ECS task after retrying 2 times.’ 1
- error ‘Failed to start ECS task after retrying 2 times.’
- echo ‘Failed to start ECS task after retrying 2 times.’ Failed to start ECS task after retrying 2 times.
- eventHelper.py --msg ‘Failed to start ECS task after retrying 2 times.’ --severity ERROR
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 7
- Comments: 15 (5 by maintainers)
Was anyone able to solve this? Experiencing this same issue, one year later
@Hugozys @milenazuccarelli unfortunately there isn’t anything we can do from this project perspective to solve this, as explained before the issues lies between
docker-gen
and the newest ECS AMI.