Configuring Ignite Services to deploy on Server nodes only

classic Classic list List threaded Threaded
3 messages Options
GB GB
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Configuring Ignite Services to deploy on Server nodes only

This post was updated on .
Hi,

Below link details how to deploy programatically Ignite Services to deploy only on Server nodes in the cluster. Our Ignite cluster is in standalone mode.


Can someone point me to documentation or way of achieving similar thing via xml configuration?
- Specifying Node filer via xml configuration :

public class ServiceFilter implements IgnitePredicate<ClusterNode> {
        @Override public boolean apply(ClusterNode node) {
  // The service will be deployed on non client nodes
    // that have the attribute 'west.coast.node'.
    return !node.isClient() &&
    node.attributes().containsKey("west.coast.node");
  }
}

- Specifying Server Node only deployment via xml configuration :

// A service will be deployed on the server nodes only.
IgniteServices services = ignite.services(ignite.cluster().forServers());

// Deploying the service.
services.deploy(serviceCfg);
afedotov afedotov
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Configuring Ignite Services to deploy on Server nodes only

If you want to get IgniteServices for only server nodes by using XML config, 
then, to my knowledge, I don't think it's feasible.
Why do you want to configure it via XML?

On Wed, Mar 15, 2017 at 12:48 PM, GB [via Apache Ignite Users] <[hidden email]> wrote:
Hi,

Below link details how to deploy programatically Ignite Services to deploy only on Server nodes in the cluster. Our Ignite cluster is in standalone mode.



Can someone point me to documentation or way of achieving similar thing via xml configuration?
- Specifying Node filer via xml configuration :

public class ServiceFilter implements IgnitePredicate<ClusterNode> {
        @Override public boolean apply(ClusterNode node) {
  // The service will be deployed on non client nodes
    // that have the attribute 'west.coast.node'.
    return !node.isClient() &&
    node.attributes().containsKey("west.coast.node");
  }
}

- Specifying Server Node only deployment via xml configuration :

// A service will be deployed on the server nodes only.
IgniteServices services = ignite.services(ignite.cluster().forServers());

// Deploying the service.
services.deploy(serviceCfg);



If you reply to this email, your message will be added to the discussion below:
http://apache-ignite-users.70518.x6.nabble.com/Configuring-Ignite-Services-to-deploy-on-Server-nodes-only-tp11189.html
To start a new topic under Apache Ignite Users, email [hidden email]
To unsubscribe from Apache Ignite Users, click here.
NAML



--
Kind regards,
Alex.
waterg waterg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Configuring Ignite Services to deploy on Server nodes only

Hi there, I was looking into the same thing. This seems to be working for me

https://apacheignite.readme.io/v2.0/docs/service-configuration


    <property name="serviceConfiguration">
        <list>
            <bean class="org.apache.ignite.services.ServiceConfiguration">
                <property name="name" value="MyClusterSingletonSvc"/>
                <property name="maxPerNodeCount" value="1"/>
                <property name="totalCount" value="1"/>
                <property name="service">
                  <ref bean="myServiceImpl"/>
                </property>
            </bean>
        </list>
    </property>
Loading...