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
-
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:export IGNITE_EVENT_DRIVEN_SERVICE_PROCESSOR_ENABLED=true
-
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"/> </property> </bean>
IgniteConfiguration cfg = new IgniteConfiguration(); ManagedDeploymentSpi deploymentSpi = new ManagedDeploymentSpi(); cfg.setDeploymentSpi(deploymentSpi); 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"); }
© 2024 GridGain Systems, Inc. All Rights Reserved. Privacy Policy | Legal Notices. GridGain® is a registered trademark of GridGain Systems, Inc.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.