Code Monkey home page Code Monkey logo

docker-zookeeper-cluster's People

Contributors

jeygeethan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-zookeeper-cluster's Issues

[question] How to run this on AWS ECS?

I don't see a way to run this on AWS Container Service in a single cluster (with, for example, 3 EC2 instances). This is because each cluster has to use a single Container definition (docker run...), and I need to pass a variable to docker run that is different for each EC2 instance in my cluster. In other words, I think I need 3x AWS clusters, each with a single EC2 instance and slightly different Container definition setup.

I don't suppose you've tried this? Or come up with a solution?

Docker container user

What about running zookeeper inside container as non-root user? Could be a best practice for security/resources reason

Error response from daemon: rpc error: code = InvalidArgument desc = port '2181' is already in use by service 'stackname_servicename' as an ingress port

All three service bind same ports on host, after removing the host port mapping part i got the output of first service

[
    {
        "ID": "nxlr74hsfa0hk294ctqbkciuq",
        "Version": {
            "Index": 2163
        },
        "CreatedAt": "2017-10-14T15:58:38.563057069Z",
        "UpdatedAt": "2017-10-14T15:58:38.565532275Z",
        "Spec": {
            "Name": "zk-cluster_zk_1",
            "Labels": {
                "com.docker.stack.image": "jeygeethan/zookeeper-cluster",
                "com.docker.stack.namespace": "zk-cluster"
            },
            "TaskTemplate": {
                "ContainerSpec": {
                    "Image": "jeygeethan/zookeeper-cluster:latest@sha256:55d24058d87df2a83e9543bd248facdb0668a769c1c9649594be0adbbfa09b5c",
                    "Labels": {
                        "com.docker.stack.namespace": "zk-cluster"
                    },
                    "Args": [
                        "docker_host_1,docker_host_2,docker_host_3",
                        "1"
                    ],
                    "Env": [
                        "constraint:node==docker_host_1"
                    ],
                    "Privileges": {
                        "CredentialSpec": null,
                        "SELinuxContext": null
                    },
                    "Mounts": [
                        {
                            "Type": "bind",
                            "Source": "/var/lib/zookeeper",
                            "Target": "/var/lib/zookeeper"
                        },
                        {
                            "Type": "bind",
                            "Source": "/var/log/zookeeper",
                            "Target": "/var/log/zookeeper"
                        }
                    ],
                    "StopGracePeriod": 10000000000,
                    "DNSConfig": {}
                },
                "Resources": {},
                "RestartPolicy": {
                    "Condition": "any",
                    "Delay": 5000000000,
                    "MaxAttempts": 0
                },
                "Placement": {
                    "Platforms": [
                        {
                            "Architecture": "amd64",
                            "OS": "linux"
                        }
                    ]
                },
                "Networks": [
                    {
                        "Target": "l4qrtzf6c2ar5648bxwwiw4qw",
                        "Aliases": [
                            "zk_1"
                        ]
                    }
                ],
                "ForceUpdate": 0,
                "Runtime": "container"
            },
            "Mode": {
                "Replicated": {
                    "Replicas": 1
                }
            },
            "UpdateConfig": {
                "Parallelism": 1,
                "FailureAction": "pause",
                "Monitor": 5000000000,
                "MaxFailureRatio": 0,
                "Order": "stop-first"
            },
            "RollbackConfig": {
                "Parallelism": 1,
                "FailureAction": "pause",
                "Monitor": 5000000000,
                "MaxFailureRatio": 0,
                "Order": "stop-first"
            },
            "EndpointSpec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 2181,
                        "PublishMode": "ingress"
                    },
                    {
                        "Protocol": "tcp",
                        "TargetPort": 2888,
                        "PublishMode": "ingress"
                    },
                    {
                        "Protocol": "tcp",
                        "TargetPort": 3888,
                        "PublishMode": "ingress"
                    }
                ]
            }
        },
        "Endpoint": {
            "Spec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 2181,
                        "PublishMode": "ingress"
                    },
                    {
                        "Protocol": "tcp",
                        "TargetPort": 2888,
                        "PublishMode": "ingress"
                    },
                    {
                        "Protocol": "tcp",
                        "TargetPort": 3888,
                        "PublishMode": "ingress"
                    }
                ]
            },
            "Ports": [
                {
                    "Protocol": "tcp",
                    "TargetPort": 2181,
                    "PublishedPort": 30000,
                    "PublishMode": "ingress"
                },
                {
                    "Protocol": "tcp",
                    "TargetPort": 2888,
                    "PublishedPort": 30001,
                    "PublishMode": "ingress"
                },
                {
                    "Protocol": "tcp",
                    "TargetPort": 3888,
                    "PublishedPort": 30002,
                    "PublishMode": "ingress"
                }
            ],
            "VirtualIPs": [
                {
                    "NetworkID": "xqg1illhhwj4ht2th2wnaof7u",
                    "Addr": "10.255.0.4/16"
                },
                {
                    "NetworkID": "l4qrtzf6c2ar5648bxwwiw4qw",
                    "Addr": "10.0.1.3/24"
                }
            ]
        }
    }
]

but no container open

docker service ls
ID NAME MODE REPLICAS IMAGE PORTS nxlr74hsfa0h zk-cluster_zk_1 replicated 0/1 jeygeethan/zookeeper-cluster:latest *:30000->2181/tcp,*:30001->2888/tcp,*:30002->3888/tcp lseqgdkfks3l zk-cluster_zk_2 replicated 0/1 jeygeethan/zookeeper-cluster:latest *:30003->2181/tcp,*:30004->2888/tcp,*:30005->3888/tcp fo08fx9cfo7g zk-cluster_zk_3 replicated 0/1 jeygeethan/zookeeper-cluster:latest *:2181->2181/tcp,*:2888->2888/tcp,*:3888->3888/tcp

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.