Last active
November 5, 2019 17:34
-
-
Save HarshadRanganathan/48928631febf8efbeb60e408f8d0c981 to your computer and use it in GitHub Desktop.
AWS ECS ElasticSearch Task Definition Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ipcMode": null, | |
"executionRoleArn": null, | |
"containerDefinitions": [ | |
{ | |
"dnsSearchDomains": null, | |
"logConfiguration": { | |
"logDriver": "awslogs", | |
"options": { | |
"awslogs-group": "/aws/ecs", | |
"awslogs-region": "us-east-1", | |
"awslogs-stream-prefix": "elasticsearch" | |
} | |
}, | |
"entryPoint": null, | |
"portMappings": [ | |
{ | |
"hostPort": 9200, | |
"protocol": "tcp", | |
"containerPort": 9200 | |
}, | |
{ | |
"hostPort": 9300, | |
"protocol": "tcp", | |
"containerPort": 9300 | |
} | |
], | |
"command": null, | |
"linuxParameters": null, | |
"cpu": 512, | |
"environment": [ | |
{ | |
"name": "ES_JAVA_OPTS", | |
"value": "-Xms2g -Xmx2g" | |
} | |
], | |
"ulimits": [ | |
{ | |
"name": "nofile", | |
"softLimit": 65536, | |
"hardLimit": 65536 | |
} | |
], | |
"dnsServers": null, | |
"mountPoints": [ | |
{ | |
"readOnly": null, | |
"containerPath": "/usr/share/elasticsearch/data", | |
"sourceVolume": "esdata" | |
} | |
], | |
"workingDirectory": null, | |
"secrets": null, | |
"dockerSecurityOptions": null, | |
"memory": 4000, | |
"memoryReservation": 2000, | |
"volumesFrom": [], | |
"image": "<img-url>", | |
"disableNetworking": null, | |
"interactive": null, | |
"healthCheck": null, | |
"essential": true, | |
"links": null, | |
"hostname": null, | |
"extraHosts": null, | |
"pseudoTerminal": null, | |
"user": null, | |
"readonlyRootFilesystem": null, | |
"dockerLabels": null, | |
"systemControls": null, | |
"privileged": false, | |
"name": "elasticsearch" | |
} | |
], | |
"memory": null, | |
"taskRoleArn": "<task-role-arn>", | |
"family": "elasticsearch", | |
"pidMode": null, | |
"requiresCompatibilities": [ | |
"EC2" | |
], | |
"networkMode": "bridge", | |
"cpu": null, | |
"volumes": [ | |
{ | |
"name": "esdata", | |
"host": { | |
"sourcePath": "/usr/share/elasticsearch/data" | |
}, | |
"dockerVolumeConfiguration": null | |
} | |
], | |
"placementConstraints": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Increase mmap count in your EC2 instance using below command:
sudo sysctl -w vm.max_map_count=262144
Not setting above will cause bootstrap checks to fail.
To set this value permanently, update the vm.max_map_count setting in /etc/sysctl.conf. To verify after rebooting, run sysctl vm.max_map_count