セレン グリッド サーバーをスピンアップし、fargate を使用して firefox-node を接続しようとしています。cloudformation を書く自信がないので、aws コンソールを使用しています。2 つのコンテナ ハブと selenium/firefox をリンクしたい。Fargate のデフォルト ネットワーク モードは awsvpc であり、従来の「リンク」パラメーターは使用できません。また、チュートリアル ビデオの 1 つでは、一般に localhost/127.0.0.1 として知られるローカル ループバック インターフェイスを使用して 2 つのコンテナーが通信できることが示唆されています。したがって、私のタスク定義を以下に示します。しかし、それでもうまくいきません。どんな助けでも大歓迎です。
{
"executionRoleArn": "arn:aws:iam::xxxxxxxxx:role/ecsTaskExecutionRole",
"containerDefinitions": [
{
"dnsSearchDomains": null,
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/first-run-task-definition",
"awslogs-region": "us-xxxx-x",
"awslogs-stream-prefix": "ecs"
}
},
"entryPoint": [],
"portMappings": [
{
"hostPort": 4444,
"protocol": "tcp",
"containerPort": 4444
}
],
"command": [],
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "SE_OPTS",
"value": "-debug"
}
],
"mountPoints": [],
"volumesFrom": [],
"image": "selenium/hub:latest",
"disableNetworking": null,
"essential": true,
"links": [],
"hostname": null,
"extraHosts": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": null,
"privileged": null,
"name": "hub"
},
{
"dnsSearchDomains": null,
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/first-run-task-definition",
"awslogs-region": "us-xxxx-1",
"awslogs-stream-prefix": "ecs"
}
},
"entryPoint": null,
"portMappings": [],
"command": null,
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "HUB_PORT_4444_TCP_ADDR",
"value": "127.0.0.1"
},
{
"name": "HUB_PORT_4444_TCP_PORT",
"value": "4444"
}
],
"volumesFrom": [],
"image": "selenium/node-firefox:latest",
"disableNetworking": null,
"essential": true,
"links": [],
"hostname": null,
"extraHosts": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": null,
"privileged": null,
"name": "firefox"
}
],
"placementConstraints": [],
"memory": "1024",
"taskRoleArn": "arn:aws:iam::xxxxxxx:role/ecsTaskExecutionRole",
"compatibilities": [
"EC2",
"FARGATE"
],
"taskDefinitionArn": "arn:aws:ecs:us-xxxx-1:xxxxx:task-definition/first-
run-task-definition:10",
"family": "first-run-task-definition",
"requiresAttributes": [
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "ecs.capability.task-eni"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.task-iam-role"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "ecs.capability.execution-role-awslogs"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
}
],
"requiresCompatibilities": [
"FARGATE"
],
"networkMode": "awsvpc",
"cpu": "512",
"revision": 10,
"status": "ACTIVE",
"volumes": []
}