Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates README to use YAML instead of XML #121

Merged
merged 2 commits into from
Jan 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 50 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This repository contains a plugin which provides the automatic Hazelcast member

## Embedded mode

To use Hazelcast embedded in your application, you need to add the plugin dependency into your Maven/Gradle file. Then, when you provide `hazelcast.xml` as presented below or an equivalent Java-based configuration, your Hazelcast instances discover themselves automatically.
To use Hazelcast embedded in your application, you need to add the plugin dependency into your Maven/Gradle file. Then, when you provide `hazelcast.yaml` as presented below or an equivalent Java-based configuration, your Hazelcast instances discover themselves automatically.

#### Maven

Expand Down Expand Up @@ -45,26 +45,26 @@ The plugin supports **Members Discovery SPI** and **Zone Aware** features.

Make sure you have the `hazelcast-aws.jar` dependency in your classpath. Then, you can configure Hazelcast in one of the following manners.

#### XML Configuration

```xml
<hazelcast>
<network>
<join>
<multicast enabled="false"/>
<aws enabled="true">
<access-key>my-access-key</access-key>
<secret-key>my-secret-key</secret-key>
<region>us-west-1</region>
<security-group-name>hazelcast</security-group-name>
<tag-key>aws-test-cluster</tag-key>
<tag-value>cluster1</tag-value>
<hz-port>5701-5708</hz-port>
<connection-retries>3</connection-retries>
</aws>
</join>
</network>
</hazelcast>
#### YAML Configuration

```yaml
hazelcast:
network:
join:
multicast:
enabled: false
aws:
enabled: false
access-key: my-access-key
secret-key: my-secret-key
iam-role: dummy
region: us-west-1
host-header: ec2.amazonaws.com
security-group-name: hazelcast-sg
tag-key: type
tag-value: hz-nodes
hz-port: 5701-5708
connection-retries: 3
```

#### Java-based Configuration
Expand Down Expand Up @@ -102,10 +102,13 @@ Note that:

When using `ZONE_AWARE` configuration, backups are created in the other Availability Zone.

#### XML Configuration
#### YAML Configuration

```xml
<partition-group enabled="true" group-type="ZONE_AWARE" />
```yaml
hazelcast:
partition-group:
enabled: true
group-type: ZONE-AWARE
```

#### Java-based Configuration
Expand All @@ -129,24 +132,21 @@ If Hazelcast Client is run outside AWS, then you always need to specify the foll

Following are example declarative and programmatic configuration snippets.

#### XML Configuration

```xml
<hazelcast-client>
<network>
<aws enabled="true">
<access-key>my-access-key</access-key>
<secret-key>my-secret-key</secret-key>
<region>us-west-1</region>
<security-group-name>hazelcast</security-group-name>
<tag-key>aws-test-cluster</tag-key>
<tag-value>cluster1</tag-value>
<hz-port>5701-5708</hz-port>
<connection-retries>3</connection-retries>
<use-public-ip>true</use-public-ip>
</aws>
</network>
</hazelcast-client>
#### YAML Configuration

```yaml
hazelcast-client:
network:
aws:
enabled: true
access-key: TEST_ACCESS_KEY
secret-key: TEST_SECRET_KEY
region: us-east-1
security-group-name: hazelcast-sg
tag-key: type
tag-value: hz-nodes
connection-retries: 3
use-public-ip: true
```

#### Java-based Configuration
Expand All @@ -171,11 +171,14 @@ In order to enable discovery within AWS ECS Cluster, within `taskdef.json` or co
"networkMode": "host"
```

Also, cluster member should have below interface binding in `hazelcast.xml` configuration file.
```
<interfaces enabled="true">
<interface>10.0.*.*</interface>
</interfaces>
Also, cluster member should have below interface binding in `hazelcast.yaml` configuration file.
```yaml
hazelcast:
network:
interfaces:
enabled: true
interfaces:
- 10.0.*.*
```
Please note that `10.0.*.*` value depends on your CIDR block definition.
If more than one `subnet` or `custom VPC` is used for cluster, it should be checked that `container instances` within cluster have network connectivity or have `tracepath` to each other.
Expand Down