variable "vpc_id" {
default = "YOUR_VPC_ID"
}
variable "subnet_id" {
default = "YOUR_SUBNET_ID"
}
- terraform init
- terraform apply --target=module.hoge_test_es_app_ecr
- cd ./elasticsearch
- docker build -t es-test:latest .
- docker tag es-test:latest ${YOUR_AWS_ACCOUNT_ID}.dkr.ecr.${YOUR_REGION}.amazonaws.com/es-test:latest
- (aws ecr get-login --region ap-northeast-1)
- docker push ${YOUR_AWS_ACCOUNT_ID}.dkr.ecr.${YOUR_REGION}.amazonaws.com/es-test:latest
[
{
"name": "ec-test",
"image": "${YOUR_AWS_ACCOUNT_ID}.dkr.ecr.${YOUR_REGION}.amazonaws.com/es-test:latest",
"cpu": 0,
"memory": 60000,
"memoryReservation": 60000,
"portMappings": [
{
"containerPort": 9200,
"hostPort": 9200,
"protocol": "tcp"
},
{
"containerPort": 9300,
"hostPort": 9300,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "ES_JAVA_OPTS ",
"value": "-Xms8g -Xmx8g "
},
{
"name": "REGION",
"value": "ap-northeast-1"
}
],
"mountPoints": [
{
"sourceVolume": "esdata",
"containerPath": "/usr/share/elasticsearch/data/"
}
],
"volumesFrom": [],
"disableNetworking": false,
"readonlyRootFilesystem": false,
"ulimits": [
{
"name": "nofile",
"softLimit": 65536,
"hardLimit": 65536
}
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/es-test",
"awslogs-region": "ap-northeast-1",
"awslogs-stream-prefix": "ecs"
}
}
}
]
- terraform apply
Kibana dev-tool makes it possible for us to execute query DSL without curl command.