Coder Social home page Coder Social logo

hazelcast-azure's Introduction

Table of Contents

Hazelcast Discovery Plugin for Microsoft Azure

This project provides a discovery strategy for Hazelcast 3.6-RC+1 enabled applications running on Azure. It will provide all Hazelcast instances by returning VMs within your Azure resource group that are tagged with a specified value.

Architectual diagram

Getting Started

To add this plugin to your Java project, add the following lines to either your Maven POM file or Gradle configuration.

For Gradle:

repositories {
    jcenter() 
}

dependencies {
    compile 'com.hazelcast.azure:hazelcast-azure:1.0'
}

For Maven:

<dependencies>
    <dependency>
        <groupId>com.hazelcast.azure</groupId>
        <artifactId>hazelcast-azure</artifactId>
        <version>1.0</version>
    </dependency>
</dependencies>

Compiling with Gradle

Run the following command to compile the plugin:

compile 'com.hazelcast.azure:hazelcast-azure:1.0'

Check the releases for the latest version.

Configuring at Hazelcast Side

Ensure that you have added the package hazelcast-azure to your Maven or Gradle configuration as mentioned above.

In your Hazelcast configuration, use the AzureDiscoveryStrategy as shown below:

<network>
    <join>
        <multicast enabled="false"/>
        <tcp-ip enabled="false" />
        <aws enabled="false"/>
        <discovery-strategies>
            <discovery-strategy enabled="true" class="com.hazelcast.azure.AzureDiscoveryStrategy">
                <properties>
                    <property name="client-id">CLIENT_ID</property>
                    <property name="client-secret">CLIENT_SECRET</property>
                    <property name="tenant-id">TENANT_ID</property>
                    <property name="subscription-id">SUB_ID</property>
                    <property name="cluster-id">HZLCAST001</property>
                    <property name="group-name">GROUP-NAME</property>
                </properties>
            </discovery-strategy>
        </discovery-strategies>
    </join>
</network>

You will need to setup Azure Active Directory Service Principal credentials for your Azure Subscription for this plugin to work. With the credentials, fill in the placeholder values above.

Configuring at Azure Side

  • client-id - The Azure Active Directory Service Principal client ID
  • client-secret - The Azure Active Directory Service Principal client secret
  • tenant-id - The Azure Active Directory tenant ID
  • subscription-id - The Azure subscription ID
  • cluster-id - The name of the tag on the hazelcast vm resources
  • group-name - The Azure resource group name of the cluster. You can find this in the Azure portal or CLI.

With every Hazelcast Virtual Machine you deploy in your resource group, you need to ensure that each VM is tagged with the value of cluster-id defined in your Hazelcast configuration. The only requirement is that every VM can access each other either by private or public IP address.

Read more about how you can tag your virtual machines.

Using Azure With ZONE_AWARE Partition Group

When you use Azure plugin as discovery provider, you can configure Hazelcast Partition Grouping with Azure. You need to add fault domain or DNS domain to your machines. So machines will be grouped with respect to their fault or DNS domains. For more information please read: http://docs.hazelcast.org/docs/3.7/manual/html-single/index.html#partition-group-configuration.

...
<partition-group enabled="true" group-type="ZONE_AWARE" />
...

Automated Deployment

You can also use the Azure Hazelcast Template to automatically deploy a Hazelcast cluster which uses this plugin.

hazelcast-azure's People

Contributors

devopshazelcast avatar hasancelik avatar bilalyasar avatar serdaro avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.