How to setup multi host node discovery

classic Classic list List threaded Threaded
4 messages Options
newigniter newigniter
Reply | Threaded
Open this post in threaded view
|

How to setup multi host node discovery

Greetings.

I am new to apache ignite and I would like to set up multiple ignite nodes
each running on separate ec2 instance inside docker container.
When I start the first ignite node, the cluster is created and now I have
one node in my cluster.
I create now new ec2 instance and start new ignite node there inside docker
container. How should my configuration look like in order for both of the
nodes joined the same cluster?

I went through Ignite Documentation for TCP/IP Discovery but can't configure
this to work.

Appreciate any help!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: How to setup multi host node discovery

Hello!

You can just list all nodes' IPs in configuration of each node, or use S3 discovery in case of AWS.

Regards,
--
Ilya Kasnacheev


ср, 9 янв. 2019 г. в 17:14, newigniter <[hidden email]>:
Greetings.

I am new to apache ignite and I would like to set up multiple ignite nodes
each running on separate ec2 instance inside docker container.
When I start the first ignite node, the cluster is created and now I have
one node in my cluster.
I create now new ec2 instance and start new ignite node there inside docker
container. How should my configuration look like in order for both of the
nodes joined the same cluster?

I went through Ignite Documentation for TCP/IP Discovery but can't configure
this to work.

Appreciate any help!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
newigniter newigniter
Reply | Threaded
Open this post in threaded view
|

Re: How to setup multi host node discovery

Tnx for your help. Below is my config. Did you mean something like this?

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">
       
        <bean id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
                <property name="dataStorageConfiguration">
                        <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
                                <property name="defaultDataRegionConfiguration">
                                        <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                                                <property name="persistenceEnabled" value="true" />
                                        </bean>
                                </property>
                        </bean>
                </property>
               
                <property name="authenticationEnabled" value="true" />
               
                <property name="discoverySpi">
                        <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                                <property name="ipFinder">
                                        <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                                                <property name="addresses">
                                                        <list>
                                                               
                                                                <value>
                                                                        127.0.0.1
                                                                </value>
                                                               
                                                                <value>
                                                                        [ec2 ip address]:47500..47509
                                                                </value>
                                                        </list>
                                                </property>
                                        </bean>
                                </property>
                        </bean>
                </property>
        </bean>
</beans>

[ec2 ip address]:47500..47509 is the ip address of the ec2 instance where
first node was started. If I understood correctly, it is enough to provide
only one ip address?

I did that and using this configuration I started 2nd node.

I connect to my first node and execute:
./control.sh --user ignite --password ignite --state -> CLUSTER ACTIVE
./control.sh --user ignite --password ignite --baseline -> only first node
is found
I connect to my second node and execute:
./control.sh --user ignite --password ignite --state -> CLUSTER IS INACTIVE






--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: How to setup multi host node discovery

Hello!

Have you tried specifying both nodes' internal IPs in configurartion?

Can you provide log thereof?

Regards,
--
Ilya Kasnacheev


ср, 9 янв. 2019 г. в 18:25, newigniter <[hidden email]>:
Tnx for your help. Below is my config. Did you mean something like this?

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">

        <bean id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
                <property name="dataStorageConfiguration">
                        <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
                                <property name="defaultDataRegionConfiguration">
                                        <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                                                <property name="persistenceEnabled" value="true" />
                                        </bean>
                                </property>
                        </bean>
                </property>

                <property name="authenticationEnabled" value="true" />

                <property name="discoverySpi">
                        <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                                <property name="ipFinder">
                                        <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                                                <property name="addresses">
                                                        <list>

                                                                <value>
                                                                        127.0.0.1
                                                                </value>

                                                                <value>
                                                                        [ec2 ip address]:47500..47509
                                                                </value>
                                                        </list>
                                                </property>
                                        </bean>
                                </property>
                        </bean>
                </property>
        </bean>
</beans>

[ec2 ip address]:47500..47509 is the ip address of the ec2 instance where
first node was started. If I understood correctly, it is enough to provide
only one ip address?

I did that and using this configuration I started 2nd node.

I connect to my first node and execute:
./control.sh --user ignite --password ignite --state -> CLUSTER ACTIVE
./control.sh --user ignite --password ignite --baseline -> only first node
is found
I connect to my second node and execute:
./control.sh --user ignite --password ignite --state -> CLUSTER IS INACTIVE






--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/