Configure Hazelcast With Azure

Learn how to get a Hazelcast cluster up and running just the way you want it using Microsoft Azure.

Getting started with Hazelecast on Microsoft Azure is a simple four-step process:

1. Basics

Username: This will be the username used to log into the virtual machine.

Authentication type: Type of authentication can be SSH Public Key or Password.

Password: The password used to login to the virtual machine.

SSH Public Key: The SSH key used to login to the virtual machine.

Subscription: Which subscription used to purchase the resources.

Resource group: The resource group that will store all created resources.

Location: The region that will host all created resources.

2. Infrastructure

Version of Hazelcast: Which version of Hazelcast Grid to be installed.

Custom jar upload: A custom jar to be added to each virtual machine classpath.

Hazelcast username: The username to be used to login to Hazelcast Grid.

Hazelcast password: The password to be used to login to Hazelcast Grid.

Storage account: The storage account used for all resource storage needs.

Ubuntu version: The version of Ubuntu to be installed.

Virtual machine size: The size of each virtual machine for the Hazelcast Grid.

3. Summary

Verify the request summary. Here, you can also choose to download the template parameterized JSON file in order to store for future reference or even use with theAzure Command Line Interface.

4. Deploy

Buy and deploy. Here, you will be presented with Hazelcast’s terms of use and privacy policy and, upon agreement, your Hazelcast Cluster will begin deployment.

If you wish to investigate the deployment on any of the nodes, simply log in using the credentials you configured. Once you log into a node you, can observe the waagent in action. Waagent (Microsoft Azure Linux Agent) begins the orchestration for the downloading, configuration, and startup of Hazelcast.

Inside the Deployment

Once the installation is completed, you’ll observe a process ID as the final statement in the waagent.log located:

/var/lib/waagent/Microsoft.OSTCExtensions.CustomScriptForLinux-1.5.2.0/download/0

So what just happened? Waagent downloaded and invoked the Hazelcast solution template to each machine. Then the solution template took the parameters from the deployment and executed a series of scripts.

bootstrap
    Created environment variables
    Calls install_hazelcast
    Calls modify_configuration
    Starts a service named hazelcast-server

Post Deployment

In the event you wish to start or stop hazelcast-server, use the service command:

service hazelcast-server stop
    service hazelcast-server start

The log is located at /var/log/hazelcast-upstart.log.

If you uploaded a jar during deployment it will be placed at /var/hazelcast/custom.jar.

You know the server is ready once see the STARTED message:

INFO: [10.0.1.5]:5701 [hzUser] [3.6.4] Address[10.0.1.5]:5701 is STARTED