Hi Stefan,

If you want to use OrientDB in a clustered configuration with Docker, you
could leverage on Kubernates.

For Kubernates we have a working configuration. Rename the attached file as
hazelcast.xml and put in the config directory overwriting the default one.
Then you need this extra jar:

<dependency>
      <groupId>com.hazelcast</groupId>
      <artifactId>hazelcast-kubernetes</artifactId>
      <version>${hazelcast-kubernetes-version}</version>
    </dependency>


For more information look at https://github.com/hazelcast/hazelcast
-kubernetes.

I hope this help. Please let me know how is going.

About Docker, use the official one: https://hub.docker.com/_/orientdb/.



Best Regards,

Luca Garulli
Founder & CEO
OrientDB LTD <http://orientdb.com/>

On 6 July 2017 at 10:54, Stefan Bergh <[email protected]> wrote:

> Hi,
> I know this thread is long dead, but I am trying to do this exact same
> thing.  I was able to access the repo https://github.com/abcum/
> docker-orientdb.git about a week ago, but it is now 404-ing.   Is that
> code gone for good, or is there any way I could grab it from somewhere?
>
> Thanks in advance,
> Stefan Bergh
>
> On Wednesday, March 4, 2015 at 7:41:02 AM UTC-6, Tobie Morgan Hitchcock
> wrote:
>>
>> Hi Esen,
>>
>> I've just been through the same problem, but have a solution.
>>
>> Basically, Hazelcast attaches itself to the private ip address of the
>> docker container, and notifies other nodes of this ip address (meaning that
>> it does not ever match the members). There are two solutions...
>>
>> 1. Use *docker run --net=host* to run the docker container (works ok,
>> but the container is therefore not running in it's separate network).
>> 2. Pass the private/public IP address of the machine to the docker
>> container so that Hazelcast knows which IP address to bind to.
>>
>>    1. Add <properties><property name="hazelcast.local.localAddress"
>>    >IPV4ADDRESSHERE</property></properties> into hazelcast.xml
>>    2. Add <network><public-address>IPV4ADDRESSHERE</public-address></n
>>    etwork>
>>
>> I've setup a docker container to do exactly this, which can be used to
>> setup a distributed OrientDB running on CoreOS using Fleet (fleetctl). This
>> will work on Vagrant or Amazon EC2/VPC.
>>
>> The repository is available here: https://github.com/abcum
>> /docker-orientdb.git
>>
>> Tobie
>>
>>
>> On Tuesday, 6 January 2015 07:19:42 UTC, Esen Sagynov wrote:
>>>
>>> I can successfully telnet to each server from any other server because
>>> incoming requests are allowed. In fact, each server successfully receives a
>>> connection request, however, there seems to be some kind of a validation.
>>> When the host A receives a connection request from host B, host A checks if
>>> the requested IP address is host A's IP address. Now here this validation
>>> fails according to the above error message.
>>>
>>> I wonder if it is necessary to do such validations in ODB?
>>>
>>> On Monday, January 5, 2015 9:27:31 PM UTC+9, Lvc@ wrote:
>>>>
>>>> Hi Esen,
>>>> Seems OrientDB servers can't see each other. I suggest you to try if
>>>> connections are allowed between hosts with CURL.
>>>>
>>>> Lvc@
>>>>
>>>>
>>>> On 5 January 2015 at 07:19, Esen Sagynov <[email protected]> wrote:
>>>>
>>>>> Using ODB 2.0-SNAPSHOT (Jan 5, 2015).
>>>>>
>>>>> My nodes in Docker containers on separate physical machines cannot
>>>>> join to each other. The establish a connection however eventually they
>>>>> refuse joining because some conditions aren't met.
>>>>>
>>>>> The following are logs on Host 2:
>>>>>
>>>>> 2015-01-05 06:07:15:691 INFO  [172.17.0.3]:2434 [orientdb] [3.3]
>>>>> Accepting socket connection from /123.123.123.124:55647 [
>>>>> SocketAcceptor]
>>>>> 2015-01-05 06:07:15:692 INFO  [172.17.0.3]:2434 [orientdb] [3.3]
>>>>> Established socket connection between /172.17.0.3:2434 and /123.123.
>>>>> 123.124:55647 [TcpIpConnectionManager]
>>>>> 2015-01-05 06:07:15:694 WARNING [172.17.0.3]:2434 [orientdb] [3.3]
>>>>> Wrong bind request from Address[172.17.0.12]:2434! This node is not
>>>>> requested endpoint: Address[123.123.123.124]:2434 [
>>>>> TcpIpConnectionManager]
>>>>>
>>>>> Host 1 (123.123.123.123) running ODB in a container 172.17.0.3:2434.
>>>>> Host 2 (123.123.123.124) running ODB in a container 172.17.0.12:2434.
>>>>> Host 3 (123.123.123.125) running ODB in a container 172.17.0.10:2434.
>>>>>
>>>>> Because docker on each host manages its own bridge each ODB container
>>>>> doesn't see it directly. This is why in config/hazelcast.xml I specify the
>>>>> IP of the host machines.
>>>>>
>>>>>                         <tcp-ip enabled="true">
>>>>>                                 <member> 123.123.123.123:2434</member>
>>>>>                                 <member> 123.123.123.124:2434</member>
>>>>>                                 <member> 123.123.123.125:2434</member>
>>>>>                         </tcp-ip>
>>>>>
>>>>> All ODB containers expose all 3 ports (2424, 2480, 2434). I can telnet
>>>>> and ping. However, because each container requests a dynamic docker IP
>>>>> address, each node cannot join the same cluster because host IP doesn't 
>>>>> not
>>>>> match the actual Docker IP inside the container as shown in the above 
>>>>> error
>>>>> log.
>>>>>
>>>>> Any solutions for this?
>>>>>
>>>>> --
>>>>>
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "OrientDB" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Copyright (c) 2008-2012, Hazel Bilisim Ltd. All Rights Reserved. ~ 
	~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may 
	not use this file except in compliance with the License. ~ You may obtain 
	a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ 
	~ Unless required by applicable law or agreed to in writing, software ~ distributed 
	under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES 
	OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for 
	the specific language governing permissions and ~ limitations under the License. -->

<hazelcast xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
           xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.7.xsd"
           xmlns="http://www.hazelcast.com/schema/config";>
    <group>
        <name>orientdb</name>
        <password>orientdb</password>
    </group>
    <properties>
        <property name="hazelcast.phone.home.enabled">false</property>
        <property name="hazelcast.mancenter.enabled">false</property>
        <property name="hazelcast.memcache.enabled">false</property>
        <property name="hazelcast.rest.enabled">false</property>
        <property name="hazelcast.wait.seconds.before.join">5</property>
        <property name="hazelcast.operation.thread.count">1</property>
        <property name="hazelcast.operation.generic.thread.count">1</property>
        <property name="hazelcast.client.event.thread.count">1</property>
        <property name="hazelcast.event.thread.count">1</property>
        <property name="hazelcast.heartbeat.interval.seconds">5</property>
        <property name="hazelcast.max.no.heartbeat.seconds">30</property>
        <property name="hazelcast.icmp.enabled">true</property>
        <property name="hazelcast.icmp.timeout">5000</property>
        <property name="hazelcast.icmp.ttl">3</property>
        <property name="hazelcast.merge.next.run.delay.seconds">15</property>
        <!-- only necessary prior Hazelcast 3.8 (Kubernetes)-->
        <property name="hazelcast.discovery.enabled">true</property>
    </properties>
    <!--<network>-->

    <!--<port auto-increment="true">2434</port>-->
    <!--<join>-->
    <!--<multicast enabled="true">-->
    <!--<multicast-group>235.1.1.1</multicast-group>-->
    <!--<multicast-port>2434</multicast-port>-->
    <!--</multicast>-->
    <!--</join>-->
    <!--</network>-->

    <!--kubernetes-->
    <network>
        <port auto-increment="false">5701</port>
        <join>
            <!-- deactivate normal discovery -->
            <multicast enabled="false"/>
            <tcp-ip enabled="false"/>

            <!-- activate the Kubernetes plugin -->
            <discovery-strategies>
                <discovery-strategy enabled="true" class="com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy">

                    <properties>

                        <property name="service-name">orientdb</property>
                        <property name="service-label-name">orientdb</property>
                        <property name="service-label-value">true</property>
                        <property name="namespace">default</property>


                        <!-- configure discovery service API lookup -->
                        <!--<property name="service-dns">kubernetes.default.svc.cluster.local</property>-->
                        <!--<property name="service-dns-timeout">10</property>-->
                    </properties>
                </discovery-strategy>
            </discovery-strategies>
        </join>
    </network>


    <executor-service>
        <pool-size>16</pool-size>
    </executor-service>
</hazelcast>

Reply via email to