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
-
Configure the Hazelcast Viridian Maven plugin in your
pom.xml
file. -
Change into your project’s root directory.
-
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
To upload code to Hazelcast Viridian:
-
Use your build tool such as Gradle or Maven to package the classes into a JAR or ZIP file.
-
Sign into the Hazelcast Viridian console and select your cluster.
-
Go to Manage > Custom Classes and upload your 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.
-
Sign into the Hazelcast Viridian console and select your cluster.
-
Go to Manage > Custom Classes and find your class in the list.
-
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.
-
Sign into the Hazelcast Viridian console.
-
Go to Manage > Custom Classes, find your class in the Uploaded Classes list and click on it.