Giter VIP home page Giter VIP logo

docker-elasticsearch-ecs's Introduction

Docker Elasticsearch in ECS

An elasticsearch docker-compose containers setup that is meant to be hosted on ECS.

2.3.X

5.2.2

Run it locally

docker-compose up

Yup that's it.

To push the docker images to a repository

Update push-tag.sample in the bin folder with your own docker registry repository.

Then bin/push-tag

Run it on ECS

Most of the legwork has already been done in the configurations so it should be fairly easy.

This blog post that I wrote runs through some of the details inside the files and configurations that you should have in the ECS and task definitions.

Also feel free to refer to ecs-task-definition.sample as a start to guide you.

{
    "networkMode": "bridge",
    "taskRoleArn": null,
    "containerDefinitions": [
        {
            "volumesFrom": [],
            "memory": 512,
            "extraHosts": null,
            "dnsServers": null,
            "disableNetworking": null,
            "dnsSearchDomains": null,
            "portMappings": [
                {
                    "hostPort": 9200,
                    "containerPort": 9200,
                    "protocol": "tcp"
                },
                {
                    "hostPort": 9300,
                    "containerPort": 9300,
                    "protocol": "tcp"
                }
            ],
            "hostname": null,
            "essential": true,
            "entryPoint": null,
            "mountPoints": [
                {
                    "containerPath": "/usr/share/elasticsearch/data",
                    "sourceVolume": "elasticsearchdata",
                    "readOnly": null
                }
            ],
            "name": "elasticsearch",
            "ulimits": null,
            "dockerSecurityOptions": null,
            "environment": [
                {
                    "name": "ES_HEAP_SIZE",
                    "value": "256m"
                }
            ],
            "links": null,
            "workingDirectory": null,
            "readonlyRootFilesystem": null,
            "image": "YOUR_DOCKER_REGISTRY_URL:latest",
            "command": null,
            "user": null,
            "dockerLabels": null,
            "logConfiguration": null,
            "cpu": 0,
            "privileged": null,
            "memoryReservation": null
        }
    ],
    "volumes": [
        {
            "host": {
                "sourcePath": "/usr/share/elasticsearch/data"
            },
            "name": "elasticsearchdata"
        }
    ],
    "family": "elasticsearch"
}

Notable configurations

elasticsearch.yml: discovery.ec2.groups should be set to the security group that was assigned when you created the ECS cluster. Do not remove network.host or network.publish_host

script.inline: true
bootstrap.mlockall: true
network.host: 0.0.0.0
plugin.mandatory: cloud-aws
network.publish_host: _ec2:privateIp_
discovery.type: ec2
discovery.ec2.groups: sg-docker-es-1
discovery.zen.ping.multicast.enabled: false

logging.yml: Currently the logging level is DEBUG which generates all kinds of logs, you may want toswitch it to INFO after getting initial set up done.

es.logger.level: DEBUG

LICENSE

MIT

docker-elasticsearch-ecs's People

Contributors

aranair avatar

Watchers

James Cloos avatar David Rison avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.