2
votes

I'm trying to deploy non custom single node elasticsearch:7.8.1 docker container to AWS ECS Fargate.

On my local I simply executed:

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.8.1

And it spined up ES container for me which my app utilises. I want do have the same container available in the cloud.

How can I do it?

Update: I was able to deploy ES to Fargate but it fails in attempt to access it with error message:

ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

After short googling I found this post where they fixed the problem by turning single node mode on. I dont quite understand how I can turn it on in Fargate, is it in task definition or how?

Another question would be what is the most common way of running ES in AWS? in EC2 or AWS ES service? My aim is to setup infra as quickly as I can. I have got .net core app running in docker using elastic search.

1
That sounds like a realy basic question that could be easily answered by reading the AWS Farget Documentation (docs.aws.amazon.com/AmazonECS/latest/developerguide/…) - maybe you can try this first before asking a question here? Or is there a specific problem you are having with trying that out?David Losert
Is it required to get elasticsearch and push it to ecr only to be able to deploy for fargate? however I'm not changing anything in ES docker at allPetr Savchenko

1 Answers

1
votes

Answering to the latest comment. No, you can simply provide the public Elasticsearch image address from image registry like Docker Hub in your Docker-compose.yml file supplied to AWS Fargate. eg: image: docker.elastic.co/elasticsearch/elasticsearch:7.7.0.