Deploying Cluster-Side Modules to Viridian Clusters

Before clusters can execute or store your cluster-side modules, they need to be packaged into a single file and uploaded to the cluster as custom classes. You can upload cluster-side modules, using the console, or the Maven plugin.

Before you Begin

Check the requirements and limitations for cluster-side modules to make sure that your code is ready to be packaged.

Uploading Cluster-Side Modules

Clusters expect all modules to be packaged into a single ZIP or JAR file. When you’ve built and packaged your cluster-side modules, the final step is to upload the resulting package file to the cluster.

You can upload custom classes, using the following options:

  • Maven plugin

  • Hazelcast Viridian console

Using the Maven Plugin

Hazelcast Viridian Serverless

  1. Configure the Hazelcast Viridian Maven plugin in your pom.xml file.

  2. Change into your project’s root directory.

  3. Execute the deploy goal to package your project into a JAR file and upload it to the configured cluster.

    mvn clean package hazelcast-cloud:deploy

In the output, you should see that the plugin packaged and deployed your JAR to your Viridian Serverless cluster.

Using the Hazelcast Viridian Console

You must have either an admin or developer role to upload code to Hazelcast Viridian.

  1. Use your build tool such as Gradle or Maven to package the classes into a JAR or ZIP file.

  2. Sign into the Hazelcast Viridian console and select your cluster.

  3. Go to Manage > Custom Classes and use the file selector to upload the file to Hazelcast Viridian.

When the file is uploaded and ready to use, you will see a success message.

Removing Cluster-Side Modules

To remove cluster-side modules from the cluster, you must use the Hazelcast Viridian console.

  1. Sign into the Hazelcast Viridian console and select your cluster.

  2. Go to Manage > Custom Classes and find your class in the list.

  3. Click on the delete icon next to the class that you want to delete.

Downloading Cluster-Side Modules

To download a cluster-side module, you must use the Hazelcast Viridian console.

  1. Sign into the Hazelcast Viridian console.

  2. Go to Manage > Custom Classes, find your class in the Uploaded Classes list and click on it.