You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by GB <ga...@gmail.com> on 2017/03/15 09:48:58 UTC

Configuring Ignite Services to deploy on Server nodes only

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. 

</a> <https://apacheignite.readme.io/docs/service-grid> 

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);




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Configuring-Ignite-Services-to-deploy-on-Server-nodes-only-tp11189.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Configuring Ignite Services to deploy on Server nodes only

Posted by waterg <je...@gmail.com>.
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>



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Configuring-Ignite-Services-to-deploy-on-Server-nodes-only-tp11189p13799.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Configuring Ignite Services to deploy on Server nodes only

Posted by afedotov <al...@gmail.com>.
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] <
ml-node+s70518n11189h93@n6.nabble.com> 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.
>
> <https://apacheignite.readme.io/docs/service-grid>
>
> 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
> ml-node+s70518n1h65@n6.nabble.com
> To unsubscribe from Apache Ignite Users, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=YWxleGFuZGVyLmZlZG90b2ZmQGdtYWlsLmNvbXwxfC0xMzYxNTU0NTg=>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Kind regards,
Alex.




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Configuring-Ignite-Services-to-deploy-on-Server-nodes-only-tp11189p11197.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.