Skip to content

GridGain-Demos/gridgain-code-deployment-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GridGain code deployment demo

This demo shows how to deploy compute tasks to Gridgain Nebula cluster and run them right from the client`s application.

  1. Go to https://portal.gridgain.com/.
    Screen
  2. Click "Create Nebula Cluster". A provisioning wizard will appear.
    Screen
  3. Create a Small Instance with 1 node:
    Screen
  4. Specify user credentials. These credentials will be used for clients that work with the cluster.
  5. Accept terms and conditions, and start provisioning the cluster.
  6. Wait for the cluster to be successfully provisioned.
  7. Make sure the cluster is selected in the Cluster Management screen.
  8. Switch to the Deployment menu and create a new deployment.
  9. Click "Add artifact" to open a menu with types of artifacts, that you can choose:
    Screen
  10. Create the following artifacts:
  • Direct Link artifact with url https://code-deployment-demo.s3.amazonaws.com/compute-task-sample-1.0.jar.
  • Maven artifact with coordinate com.google.guava:guava-collections:r03, which is a transitive dependency of the compute task.
  1. Switch to the Clusters screen, click the on the right of the cluster and select "Connect" from the drop-down menu. Copy the connection url: Screen
  2. Use the ThinClientApp class ( if you want to run a thin client ) or ThickClientApp class ( if you want to run a thick client) and fill copied connection url to ADDRESSES field.
  3. Run the application. It executes a job on the cluster, and you should see its output on the client node:
    >> Execute org.gridgain.demo.CityFilterTask job
    >> Job result:
    [Barcelona, Bilbao, Córdoba, Gijón, Madrid, Mallorca, Murcia, Málaga, Sevilla, Valencia, Valladolid, Vigo, Zaragoza]
    >> Compute task is executed, check for output on the server nodes.
    
    and the following output on the server node:
    >> Executing the compute task
    >> Found 13 cities with code SPA
    
  4. [Optional] Go to the compute task class CityFilterTask.java and invert comments in rows 26-27:
       CityComputeJob job = new CityComputeJob(CountryCode.SPA);
    // CityComputeJob job = new CityComputeJob(CountryCode.FRA);
  5. [Optional] Perform points 5, 6, 7 again and you should get the following output:
    >> Execute org.gridgain.demo.CityFilterTask job
    >> Job result:
    [Angers, Bordeaux, Brest, Dijon, Grenoble, Lille, Lyon, Marseille, Montpellier, Nantes, Nice, Paris, Reims, Rennes, Strasbourg, Toulon, Toulouse]
    >> Compute task is executed, check for output on the server nodes.
    
    and on the server node side:
    >> Executing the compute task
    >> Found 17 cities with code FRA
    

About

An example of how to deploy a cluster in GridGain Nebula

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages