공식 문서를 비롯한 수많은 자습서 및 가이드를 따르더라도 ECS에 도커 컨테이너를 배포하려고 할 때 끊임없이 벽돌 벽을 때리고 있습니다. 여기 Docker 작곡가를 AWS ECS에 배포 할 수 없습니다
내가 무슨 짓을했는지의 :ecs-cli configure --cluster my-cluster
ecs-cli up --keypair XXX --capability-iam --size 1 --instance-type t2.micro
ecs-cli compose --file docker-compose.staging.yml up
내 docker-compose.staging.yml
가 작성 명령을 실행 한 후
version: '2'
services:
web:
mem_limit: 128m
image: nginx:latest
ports:
- "80:80"
- "443:443"
volumes:
- src:/var/www
- vhost.staging.conf:/etc/nginx/conf.d/site.conf
- certificates:/etc/nginx/ssl
links:
- app
depends_on:
- app
app:
mem_limit: 128m
image: groberts12/php7.1-fpm-base
volumes:
- src:/var/www
을, 내가 얻을 :
WARN[0000] Skipping unsupported YAML option... option name=networks
WARN[0000] Skipping unsupported YAML option for service... option name=networks service name=app
WARN[0000] Skipping unsupported YAML option for service... option name="depends_on" service name=web
WARN[0000] Skipping unsupported YAML option for service... option name=networks service name=web
INFO[0002] Using ECS task definition TaskDefinition="ecscompose-docker:5"
INFO[0002] Starting container... container="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/app"
INFO[0002] Starting container... container="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/web"
INFO[0002] Describe ECS container status container="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/web" desiredStatus=RUNNING lastStatus=PENDING taskDefinition="ecscompose-docker:5"
INFO[0002] Describe ECS container status container="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/app" desiredStatus=RUNNING lastStatus=PENDING taskDefinition="ecscompose-docker:5"
INFO[0014] Describe ECS container status container="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/web" desiredStatus=RUNNING lastStatus=PENDING taskDefinition="ecscompose-docker:5"
INFO[0014] Describe ECS container status container="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/app" desiredStatus=RUNNING lastStatus=PENDING taskDefinition="ecscompose-docker:5"
INFO[0026] Describe ECS container status container="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/web" desiredStatus=RUNNING lastStatus=PENDING taskDefinition="ecscompose-docker:5"
INFO[0026] Describe ECS container status container="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/app" desiredStatus=RUNNING lastStatus=PENDING taskDefinition="ecscompose-docker:5"
INFO[0032] Stopped container... container="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/web" desiredStatus=STOPPED lastStatus=STOPPED taskDefinition="ecscompose-docker:5"
INFO[0032] Stopped container... container="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/app" desiredStatus=STOPPED lastStatus=STOPPED taskDefinition="ecscompose-docker:5"
ecs-cli ps
친절 반환
Name State Ports TaskDefinition
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/web STOPPED ExitCode: 1 xx.xxx.xxx.xxx:443->443/tcp, xx.xxx.xxx.xxx:80->80/tcp ecscompose-docker:5
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/app STOPPED ExitCode: 0 ecscompose-docker:5
그냥 경우에, 나는 다음 서비스 스핀 업 달렸다 :
ecs-cli compose --file docker-compose.staging.yml service up
이 잠시했다
을하지만, 결국이 끝난 말했다 : 다시 프로세스 목록을 검사 할 때
WARN[0000] Skipping unsupported YAML option... option name=networks
WARN[0000] Skipping unsupported YAML option for service... option name=networks service name=app
WARN[0000] Skipping unsupported YAML option for service... option name="depends_on" service name=web
WARN[0000] Skipping unsupported YAML option for service... option name=networks service name=web
INFO[0001] Using ECS task definition TaskDefinition="ecscompose-docker:6"
INFO[0001] Created an ECS service service=ecscompose-service-docker taskDefinition="ecscompose-docker:6"
INFO[0002] Updated ECS service successfully desiredCount=1 serviceName=ecscompose-service-docker
INFO[0002] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0032] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0062] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0092] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0122] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0152] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0182] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0212] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0243] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0273] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0303] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0333] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0363] Describe ECS Service status desiredCount=1 runningCount=0 serviceName=ecscompose-service-docker
INFO[0378] ECS Service has reached a stable state desiredCount=1 runningCount=1 serviceName=ecscompose-service-docker
그러나 , 그것은 위의 시도의 중복으로 가득 차 있었다.
마침내 컨테이너 인스턴스에 연결 한 후, 나는 ECS 에이전트 로그를 조회 할 수 있었다 그러나 이것은 정말 이외의 많은 정보를 포함하지 않았다
2017-03-29T15:24:11Z [WARN] Warning, link with no linkalias module="api client" linkName="app" task="ecscompose-docker:6 arn:aws:ecs:eu-west-1:571010915057:task/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, Status: (NONE->RUNNING) Containers: [web (PULLED->RUNNING),app (RUNNING->RUNNING),]" container="web(nginx:latest) (PULLED->RUNNING)"
모든 것이 문제없이 도커에 완벽하게 잘 작동 ,하지만 devops 게임의이 부분에서는 새로운 것이므로 문제가 될 수있는 부분에 대해서는 완전히 혼란 스럽습니다.
제안 사항?