GridGain Developers Hub

Code Deployment

You may want to deploy compute tasks to your GridGain nodes. For example, you often need a large number of dependencies to complete distributed computing tasks.

With GridGain Control Center, you can quickly deliver all dependencies you need to your cluster by using Deployment units. Each deployment unit contains a list of dependencies that is passed to the cluster and stored in the metastorage. When you deploy a version, all nodes in the cluster receive the list of dependencies and download them from the specified repository or URL.

For code deployment to work on attached clusters, provide ADMIN_OPS permissions on the user who deploys the code. For details, see Authorization and Permissions.

How to Start With Code Deployment

  1. Enable the event driven service processor on every node in the cluster. To do this, set the IGNITE_EVENT_DRIVEN_SERVICE_PROCESSOR_ENABLED to true:

  2. Configure ManagedDeploymentSpi in your project. This will allow Nebula to deploy code to your cluster:

    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
    <property name="deploymentSpi">
    <bean class="org.gridgain.control.agent.processor.deployment.ManagedDeploymentSpi"/>
    IgniteConfiguration cfg = new IgniteConfiguration();
    ManagedDeploymentSpi deploymentSpi = new ManagedDeploymentSpi();
    try (Ignite ignite = Ignition.start(cfg)) {
        //execute the task represented by a class located in the "user_libs" directory
        ignite.compute().execute("org.mycompany.HelloWorldTask", "My Args");